1 2020-10-23 Jonathan Wakely <jwakely@redhat.com>
3 * include/experimental/memory_resource: Include <tuple>.
4 (polymorphic_allocator::construct): Qualify forward_as_tuple.
5 * include/std/memory_resource: Likewise.
7 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
9 * testsuite/30_threads/condition_variable/members/68519.cc:
10 Define recent_epoch_float_clock::duration to meet the Cpp17Clock
13 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
15 * include/std/shared_mutex: Only include <condition_variable>
16 when pthread_rwlock_t and POSIX timers are not available.
17 (__cpp_lib_shared_mutex, __cpp_lib_shared_timed_mutex): Change
18 value to be type 'long'.
19 * include/std/version (__cpp_lib_shared_mutex)
20 (__cpp_lib_shared_timed_mutex): Likewise.
22 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
24 * include/Makefile.am: Add new header.
25 * include/Makefile.in: Regenerate.
26 * include/bits/shared_ptr.h: Include <iosfwd>.
27 * include/bits/shared_ptr_base.h: Include required headers here
28 directly, instead of in <memory>.
29 * include/bits/uses_allocator_args.h: New file. Move utility
30 functions for uses-allocator construction from <memory> to here.
31 Only define the utility functions when concepts are available.
32 (__cpp_lib_make_obj_using_allocator): Define non-standard
34 * include/std/condition_variable: Remove unused headers.
35 * include/std/future: Likewise.
36 * include/std/memory: Remove headers that are not needed
37 directly, and are now inclkuded where they're needed. Include
38 new <bits/uses_allocator_args.h> header.
39 * include/std/memory_resource: Include only the necessary
40 headers. Use new feature test macro to detect support for the
42 * include/std/scoped_allocator: Likewise.
43 * include/std/version (__cpp_lib_make_obj_using_allocator):
46 2020-10-22 Olivier Hainque <hainque@adacore.com>
48 * crossconfig.m4: Turn vxworks matcher into vxworks*.
49 * configure.host: Likewise.
50 * configure: Regenerate.
52 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
54 * include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
56 * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock):
57 Remove specializations and just call _M_add_ref_lock_nothrow.
58 (__shared_count, __shared_ptr): Use nullptr for null pointer
60 (__shared_count(const __weak_count&)): Use _M_add_ref_lock_nothrow
61 instead of _M_add_ref_lock.
62 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept.
63 (__shared_ptr::operator bool()): Add noexcept.
64 (__shared_ptr(const __weak_ptr&, nothrow_t)): Add noexcept.
66 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
69 * include/bits/ranges_util.h (tuple_size<subrange>)
70 (tuple_element<I, cv subrange>): Move here from ...
71 * include/std/ranges: ... here.
72 * testsuite/std/ranges/subrange/97512.cc: New test.
74 2020-10-21 Thomas Rodgers <trodgers@redhat.com>
76 * include/pstl/algorithm_impl.h: Update file.
77 * include/pstl/execution_impl.h: Likewise.
78 * include/pstl/glue_algorithm_impl.h: Likewise.
79 * include/pstl/glue_memory_impl.h: Likewise.
80 * include/pstl/glue_numeric_impl.h: Likewise.
81 * include/pstl/memory_impl.h: Likewise.
82 * include/pstl/numeric_impl.h: Likewise.
83 * include/pstl/parallel_backend.h: Likewise.
84 * include/pstl/parallel_backend_serial.h: Likewise.
85 * include/pstl/parallel_backend_tbb.h: Likewise.
86 * include/pstl/parallel_backend_utils.h: Likewise.
87 * include/pstl/pstl_config.h: Likewise.
88 * include/pstl/unseq_backend_simd.h: Likewise.
90 2020-10-20 François Dumont <fdumont@gcc.gnu.org>
92 * include/bits/hashtable_policy.h
93 (_Hash_node_value_base<>): Remove _Hash_node_base inheritance.
94 (_Hash_node_code_cache<bool _Cache_hash_code>): New.
95 (_Hash_node_value<typename _Value, bool _Cache_hash_code>): New.
96 (_Hash_node<>): Inherits _Hash_node_base<> and _Hash_node_value<>.
97 (_Map_base<>::__node_type): Remove.
98 (_Map_base<>::iterator): Remove.
99 (_Insert_base<>::__hash_cached): New.
100 (_Insert_base<>::__constant_iterators): New.
101 (_Insert_base<>::__hashtable_alloc): New.
102 (_Insert_base<>::__node_type): Remove.
103 (_Insert_base<>::__node_ptr): New.
104 (_Hash_code_base<>): Remove specializations.
105 (_Hash_code_base<>::__node_type): Remove.
106 (_Hash_code_base<>::_M_bucket_index(const __node_type*, size_t)):
108 (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)):
110 (_Hash_code_base<>::_M_store_code(__node_type*, __hash_code)):
112 (_Hash_code_base<>::_M_store_code(_Hash_node_code_cache<>&, __hash_code)):
114 (_Hash_code_base<>::_M_copy_code(__node_type*, const __node_type*)):
116 (_Hash_code_base<>::_M_copy_code(_Hash_node_code_cache<>&,
117 const _Hash_node_code_base<>&)): ...this.
118 (_Hashtable_base<>::__constant_iterators): Remove.
119 (_Hashtable_base<>::__unique_keys): Remove.
120 (_Hashtable_base<>::__node_type): Remove.
121 (_Hashtable_base<>::iterator): Remove.
122 (_Hashtable_base<>::const_iterator): Remove.
123 (_Hashtable_base<>::local_iterator): Remove.
124 (_Hashtable_base<>::const_local_iterator): Remove.
125 (_Hashtable_base<>::__ireturn_type): Remove.
126 (_Hashtable_base<>::_Equal_hash_code<>::_S_equals): Replace by...
127 (_Hashtable_base<>::_S_equals(__hash_code, const _Hash_node_code_hash<>&)):
129 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals): Replace by...
130 (_Hashtable_base<>::_S_node_equals(__hash_code,
131 const _Hash_node_code_hash<>&)): ...this.
132 (_Hashtable_base<>::_Equal_hash_code<>): Remove.
133 (_Hashtable_base<>::_M_equals): Adapt.
134 (_Hashtable_baxe<>::_M_node_equals): Adapt.
135 (_Equality<>::_M_equal): Adapt.
136 (_Hashtable_alloc<>::__node_ptr): New.
137 (_Hashtable_alloc<>::__bucket_type): Rename into...
138 (_Hashtable_alloc<>::__node_base_ptr): ...this.
139 (_Hashtable_alloc<>::__bucket_alloc_type): Rename into...
140 (_Hashtable_alloc<>::__buckets_alloc_type): ...this.
141 (_Hashtable_alloc<>::__bucket_alloc_traits): Rename into...
142 (_Hashtable_alloc<>::__buckets_alloc_traits): ...this.
143 (_Hashtable_alloc<>::__buckets_ptr): New.
144 (_Hashtable_alloc<>::_M_allocate_node): Adapt.
145 (_Hashtable_alloc<>::_M_deallocate_node): Adapt.
146 (_Hashtable_alloc<>::_M_deallocate_node_ptr): Adapt.
147 (_Hashtable_alloc<>::_M_deallocate_nodes): Adapt.
148 (_Hashtable_alloc<>::_M_allocate_buckets): Adapt.
149 (_Hashtable_alloc<>::_M_deallocate_buckets): Adapt.
150 * include/bits/hashtable.h (_Hashtable<>): Adapt.
152 2020-10-20 Aldy Hernandez <aldyh@redhat.com>
154 * testsuite/21_strings/basic_string/capacity/1.cc: Pass
155 -Wno-stringop-overflow to test.
157 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
160 * include/std/coroutine (__noop_coro_frame): Replace with
161 noop_coroutine_handle::__frame.
162 (__dummy_resume_destroy): Define inline in __frame.
163 (__noop_coro_fr): Replace with noop_coroutine_handle::_S_fr
164 and define as inline.
165 * testsuite/18_support/coroutines/95917.cc: New test.
167 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
169 * include/std/coroutine (coroutine_handle<_Promise>): Remove
170 base class. Add constructors, conversions, accessors etc. as
171 proposed for LWG 3460.
172 (coroutine_handle<noop_coroutine_promise>): Likewise.
173 * testsuite/18_support/coroutines/lwg3460.cc: New test.
175 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
177 * include/bits/unique_ptr.h (make_unique_for_overwrite): Define
179 * testsuite/20_util/unique_ptr/creation/array_neg.cc: Remove
180 unused header. Adjust standard reference.
181 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: New test.
182 * testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc: New test.
184 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
186 * include/std/tuple (_Head_base<Idx, Head, true>): Use reserved
187 form of __no_unique_address__ attribute because
188 no_unique_address is not reserved prior to C++20.
190 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
192 * include/bits/node_handle.h (_Node_handle_common): Replace
193 std::optional with custom type.
194 * testsuite/20_util/variant/exception_safety.cc: Add missing
197 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
199 * include/precompiled/expc++.h: Removed.
201 2020-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
204 * include/std/variant
205 (__gen_vtable_impl<>::_S_apply_single_alt):
206 Diagnose visitor return type mismatches here..
207 (__gen_vtable_impl</*base case*/>::_S_apply):
210 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
212 * include/std/concepts: Fix typos in copyright notice.
213 * include/std/ranges: Likewise.
215 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
218 * include/std/sstream (basic_stringbuf::str()): Check for
219 null egptr() before comparing to non-null pptr().
221 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
223 * testsuite/21_strings/basic_string/modifiers/assign/char/move_assign_optim.cc:
224 Do not generate debug info.
225 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign_optim.cc:
228 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
230 * include/bits/basic_string.h (basic_string(const Alloc&))
231 (basic_string(const basic_string&)
232 (basic_string(const CharT*, size_type, const Alloc&))
233 (basic_string(const CharT*, const Alloc&))
234 (basic_string(size_type, CharT, const Alloc&))
235 (basic_string(initializer_list<CharT>, const Alloc&))
236 (basic_string(InputIterator, InputIterator, const Alloc&)):
237 Define inline in class body.
238 * include/bits/basic_string.tcc (basic_string(const Alloc&))
239 (basic_string(const basic_string&)
240 (basic_string(const CharT*, size_type, const Alloc&))
241 (basic_string(const CharT*, const Alloc&))
242 (basic_string(size_type, CharT, const Alloc&))
243 (basic_string(initializer_list<CharT>, const Alloc&))
244 (basic_string(InputIterator, InputIterator, const Alloc&)):
245 Move definitions into class body.
247 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
249 * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi):
250 Add comments about which test flags get used by the check.
252 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
254 * testsuite/21_strings/basic_string/allocator/char/copy.cc: Make
255 comment more precise about what isn't supported by COW strings.
256 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
258 * testsuite/21_strings/basic_string/allocator/char/move.cc:
260 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
262 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
264 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
266 * testsuite/21_strings/basic_string/allocator/char/swap.cc:
268 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
270 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
272 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
274 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
276 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
278 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
280 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
283 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
285 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
286 Do not require cxx11-abi effective target.
287 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
289 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
291 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
293 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
294 (basic_string(const _CharT*, const _Alloc&)): Constrain to
295 require an allocator-like type to fix CTAD ambiguity (LWG 3706).
296 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
298 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
301 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
303 * include/bits/stl_algo.h (any_of): Fix incorrect description
306 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
308 * doc/xml/manual/evolution.xml: Document some API changes
310 * doc/xml/manual/intro.xml: Document LWG 2499.
311 * doc/xml/manual/status_cxx2020.xml: Update status.
312 * doc/html/*: Regenerate.
314 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
316 * doc/xml/book.txml: Remove trailing whitespace.
317 * doc/xml/chapter.txml: Likewise.
318 * doc/xml/class.txml: Likewise.
319 * doc/xml/gnu/fdl-1.3.xml: Likewise.
320 * doc/xml/gnu/gpl-3.0.xml: Likewise.
321 * doc/xml/manual/abi.xml: Likewise.
322 * doc/xml/manual/algorithms.xml: Likewise.
323 * doc/xml/manual/allocator.xml: Likewise.
324 * doc/xml/manual/appendix_contributing.xml: Likewise.
325 * doc/xml/manual/appendix_free.xml: Likewise.
326 * doc/xml/manual/appendix_porting.xml: Likewise.
327 * doc/xml/manual/atomics.xml: Likewise.
328 * doc/xml/manual/auto_ptr.xml: Likewise.
329 * doc/xml/manual/backwards_compatibility.xml: Likewise.
330 * doc/xml/manual/bitmap_allocator.xml: Likewise.
331 * doc/xml/manual/build_hacking.xml: Likewise.
332 * doc/xml/manual/codecvt.xml: Likewise.
333 * doc/xml/manual/concurrency.xml: Likewise.
334 * doc/xml/manual/concurrency_extensions.xml: Likewise.
335 * doc/xml/manual/configure.xml: Likewise.
336 * doc/xml/manual/containers.xml: Likewise.
337 * doc/xml/manual/ctype.xml: Likewise.
338 * doc/xml/manual/debug.xml: Likewise.
339 * doc/xml/manual/debug_mode.xml: Likewise.
340 * doc/xml/manual/diagnostics.xml: Likewise.
341 * doc/xml/manual/documentation_hacking.xml: Likewise.
342 * doc/xml/manual/evolution.xml: Likewise.
343 * doc/xml/manual/internals.xml: Likewise.
344 * doc/xml/manual/intro.xml: Likewise.
345 * doc/xml/manual/io.xml: Likewise.
346 * doc/xml/manual/iterators.xml: Likewise.
347 * doc/xml/manual/locale.xml: Likewise.
348 * doc/xml/manual/localization.xml: Likewise.
349 * doc/xml/manual/messages.xml: Likewise.
350 * doc/xml/manual/mt_allocator.xml: Likewise.
351 * doc/xml/manual/numerics.xml: Likewise.
352 * doc/xml/manual/parallel_mode.xml: Likewise.
353 * doc/xml/manual/policy_data_structures.xml: Likewise.
354 * doc/xml/manual/prerequisites.xml: Likewise.
355 * doc/xml/manual/shared_ptr.xml: Likewise.
356 * doc/xml/manual/spine.xml: Likewise.
357 * doc/xml/manual/status_cxxtr1.xml: Likewise.
358 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
359 * doc/xml/manual/strings.xml: Likewise.
360 * doc/xml/manual/support.xml: Likewise.
361 * doc/xml/manual/test.xml: Likewise.
362 * doc/xml/manual/test_policy_data_structures.xml: Likewise.
363 * doc/xml/manual/using.xml: Likewise.
364 * doc/xml/manual/using_exceptions.xml: Likewise.
365 * doc/xml/manual/utilities.xml: Likewise.
366 * doc/html/*: Regenerate.
368 2020-10-12 Patrick Palka <ppalka@redhat.com>
370 * include/std/ranges (take_while_view::begin): Constrain the
371 const overload further as per LWG 3450.
372 (take_while_view::end): Likewise.
373 * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
376 2020-10-12 Patrick Palka <ppalka@redhat.com>
379 * include/std/ranges (take_view::_CI): Define this alias
380 template as per LWG 3449 and remove ...
381 (take_view::_Sentinel::_CI): ... this type alias.
382 (take_view::_Sentinel::operator==): Adjust use of _CI
383 accordingly. Define a second overload that accepts an iterator
384 of the opposite constness as per LWG 3449.
385 (take_while_view::_Sentinel::operator==): Likewise.
386 * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
388 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
390 * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
392 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
394 * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
395 so that C++17 features are documented.
397 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
399 * include/bits/stl_algobase.h (copy, move, copy_backward)
400 (move_backward): Fix documentation for returned iterator.
402 2020-10-12 Martin Sebor <msebor@redhat.com>
405 * libsupc++/new (operator new): Add attribute alloc_size and malloc.
407 2020-10-11 Clement Chigot <clement.chigot@atos.net>
409 * config/os/aix/t-aix: Add complementary mode object file to
412 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
415 * doc/html/manual/source_code_style.html: Regenerate.
416 * doc/xml/manual/appendix_contributing.xml: Add __deref to
418 * include/debug/functions.h (_Irreflexive_checker::__deref):
420 * testsuite/17_intro/badnames.cc: Check __deref.
422 2020-10-10 Ville Voutilainen <ville.voutilainen@gmail.com>
424 * include/std/variant (__check_visitor_result):
425 Use size_t for indexes.
426 (__check_visitor_results): Likewise.
428 2020-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
431 * include/std/variant (__deduce_visit_result): Add a nested ::type.
432 (__gen_vtable_impl</*base case*/>::_S_apply):
433 Check the visitor return type.
435 (__check_visitor_result): Likewise.
436 (__check_visitor_results): Likewise.
437 (visit(_Visitor&&, _Variants&&...)): Use __check_visitor_results
438 in case we're visiting just one variant.
439 * testsuite/20_util/variant/visit_neg.cc: Adjust.
441 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
444 * include/bits/random.tcc (seed_seq::generate): Use uint32_t for
445 calculations. Also split the first loop into three loops to
446 avoid branching on k on every iteration, resolving PR 94823.
447 * testsuite/26_numerics/random/seed_seq/97311.cc: New test.
448 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-erro
451 2020-10-09 Daniel Lemire <lemire@gmail.com>
453 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
454 New member function implementing Lemire's "nearly divisionless"
456 (uniform_int_distribution::operator()): Use _S_nd when the range
457 of the URBG is the full width of the result type.
459 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
461 * testsuite/Makefile.am: Set and export variable separately.
462 * testsuite/Makefile.in: Regenerate.
464 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
466 * scripts/check_performance: Use gnu++11 instead of gnu++0x.
467 * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
469 * testsuite/Makefile.in: Regenerate.
471 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
473 * testsuite/performance/26_numerics/random_dist.cc: New test.
475 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
477 * testsuite/util/testsuite_performance.h (report_header): Remove
480 2020-10-08 Patrick Palka <ppalka@redhat.com>
483 * include/bits/ranges_uninitialized.h:
484 (__construct_at_fn::operator()): Rewrite in terms of
485 std::construct_at. Declare it conditionally noexcept. Qualify
486 calls to declval in its requires-clause.
487 * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
490 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
493 * include/bits/random.tcc
494 (discrete_distribution::param_type::_M_initialize)
495 (piecewise_constant_distribution::param_type::_M_initialize)
496 (piecewise_linear_distribution::param_type::_M_initialize):
497 Add assertions for positive sums..
498 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
501 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
503 * include/bits/ios_base.h (ios_base::failure): Add constructors
504 takeing error_code argument. Add code() member function.
505 * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
506 run for the old ABI but do not check for derivation from
508 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
510 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
512 * include/bits/random.h (__detail::_Mod): Revert last change.
513 (__detail::__mod): Do not use _Mod for a==0 case.
514 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
515 Check other cases with a==0. Also check runtime results.
516 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
519 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
521 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
522 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
525 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
527 * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
528 parameter to use reserved name.
529 * include/bits/ranges_algo.h (shift_left, shift_right): Rename
530 template parameters to use reserved name.
531 * libsupc++/exception_ptr.h (exception_ptr): Likewise for
532 parameters and local variables.
533 * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
536 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
539 * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
540 (exception_ptr::_M_addref(), exception_ptr::_M_release()):
542 * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
543 Remove out-of-line definition.
544 (exception_ptr::exception_ptr(const exception_ptr&)):
546 (exception_ptr::~exception_ptr()): Likewise.
547 (exception_ptr::operator=(const exception_ptr&)):
549 (exception_ptr::swap(exception_ptr&)): Likewise.
550 (exception_ptr::_M_addref()): Add branch prediction.
551 * libsupc++/exception_ptr.h (exception_ptr::operator bool):
553 [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
554 inline as hidden friends. Remove declarations at namespace
556 (exception_ptr::exception_ptr()): Define inline.
557 (exception_ptr::exception_ptr(const exception_ptr&)):
559 (exception_ptr::~exception_ptr()): Likewise.
560 (exception_ptr::operator=(const exception_ptr&)):
562 (exception_ptr::swap(exception_ptr&)): Likewise.
563 * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.13.
564 * testsuite/18_support/exception_ptr/90295.cc: New test.
566 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
568 * include/std/ranges (join_view): Remove deduction guide.
569 (views::join): Add explicit template argument list to prevent
570 deducing the wrong type.
571 * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
573 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
575 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
577 * include/bits/regex.h: Use __int_traits<int> instead of
578 std::numeric_limits<int>.
579 * include/bits/uniform_int_dist.h: Use __int_traits<T>::__max
580 instead of std::numeric_limits<T>::max().
581 * include/bits/hashtable_policy.h: Use size_t(-1) instead of
582 std::numeric_limits<size_t>::max().
583 * include/std/regex: Include <ext/numeric_traits.h>.
584 * include/std/string_view: Use typedef for __int_traits<int>.
585 * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of
586 std::numeric_limits<size_t>::max().
587 * testsuite/std/ranges/iota/96042.cc: Include <limits>.
588 * testsuite/std/ranges/iota/difference_type.cc: Likewise.
589 * testsuite/std/ranges/subrange/96042.cc: Likewise.
591 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
593 * include/std/numeric: Move all #include directives to the top
595 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
597 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
599 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
601 * config/abi/pre/gnu.ver: Add new symbol.
602 * include/bits/functexcept.h (__throw_bad_array_new_length):
603 Declare new function.
604 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
605 Throw bad_array_new_length for impossible sizes (LWG 3190).
606 * include/ext/new_allocator.h (new_allocator::allocate):
608 * include/std/memory_resource (polymorphic_allocator::allocate)
609 (polymorphic_allocator::allocate_object): Use new function,
610 __throw_bad_array_new_length.
611 * src/c++11/functexcept.cc (__throw_bad_array_new_length):
613 * testsuite/20_util/allocator/lwg3190.cc: New test.
615 2020-10-05 Mike Crowe <mac@mcrowe.com>
618 * include/bits/atomic_futex.h:
619 (__atomic_futex_unsigned::_M_load_when_equal_until): Use target
620 clock duration type when rounding.
621 * testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
622 Rename from test_pr91486.
623 (float_steady_clock): New class for test.
624 (test_pr91486_wait_until): New test.
626 2020-10-05 Mike Crowe <mac@mcrowe.com>
628 * testsuite/20_util/duration_cast/rounding_c++11.cc: Copy
629 rounding.cc and alter to support compilation for C++11 and to
630 test std::chrono::__detail::ceil.
632 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
634 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
635 instead of double so that __atomic_load_8 isn't needed.
637 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
639 * testsuite/18_support/96817.cc: Use terminate handler that
642 2020-10-02 Patrick Palka <ppalka@redhat.com>
644 * include/bits/stl_iterator.h (reverse_iterator::iter_move):
645 Define for C++20 as per P0896.
646 (reverse_iterator::iter_swap): Likewise.
647 (move_iterator::operator*): Apply P0896 changes for C++20.
648 (move_iterator::operator[]): Likewise.
649 * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
651 2020-10-01 Jonathan Wakely <jwakely@redhat.com>
653 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
654 Do not try to dereference return value of __atomic_load_n.
656 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
658 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
659 (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
661 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
663 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_SAME):
664 Define for GCC 11 or when !__is_identifier(__is_same).
665 (_GLIBCXX_BUILTIN_IS_SAME_AS): Remove.
666 * include/std/type_traits (is_same, is_same_v): Replace uses
667 of _GLIBCXX_BUILTIN_IS_SAME_AS.
669 2020-09-28 Patrick Palka <ppalka@redhat.com>
671 * include/std/ranges (filter_view): Declare the data member
672 _M_base last instead of first, and adjust constructors' member
673 initializer lists accordingly.
674 (transform_view): Likewise.
675 (take_view): Likewise.
676 (take_while_view): Likewise.
677 (drop_view): Likewise.
678 (drop_while_view): Likewise.
679 (join_view): Likewise.
680 (split_view): Likewise (and tweak nearby formatting).
681 (reverse_view): Likewise.
682 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected
685 2020-09-28 Patrick Palka <ppalka@redhat.com>
687 * testsuite/std/ranges/adaptors/sizeof.cc: New test.
689 2020-09-28 Patrick Palka <ppalka@redhat.com>
691 * include/bits/ranges_util.h (subrange::_M_end): Give it
692 [[no_unique_address]].
693 * testsuite/std/ranges/subrange/sizeof.cc: New test.
695 2020-09-28 Patrick Palka <ppalka@redhat.com>
697 * include/std/ranges (iota_view::_M_bound): Give it
698 [[no_unique_address]].
699 * testsuite/std/ranges/iota/iota_view.cc: Check that an
700 unbounded iota_view has minimal size.
702 2020-09-27 Clement Chigot <clement.chigot@atos.net>
704 * config/os/aix/t-aix: Use $(AR) without -X32_64.
706 2020-09-26 Jonathan Wakely <jwakely@redhat.com>
709 * include/ext/atomicity.h (__gnu_cxx::__is_single_threaded()):
710 New function wrapping __libc_single_threaded if available.
711 (__exchange_and_add_dispatch, __atomic_add_dispatch): Use it.
712 * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_abort)
713 (__cxa_guard_release): Likewise.
714 * testsuite/18_support/96817.cc: New test.
716 2020-09-25 Jonathan Wakely <jwakely@redhat.com>
718 * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
719 * libsupc++/Makefile.in: Regenerate.
721 2020-09-24 Antony Polukhin <antoshkka@gmail.com>
724 * include/std/type_traits (invoke_result, is_invocable)
725 (is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r):
726 Add static_asserts to make sure that the arguments of the type
727 traits are not misused with incomplete types.
728 * testsuite/20_util/invoke_result/incomplete_args_neg.cc: New test.
729 * testsuite/20_util/is_invocable/incomplete_args_neg.cc: New test.
730 * testsuite/20_util/is_invocable/incomplete_neg.cc: New test.
731 * testsuite/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
733 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
734 for error on incomplete type usage in trait.
736 2020-09-24 Patrick Palka <ppalka@redhat.com>
738 * include/std/ranges (__detail::__boxable): Split out the
739 associated constraints of __box into here.
740 (__detail::__box): Use the __boxable concept. Define a leaner
741 partial specialization for semiregular types.
742 (single_view::_M_value): Give it [[no_unique_address]].
743 (filter_view::_M_pred): Likewise.
744 (transform_view::_M_fun): Likewise.
745 (take_while_view::_M_pred): Likewise.
746 (drop_while_view::_M_pred):: Likewise.
747 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc: New
750 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
752 * doc/xml/manual/configure.xml: Correct name of option.
753 * doc/html/*: Regenerate.
755 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
758 * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
759 for empty string before inspecting the first character.
760 * testsuite/27_io/filesystem/path/append/source.cc: Append
761 empty string_view to path.
763 2020-09-22 Glen Joseph Fernandes <glenjofe@gmail.com>
765 * include/bits/align.h (align): Fix overflow handling.
766 * testsuite/20_util/align/3.cc: New test.
768 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
770 * include/Makefile.am: Add new headers and adjust for renamed
772 * include/Makefile.in: Regenerate.
773 * include/bits/iterator_concepts.h: Adjust for renamed header.
774 * include/bits/range_access.h (ranges::*): Move to new
775 <bits/ranges_base.h> header.
776 * include/bits/ranges_algobase.h: Include new <bits/ranges_base.h>
777 header instead of <ranges>.
778 * include/bits/ranges_algo.h: Include new <bits/ranges_util.h>
780 * include/bits/range_cmp.h: Moved to...
781 * include/bits/ranges_cmp.h: ...here.
782 * include/bits/ranges_base.h: New header.
783 * include/bits/ranges_util.h: New header.
784 * include/experimental/string_view: Include new
785 <bits/ranges_base.h> header.
786 * include/std/functional: Adjust for renamed header.
787 * include/std/ranges (ranges::view_base, ranges::enable_view)
788 (ranges::dangling, ranges::borrowed_iterator_t): Move to new
789 <bits/ranges_base.h> header.
790 (ranges::view_interface, ranges::subrange)
791 (ranges::borrowed_subrange_t): Move to new <bits/ranges_util.h>
793 * include/std/span: Include new <bits/ranges_base.h> header.
794 * include/std/string_view: Likewise.
795 * testsuite/24_iterators/back_insert_iterator/pr93884.cc: Add
796 missing <ranges> header.
797 * testsuite/24_iterators/front_insert_iterator/pr93884.cc:
800 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
804 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
805 Use correct value category in __use_alloc call.
806 * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
807 that require correct value category to be used.
809 2020-09-22 Patrick Palka <ppalka@redhat.com>
811 * include/std/span (span::front): Remove static_assert.
812 (span::back): Likewise.
813 (span::operator[]): Likewise.
814 * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
815 that we check the preconditions of back() only when it's called.
816 * testsuite/23_containers/span/front_neg.cc: Likewise for
818 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
821 2020-09-22 Patrick Palka <ppalka@redhat.com>
823 * include/bits/stl_algo.h (__sample): Exit early when the
824 input range is empty.
825 * testsuite/25_algorithms/sample/3.cc: New test.
827 2020-09-22 Patrick Palka <ppalka@redhat.com>
829 * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
830 (search): Likewise for the overload that takes a searcher.
831 * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
833 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
834 std::search overload that takes a searcher.
836 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
838 * include/bits/c++config (__replacement_assert): Add noreturn
840 (__glibcxx_assert_impl): Use __builtin_expect to hint that the
841 assertion is expected to pass.
843 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
845 * include/std/ranges (drop_view::begin()): Adjust constraints
846 to match the correct condition for O(1) ranges::next (LWG 3482).
847 * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
848 cached for non-sized_range.
850 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
852 * include/std/ranges (transform_view, elements_view): Relax
853 constraints on operator- for iterators, as per LWG 3483.
854 * testsuite/std/ranges/adaptors/elements.cc: Check that we
855 can take the difference of two iterators from a non-random
857 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
859 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
862 * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
864 (assume_aligned): Do not use __builtin_assume_aligned during
866 * testsuite/20_util/assume_aligned/1.cc: Improve test.
867 * testsuite/20_util/assume_aligned/97132.cc: New test.
869 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
872 * include/std/functional (bind_front): Fix order of parameters
873 in is_nothrow_constructible_v specialization.
874 * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
876 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
878 * include/std/memory: Move #include <bits/align.h> inside C++11
879 conditional includes.
881 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
883 * include/Makefile.am (bits_headers): Add new header.
884 * include/Makefile.in: Regenerate.
885 * include/bits/align.h: New file.
886 * include/std/memory (align): Move definition to bits/align.h.
887 (assume_aligned): Likewise.
889 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
891 * include/std/chrono [C++17] (chrono::__detail::ceil): Add
892 using declaration to make chrono::ceil available for internal
893 use with a consistent name.
894 (chrono::__detail::__ceil_impl): New function template.
895 (chrono::__detail::ceil): Use __ceil_impl to compare and
896 increment the value. Remove SFINAE constraint.
898 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
900 * include/bits/regex_error.h (__throw_regex_error): Fix
901 parameter declaration and use reserved attribute names.
903 2020-09-11 Mike Crowe <mac@mcrowe.com>
905 * include/std/condition_variable (condition_variable::wait_until):
906 Convert delta to steady_clock duration before adding to current
907 steady_clock time to avoid rounding errors described in PR68519.
908 (condition_variable::wait_for): Simplify calculation of absolute
909 time by using chrono::__detail::ceil in both overloads.
910 * testsuite/30_threads/condition_variable/members/68519.cc:
911 (test_wait_for): Renamed from test01. Replace unassigned val
912 variable with constant false. Reduce scope of mx and cv
913 variables to just test_wait_for function.
914 (test_wait_until): Add new test case.
916 2020-09-11 Mike Crowe <mac@mcrowe.com>
919 * include/bits/atomic_futex.h
920 (__atomic_futex_unsigned::_M_load_when_equal_for)
921 (__atomic_futex_unsigned::_M_load_when_equal_until): Use
922 __detail::ceil to convert delta to the reference clock
923 duration type to avoid resolution problems.
924 * include/std/chrono (__detail::ceil): Move implementation
925 of std::chrono::ceil into private namespace so that it's
926 available to pre-C++17 code.
927 * testsuite/30_threads/async/async.cc (test_pr91486):
928 Test __atomic_futex_unsigned::_M_load_when_equal_for.
930 2020-09-11 Mike Crowe <mac@mcrowe.com>
932 * include/bits/atomic_futex.h
933 (__atomic_futex_unsigned::_M_load_when_equal_until): Add
934 loop on generic _Clock to check the timeout against _Clock
935 again after _M_load_when_equal_until returns indicating a
937 * testsuite/30_threads/async/async.cc: Invent slow_clock
938 that runs at an eleventh of steady_clock's speed. Use it
939 to test the user-supplied-clock variant of
940 __atomic_futex_unsigned::_M_load_when_equal_until works
941 generally with test03 and loops correctly when the timeout
942 time hasn't been reached in test04.
944 2020-09-11 Mike Crowe <mac@mcrowe.com>
947 * include/bits/atomic_futex.h (__atomic_futex_unsigned): Change
948 __clock_t typedef to use steady_clock so that unknown clocks are
949 synced to it rather than system_clock. Change existing __clock_t
950 overloads of _M_load_and_text_until_impl and
951 _M_load_when_equal_until to use system_clock explicitly. Remove
952 comment about DR 887 since these changes address that problem as
953 best as we currently able.
955 2020-09-11 Mike Crowe <mac@mcrowe.com>
958 * config/abi/pre/gnu.ver: Update for addition of
959 __atomic_futex_unsigned_base::_M_futex_wait_until_steady.
960 * include/bits/atomic_futex.h (__atomic_futex_unsigned_base):
961 Add comments to clarify that _M_futex_wait_until and
962 _M_load_and_test_until use CLOCK_REALTIME.
963 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady)
964 (__atomic_futex_unsigned_base::_M_load_and_text_until_steady):
965 New member functions that use CLOCK_MONOTONIC.
966 (__atomic_futex_unsigned_base::_M_load_and_test_until_impl)
967 (__atomic_futex_unsigned_base::_M_load_when_equal_until): Add
968 overloads that accept a steady_clock time_point and use the
969 new member functions.
970 * src/c++11/futex.cc: Include headers required for
972 (futex_clock_monotonic_flag): New constant to tell futex to
973 use CLOCK_MONOTONIC to match existing futex_clock_realtime_flag.
974 (futex_clock_monotonic_unavailable): New global to store the
975 result of trying to use CLOCK_MONOTONIC.
976 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Add
977 new variant of _M_futex_wait_until that uses CLOCK_MONOTONIC to
978 support waiting using steady_clock.
980 2020-09-11 Mike Crowe <mac@mcrowe.com>
982 * src/c++11/futex.cc: Add new constants for required futex
983 flags. Add futex_clock_realtime_unavailable flag to store
984 result of trying to use FUTEX_CLOCK_REALTIME.
985 (__atomic_futex_unsigned_base::_M_futex_wait_until): Try to
986 use FUTEX_WAIT_BITSET with FUTEX_CLOCK_REALTIME and only
987 fall back to using gettimeofday and FUTEX_WAIT if that's not
990 2020-09-11 Mike Crowe <mac@mcrowe.com>
992 * testsuite/30_threads/async/async.cc (test02): Test steady_clock
993 with std::future::wait_until.
994 (test03): Add new test templated on clock type waiting for future
995 associated with async to resolve.
996 (main): Call test03 to test both system_clock and steady_clock.
998 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
999 Christophe Lyon <christophe.lyon@linaro.org>
1001 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
1003 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
1004 Christophe Lyon <christophe.lyon@linaro.org>
1006 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
1008 2020-09-11 Christophe Lyon <christophe.lyon@linaro.org>
1010 * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
1012 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1014 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
1015 Add casts to compare types of the same signedness.
1017 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1019 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
1022 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1024 * include/std/version (__cpp_lib_array_constexpr):
1025 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
1028 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1030 * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
1031 (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
1032 warnings for uses of std::auto_ptr.
1033 * include/experimental/type_traits (is_literal_type_v):
1034 Likewise, for use of std::is_literal_type.
1035 * include/std/condition_variable (condition_variable_any::_Unlock):
1036 Likewise, for use of std::uncaught_exception.
1038 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1040 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
1042 * include/std/chrono (operator+(const year&, const years&)):
1045 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1047 * include/bits/codecvt.h (codecvt_byname): Remove names of
1050 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1052 * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
1054 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
1056 * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
1058 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
1060 * include/bits/atomic_base.h: Fix -Wunused-variable
1062 * include/ext/new_allocator.h: Fix -Wunused-parameter
1065 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1067 * include/bits/stl_iterator.h (counted_iterator): Add assertions
1068 to check preconditions added by LWG 3472.
1070 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1073 * src/c++17/memory_resource.cc (munge_options): Round
1074 max_blocks_per_chunk to a multiple of four.
1075 (__pool_resource::_M_alloc_pools()): Simplify slightly.
1076 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1077 Check that valid pointers are returned when small values are
1078 used for max_blocks_per_chunk.
1080 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1083 * include/std/memory_resource (monotonic_buffer_resource::do_allocate):
1084 Use __builtin_expect when checking if a new buffer needs to be
1085 allocated from the upstream resource, and for checks for edge
1086 cases like zero sized buffers and allocations.
1087 * src/c++17/memory_resource.cc (aligned_size): New class template.
1088 (aligned_ceil): New helper function to round up to a given
1090 (monotonic_buffer_resource::chunk): Replace _M_size and _M_align
1091 with an aligned_size member. Remove _M_canary member. Change _M_next
1092 to pointer instead of unaligned buffer.
1093 (monotonic_buffer_resource::chunk::allocate): Round up to multiple
1094 of 64 instead of to power of two. Check for size overflow. Remove
1095 redundant check for minimum required alignment.
1096 (monotonic_buffer_resource::chunk::release): Adjust for changes
1098 (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
1099 (big_block): Replace _M_size and _M_align with aligned_size
1101 (big_block::big_block): Check for size overflow.
1102 (big_block::size, big_block::align): Adjust to use aligned_size.
1103 (big_block::alloc_size): Use aligned_ceil.
1104 (munge_options): Use aligned_ceil.
1105 (__pool_resource::allocate): Use big_block::align for alignment.
1106 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Check
1107 upstream resource gets expected values for impossible sizes.
1108 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1109 Likewise. Adjust checks for expected alignment in existing test.
1111 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
1113 * include/std/chrono (duration::_S_gcd): Use invariant that
1114 neither value is zero initially.
1116 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
1118 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
1120 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
1123 * include/std/tuple (_TupleConstraints<true, T...>): Use
1124 alternative is_constructible instead of std::is_constructible.
1125 * testsuite/20_util/tuple/cons/96592.cc: New test.
1127 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
1129 * include/std/chrono (duration::_S_gcd): Use iterative algorithm
1130 for C++14 and later.
1131 * include/std/numeric (__detail::__gcd): Replace recursive
1132 Euclidean algorithm with iterative version of binary GCD algorithm.
1133 * testsuite/26_numerics/gcd/1.cc: Test additional inputs.
1134 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
1135 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1136 * testsuite/experimental/numeric/gcd.cc: Test additional inputs.
1137 * testsuite/26_numerics/gcd/2.cc: New test.
1139 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1142 * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
1145 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1148 * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
1149 New trait that says if memcmp can be used for ordering.
1150 (__is_memcmp_ordered_with): Likewise, for two types.
1151 * include/bits/deque.tcc (__lex_cmp_dit): Use new traits
1152 instead of __is_byte and __numeric_traits.
1153 (__lexicographical_compare_aux1): Likewise.
1154 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
1156 * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
1157 (__is_byte_iter): Likewise.
1158 * include/std/array (operator<=>): Likewise. Only use memcmp
1159 when std::is_constant_evaluated() is false.
1160 * testsuite/23_containers/array/comparison_operators/96851.cc:
1162 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
1163 Adjust dg-error line numbers.
1165 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1167 * include/bits/stl_iterator.h: Include <bits/exception_defines.h>
1168 for definitions of __try, __catch and __throw_exception_again.
1169 (counted_iterator::operator++(int)): Use __throw_exception_again
1171 * libsupc++/new: Include <bits/exception.h> not <exception>.
1172 * libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
1173 * testsuite/18_support/destroying_delete.cc: Include
1174 <type_traits> for std::is_same_v definition.
1175 * testsuite/20_util/variant/index_type.cc: Qualify size_t.
1177 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
1180 * include/bits/c++config (__glibcxx_assert_impl): Remove
1181 do-while so that uses of the macro need to add it.
1182 (__glibcxx_assert): Rename macro for runtime assertions
1183 to __glibcxx_assert_2.
1184 (__glibcxx_assert_1): Define macro for constexpr assertions.
1185 (__glibcxx_assert): Define macro for constexpr and runtime
1187 * include/bits/range_access.h (ranges::advance): Remove
1188 redundant precondition checks during constant evaluation.
1189 * include/parallel/base.h (_GLIBCXX_PARALLEL_ASSERT): Always
1190 use do-while in macro expansion.
1191 * include/std/ranges (iota_view::iota_view(W, B)): Remove
1194 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
1196 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
1197 New helper function for finding GCD of two positive intmax_t
1199 (duration::__divide): New helper alias for dividing one period
1201 (duration::__is_harmonic): Use __divide not ratio_divide.
1202 (duration(const duration<R2, P2>&)): Require the duration rep
1203 types to be convertible.
1204 * testsuite/20_util/duration/cons/dr2094.cc: New test.
1205 * testsuite/20_util/duration/requirements/reduced_period.cc:
1206 Fix definition of unused member functions in test type.
1207 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
1208 Adjust expected errors.
1210 2020-08-29 Jonathan Wakely <jwakely@redhat.com>
1212 * include/std/numeric (__detail::__absu(bool)): Make deleted
1213 function a function template, so it will be chosen for calls
1214 with an explicit template argument list.
1215 * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output.
1216 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1218 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
1220 * include/std/chrono (common_type): Fix partial specializations
1221 for a single duration type to use the common_type of the rep.
1222 (duration::operator+, duration::operator-): Fix return types
1223 to also use the common_type of the rep.
1224 * testsuite/20_util/duration/requirements/reduced_period.cc:
1225 Check duration using a rep that has common_type specialized.
1227 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
1230 * include/std/numeric (__abs_integral): Replace with ...
1231 (__detail::__absu): New function template that returns an
1232 unsigned type, guaranteeing it can represent the most
1233 negative signed value.
1234 (__detail::__gcd, __detail::__lcm): Require arguments to
1235 be unsigned and therefore already non-negative.
1236 (gcd, lcm): Convert arguments to absolute value as unsigned
1237 type before calling __detail::__gcd or __detail::__lcm.
1238 * include/experimental/numeric (gcd, lcm): Likewise.
1239 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
1241 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1242 * testsuite/26_numerics/gcd/92978.cc: New test.
1243 * testsuite/26_numerics/lcm/92978.cc: New test.
1244 * testsuite/experimental/numeric/92978.cc: New test.
1246 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
1248 * include/std/chrono (__duration_common_type): Ensure the
1249 reduced ratio is used. Remove unused partial specialization
1250 using __failure_type.
1251 (common_type): Pass reduced ratios to __duration_common_type.
1252 Add partial specializations for simple cases involving a single
1253 duration or time_point type.
1254 (duration::period): Use reduced ratio.
1255 (duration::operator+(), duration::operator-()): Return duration
1256 type using the reduced ratio.
1257 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
1258 Adjust expected errors.
1259 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
1261 2020-08-27 Patrick Palka <ppalka@redhat.com>
1263 * include/std/chrono (year_month::operator+): Properly handle a
1264 month value of 0 by casting the month value to int before
1265 subtracting 1 from it so that the difference is sign-extended in
1266 the subsequent addition.
1267 * testsuite/std/time/year_month/1.cc: Test adding months to a
1268 year_month whose month component is below or above the
1269 normalized range of [1,12].
1271 2020-08-27 Patrick Palka <ppalka@redhat.com>
1273 * include/std/chrono
1274 (__detail::__months_years_conversion_disambiguator): Define.
1275 (year_month::operator+=): Templatize the 'months'-based overload
1276 so that the 'years'-based overload is selected in case of
1277 equally-ranked implicit conversion sequences to both 'months'
1278 and 'years' from the supplied argument.
1279 (year_month::operator-=): Likewise.
1280 (year_month::operator+): Likewise.
1281 (year_month::operator-): Likewise.
1282 (year_month_day::operator+=): Likewise.
1283 (year_month_day::operator-=): Likewise.
1284 (year_month_day::operator+): Likewise.
1285 (year_month_day::operator-): Likewise.
1286 (year_month_day_last::operator+=): Likewise.
1287 (year_month_day_last::operator-=): Likewise.
1288 (year_month_day_last::operator+): Likewise
1289 (year_month_day_last::operator-): Likewise.
1290 (year_month_day_weekday::operator+=): Likewise
1291 (year_month_day_weekday::operator-=): Likewise.
1292 (year_month_day_weekday::operator+): Likewise.
1293 (year_month_day_weekday::operator-): Likewise.
1294 (year_month_day_weekday_last::operator+=): Likewise
1295 (year_month_day_weekday_last::operator-=): Likewise.
1296 (year_month_day_weekday_last::operator+): Likewise.
1297 (year_month_day_weekday_last::operator-): Likewise.
1298 (testsuite/std/time/year_month/2.cc): New test.
1299 (testsuite/std/time/year_month_day/2.cc): New test.
1300 (testsuite/std/time/year_month_day_last/2.cc): New test.
1301 (testsuite/std/time/year_month_weekday/2.cc): New test.
1302 (testsuite/std/time/year_month_weekday_last/2.cc): New test.
1303 * testsuite/std/time/year_month/2.cc: New file.
1304 * testsuite/std/time/year_month_day/2.cc: New file.
1305 * testsuite/std/time/year_month_day_last/2.cc: New file.
1306 * testsuite/std/time/year_month_weekday/2.cc: New file.
1307 * testsuite/std/time/year_month_weekday_last/2.cc: New file.
1309 2020-08-27 Patrick Palka <ppalka@redhat.com>
1312 * include/std/ranges (transform_view::sentinel::__distance_from):
1313 Give this a deduced return type.
1314 (transform_view::sentinel::operator-): Adjust the return type so
1315 that it's based on the constness of the iterator rather than
1316 that of the sentinel.
1317 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
1319 2020-08-27 Patrick Palka <ppalka@redhat.com>
1321 * include/std/ranges (elements_view::begin): Adjust constraints.
1322 (elements_view::end): Likewise.
1323 (elements_view::_Sentinel::operator==): Templatize to take both
1324 _Iterator<true> and _Iterator<false>.
1325 (elements_view::_Sentinel::operator-): Likewise.
1326 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
1327 the example from P1994R1.
1328 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
1330 2020-08-27 Patrick Palka <ppalka@redhat.com>
1332 * include/std/ranges (elements_view::end): Replace these two
1333 overloads with four new overloads.
1334 (elements_view::_Iterator::operator==): Remove.
1335 (elements_view::_Iterator::operator-): Likewise.
1336 (elements_view::_Sentinel): Define.
1338 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1340 * include/std/tuple (_Tuple_impl): Whitespaces changes for
1341 consistent indentation. Also use __enable_if_t alias template.
1343 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1347 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
1348 Replace parameter pack with a type parameter and a pack and pass
1349 the first type to __use_alloc.
1350 * testsuite/20_util/tuple/cons/96803.cc: New test.
1352 2020-08-26 Patrick Palka <ppalka@redhat.com>
1354 * include/std/chrono (year_month_weekday::operator==): Compare
1355 weekday_indexed instead of weekday.
1356 * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
1358 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1360 * include/bits/hashtable_policy.h (_Hash_code_base): Change
1361 index of _Hashtable_ebo_helper base class.
1362 * testsuite/23_containers/unordered_map/dup_types.cc: New test.
1364 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1367 * include/experimental/string_view (basic_string_view):
1368 Enable debug assertions.
1369 * include/std/string_view (basic_string_view):
1372 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
1374 * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
1375 _H2 into _RangeHash and _Hash into _Unused.
1376 (_Hastable_base<>): Likewise.
1377 (_Map_base<>): Likewise.
1378 (_Insert_base<>): Likewise.
1379 (_Insert<>): Likewise.
1380 (_Rehash_base<>): Likewise.
1381 (_Local_iterator_base<>): Likewise.
1382 (_Hash_code_base<>): Likewise.
1383 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
1385 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
1387 (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
1388 bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
1389 (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
1391 (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
1392 (_Local_iterator<>): Remove _H1 and _H2 template parameters.
1393 (_Local_const_iterator<>): Likewise.
1394 (_Equality<>): Likewise.
1395 (_Map_base<>::operator[](const key_type&): Adapt.
1396 (_Map_base<>::operator[](key_type&&): Adapt.
1397 (_Identity::operator()): Add noexcept.
1398 (_Select1st::operator()): Likewise.
1399 (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
1401 (_Hash_code_base::_M_extract): Remove.
1402 * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
1403 parameters. Remove _ExtractKey from constructors.
1404 (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
1405 __hash_code, __node_type*, size_t)): Replace by...
1406 (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
1407 __node_type*, size_t)): ...this.
1408 (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
1409 __hash_code, __node_type*)): Replace by...
1410 (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
1411 __node_type*)): ...this.
1412 (_Hashtable<>::__key_extract): Remove.
1413 * include/bits/node_handle.h: Adapt.
1415 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
1417 * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
1418 * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
1419 * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
1420 * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
1421 * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
1422 * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
1423 * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
1424 * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
1425 * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
1426 * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
1427 * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
1428 * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
1429 * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
1430 * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
1431 * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
1432 * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
1433 * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
1434 * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
1435 * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
1437 * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
1438 * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
1440 * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
1441 * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
1442 * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
1443 * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
1444 * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
1446 2020-08-25 Patrick Palka <ppalka@redhat.com>
1448 * include/std/chrono (year_month_weekday::ok): Fix assert.
1450 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
1452 * include/std/future (future, shared_future. promise): Add
1453 is_destructible assertion (LWG 3466). Adjust string-literal for
1454 !is_array and !is_function assertions.
1455 * testsuite/30_threads/future/requirements/lwg3458.cc: Check
1456 types with no accessible destructor. Adjust expected errors.
1457 * testsuite/30_threads/promise/requirements/lwg3466.cc:
1459 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
1462 2020-08-25 Patrick Palka <ppalka@redhat.com>
1463 Ed Smith-Rowland <3dw4rd@verizon.net>
1464 Jonathan Wakely <jwakely@redhat.com>
1466 * include/std/chrono (time_point::operator++)
1467 (time_point::operator--): Define.
1468 (utc_clock, tai_clock, gps_clock): Forward declare.
1469 (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
1470 (gps_seconds): Define.
1471 (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
1472 (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
1473 (is_clock_v<gps_clock>): Define these specializations.
1474 (leap_second_info): Define.
1475 (day, month, year, weekday, weekday_indexed)
1476 (weekday_last, month_day, month_day_last, month_weekday)
1477 (month_weekday_last, year_month, year_month_day)
1478 (year_month_day_last, year_month_weekday, year_month_weekday_last):
1479 Declare and later define.
1480 (last_spec, last, __detail::__days_per_month)
1481 (__detail::__days_per_month, __detail::__last_day): Define.
1482 (January, February, March, April, May, June, July, August)
1483 (September, October, November, December, Sunday, Monday, Tuesday)
1484 (Wednesday, Thursday, Friday, Saturday): Define.
1485 (weekday::operator[]): Define out-of-line.
1486 (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
1488 (year_month_day::year_month_day, year_month_day::ok): Likewise.
1489 (__detail::__pow10, hh_mm_ss): Define.
1490 (literals::chrono_literals::operator""d)
1491 (literals::chrono_literals::operator""y): Define.
1492 (is_am, is_pm, make12, make24): Define.
1493 * testsuite/20_util/time_point/4.cc: New test.
1494 * testsuite/std/time/day/1.cc: New test.
1495 * testsuite/std/time/hh_mm_ss/1.cc: New test.
1496 * testsuite/std/time/is_am/1.cc: New test.
1497 * testsuite/std/time/is_pm/1.cc: New test.
1498 * testsuite/std/time/make12/1.cc: New test.
1499 * testsuite/std/time/make24/1.cc: New test.
1500 * testsuite/std/time/month/1.cc: New test.
1501 * testsuite/std/time/month_day/1.cc: New test.
1502 * testsuite/std/time/month_day_last/1.cc: New test.
1503 * testsuite/std/time/month_weekday/1.cc: New test.
1504 * testsuite/std/time/month_weekday_last/1.cc: New test.
1505 * testsuite/std/time/weekday/1.cc: New test.
1506 * testsuite/std/time/weekday_indexed/1.cc: New test.
1507 * testsuite/std/time/weekday_last/1.cc: New test.
1508 * testsuite/std/time/year/1.cc: New test.
1509 * testsuite/std/time/year_month/1.cc: New test.
1510 * testsuite/std/time/year_month_day/1.cc: New test.
1511 * testsuite/std/time/year_month_day_last/1.cc: New test.
1512 * testsuite/std/time/year_month_weekday/1.cc: New test.
1513 * testsuite/std/time/year_month_weekday_last/1.cc: New test.
1515 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1517 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
1518 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
1520 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1522 * include/bits/iterator_concepts.h (indirectly_readable): Add
1523 partial specializations to resolve ambiguities (LWG 3446).
1524 * testsuite/24_iterators/associated_types/readable.traits.cc:
1525 Check types with both value_type and element_type.
1527 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1529 * include/std/ranges (ranges::iota_view::size()): Perform all
1530 calculations in the right unsigned types.
1531 * testsuite/std/ranges/iota/size.cc: New test.
1533 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1536 * include/std/variant (_Variant_storage): Replace implicit
1537 conversions from size_t to __index_type with explicit casts.
1539 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1541 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
1542 C++11 and skip for C++17 or later.
1544 2020-08-24 Corentin Gay <gay@adacore.com>
1546 * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
1547 threads and add -pthread only on targets supporting them.
1548 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
1550 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
1552 * testsuite/30_threads/async/42819.cc: Likewise.
1553 * testsuite/30_threads/async/49668.cc: Likewise.
1554 * testsuite/30_threads/async/54297.cc: Likewise.
1555 * testsuite/30_threads/async/any.cc: Likewise.
1556 * testsuite/30_threads/async/async.cc: Likewise.
1557 * testsuite/30_threads/async/except.cc: Likewise.
1558 * testsuite/30_threads/async/launch.cc: Likewise.
1559 * testsuite/30_threads/async/lwg2021.cc: Likewise.
1560 * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
1561 * testsuite/30_threads/call_once/39909.cc: Likewise.
1562 * testsuite/30_threads/call_once/49668.cc: Likewise.
1563 * testsuite/30_threads/call_once/60497.cc: Likewise.
1564 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
1565 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
1566 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
1567 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
1568 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
1569 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
1570 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
1571 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
1572 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
1573 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
1575 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
1576 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
1577 * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
1578 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
1579 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
1580 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
1581 * testsuite/30_threads/future/cons/move.cc: Likewise.
1582 * testsuite/30_threads/future/members/45133.cc: Likewise.
1583 * testsuite/30_threads/future/members/get.cc: Likewise.
1584 * testsuite/30_threads/future/members/get2.cc: Likewise.
1585 * testsuite/30_threads/future/members/share.cc: Likewise.
1586 * testsuite/30_threads/future/members/valid.cc: Likewise.
1587 * testsuite/30_threads/future/members/wait.cc: Likewise.
1588 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
1589 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
1590 * testsuite/30_threads/lock/1.cc: Likewise.
1591 * testsuite/30_threads/lock/2.cc: Likewise.
1592 * testsuite/30_threads/lock/3.cc: Likewise.
1593 * testsuite/30_threads/lock/4.cc: Likewise.
1594 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
1595 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
1596 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
1597 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
1598 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
1599 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
1600 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
1601 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
1602 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
1603 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
1604 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
1605 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
1606 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
1607 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
1608 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
1609 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
1610 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
1611 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
1612 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
1614 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
1615 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
1616 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
1617 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
1618 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
1619 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
1620 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
1621 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
1622 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
1623 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
1624 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
1625 * testsuite/30_threads/promise/60966.cc: Likewise.
1626 * testsuite/30_threads/promise/cons/1.cc: Likewise.
1627 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
1628 * testsuite/30_threads/promise/cons/move.cc: Likewise.
1629 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
1630 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
1631 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
1632 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
1633 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
1634 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
1635 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
1636 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
1637 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
1638 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
1639 * testsuite/30_threads/promise/members/swap.cc: Likewise.
1640 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
1641 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
1643 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
1644 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
1645 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
1647 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
1648 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
1649 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
1650 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
1651 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
1652 * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
1654 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
1655 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
1656 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
1658 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
1660 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
1661 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
1662 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
1664 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
1666 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
1668 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
1670 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
1672 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
1673 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
1674 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
1675 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
1676 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
1677 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
1678 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
1679 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
1680 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
1681 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
1682 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
1683 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
1684 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
1685 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
1686 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
1687 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
1688 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
1689 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
1690 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
1691 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
1692 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
1693 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
1694 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
1695 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
1696 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
1697 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
1698 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
1699 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
1700 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
1701 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
1702 * testsuite/30_threads/this_thread/1.cc: Likewise.
1703 * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
1704 * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
1705 * testsuite/30_threads/thread/cons/1.cc: Likewise.
1706 * testsuite/30_threads/thread/cons/2.cc: Likewise.
1707 * testsuite/30_threads/thread/cons/3.cc: Likewise.
1708 * testsuite/30_threads/thread/cons/4.cc: Likewise.
1709 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
1710 * testsuite/30_threads/thread/cons/5.cc: Likewise.
1711 * testsuite/30_threads/thread/cons/6.cc: Likewise.
1712 * testsuite/30_threads/thread/cons/7.cc: Likewise.
1713 * testsuite/30_threads/thread/cons/8.cc: Likewise.
1714 * testsuite/30_threads/thread/cons/9.cc: Likewise.
1715 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
1716 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
1717 * testsuite/30_threads/thread/members/1.cc: Likewise.
1718 * testsuite/30_threads/thread/members/2.cc: Likewise.
1719 * testsuite/30_threads/thread/members/3.cc: Likewise.
1720 * testsuite/30_threads/thread/members/4.cc: Likewise.
1721 * testsuite/30_threads/thread/members/5.cc: Likewise.
1722 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
1724 * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
1725 * testsuite/30_threads/thread/swap/1.cc: Likewise.
1726 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
1727 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
1729 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
1730 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
1731 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
1733 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
1734 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
1735 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
1736 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
1737 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
1738 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
1739 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
1740 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
1741 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
1742 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
1743 * testsuite/30_threads/try_lock/1.cc: Likewise.
1744 * testsuite/30_threads/try_lock/2.cc: Likewise.
1745 * testsuite/30_threads/try_lock/3.cc: Likewise.
1746 * testsuite/30_threads/try_lock/4.cc: Likewise.
1747 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
1748 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
1749 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
1750 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
1751 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
1752 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
1753 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
1754 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
1755 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
1756 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
1757 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
1759 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
1762 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
1763 test "cold" on darwin.
1764 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
1766 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
1768 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
1770 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
1773 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
1776 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
1777 tbb-backend effective target.
1778 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
1779 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
1780 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
1782 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
1784 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
1785 (incrementable_traits<__int128>): Define specialization.
1786 (incrementable_traits<unsigned __int128>): Likewise.
1787 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
1790 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1791 Patrick Palka <ppalka@redhat.com>
1794 * include/bits/range_access.h (__detail::__to_unsigned_like):
1795 Do not use make_unsigned_t<T> in the return type, as it can
1796 result in an error before the integral<T> constraint is checked.
1797 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
1798 (__detail::__make_unsigned_like_t): Define as the return type
1799 of __to_unsigned_like.
1800 * testsuite/std/ranges/subrange/96042.cc: New test.
1802 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1804 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
1805 (operator>=): Remove deprecated functions.
1807 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1810 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
1811 trait which is true for 128-bit integers even in strict modes.
1812 (__numeric_traits_integer, __numeric_traits): Use
1813 __is_integer_nonstrict instead of __is_integer.
1814 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
1815 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
1817 * testsuite/std/ranges/iota/96042.cc: New test.
1819 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1821 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
1822 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
1823 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
1824 Add new macros to comment.
1826 2020-08-19 Patrick Palka <ppalka@redhat.com>
1828 * include/Makefile.am (bits_headers): Add new header
1829 <bits/max_size_type.h>.
1830 * include/Makefile.in: Regenerate.
1831 * include/bits/iterator_concepts.h
1832 (ranges::__detail::__max_diff_type): Remove definition, replace
1833 with forward declaration of class __max_diff_type.
1834 (__detail::__max_size_type): Remove definition, replace with
1835 forward declaration of class __max_size_type.
1836 (__detail::__is_unsigned_int128, __is_signed_int128)
1837 (__is_int128): New concepts.
1838 (__detail::__is_integer_like): Accept __int128 and unsigned
1840 (__detail::__is_signed_integer_like): Accept __int128.
1841 * include/bits/max_size_type.h: New header.
1842 * include/bits/range_access.h: Include <bits/max_size_type.h>.
1843 (__detail::__to_unsigned_like): Two new overloads.
1844 * testsuite/std/ranges/iota/difference_type.cc: New test.
1845 * testsuite/std/ranges/iota/max_size_type.cc: New test.
1847 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1849 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
1851 (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
1852 message in deprecated warnings.
1853 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
1854 macros for marking features deprecated in C++11.
1855 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
1857 * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
1858 Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
1859 (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
1860 * include/backward/binders.h (binder1st, binder2nd): Likewise.
1861 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
1862 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
1863 * include/std/streambuf (stossc): Replace C++11 attribute
1864 with _GLIBCXX_DEPRECATED_SUGGEST.
1865 * include/std/type_traits (__is_nullptr_t): Use
1866 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
1867 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
1868 Also check for io_state, open_mode and seek_dir typedefs.
1870 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
1873 * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
1874 Add static_asserts to make sure that the argument of the type
1875 trait is not misused with incomplete types.
1876 (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
1877 to make sure that the first and second arguments of the type trait
1878 are not misused with incomplete types.
1879 * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
1880 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
1881 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
1882 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
1884 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
1886 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
1887 Clement Chigot <clement.chigot@atos.net>
1889 * config/os/aix/t-aix: Add complementary mode object files to
1892 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
1894 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
1895 "cold" isn't used in the library. Also check <cxxabi.h>.
1896 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
1898 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
1900 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
1902 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
1905 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
1908 * include/std/future (__future_base::_S_make_deferred_state)
1909 (__future_base::_S_make_async_state): Remove.
1910 (__future_base::_Deferred_state): Change constructor to accept a
1911 parameter pack of arguments and forward them to the call
1913 (__future_base::_Async_state_impl): Likewise. Replace lambda
1914 expression with a named member function.
1915 (async): Construct state object directly from the arguments,
1916 instead of using thread::__make_invoker, _S_make_deferred_state
1917 and _S_make_async_state. Move shared state into the returned
1919 * include/std/thread (thread::_Call_wrapper): New alias
1920 template for use by constructor and std::async.
1921 (thread::thread(Callable&&, Args&&...)): Create state object
1922 directly instead of using _S_make_state.
1923 (thread::__make_invoker, thread::__decayed_tuple)
1924 (thread::_S_make_state): Remove.
1925 * testsuite/30_threads/async/69724.cc: New test.
1927 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
1932 * include/std/tuple [__has_cpp_attribute(no_unique_address)]
1933 (_Head_base<Idx, Head, true>): New definition of the partial
1934 specialization, using [[no_unique_address]] instead of
1936 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
1938 * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
1939 * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
1940 * testsuite/20_util/tuple/element_access/71096.cc: New test.
1942 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
1944 * testsuite/lib/libstdc++.exp: Use the new option
1945 -fdiagnostics-plain-output.
1947 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
1949 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
1950 option is used and fail unless --enable-cheaders-obsolete is
1952 * configure: Regenerate.
1954 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
1957 * include/bits/basic_string.h (operator=(basic_string&&)): Check
1958 for self-move before copying with char_traits::copy.
1959 * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
1961 * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
1962 Check for equal allocators.
1963 * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
1964 Call clear() instead of _M_clear().
1965 * include/debug/formatter.h (__msg_self_move_assign): Change
1967 * include/debug/macros.h (__glibcxx_check_self_move_assign):
1968 (_GLIBCXX_DEBUG_VERIFY): Remove.
1969 * include/debug/safe_container.h (operator=(_Safe_container&&)):
1970 Remove assertion check for safe move and make it well-defined.
1971 * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
1972 Remove assertion check for self-move.
1973 * include/debug/safe_local_iterator.h
1974 (operator=(_Safe_local_iterator&&)): Likewise.
1975 * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
1976 * testsuite/23_containers/deque/cons/self_move.cc: New test.
1977 * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
1978 * testsuite/23_containers/list/cons/self_move.cc: New test.
1979 * testsuite/23_containers/set/cons/self_move.cc: New test.
1980 * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
1981 * testsuite/23_containers/vector/cons/self_move.cc: New test.
1983 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
1986 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
1987 to destroy in an intermediate forward_list.
1988 (forward_list<>::remove_if, forward_list<>::unique): Likewise.
1989 * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
1990 (list<>::remove_if): Likewise.
1991 * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
1992 (forward_list<>::erase_after): Adapt.
1993 (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
1994 destroy in an intermediate forward_list.
1995 (forward_list<>::unique): Likewise.
1996 * include/debug/list (list<>::remove, list<>::unique): Likewise.
1997 (list<>::remove_if): Likewise.
1998 * testsuite/23_containers/forward_list/operations/91620.cc: New test.
1999 * testsuite/23_containers/list/operations/91620.cc: New test.
2001 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2003 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
2005 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
2007 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2010 * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
2011 (execution_context::mutex_type): Define dummy mutex type.
2012 (system_context): Use execution_context::mutex_type.
2013 (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
2014 thread and condition variable types.
2015 [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
2017 (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
2018 an exception when threads aren't available.
2019 (strand::running_in_this_thread()): Defer to _M_state.
2020 (strand::_State::running_in_this_thread()): New function.
2021 (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
2022 * include/experimental/io_context (io_context): Use the
2023 execution_context::mutex_type alias. Replace stack of thread
2025 * testsuite/experimental/net/execution_context/use_service.cc:
2026 Enable test for non-pthread targets.
2028 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2030 * include/experimental/executor (system_context::a__tag): Make
2031 default constructor explicit.
2033 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2035 * include/experimental/executor (system_context::_M_run()):
2037 * testsuite/experimental/net/system_context/1.cc: New test.
2039 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2041 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
2042 #ifdef instead of #if.
2043 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
2044 using __gthread_yield.
2046 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2048 * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
2049 (this_thread::sleep_until): Define.
2050 [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
2051 use of __gthread_time_t typedef with timespec.
2052 * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
2054 * testsuite/30_threads/this_thread/2.cc: Moved to...
2055 * testsuite/30_threads/this_thread/yield.cc: ...here.
2056 * testsuite/30_threads/this_thread/3.cc: Moved to...
2057 * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
2058 * testsuite/30_threads/this_thread/4.cc: Moved to...
2059 * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
2060 * testsuite/30_threads/this_thread/58038.cc: Add
2062 * testsuite/30_threads/this_thread/60421.cc: Likewise.
2063 * testsuite/30_threads/this_thread/sleep_for.cc: New test.
2064 * testsuite/30_threads/this_thread/sleep_until.cc: New test.
2066 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2069 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
2070 of calling ::lstat directly.
2071 * src/filesystem/ops.cc (read_symlink): Likewise.
2073 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2075 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2076 Use gdb.Type.strip_typedefs().
2077 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
2078 the emulated old type.
2080 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2083 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
2084 $enable_libstdcxx_filesystem_ts.
2085 * configure: Regenerate.
2087 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2090 * include/bits/stl_iterator.h (inserter): Do not deduce
2091 iterator type (LWG 561).
2092 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
2094 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2096 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
2097 (basic_string::reserve()): Do nothing if exceptions are not
2100 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2103 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2104 (stat_type): Change to __stat64.
2105 (stat): Use _wstat64.
2107 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2110 * include/debug/bitset (bitset::operator==): Call _M_base() on
2112 (bitset::operator!=): Likewise, but don't define it at all when
2113 default comparisons are supported by the compiler.
2114 * testsuite/23_containers/bitset/operations/96303.cc: New test.
2116 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2118 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
2119 Replace VERIFY with static_assert where the compiler now
2121 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
2124 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2126 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
2128 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
2129 Jonathan Wakely <jwakely@redhat.com>
2131 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
2132 patterns for basic_string members.
2133 (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
2134 * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
2135 * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
2136 (reserve(size_type)): Remove default argument.
2137 (reserve()): Declare new overload.
2138 [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
2139 * include/bits/basic_string.tcc (reserve(size_type)): Remove
2140 support for shrinking capacity.
2141 (reserve()): Perform shrink-to-fit operation.
2142 [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
2143 * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
2144 reflect new behavior.
2145 * testsuite/21_strings/basic_string/capacity/char/1.cc:
2147 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
2149 * testsuite/21_strings/basic_string/capacity/char/2.cc:
2151 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
2153 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
2155 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
2158 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2160 * include/bits/basic_string.tcc
2161 (operator>>(basic_istream&, basic_string&)): Do not set eofbit
2162 if extraction stopped after in.width() characters.
2163 * src/c++98/istream-string.cc (operator>>(istream&, string&)):
2165 * include/bits/istream.tcc (__istream_extract): Do not set
2166 eofbit if extraction stopped after n-1 characters.
2167 * src/c++98/istream.cc (__istream_extract): Likewise.
2168 * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
2169 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
2170 * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
2171 * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
2173 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2176 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
2177 immediately for non-symlinks.
2178 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
2180 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2182 * include/std/istream (operator>>(istream&, char*)): Add
2183 attributes to get warnings for pointers that are null or known
2184 to point to the end of a buffer. Request upper bound from
2185 __builtin_object_size check and handle zero-sized buffer case.
2186 (operator>>(istream&, signed char))
2187 (operator>>(istream&, unsigned char*)): Add attributes.
2188 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
2189 Check extracting into the middle of a buffer.
2190 * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
2192 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
2194 * include/std/atomic (atomic<T>::store): Reformat.
2196 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
2198 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
2199 with LLVM repo for PSTL.
2200 * doc/html/manual/status.html: Regenerate.
2202 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
2204 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
2205 * include/bits/istream.tcc (__istream_extract): New function
2206 template implementing both of operator>>(istream&, char*) and
2207 operator>>(istream&, char(&)[N]). Add explicit instantiation
2208 declaration for it. Remove explicit instantiation declarations
2209 for old function templates.
2210 * include/std/istream (__istream_extract): Declare.
2211 (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
2212 call __istream_extract.
2213 (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
2214 (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
2215 (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
2216 (operator>>(basic_istream<char,T>&, signed char(&)[N])):
2218 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
2220 * include/std/streambuf (basic_streambuf): Declare char overload
2221 of __istream_extract as a friend.
2222 * src/c++11/istream-inst.cc: Add explicit instantiation
2223 definition for wchar_t overload of __istream_extract. Remove
2224 explicit instantiation definitions of old operator>> overloads
2225 for versioned-namespace build.
2226 * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
2227 with __istream_extract(istream&, char*, streamsize).
2228 * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
2229 Do not use variable-length array.
2230 * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
2231 Do not run test for C++20.
2232 * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
2233 Do not test writing to pointers for C++20.
2234 * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
2235 Use array instead of pointer.
2236 * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
2237 Do not use variable-length array.
2238 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
2239 Do not run test for C++20.
2240 * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
2241 Do not test writing to pointers for C++20.
2242 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
2244 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
2246 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
2248 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
2250 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
2253 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
2255 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
2257 * doc/html/manual/using_exceptions.html: Regenerate.
2259 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
2261 * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
2262 of oneAPI DPC++ Library on Github.
2263 * doc/html/manual/status.html: Regenerate.
2265 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
2267 * include/bits/stl_bvector.h
2268 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
2270 (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
2271 (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
2272 (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
2273 (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
2274 (_Bvector_impl_data::_M_reset()): Likewise.
2275 (_Bvector_impl_data::_M_swap_data): New.
2276 (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
2277 (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
2278 (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
2280 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
2282 (vector::vector(vector&&, const allocator_type&, false_type)): New.
2283 (vector::vector(vector&&, const allocator_type&)): Use latters.
2284 (vector::vector(const vector&, const allocator_type&)): Adapt.
2285 [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
2286 const allocator_type&)): Use _M_initialize_range.
2287 (vector::operator[](size_type)): Use iterator operator[].
2288 (vector::operator[](size_type) const): Use const_iterator operator[].
2289 (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
2290 [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
2291 _InputIt)): Use _M_insert_range.
2292 (vector::_M_initialize(size_type)): Adapt.
2293 [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
2294 [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
2295 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
2296 using start _M_offset.
2297 (StdVectorPrinter.to_string): Likewise.
2298 * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
2299 * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
2302 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2304 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
2306 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
2309 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2311 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
2312 Move struct to namespace scope.
2314 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2316 * testsuite/26_numerics/numbers/float128.cc: Check
2317 __STRICT_ANSI__ before using __float128.
2318 * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
2321 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2323 * testsuite/18_support/set_terminate.cc: Require C++11 or
2325 * testsuite/28_regex/simple_c++11.cc: Likewise.
2326 * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
2327 * testsuite/24_iterators/headers/iterator/synopsis.cc:
2328 Require C++14 or lower.
2330 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2332 * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
2333 effective-target from xfail selector.
2334 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
2335 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
2336 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
2337 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
2338 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
2339 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
2340 * testsuite/23_containers/span/subspan_2_assert_neg.cc:
2342 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
2344 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
2346 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
2348 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
2350 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
2352 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2354 * testsuite/20_util/reference_wrapper/83427.cc: Adjust
2355 effective-target to specific language mode only.
2356 * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
2358 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
2360 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
2362 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
2364 * testsuite/26_numerics/valarray/69116.cc:
2366 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
2367 Remove whitespace at end of file.
2368 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
2371 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2373 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
2374 c++17 effective-target.
2375 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
2377 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
2378 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
2380 * testsuite/17_intro/headers/c++2017/operator_names.cc:
2382 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
2383 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
2385 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
2387 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
2389 * testsuite/20_util/any/assign/1.cc: Likewise.
2390 * testsuite/20_util/any/assign/2.cc: Likewise.
2391 * testsuite/20_util/any/assign/emplace.cc: Likewise.
2392 * testsuite/20_util/any/assign/exception.cc: Likewise.
2393 * testsuite/20_util/any/assign/self.cc: Likewise.
2394 * testsuite/20_util/any/cons/1.cc: Likewise.
2395 * testsuite/20_util/any/cons/2.cc: Likewise.
2396 * testsuite/20_util/any/cons/aligned.cc: Likewise.
2397 * testsuite/20_util/any/cons/explicit.cc: Likewise.
2398 * testsuite/20_util/any/cons/in_place.cc: Likewise.
2399 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
2400 * testsuite/20_util/any/make_any.cc: Likewise.
2401 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
2402 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
2403 * testsuite/20_util/any/misc/swap.cc: Likewise.
2404 * testsuite/20_util/any/modifiers/1.cc: Likewise.
2405 * testsuite/20_util/any/observers/type.cc: Likewise.
2406 * testsuite/20_util/any/requirements.cc: Likewise.
2407 * testsuite/20_util/any/typedefs.cc: Likewise.
2408 * testsuite/20_util/as_const/1.cc: Likewise.
2409 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
2410 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
2411 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
2412 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
2414 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
2415 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
2417 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
2418 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
2419 * testsuite/20_util/function_objects/searchers.cc: Likewise.
2420 * testsuite/20_util/in_place/requirements.cc: Likewise.
2421 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
2423 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
2425 * testsuite/20_util/is_invocable/value.cc: Likewise.
2426 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
2428 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
2430 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
2432 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
2434 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
2435 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
2437 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
2439 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
2441 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
2443 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
2445 * testsuite/20_util/is_swappable/value.cc: Likewise.
2446 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
2448 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
2450 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
2451 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
2453 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
2455 * testsuite/20_util/logical_traits/value.cc: Likewise.
2456 * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
2457 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
2458 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
2459 * testsuite/20_util/optional/hash.cc: Likewise.
2460 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
2461 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
2462 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
2464 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
2466 * testsuite/20_util/tuple/apply/1.cc: Likewise.
2467 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
2468 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
2469 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
2470 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
2472 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
2474 * testsuite/20_util/variant/any.cc: Likewise.
2475 * testsuite/20_util/variant/compile.cc: Likewise.
2476 * testsuite/20_util/variant/hash.cc: Likewise.
2477 * testsuite/20_util/variant/index_type.cc: Likewise.
2478 * testsuite/20_util/variant/run.cc: Likewise.
2479 * testsuite/20_util/void_t/1.cc: Likewise.
2480 * testsuite/21_strings/basic_string/79162.cc: Likewise.
2481 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
2482 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
2483 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
2484 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
2485 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
2487 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
2489 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
2491 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
2493 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
2495 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
2497 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
2499 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
2501 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
2503 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
2505 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
2507 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
2509 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
2511 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
2513 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
2514 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
2516 * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
2517 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
2518 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
2519 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
2520 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
2522 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
2524 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
2526 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
2528 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
2530 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2532 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
2534 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
2536 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
2538 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
2540 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
2542 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
2543 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
2545 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
2547 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
2549 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
2551 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
2553 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
2555 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
2557 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2559 * testsuite/21_strings/basic_string_view/literals/types.cc:
2561 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
2563 * testsuite/21_strings/basic_string_view/literals/values.cc:
2565 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
2567 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
2569 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
2571 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
2573 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
2575 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
2577 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
2579 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
2581 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
2583 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
2585 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
2587 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
2589 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
2591 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
2593 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
2595 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
2597 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
2599 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
2601 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
2603 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
2605 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
2607 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
2609 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
2611 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
2613 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
2615 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
2617 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
2619 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
2621 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
2623 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
2625 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
2627 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
2629 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
2631 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
2633 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
2635 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
2637 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
2639 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2641 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
2642 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
2643 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2645 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
2646 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2648 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
2649 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2650 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2651 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
2652 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2653 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
2654 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2655 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
2656 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2658 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
2660 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
2662 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
2664 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2666 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
2668 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2670 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
2672 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2674 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
2676 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
2678 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
2680 * testsuite/25_algorithms/clamp/1.cc: Likewise.
2681 * testsuite/25_algorithms/clamp/2.cc: Likewise.
2682 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
2683 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
2685 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
2687 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
2689 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2691 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
2693 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
2694 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2696 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
2697 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
2698 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
2700 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
2702 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
2704 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
2705 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
2706 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
2708 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2711 * include/bits/stl_iterator.h (reverse_iterator): Friend
2712 declaration should not depend on __cplusplus.
2714 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2716 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
2717 Remove -std=gnu++17 option.
2719 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2721 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
2722 definition of aggregates in C++20.
2723 * testsuite/20_util/optional/requirements.cc: Adjust for
2724 defaulted comparisons in C++20.
2726 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2728 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
2729 deprecation of volatile-qualified structured bindings in C++20.
2730 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
2731 for deprecation of is_pod in C++20
2733 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2735 * testsuite/20_util/time_point_cast/rounding.cc: Remove
2736 duplicate dg-do directive and add c++17 effective target.
2738 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2740 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
2741 LC_ALL_MASK not LC_ALL.
2743 2020-07-31 Richard Biener <rguenther@suse.de>
2746 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
2748 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2750 * include/bits/basic_string.h (size_type, difference_type):
2751 Use allocator_traits to obtain the allocator's size_type and
2754 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2757 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
2759 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
2762 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2764 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
2765 Use allocator with the correct value type.
2766 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
2769 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2771 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
2774 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2776 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
2778 (__detail::__integral_nonbool): Likewise.
2779 (__detail::__is_integer_like): Use __integral_nonbool.
2780 * testsuite/std/ranges/access/lwg3467.cc: New test.
2782 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2784 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
2785 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
2787 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2789 * testsuite/23_containers/vector/bool/72847.cc: Use the
2790 exceptions_enabled effective-target keyword instead of
2791 checking for an explicit -fno-exceptions option.
2792 * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
2793 redundant try-catch.
2794 * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
2795 Do not define check_allocate_max_size and memory_resource.
2796 * testsuite/util/testsuite_containers.h: Replace comment with
2797 #error if wrong standard dialect used.
2798 * testsuite/util/testsuite_shared.cc: Likewise.
2800 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
2802 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
2803 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
2805 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
2807 (_Local_iterator_base<>): Inherits _Node_iterator_base.
2808 (_Local_iterator_base<>::_M_cur): Remove.
2809 (_Local_iterator_base<>::_M_curr()): Remove.
2810 (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
2812 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
2814 * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
2815 (unordered_multimap<>::_M_invalidate): Adapt.
2816 * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
2817 (unordered_multiset<>::_M_invalidate): Adapt.
2819 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
2820 Jonathan Wakely <jwakely@redhat.com>
2821 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2823 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
2824 target powerpc-ibm-aix* and powerpc*-*-darwin*.
2825 * testsuite/29_atomics/atomic_float/value_init.cc: Add options
2828 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
2830 * include/bits/hashtable.h
2831 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
2832 Add noexcept qualification.
2833 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
2834 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
2836 * include/bits/unordered_map.h
2837 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
2839 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
2841 * include/bits/unordered_set.h
2842 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
2843 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
2845 * include/debug/unordered_map
2846 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
2847 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
2849 * include/debug/unordered_set
2850 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
2851 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
2853 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
2855 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
2857 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
2859 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
2861 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
2863 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
2865 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
2867 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
2869 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
2871 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
2873 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
2876 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
2878 * include/bits/hashtable.h
2879 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
2880 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
2881 const allocator_type&, true_type)): New.
2882 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
2883 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
2884 const allocator_type&, false_type)): New.
2885 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
2886 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
2887 const allocator_type&)): Delegate to latters.
2888 (operator=(initializer_list<value_type>)): Rehash if too small.
2889 (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
2890 size_t len parameter.
2891 * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
2892 Do not try to get input range distance.
2893 * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
2894 * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
2896 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
2898 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
2900 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
2901 (_Hashtable_base<>::_M_node_equals): New, use latter.
2902 (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
2903 _RehashPolicy, false>::_M_equal): Adapt to use latter.
2904 * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
2905 (_Hashtable<>::_M_assign): Use latter.
2906 (_Hashtable<>::_M_move_assign): Likewise.
2907 (_Hashtable<>(_Hashtable<>&&)): Likewise.
2908 (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
2909 (_Hashtable<>::swap): Likewise.
2910 (_Hashtable<>::find): Build iterator directly from _M_find_node result.
2911 (_Hashtable<>::count): Use _Hashtable<>::find.
2912 (_Hashtable<>::equal_range): Likewise.
2913 (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
2916 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
2918 * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
2919 that FE_NEAREST is used.
2920 * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
2921 a { target c++14 } test.
2922 [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
2923 * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
2925 * testsuite/20_util/from_chars/6.cc: New test.
2927 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
2929 * include/std/future (future, shared_future, promise): Add
2930 static assertions to the primary template to reject array and
2932 * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
2933 * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
2934 * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
2936 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
2938 * include/bits/stl_iterator.h (reverse_iterator): Constrain
2939 converting constructor and converting assignment operator.
2940 Access source iterator's data member directly instead of
2942 (move_iterator): Likewise.
2943 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
2944 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
2946 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
2948 * acinclude.m4 (libtool_VERSION): Bump version.
2949 * config.h.in: Regenerate.
2950 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
2952 * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
2953 version and new export.
2954 * configure: Regenerate.
2955 * configure.ac: Check for <xlocale.h> and uselocale.
2956 * crossconfig.m4: Add macro or checks for uselocale.
2957 * include/std/charconv (from_chars): Declare overloads for
2958 float, double, and long double.
2959 * src/c++17/Makefile.am: Add new file.
2960 * src/c++17/Makefile.in: Regenerate.
2961 * src/c++17/floating_from_chars.cc: New file.
2962 (from_chars): Define for float, double, and long double.
2963 * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
2964 diagnostics caused by new overloads.
2965 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
2966 * testsuite/20_util/from_chars/2.cc: Check leading '+'.
2967 * testsuite/20_util/from_chars/4.cc: New test.
2968 * testsuite/20_util/from_chars/5.cc: New test.
2969 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
2971 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
2973 * include/bits/istream.tcc
2974 (basic_istream::get(__streambuf_type&, char_type): Use unsigned
2975 long long for counter and check if it would overflow _M_gcount.
2976 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
2977 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
2979 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
2981 * include/std/coroutine: Mark the methods of the
2982 trivial awaitables as constexpr.
2984 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
2986 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
2988 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
2992 * include/bits/istream.tcc (basic_istream::ignore(streamsize))
2993 [n == max]: Check overflow conditions on _M_gcount. Rely on
2994 the fact that either EOF or the delimiter was reached.
2995 [n < max]: Check _M_gcount < n before checking for EOF or
2997 (basic_istream::ignore(streamsize, char_type): Likewise.
2998 * src/c++98/compatibility.cc (istream::ignore(streamsize))
2999 (wistream::ignore(streamsize)): Likewise.
3000 * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
3001 (wistream::ignore(streamsize, char_type)): Likewise.
3002 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
3003 delimiter is discarded if the number of characters ignored
3004 doesn't fit in streamsize.
3005 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
3007 * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
3008 * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
3010 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
3012 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
3013 qualification based only on _Compare one.
3014 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
3016 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
3018 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
3020 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
3022 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3024 * include/std/limits: Whitespace changes.
3026 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3028 * include/Makefile.am: Remove bits/int_limits.h.
3029 * include/Makefile.in: Regenerate.
3030 * include/bits/int_limits.h: Removed.
3031 * include/bits/parse_numbers.h (_Select_int_base): Replace
3032 __int_limits with __int_traits.
3033 * include/bits/range_access.h (_SSize::operator()): Likewise.
3034 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
3036 (__int_traits): New alias template.
3037 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
3038 (__countr_zero, __countr_one, __popcount, __bit_ceil)
3039 (__bit_floor, __bit_width) Replace __int_limits with
3041 * include/std/charconv (__to_chars_8, __from_chars_binary)
3042 (__from_chars_alpha_to_num, from_chars): Likewise.
3043 * include/std/memory_resource (polymorphic_allocator::allocate)
3044 (polymorphic_allocator::allocate_object): Likewise.
3045 * include/std/string_view (basic_string_view::_S_compare):
3047 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
3049 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3051 * include/std/limits: Whitespace changes.
3053 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3055 * include/std/optional (_Optional_payload_base, _Optional_base)
3056 (optional, __optional_hash_call_base): Adjust whitespace and
3057 other formatting. Remove redundant && tokens on template
3058 arguments to type traits.
3060 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3062 * include/std/optional (make_optional): Add enable_if
3063 constraints and noexcept-specifier to each overload.
3064 * testsuite/20_util/optional/make_optional-2.cc: New test.
3066 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3069 * include/std/optional (optional): Add noexcept-specifier to
3070 every constructor, assignment operator, emplace function and
3071 dereference operator.
3072 * testsuite/20_util/optional/assignment/noexcept.cc: New test.
3073 * testsuite/20_util/optional/cons/noexcept.cc: New test.
3075 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3078 * include/bits/fs_dir.h: Use consistent tag in class-head.
3079 * include/bits/localefwd.h: Likewise.
3080 * include/bits/regex.h: Likewise.
3081 * include/bits/stl_map.h: Likewise.
3082 * include/bits/stl_multimap.h: Likewise.
3083 * include/bits/stl_multiset.h: Likewise.
3084 * include/bits/stl_set.h: Likewise.
3085 * include/std/complex: Likewise.
3086 * include/std/functional: Likewise.
3087 * include/std/future: Likewise.
3088 * include/std/system_error: Likewise.
3089 * include/std/thread: Likewise.
3090 * include/std/tuple: Likewise.
3091 * include/std/type_traits: Likewise.
3092 * include/std/valarray: Likewise.
3094 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
3096 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
3099 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
3101 * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
3102 c++98_only target selector.
3103 * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
3105 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
3107 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
3108 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
3110 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
3112 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
3114 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
3116 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
3118 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
3120 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
3122 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
3124 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
3126 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
3128 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
3130 * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
3131 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
3132 * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
3134 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
3136 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
3138 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
3139 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
3142 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
3145 * include/std/variant
3146 (_Copy_assign_base::operator=(const _Copy_assign_base&):
3147 Do the move-assignment from a temporary so that the temporary
3148 is constructed with an explicit index.
3149 * testsuite/20_util/variant/91807.cc: New.
3151 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
3155 * testsuite/29_atomics/atomic_float/1.cc: Use different values
3157 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
3159 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
3162 * include/bits/regex.h (operator==, operator!=): Remove noexcept
3163 equality comparisons for match_results.
3164 * testsuite/28_regex/match_results/94627.cc: New test.
3166 2020-07-01 Martin Sebor <msebor@redhat.com>
3168 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
3169 text of expected warning.
3170 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
3171 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
3172 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
3173 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
3175 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
3178 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3180 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
3181 Add a __nonnull__ attribute.
3182 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
3183 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
3185 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3187 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
3188 Add a __nonnull__ attribute.
3189 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
3190 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
3192 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3195 * include/std/type_traits (is_literal_type, is_literal_type_v):
3197 * include/std/variant (_Uninitialized):
3198 Adjust the condition and the comment.
3199 * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
3200 * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
3202 * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
3203 * testsuite/20_util/is_literal_type/value.cc: Likewise.
3204 * testsuite/20_util/optional/constexpr/nullopt.cc:
3205 Use __is_literal_type directly.
3206 * testsuite/20_util/optional/nullopt.cc: Likewise.
3207 * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
3208 * testsuite/20_util/variant/95915.cc: New.
3209 * testsuite/20_util/variant/compile.cc: Add new test.
3210 * testsuite/experimental/optional/constexpr/nullopt.cc:
3211 Use __is_literal_type directly.
3212 * testsuite/experimental/optional/nullopt.cc: Likewise.
3213 * testsuite/experimental/type_traits/value.cc: Adjust.
3214 * testsuite/util/testsuite_common_types.h:
3215 Use __is_literal_type directly.
3217 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
3219 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
3220 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
3222 * testsuite/20_util/from_chars/3.cc: New test.
3224 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
3226 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
3227 * include/std/charconv (__detail::__to_chars): Avoid
3228 -Wsign-compare warning.
3230 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
3233 * include/std/charconv (__to_chars_i): Check for zero-sized
3234 buffer unconditionally.
3235 * testsuite/20_util/to_chars/95851.cc: New test.
3237 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
3239 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
3241 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
3242 directives outside preprocessor condition.
3244 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
3247 * include/std/variant (__detail::__variant::_Build_FUN): Remove
3248 partial specialization to prevent narrowing conversions to bool.
3249 * testsuite/20_util/variant/compile.cc: Test non-narrowing
3250 conversions to bool.
3251 * testsuite/20_util/variant/run.cc: Likewise.
3253 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
3255 * doc/Makefile.in: Regenerate.
3256 * include/Makefile.in: Regenerate.
3257 * libsupc++/Makefile.in: Regenerate.
3258 * po/Makefile.in: Regenerate.
3259 * python/Makefile.in: Regenerate.
3260 * src/Makefile.in: Regenerate.
3261 * src/c++11/Makefile.in: Regenerate.
3262 * src/c++17/Makefile.in: Regenerate.
3263 * src/c++98/Makefile.in: Regenerate.
3264 * src/filesystem/Makefile.in: Regenerate.
3265 * testsuite/Makefile.in: Regenerate.
3267 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
3269 * Makefile.am: Use -include.
3270 * Makefile.in: Regenerate.
3272 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
3274 * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
3275 * Makefile.in: Regenerate.
3276 * configure.ac (tmake_file): Substitute.
3277 * configure: Regenerate.
3278 * configure.host (aix*): Define tmake_file.
3279 * config/os/aix/t-aix: New file.
3281 2020-06-20 Jason Merrill <jason@redhat.com>
3283 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
3284 Remove greedy_ops tests.
3285 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
3286 Remove greedy_ops tests.
3288 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3291 * include/bits/stl_algobase.h (__size_to_integer(float))
3292 (__size_to_integer(double), __size_to_integer(long double))
3293 (__size_to_integer(__float128)): Cast return type explicitly.
3294 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
3295 Remove unused typedef.
3297 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3299 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
3300 namespace qualification.
3301 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
3303 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
3304 (tuple_element, __get_helper, get, __make_tuple_impl)
3305 (__make_1st_indices, __tuple_concater)
3306 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
3308 * include/std/utility (tuple_element, __is_tuple_like_impl)
3309 (tuple_size, __pair_get, get): Likewise.
3311 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3313 * include/bits/std_function.h (function): Define all member
3316 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
3318 * include/bits/stl_algo.h (__includes): Simplify the code.
3320 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
3322 * include/std/optional (optional()): Explicitly define it.
3324 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3327 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
3328 Construct the first value at *__first instead of on the stack.
3329 (__uninitialized_default_n_1<true>): Likewise.
3330 Improve comments on several of the non-standard algorithms.
3331 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
3333 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
3335 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
3337 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
3339 * testsuite/23_containers/vector/cons/94540.cc: New test.
3341 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3343 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
3344 Replace Value type with int so trivial code path is used.
3345 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
3348 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3350 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
3351 use std::fill_n when the size is an integral type.
3352 (__uninitialized_default_n): Likewise.
3353 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
3355 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
3357 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
3360 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
3363 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
3364 alias instead of deducing _Tp as an unqualified type.
3365 (__atomic_impl::exchange): Use the _Val alias to remove volatile
3366 from the reinterpret_cast result type.
3368 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
3370 * include/std/atomic (atomic): Add static assertions.
3371 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
3373 2020-06-16 Patrick Palka <ppalka@redhat.com>
3376 * testsuite/20_util/is_constructible/94003.cc: New test.
3378 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
3380 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
3381 Update value for C++20.
3382 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
3383 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
3384 Update expected value.
3385 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
3388 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
3390 * include/bits/char_traits.h (char_traits::move): constexpr move with
3391 overlap was using copy_backward incorrectly.
3392 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
3395 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
3397 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
3398 when the value is currently set.
3399 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
3400 Actually check the return value.
3401 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
3404 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
3406 * include/bits/atomic_base.h (atomic_flag::test): Add missing
3408 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
3409 dg-options and verify results of test function.
3410 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
3412 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
3415 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
3416 Only discard an extra character if we didn't already reach the
3418 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
3419 (wistream::ignore(streamsize, wchar_t)): Likewise.
3420 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
3421 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
3423 2020-06-10 Patrick Palka <ppalka@redhat.com>
3426 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
3427 Also check that the iterator and sentinel have the same type before
3428 applying the unwrapping optimization for __normal_iterator.
3429 Split the check into two, one for the first iterator/sentinel
3430 pair and another for second iterator/sentinel pair. Remove uses
3431 of __niter_base, and remove uses of std::move on a
3433 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
3434 (__copy_or_move): Likewise. Perform similar adjustments for
3435 the reverse_iterator and move_iterator optimizations. Inline
3436 the checks into the if-constexprs, and use using-declarations to
3437 make them less visually noisy. Remove uses of __niter_wrap.
3438 (__copy_or_move_backward): Likewise.
3439 * testsuite/25_algorithms/copy/95578.cc: New test.
3440 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
3441 * testsuite/25_algorithms/equal/95578.cc: New test.
3442 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
3443 * testsuite/25_algorithms/move/95578.cc: New test.
3444 * testsuite/25_algorithms/move_backward/95578.cc: New test.
3446 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
3447 Jonathan Wakely <jwakely@redhat.com>
3449 * include/bits/deque.tcc (__lex_cmp_dit): New.
3450 (__lexicographical_compare_aux1): Define overloads for deque
3452 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
3453 New static member function.
3454 (__lexicographical_compare<true>::__3way): Likewise.
3455 (__lexicographical_compare<true>::__lc): Use __3way.
3456 (__lexicographical_compare_aux): Rename to
3457 __lexicographical_compare_aux1 and declare overloads for deque
3459 (__lexicographical_compare_aux): Define new forwarding function
3460 that calls __lexicographical_compare_aux1 and declare new overloads
3462 (lexicographical_compare): Do not use __niter_base on
3464 * include/debug/safe_iterator.tcc
3465 (__lexicographical_compare_aux): Define overloads for safe
3467 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
3468 checks with random access iterators.
3469 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
3472 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
3474 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
3475 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
3477 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
3479 * include/std/optional (bad_optional_access): Define default
3480 constructor and destructor as defaulted.
3481 * testsuite/20_util/optional/bad_access.cc: New test.
3483 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
3485 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
3487 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
3489 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
3491 * include/bits/unique_ptr.h (operator<<): Define for C++20.
3492 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
3494 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
3496 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
3497 (__detail::__cat, __detail::__diff): Move to class scope in the
3498 relevant __iterator_traits specializations.
3499 (__iterator_traits<>): Use nested class templates instead of ones from
3501 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
3502 class scope in iterator_traits<common_iterator<I, S>>.
3503 (iterator_traits<common_iterator<I, S>>): Use nested class template
3504 instead of __detail::__common_iter_ptr.
3506 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
3508 * include/bits/stl_algo.h (__copy_n_a): Move to ...
3509 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
3511 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
3513 (__niter_base(const _Safe_iterator<_Ite, _Seq,
3514 random_access_iterator_tag>&)): Declare.
3515 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
3516 _Deque_iterator<>)): Declare.
3517 * include/bits/deque.tcc
3518 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
3519 _Deque_iterator<>)): New.
3520 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
3522 * include/bits/streambuf_iterator.h
3523 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
3524 * include/debug/safe_iterator.tcc (__niter_base): New.
3525 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
3527 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
3529 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
3531 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
3532 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
3535 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
3537 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
3538 ranges::copy for positive values.
3539 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
3540 integral type and only call __copy_n for positive values.
3541 * testsuite/util/testsuite_iterators.h
3542 (random_access_iterator_wrapper::operator+=): Fix range check for
3544 (output_container, input_container, forward_container)
3545 (bidirectional_container, random_access_container): New alias
3547 * testsuite/25_algorithms/copy_n/5.cc: New test.
3549 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
3552 * include/debug/deque (deque(const _Base&)): Replace parameter
3553 with a struct that wraps a const _Base&.
3554 * include/debug/forward_list (forward_list(_Base_ref)): New
3556 * include/debug/list (list(const _Base&)): Replace parameter
3557 with a struct that wraps a const _Base&.
3558 * include/debug/map.h (map(const _Base&)): Likewise.
3559 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
3560 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
3561 * include/debug/set.h (set(const _Base&)): Likewise.
3562 * include/debug/unordered_map (unordered_map(const _Base&))
3563 (unordered_multimap(const _Base&)): Likewise.
3564 * include/debug/unordered_set (unordered_set(const _Base&))
3565 (unordered_multiset(const _Base&)): Likewise.
3566 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
3567 Adjust dg-error line number.
3568 * include/debug/vector (vector(const _Base&)): Likewise.
3569 * testsuite/23_containers/deque/debug/90102.cc: New test.
3570 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
3571 * testsuite/23_containers/list/debug/90102.cc: New test.
3572 * testsuite/23_containers/map/debug/90102.cc: New test.
3573 * testsuite/23_containers/multimap/debug/90102.cc: New test.
3574 * testsuite/23_containers/multiset/debug/90102.cc: New test.
3575 * testsuite/23_containers/set/debug/90102.cc: New test.
3576 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
3577 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
3578 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
3579 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
3580 * testsuite/23_containers/vector/debug/90102.cc: New test.
3582 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3585 * include/bits/fs_path.h (path::_S_to_string): Move to
3586 namespace-scope and rename to ...
3587 (__detail::__string_from_range): ... this.
3588 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
3589 convert a char sequence containing UTF-8 to wstring.
3590 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
3591 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
3592 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
3593 __string_from_range to obtain a contiguous range and
3594 __wstr_from_utf8 to obtain a wide string.
3595 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
3596 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
3598 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
3599 Use __wstr_from_utf8.
3601 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3603 * testsuite/util/testsuite_iterators.h:
3604 (input_iterator_wrapper::operator++(int)): Return proxy object.
3606 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3608 * doc/xml/manual/evolution.xml: Document deprecation of
3609 __is_nullptr_t and removal of std::allocator members.
3610 * doc/html/manual/api.html: Regenerate.
3612 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3614 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
3615 * doc/xml/manual/evolution.xml: Likewise.
3616 * doc/html/manual/api.html: Regenerate.
3617 * doc/html/manual/containers.html: Regenerate.
3619 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
3621 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
3622 * doc/html/faq.html: Regenerate.
3624 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
3626 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
3629 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
3631 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
3632 www.cs.princeton.edu to https.
3633 * doc/html/manual/policy_data_structures.html: Regenerate.
3635 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
3637 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
3638 * configure: Rebuild.
3640 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
3643 * configure: Regenerated.
3645 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
3648 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
3649 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
3650 (unordered_map<>::insert_or_assign): Adapt.
3652 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3655 * include/bits/atomic_base.h (__atomic_impl::load): Add
3656 cv-qualifiers to parameter so that _Tp is deduced as the
3658 * testsuite/29_atomics/atomic_float/95282.cc: New test.
3660 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3663 * include/std/ranges (transform_view::_Sentinel): Allow hidden
3664 friends to work with _Iterator<true> and _Iterator<false>.
3665 (join_view::_Sentinel): Likewise.
3666 * testsuite/std/ranges/adaptors/95322.cc: New test.
3668 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3671 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
3672 operators to use the correct operations on the underlying
3674 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
3676 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3678 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
3680 2020-05-26 Patrick Palka <ppalka@redhat.com>
3683 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
3684 Remove and instead define it ...
3685 (common_iterator::_Proxy): ... here.
3686 (common_iterator::operator->): Use it.
3687 * testsuite/24_iterators/common_iterator/2.cc: New test.
3688 * testsuite/std/ranges/adaptors/95322.cc: New test.
3690 2020-05-23 Patrick Palka <ppalka@redhat.com>
3693 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
3694 dg-additional-options. Avoid unused-but-set-variable warning.
3696 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
3699 * include/debug/helper_functions.h (__get_distance): Only declare
3700 as a constexpr function for C++14 and up.
3701 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
3703 * include/bits/fs_path.h (__detail::_S_range_begin)
3704 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
3705 overloaded function template __detail::__effective_range.
3706 (__detail::__effective_range): New overloaded function template to
3707 create a basic_string or basic_string_view for an effective range.
3708 (__detail::__value_type_is_char): Use __detail::__effective_range.
3709 Do not use remove_const on value type.
3710 (__detail::__value_type_is_char_or_char8_t): Likewise.
3711 (path::path(const Source&, format))
3712 (path::path(const Source&, const locale&))
3713 (path::operator/=(const Source&), path::append(const Source&))
3714 (path::concat(const Source&)): Use __detail::__effective_range.
3715 (path::_S_to_string(InputIterator, InputIterator)): New function
3716 template to create a string view if possible, or string otherwise.
3717 (path::_S_convert): Add overloads that convert a string returned
3718 by __detail::__effective_range. Use if-constexpr to inline conversion
3719 logic from all overloads of _Cvt::_S_convert.
3720 (path::_S_convert_loc): Add overload that converts a string. Use
3721 _S_to_string to avoid allocation when possible.
3722 (path::_Cvt): Remove.
3723 (path::operator+=(CharT)): Remove indirection through path::concat.
3724 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
3725 overload for non-const pointers, to avoid constructing a std::string.
3726 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
3727 compilation with call to _S_convert.
3729 * include/bits/fs_path.h (__detail::_S_range_begin)
3730 (__detail::_S_range_end): Remove unintentional static specifiers.
3731 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
3732 (__detail::_S_range_end): Likewise.
3734 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
3735 Replace alias template with variable template. Don't remove const.
3736 (filesystem::__detail::__is_path_src): Replace overloaded function
3737 template with variable template and specializations.
3738 (filesystem::__detail::__is_path_iter_src): Replace alias template
3739 with class template.
3740 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
3742 (filesystem::__detail::_Path2): New alias template for checking
3743 InputIterator requirements.
3744 (filesystem::__detail::__constructible_from): Remove.
3745 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
3746 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
3747 constructor arguments of void and void* types.
3749 2020-05-21 Matthias Kretz <kretz@kde.org>
3751 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
3752 allowing runtest to work without arguments.
3753 * testsuite/Makefile.in: Regenerate.
3755 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
3758 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
3759 Reorder constraints to avoid recursion when constructors use
3760 iterator_traits (LWG 3420).
3761 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
3763 * include/experimental/socket (basic_socket::is_open()
3764 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
3766 * include/experimental/bits/net.h (__endpoint, __protocol)
3767 (__acceptable_protocol, __inet_protocol): New concepts.
3768 (__detail::__is_endpoint): Move trait from <experimental/socket>.
3769 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
3771 (__endpoint, __protocol, __acceptable_protocol): New variable
3773 * include/experimental/socket (__is_endpoint): Move to net.h header.
3774 (basic_socket, basic_socket_acceptor): Check requirements.
3776 * include/experimental/executor (use_future_t::use_future_t()): Fix
3777 incorrect noexcept-specifier.
3778 * include/experimental/internet (basic_resolver_results): Adjust
3780 * include/experimental/socket (__basic_socket_impl::release): Add
3782 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
3784 (basic_socket::release(), basic_socket::release(error_code&)): Add
3785 missing member functions.
3786 (basic_socket::is_open()): Add nodiscard attribute.
3787 (basic_socket::close(error_code&)): Pass argument to base function.
3788 (basic_socket_acceptor::release())
3789 (basic_socket_acceptor::release(error_code&)): Add missing member
3791 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
3792 (basic_socket_streambuf::error()): Add noexcept.
3793 (basic_socket_iostream::error()): Likewise.
3794 * testsuite/experimental/net/socket/basic_socket.cc: New test.
3796 * include/experimental/buffer: Replace typedefs with
3798 * include/experimental/executor: Likewise.
3799 * include/experimental/internet: Likewise.
3800 * include/experimental/socket: Likewise.
3801 * include/experimental/timer: Likewise.
3803 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
3806 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
3808 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
3810 (random_device::_M_init): Use __x86_rdseed_rdrand when both
3811 instructions are available.
3812 * testsuite/26_numerics/random/random_device/94087.cc: New test.
3814 2020-05-19 Patrick Palka <ppalka@redhat.com>
3817 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
3819 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
3821 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
3824 * configure: Regenerated.
3826 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
3828 * configure: Regenerated.
3830 2020-05-13 Alexandre Oliva <oliva@adacore.com>
3833 * include/experimental/memory_resource
3834 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
3835 x86-vxworks as on x86-solaris.
3836 (__resource_adaptor_imp::do_deallocate): Likewise.
3837 * testsuite/experimental/memory_resource/new_delete_resource.cc:
3839 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
3840 (test03): Drop max-align test for char-aligned alloc.
3842 2020-05-08 Ulrich Drepper <drepper@redhat.com>
3844 * include/bits/atomic_base.h (atomic_flag): Implement test member
3846 * include/std/version: Define __cpp_lib_atomic_flag_test.
3847 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
3848 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
3850 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
3852 PR libstdc++/94971 (partial)
3853 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
3854 std::sample using macro to work in parallel mode.
3855 (__sort_fn): Likewise for std::sort.
3856 (ranges::__nth_element_fn): Likewise for std::nth_element.
3857 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
3858 Likewise for std::__min_cmp.
3859 * include/parallel/algobase.h (lexicographical_compare_three_way):
3860 Add to namespace std::__parallel.
3863 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
3864 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
3865 (_UnguardedIterator::operator _RAIter): Add const qualifier.
3866 (operator<(_GuardedIterator&, _GuardedIterator&)
3867 (operator<=(_GuardedIterator&, _GuardedIterator&)
3868 (operator<(_UnguardedIterator&, _UnguardedIterator&)
3869 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
3870 parameters to const references.
3872 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
3874 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
3875 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3877 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
3879 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
3880 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
3881 * include/bits/stl_bvector.h (__fill_bvector): Move outside
3882 _GLIBCXX_STD_C namespace.
3883 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
3885 (__fill_a1): ...this.
3886 * testsuite/25_algorithms/fill/bvector/1.cc: New.
3888 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
3890 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3892 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3894 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
3895 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
3897 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
3898 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
3901 2020-05-06 Martin Liska <mliska@suse.cz>
3904 2020-05-05 Martin Liska <mliska@suse.cz>
3906 * include/parallel/multiway_merge.h:
3907 Use const for _Compare template argument.
3909 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
3911 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
3912 versions for GCC 9.[123] and 10.1 releases.
3913 * doc/html/*: Regenerate.
3915 2020-05-06 Jakub Jelinek <jakub@redhat.com>
3917 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3918 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3919 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
3920 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3921 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3922 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3923 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3925 2020-05-05 Martin Liska <mliska@suse.cz>
3928 * include/parallel/multiway_merge.h:
3929 Use const for _Compare template argument.
3931 2020-05-04 Fangrui Song <maskray@google.com>
3933 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
3935 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
3937 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
3938 * doc/html/*: Regenerate.
3941 * src/c++17/memory_resource.cc
3942 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
3945 2020-05-04 Nathan Sidwell <nathan@acm.org>
3948 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
3949 ptrdiff_t before negation, to show intent more clearly.
3951 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
3954 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
3955 Add comment about single-threaded behaviour.
3956 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
3957 class member access out of loop.
3958 (synchronized_pool_resource::synchronized_pool_resource())
3959 (synchronized_pool_resource::~synchronized_pool_resource())
3960 (synchronized_pool_resource::release()): Check __gthread_active_p
3961 before creating and/or deleting the thread-specific data key.
3962 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
3964 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
3965 path for single-threaded case.
3966 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
3967 Likewise. Return if unable to find a pool that owns the allocation.
3968 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
3970 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
3972 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
3975 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
3978 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
3979 usable in constant expressions.
3980 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
3983 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
3986 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
3988 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
3989 Patrick Palka <ppalka@redhat.com>
3992 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
3993 Add trait to determine return type and an alias for it.
3994 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
3995 deduced return type.
3996 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
3997 the result of ranges::iter_move.
3998 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
3999 instead of checking the result of ranges::iter_move.
4000 * testsuite/24_iterators/customization_points/92894.cc: New test.
4001 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
4003 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4006 * include/std/type_traits (__is_complete_or_unbounded): Replace
4007 BADNAME _T with _Tp.
4008 * testsuite/17_intro/badnames.cc: New test.
4010 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
4013 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
4014 (allocator_traits::_S_destroy)
4015 (allocator_traits<allocator<T>>::construct): Use traits in
4016 noexcept-specifiers.
4017 * include/bits/allocator.h (allocator<void>::construct)
4018 (allocator<void>::destroy): Likewise.
4019 * include/ext/malloc_allocator.h (malloc_allocator::construct)
4020 (malloc_allocator::destroy): Likewise.
4021 * include/ext/new_allocator.h (new_allocator::construct)
4022 (new_allocator::destroy): Likewise.
4023 * testsuite/20_util/allocator/89510.cc: New test.
4024 * testsuite/ext/malloc_allocator/89510.cc: New test.
4025 * testsuite/ext/new_allocator/89510.cc: New test.
4027 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
4030 * include/bits/basic_string.tcc: Update comment about explicit
4033 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
4036 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
4037 Remove non-standard macro.
4038 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
4039 to indicate P1032R1 support.
4040 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
4041 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
4042 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
4043 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
4044 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
4045 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
4046 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
4048 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
4049 * testsuite/21_strings/basic_string_view/operations/copy/char/
4050 constexpr.cc: Likewise.
4051 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
4054 * include/bits/alloc_traits.h (_S_construct): Restore placement
4055 new-expression for C++11/14/17 and call std::construct_at directly
4057 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
4058 function returning void.
4059 * testsuite/20_util/specialized_algorithms/
4060 uninitialized_value_construct/94831.cc: New test.
4061 * testsuite/23_containers/vector/cons/94831.cc: New test.
4063 2020-04-28 Patrick Palka <ppalka@redhat.com>
4065 LWG 3433 subrange::advance(n) has UB when n < 0
4066 * include/std/ranges (subrange::prev): Fix typo.
4067 (subrange::advance): Handle a negative argument as per the proposed
4068 resolution of LWG 3433.
4069 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
4071 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
4072 Iain Sandoe <iain@sandoe.co.uk>
4075 * include/std/coroutine: Implement handing for non-
4076 class coroutine return types.
4078 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
4080 * include/experimental/executor (service_already_exists): Make default
4081 constructor public (LWG 3414).
4082 * testsuite/experimental/net/execution_context/make_service.cc: Check
4083 the service_already_exists can be default constructed.
4085 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
4086 Jonathan Wakely <jwakely@redhat.com>
4090 * include/std/any (any): Rename template parameters for consistency
4092 (any::_Decay): Rename to _Decay_if_not_any.
4093 (any::any(T&&):: Remove is_constructible from constraints. Remove
4094 non-standard overload.
4095 (any::any(in_place_type_t<T>, Args&&...))
4096 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
4097 (any::emplace(Args&&...))
4098 (any::emplace(initializer_list<U>, Args&&...)):
4099 Use decay_t instead of _Decay.
4100 * testsuite/20_util/any/cons/90415.cc: New test.
4101 * testsuite/20_util/any/cons/92156.cc: New Test.
4102 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
4104 * testsuite/20_util/any/modifiers/92156.cc: New test.
4106 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
4108 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
4109 * doc/html/*: Regenerate.
4111 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
4112 value for C++17 to 201803L because P0858R0 is supported for C++17.
4113 * include/std/version (__cpp_lib_array_constexpr): Likewise.
4114 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
4115 Check for value corresponding to P0031R0 features being tested.
4116 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
4117 Check for value corresponding to P0858R0 features being tested.
4119 * include/std/version (__cpp_lib_three_way_comparison): Define for
4120 freestanding builds.
4122 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
4124 * include/experimental/net/executor (system_context): Mark
4125 system_context::system_context() = delete.
4126 * testsuite/experimental/net/executor/1.cc: Add new
4127 test to check system_context is not default constructible.
4129 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
4131 * include/std/coroutine: Update the inline namespace to __n4861.
4132 Add the __cpp_lib_coroutine define, set to 201902L.
4133 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
4135 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
4137 * include/std/execution (__cpp_lib_execution): Define to indicate
4138 support for P0024R2 and P1001R2.
4139 * include/std/version (__cpp_lib_execution): Define.
4140 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
4141 defined by <algorithm>, move other tests to new tests ...
4142 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
4143 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
4144 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
4145 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
4147 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
4148 different values for C++17 and C++20, to indicate different feature
4149 sets. Update value for C++20 to indicate P1032R1 support.
4150 * include/std/version (__cpp_lib_array_constexpr): Likewise.
4151 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
4152 Check feature test macro.
4153 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
4155 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
4157 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
4158 in C++17 mode and check feature test macro.
4160 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
4162 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
4163 defined by <utility>.
4165 * include/std/functional (__cpp_lib_concepts): Update macro value to
4166 indicate P1964R2 support.
4167 * include/std/version (__cpp_lib_concepts): Likewise.
4168 * testsuite/std/concepts/1.cc: Adjust expected value.
4169 * testsuite/std/concepts/2.cc: Likewise.
4171 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
4172 __cpp_lib_constexpr_functional.
4173 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
4174 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
4176 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
4177 indicate P1006R1 support.
4178 (__cpp_lib_to_address): Define to indicate P0653R2 support.
4179 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
4181 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
4183 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
4185 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
4187 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
4188 Define to indicate P0339R6 support.
4189 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
4190 indicate P0457R2 support.
4191 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
4192 to indicate P0758R1 support.
4193 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
4194 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
4195 * include/std/version (__cpp_lib_atomic_float)
4196 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
4197 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
4198 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
4199 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
4200 (__cpp_lib_to_address): Define.
4201 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
4203 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
4205 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
4207 * include/std/version (__cpp_lib_map_insertion)
4208 (__cpp_lib_unordered_map_insertion): Remove.
4210 * include/std/condition_variable (__cpp_lib_jthread): Remove
4211 redundant definition.
4212 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
4213 indicate P1869R1 support.
4214 * include/std/version (__cpp_lib_jthread): Update value.
4215 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
4216 for updated macro value.
4217 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
4219 * testsuite/30_threads/jthread/1.cc: Likewise.
4220 * testsuite/30_threads/jthread/2.cc: Likewise.
4221 * testsuite/30_threads/stop_token/1.cc: Likewise.
4222 * testsuite/30_threads/stop_token/2.cc: Likewise.
4224 * testsuite/21_strings/basic_string/erasure.cc: Check for
4225 __cpp_lib_erase_if macro.
4226 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
4228 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4229 * testsuite/23_containers/list/erasure.cc: Likewise.
4230 * testsuite/23_containers/map/erasure.cc: Likewise.
4231 * testsuite/23_containers/set/erasure.cc: Likewise.
4232 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4233 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4234 * testsuite/23_containers/vector/erasure.cc: Likewise.
4236 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
4238 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
4239 to define operator<=>.
4240 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
4242 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
4243 * doc/Makefile.in: Regenerate.
4244 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
4246 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
4247 to the C++11 status table.
4248 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
4249 proposals with table matching contents of the C++14 standard.
4250 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
4252 * doc/html/*: Regenerate.
4255 * include/std/type_traits (__is_nt_constructible_impl): Add partial
4256 specializations for bounded arrays with non-empty initializers.
4257 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
4259 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
4261 * testsuite/lib/libstdc++.exp: Add additional_flags=
4262 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
4263 compiling with a newer Thread Building Blocks.
4265 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
4267 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
4269 * testsuite/20_util/is_constructible/51185.cc: Make test class a
4270 non-aggregate so that the test verifies the same thing in all -std
4272 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
4273 results for some types when paren-init for aggregates is supported.
4275 * include/std/version (__cpp_lib_three_way_comparison): Update value.
4276 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
4277 (__detail::__synth3way): Add noexcept-specifier.
4279 * include/bits/stl_map.h (map): Define operator<=> and remove
4280 operator< for C++20.
4281 * include/bits/stl_multimap.h (multimap): Likewise.
4282 * include/bits/stl_multiset.h (multiset): Likewise.
4283 * include/bits/stl_set.h (set): Likewise.
4284 * include/bits/stl_tree.h (_Rb_tree): Likewise.
4285 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
4286 operator!= for C++20.
4287 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
4288 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
4289 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
4290 * include/debug/set.h (__gnu_debug::set): Likewise.
4291 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
4292 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
4293 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
4294 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
4296 2020-04-20 Matthias Kretz <kretz@kde.org>
4298 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
4300 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
4302 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
4303 * include/bits/stl_stack.h (stack): Likewise.
4304 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
4305 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
4307 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4308 Remove redundant operator!= for C++20.
4309 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4311 * include/debug/unordered_map (unordered_map, unordered_multimap):
4313 * include/debug/unordered_set (unordered_set, unordered_multiset):
4317 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
4318 redundant assignment in constructor.
4320 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
4322 * include/std/chrono (duration, time_point): Define operator<=> and
4323 remove redundant operator!= for C++20.
4324 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
4326 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
4329 * testsuite/util/native_type/native_priority_queue.hpp: Use
4330 allocator_traits to rebind allocator.
4332 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
4334 * include/bits/forward_list.h (forward_list): Define operator<=> and
4335 remove redundant comparison operators for C++20.
4336 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
4337 * include/bits/stl_deque.h (deque): Likewise.
4338 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
4339 * include/bits/stl_list.h (list): Likewise.
4340 * include/bits/stl_vector.h (vector): Likewise.
4341 * include/debug/deque (__gnu_debug::deque): Likewise.
4342 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
4343 * include/debug/list (__gnu_debug::list): Likewise.
4344 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
4346 * include/debug/vector (__gnu_debug::vector): Likewise.
4347 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
4348 operator<=> for C++20.
4349 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
4350 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
4351 * testsuite/23_containers/list/cmp_c++20.cc: New test.
4352 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
4353 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
4355 * include/bits/basic_string.h (basic_string): Define operator<=> and
4356 remove redundant comparison operators for C++20.
4357 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
4358 Add comparison_category members.
4359 (__detail::__char_traits_cmp_cat): New helper to get comparison
4360 category from char traits class.
4361 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
4363 (sub_match): Define operator<=> and remove redundant comparison
4364 operators for C++20.
4365 (match_results): Remove redundant operator!= for C++20.
4366 * include/std/string_view (basic_string_view): Define operator<=> and
4367 remove redundant comparison operators for C++20.
4368 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
4370 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
4372 * testsuite/21_strings/basic_string_view/operations/copy/char/
4373 constexpr.cc: Initialize variable.
4374 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
4375 constexpr.cc: Likewise.
4376 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
4377 dg-do directive and remove comments showing incorrect signatures.
4378 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
4380 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
4382 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
4384 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
4386 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
4388 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
4389 name of unused parameter.
4391 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
4393 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
4394 (directory_entry): Define operator<=> and remove redundant comparison
4395 operators for C++20.
4396 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
4397 * include/bits/fs_path.h (path): Define operator<=> and remove
4398 redundant comparison operators for C++20.
4399 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
4400 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4401 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4402 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4404 * include/bits/allocator.h (operator!=): Do not define for C++20.
4405 * include/bits/locale_classes.h (operator!=): Likewise.
4406 * include/bits/std_function.h (operator==(nullptr_t, const function&))
4407 (operator!=(const function&, nullptr_t))
4408 (operator!=(nullptr_t, const function&)): Likewise.
4409 * include/ext/bitmap_allocator.h (operator!=): Likewise.
4410 * include/ext/debug_allocator.h (operator!=): Likewise.
4411 * include/ext/extptr_allocator.h (operator!=): Likewise.
4412 * include/ext/malloc_allocator.h (operator!=): Likewise.
4413 * include/ext/mt_allocator.h (operator!=): Likewise.
4414 * include/ext/new_allocator.h (operator!=): Likewise.
4415 * include/ext/pool_allocator.h (operator!=): Likewise.
4416 * include/ext/throw_allocator.h (operator!=): Likewise.
4417 * include/std/bitset (bitset::operator!=): Likewise.
4418 * include/std/memory_resource (operator!=): Likewise.
4419 * include/std/scoped_allocator (operator!=): Likewise.
4421 * include/std/typeindex (operator<=>): Define for C++20.
4422 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
4424 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
4426 * libsupc++/compare (compare_three_way): Fix constraint so that
4427 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
4428 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
4432 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
4433 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
4434 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
4435 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
4436 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
4437 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
4441 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
4442 * testsuite/18_support/comparisons/categories/94565.cc: New test.
4444 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
4446 * include/std/coroutine: Update coroutines builtin define,
4449 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
4451 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
4452 (strong_order, weak_order, partial_order): Replace uses of <=> with
4453 compare_three_way function object (LWG 3324).
4454 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
4455 equality operator so that X satisfies three_way_comparable.
4456 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
4458 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
4460 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
4461 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
4462 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
4463 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
4464 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
4466 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
4468 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
4470 * include/std/complex (operator==(const T&, const complex<T>&))
4471 (operator!=(const complex<T>&, const complex<T>&))
4472 (operator!=(const complex<T>&, const T&))
4473 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
4474 * testsuite/26_numerics/slice/compare.cc: New test.
4476 * include/std/charconv (to_chars_result, from_chars_result): Add
4477 defaulted equality comparisons for C++20.
4478 * testsuite/20_util/from_chars/compare.cc: New test.
4479 * testsuite/20_util/to_chars/compare.cc: New test.
4481 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
4484 * include/std/charconv (__integer_to_chars_result_type)
4485 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
4487 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
4488 use of std::string_view with std::string.
4489 * testsuite/20_util/from_chars/2.cc: Likewise.
4490 * testsuite/20_util/to_chars/1.cc: Likewise.
4491 * testsuite/20_util/to_chars/2.cc: Likewise.
4493 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
4496 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
4497 usable in constant expressions for C++20.
4498 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
4499 _GLIBCXX20_CONSTEXPR.
4500 (std::char_traits<char>, std::char_traits<wchar_t>)
4501 (std::char_traits<char8_t>): Make move, copy and assign usable in
4502 constant expressions for C++20.
4503 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
4504 and copy usable in constant expressions for C++20.
4505 * include/std/string_view (basic_string_view::copy): Add
4506 _GLIBCXX20_CONSTEXPR.
4507 * testsuite/21_strings/basic_string_view/operations/copy/char/
4508 constexpr.cc: New test.
4509 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
4510 constexpr.cc: New test.
4512 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
4514 * doc/xml/manual/appendix_contributing.xml: Refer to Git
4515 documentation instead of Subversion. Switch to https.
4516 * doc/html/manual/appendix_contributing.html: Regenerate.
4518 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
4521 * include/bits/ptr_traits.h (__to_address): Add special case for debug
4522 iterators, to avoid dereferenceable check.
4523 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
4524 * testsuite/20_util/to_address/debug.cc: New test.
4526 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
4528 * testsuite/experimental/net/execution_context/use_service.cc:
4529 Require pthread and gthreads.
4531 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
4533 * doc/xml/manual/appendix_free.xml: Move "free books" list from
4535 * doc/html/manual/appendix_free.html: Regenerate.
4537 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
4539 Library-side tests for parenthesized aggregate init
4544 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
4545 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
4546 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
4547 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
4548 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
4549 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
4550 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
4551 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
4552 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
4554 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
4555 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
4556 * testsuite/20_util/variant/92878_92947.cc: Likewise.
4557 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
4559 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
4561 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
4563 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
4565 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
4567 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
4569 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
4570 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
4571 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
4573 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
4574 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
4576 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
4578 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
4580 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
4582 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
4585 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
4587 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
4588 for changes due to parenthesized aggregate-initialization in C++20.
4589 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
4590 with std::chrono::sys_time in C++20.
4592 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
4593 to constrain C++20 versions of comparison operators. Fix backwards
4594 logic of relational operators.
4595 (move_iterator): Use requires-clause to constrain comparison operators
4596 in C++20. Do not declare non-standard same-type overloads for C++20.
4597 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
4598 of comparisons and check using greedy_ops type.
4599 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
4600 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
4601 main function from compile-only test.
4602 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
4604 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
4606 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
4607 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
4608 C++20 concepts are required.
4609 * include/bits/stl_iterator_base_types.h: Likewise.
4610 * include/std/concepts: Likewise.
4611 * include/std/version: Likewise.
4612 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
4615 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
4616 (reverse_iterator::iterator_category): Define for C++20.
4617 (reverse_iterator): Define comparison operators correctly for C++20.
4618 (__normal_iterator): Add constraints to comparison operators for C++20.
4619 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
4620 overload for input iterators.
4621 (move_iterator): Add constraints to comparison operators for C++20.
4622 Define operator<=> for C++20.
4623 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
4624 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
4625 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
4626 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
4628 * include/bits/iterator_concepts.h (__detail::__decay_copy)
4629 (__detail::__member_begin, __detail::__adl_begin): Move here from
4630 <bits/range_access.h>.
4631 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
4632 * bits/range_access.h (__cust_access::__decay_copy)
4633 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
4634 <bits/iterator_concepts.h>.
4635 (ranges::iterator_t): Use __detail::__range_iter_t.
4636 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
4637 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
4638 (front_insert_iterator): Likewise.
4639 (insert_iterator): Implement changes from P0896R4 for C++20.
4640 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
4641 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
4642 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
4643 for inclusion in synopsis_c++20.cc which expects different signatures
4644 for some function templates.
4645 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
4647 * include/std/type_traits (__is_array_convertible): Move definition
4648 to immediately after is_convertible.
4650 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
4652 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
4653 (chrono::months, chrono::sys_days, chrono::local_t)
4654 (chrono::local_time, chrono::local_seconds, chrono::local_days):
4656 (chrono::time_point): Add missing static assert.
4657 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
4658 * testsuite/std/time/clock/file/overview.cc: New test.
4659 * testsuite/std/time/clock/file/members.cc: New test.
4660 * testsuite/std/time/syn_c++20.cc: New test.
4662 2020-03-25 Mike Crowe <mac@mcrowe.com>
4664 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
4666 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
4669 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
4671 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
4672 * include/std/chrono (filesystem::__file_clock): Here.
4673 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
4674 Define public member functions for C++20.
4675 (is_clock, is_clock_v): Define traits for C++20.
4676 * include/std/condition_variable (condition_variable::wait_until): Add
4677 check for valid clock.
4678 * include/std/future (_State_baseV2::wait_until): Likewise.
4679 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
4680 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
4682 * include/std/thread (this_thread::sleep_until): Likewise.
4683 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
4684 slow_clock with new namespace.
4685 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
4687 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
4689 * testsuite/30_threads/future/members/clock_neg.cc: New test.
4690 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
4691 Qualify slow_clock with new namespace.
4692 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
4693 clock_neg.cc: New test.
4694 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
4696 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
4697 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
4699 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
4700 slow_clock with new namespace.
4701 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
4702 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
4704 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
4705 * testsuite/std/time/traits/is_clock.cc: New test.
4706 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
4709 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
4712 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
4713 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
4714 Improve test coverage.
4717 * include/bits/fs_path.h (path::_S_str_convert): Replace first
4718 parameter with basic_string_view so that strings with different
4719 allocators can be accepted.
4720 (path::generic_string<C,T,A>()): Use basic_string object that uses the
4721 right allocator type.
4722 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
4723 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
4726 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
4729 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
4730 (__is_nt_default_constructible_impl): Remove.
4731 (__is_nothrow_default_constructible_impl): Remove.
4732 (__is_nt_constructible_impl): Add bool template parameter. Adjust
4733 partial specializations.
4734 (__is_nothrow_constructible_impl): Replace class template with alias
4736 (is_nothrow_default_constructible): Derive from alias template
4737 __is_nothrow_constructible_impl instead of
4738 __is_nothrow_default_constructible_impl.
4739 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
4741 * include/std/stop_token (stop_token::_Stop_state_ref): Define
4742 comparison operators explicitly if the compiler won't synthesize them.
4744 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
4745 __cpp_lib_concepts before using iter_reference_t.
4746 * include/bits/stream_iterator.h (istream_iterator): Check
4747 __cpp_lib_concepts before using default_sentinel_t.
4748 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
4751 * include/experimental/executor (executor::executor(Executor)): Call
4752 make_shared directly instead of _M_create. Create _Tgt1 object.
4753 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
4754 Call allocate_shared directly instead of _M_create. Create _Tgt2
4756 (executor::target_type): Add cast needed for new _Tgt interface.
4757 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
4758 (executor::_Tgt): Define the same interface whether RTTI is enabled or
4760 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
4761 std::type_info in the interface.
4762 (executor::_Tgt::_M_func): Add data member.
4763 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
4764 (executor::_Tgt1::_S_func): Define function to access target without
4766 (executor::_M_create): Remove.
4767 (operator==, operator!=): Simplify comparisons for executor.
4768 * include/experimental/socket (is_error_code_enum<socket_errc>):
4769 Define specialization before use.
4770 * testsuite/experimental/net/executor/1.cc: New test.
4772 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
4775 * include/experimental/executor (service_already_exists): Add default
4776 constructor. Declare make_service to be a friend.
4777 * testsuite/experimental/net/execution_context/make_service.cc: New
4780 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
4782 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
4783 a null pointer to functions with nonnull(1) attribute.
4785 2020-03-11 Patrick Palka <ppalka@redhat.com>
4787 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
4788 'address' -> 'std::__addressof'.
4789 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
4790 a non-forward input_range.
4791 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
4792 default constructor protected instead of deleted, like with
4793 input_iterator_wrapper.
4794 (test_range::iterator): Add comment explaining that this type is used
4795 only when the underlying wrapper is input_iterator_wrapper or
4796 output_iterator_wrapper. Remove delegating defaulted constructor so
4797 that the inherited default constructor is used instead.
4799 LWG 3286 ranges::size is not required to be valid after a call to
4800 ranges::begin on an input range
4801 * include/std/ranges (subrange::subrange): Split single-argument
4802 constructor into two, one constrained by _S_store_size and another by
4804 (take_view::begin): Call size() before calling ranges::begin(_M_base).
4805 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
4806 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
4808 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
4810 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
4811 instead of _M_current.
4812 (split_view::_OuterIter::operator++): Likewise.
4814 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
4815 (transform_view::_Iterator::operator*): Add noexcept-specifier.
4816 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
4817 (split_view::_OuterIter::__current): Add noexcept.
4818 (split_view::_InnerIter::__iter_swap): Remove.
4819 (split_view::_InnerIter::__iter_move): Remove.
4820 (split_view::_InnerIter::_M_i_current): New accessors.
4821 (split_view::_InnerIter::__at_end): Use _M_i_current().
4822 (split_view::_InnerIter::operator*): Likewise.
4823 (split_view::_InnerIter::operator++): Likewise.
4824 (iter_move(const _InnerIter&)): Likewise.
4825 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
4826 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
4827 for iter_move and iter_swap on split_view's inner iterator.
4830 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
4831 Change expression in noexcept-specifier to match function body.
4833 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
4834 comment explaining multiple dg-do directives.
4835 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
4836 so test is run as well as compiled.
4838 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
4841 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
4842 handle concatenations that change the type of the first component.
4843 (path::operator+=(basic_string_view<value_type>)): Likewise.
4844 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
4846 2020-03-06 Patrick Palka <ppalka@redhat.com>
4848 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
4849 join_view::_Sentinel<!_Const>.
4850 * testsuite/std/ranges/adaptors/join.cc: Augment test.
4853 * include/bits/range_access.h (__cust_access::_Empty::operator()):
4854 Declare return type to be bool instead of auto.
4855 * testsuite/std/ranges/adaptors/93978.cc: New test.
4857 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
4860 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
4861 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
4862 second argument to __glibcxx_rwlock_init.
4863 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
4866 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
4867 test to not fail due to PR 94063.
4868 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
4869 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
4871 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
4873 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
4876 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
4878 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
4879 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
4880 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4881 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
4882 for return value, and in comparison.
4883 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
4886 * include/std/string_view: Include <bits/ostream_insert.h>.
4887 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
4889 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
4891 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
4893 2020-03-04 Patrick Palka <ppalka@redhat.com>
4896 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
4897 condition for when to use memset, making sure to additionally check that
4898 the output pointer's value type is a non-volatile byte type. Instead of
4899 requiring that the fill type is a byte type, just require that it's an
4901 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
4903 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
4905 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
4906 blocked by PR 94017.
4907 * testsuite/25_algorithms/fill/94017.cc: New test.
4908 * testsuite/25_algorithms/fill_n/94017.cc: New test.
4910 LWG 3355 The memory algorithms should support move-only input iterators
4912 * include/bits/ranges_uninitialized.h
4913 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
4914 to copy __ifirst, which could be a move-only input iterator. Use
4915 operator- instead of ranges::distance to compute distance from a sized
4917 (__uninitialized_copy_n_fn::operator()): Likewise.
4918 (__uninitialized_move_fn::operator()): Likewise.
4919 (__uninitialized_move_n_fn::operator()): Likewise.
4920 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
4921 attempting to copy __first.
4922 (__uninitialized_destroy_n_fn::operator()): Likewise.
4923 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
4925 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
4927 * .../specialized_algorithms/uninitialized_move/constrained.cc:
4930 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
4931 protected instead of private.
4932 (test_sized_range_sized_sent): New.
4934 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
4935 New testsuite iterator.
4936 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
4937 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
4939 * include/bits/ranges_uninitialized.h
4940 (uninitialized_copy_fn::operator()): Pass a reference type as the first
4941 argument to is_nothrow_assignable_v.
4942 (uninitialized_copy_fn::operator()): Likewise.
4943 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
4944 with the input iterator stripped of its move_iterator.
4945 (uninitialized_move_n_fn::operator()): Likewise.
4946 (uninitialized_fill_fn::operator()): Pass a reference type as the first
4947 argument to is_nothrow_assignable_v.
4948 (uninitialized_fill_n_fn::operator()): Likewise.
4950 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
4953 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
4954 traits to control when to use memmove and memcmp optimizations.
4955 (__is_nonvolatile_trivially_copyable): New helper trait.
4956 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
4957 use memcmp optimization with volatile data.
4958 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
4959 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
4960 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
4961 (__copy_move_backward_a2): Likewise.
4962 (__equal_aux1): Use __memcmpable.
4963 (__lexicographical_compare_aux): Do not use memcmp optimization with
4965 * testsuite/25_algorithms/copy/94013.cc: New test.
4966 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
4967 * testsuite/25_algorithms/equal/94013.cc: New test.
4968 * testsuite/25_algorithms/fill/94013.cc: New test.
4969 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
4970 * testsuite/25_algorithms/move/94013.cc: New test.
4971 * testsuite/25_algorithms/move_backward/94013.cc: New test.
4973 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
4974 Avoid redundant iterator comparisons (LWG 3410).
4976 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
4979 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
4981 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
4983 * include/std/ranges (__detail::__maybe_empty_t): Rename to
4985 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
4987 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
4990 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
4992 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
4994 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
4996 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
4997 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
4998 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
4999 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
5000 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
5002 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
5003 Add libatomic option.
5004 * testsuite/30_threads/jthread/jthread.cc: Likewise.
5006 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
5008 * include/bits/stl_algo.h
5009 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
5010 * include/bits/stl_algobase.h: ...here.
5011 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
5013 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
5015 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
5017 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
5019 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
5020 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
5021 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
5022 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
5023 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
5024 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
5025 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
5029 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
5031 2020-02-28 Patrick Palka <ppalka@redhat.com>
5034 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
5035 Fix condition for when to use memcmp, making it consistent with the
5036 corresponding condition used in std::lexicographical_compare.
5037 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
5039 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
5040 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
5041 existing signatures for C++2a.
5043 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
5045 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
5046 test instead of just compiling it.
5048 2020-02-28 Patrick Palka <ppalka@redhat.com>
5050 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
5051 whenever the underlying range models common_range.
5053 * include/std/ranges (__detail::_CachedPosition): New struct.
5054 (views::filter_view::_S_needs_cached_begin): New member variable.
5055 (views::filter_view::_M_cached_begin): New member variable.
5056 (views::filter_view::begin): Use _M_cached_begin to cache its
5058 (views::drop_view::_S_needs_cached_begin): New static member variable.
5059 (views::drop_view::_M_cached_begin): New member variable.
5060 (views::drop_view::begin): Use _M_cached_begin to cache its result
5061 when _S_needs_cached_begin.
5062 (views::drop_while_view::_M_cached_begin): New member variable.
5063 (views::drop_while_view::begin): Use _M_cached_begin to cache its
5065 (views::reverse_view::_S_needs_cached_begin): New static member
5067 (views::reverse_view::_M_cached_begin): New member variable.
5068 (views::reverse_view::begin): Use _M_cached_begin to cache its result
5069 when _S_needs_cached_begin.
5070 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
5071 drop_view::begin caches its result.
5072 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
5073 that drop_while_view::begin caches its result.
5074 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
5075 filter_view::begin caches its result.
5076 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
5077 reverse_view::begin caches its result.
5079 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
5081 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
5082 filesystems that silently truncate timestamps.
5083 * testsuite/experimental/filesystem/operations/last_write_time.cc:
5086 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
5087 -Wstringop-overflow warnings.
5089 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
5091 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
5092 -fdiagnostics-urls=never to options.
5094 2020-02-27 Patrick Palka <ppalka@redhat.com>
5096 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
5098 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
5099 (take_view::_Sentinel<_Const>): Likewise.
5100 (take_while_view::_Sentinel<_Const>): Likewise.
5101 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
5102 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5103 * testsuite/std/ranges/adaptors/take.cc: Augment test.
5104 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
5105 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
5107 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
5108 base() of a vector<>::iterator is a pointer.
5109 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
5110 * testsuite/25_algorithms/move/constrained.cc: Likewise.
5111 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
5112 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
5114 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
5115 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
5116 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
5117 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
5118 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
5120 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
5122 * include/debug/array (operator<=>): Define for C++20.
5123 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
5124 Adjust dg-error line numbers.
5125 * testsuite/23_containers/array/tuple_interface/
5126 tuple_element_debug_neg.cc: Likewise.
5128 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
5129 defining _GLIBCXX_ASSERTIONS.
5130 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
5131 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
5132 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
5133 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
5134 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
5135 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
5136 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
5137 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
5138 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
5139 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
5140 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
5141 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
5143 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
5144 C++98 where the member function of the base class returns void.
5146 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
5147 equality comparisons that support value-initialized iterators.
5149 * include/bits/boost_concept_check.h (__function_requires): Add
5150 _GLIBCXX14_CONSTEXPR.
5151 * testsuite/25_algorithms/min/concept_checks.cc: New test.
5153 2020-02-26 Patrick Palka <ppalka@redhat.com>
5156 * include/std/ranges (split_view::_InnerIter::operator==): Compare
5157 the operands' _M_i rather than their _M_i.current().
5158 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5160 P1645R1 constexpr for <numeric> algorithms
5161 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
5162 partial_sum, adjacent_difference): Make conditionally constexpr for
5164 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
5166 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
5167 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
5168 constexpr for C++20.
5169 * include/std/version (__cpp_lib_constexpr_numeric): Define.
5170 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
5171 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
5172 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
5173 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
5174 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
5175 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
5176 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
5177 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
5178 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
5179 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
5180 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
5182 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
5184 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
5185 variables in smaller scope and avoid calling ranges::distance when we
5186 know they are pointers. Remove statically-unreachable use of
5187 __builtin_unreachable().
5188 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
5191 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
5193 (__detail::__maybe_const_t): Likewise.
5194 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
5195 (transform_view, take_view, take_while_view, elements_view): Use
5197 (join_view, split_view): Use both.
5199 2020-02-25 Patrick Palka <ppalka@redhat.com>
5201 LWG 3397 basic_istream_view::iterator should not provide
5203 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
5205 (basic_istream_view:_Iterator::iterator_concept): ... this.
5206 * testsuite/std/ranges/istream_view.cc: Augment test.
5208 LWG 3325 Constrain return type of transformation function for
5210 * include/std/ranges (transform_view): Constrain the return type of the
5211 transformation function as per LWG 3325.
5212 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
5214 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
5215 * include/std/ranges (join_view::_Iterator::operator--): Require that
5216 range_reference_t<_Base> models common_range.
5217 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
5219 LWG 3301 transform_view::_Iterator has incorrect iterator_category
5220 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
5221 determination of iterator_category as per LWG 3301.
5222 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
5224 LWG 3292 iota_view is under-constrained
5225 * include/std/ranges (iota_view): Require that _Winc models semiregular
5227 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
5229 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
5231 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
5232 during constant evaluation. Call __builtin_memmove directly instead of
5234 (__copy_or_move_backward): Likewise.
5235 * include/bits/stl_algobase.h (__memmove): Remove.
5236 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
5237 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
5238 Use __builtin_memmove directly instead of __memmove.
5239 (__copy_move_a2): Do not use memmove during constant evaluation.
5240 (__copy_move_backward_a2): Use _IsMove constant to select correct
5241 __copy_move_backward specialization.
5242 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
5243 begin turned into moves during constant evaluation.
5245 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
5249 * include/bits/stl_algobase.h (__memmove): Cast away const before
5250 doing move assignment.
5251 * testsuite/25_algorithms/move/93872.cc: New test.
5252 * testsuite/25_algorithms/move_backward/93872.cc: New test.
5254 2020-02-24 Patrick Palka <ppalka@redhat.com>
5257 * include/bits/ranges_algobase.h (__copy_or_move,
5258 __copy_or_move_backward): Don't inspect the iter_value_t of the output
5259 iterator, instead inspect its iterator_traits directly.
5260 * include/bits/stl_iterator.h (back_insert_iterator::container):
5261 Conditionally initialize.
5262 (back_insert_iterator::difference_type): Conditionally define.
5263 (back_insert_iterator::back_insert_iterator): Conditionally define this
5264 default constructor.
5265 (front_insert_iterator::container): Conditionally initialize.
5266 (front_insert_iterator::difference_type): Conditionally define.
5267 (front_insert_iterator::front_insert_iterator): Conditionally define
5268 this default constructor.
5269 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
5270 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
5272 P0769R2 Add shift to <algorithm>
5273 * include/bits/ranges_algo.h (shift_left, shift_right): New.
5274 * testsuite/25_algorithms/shift_left/1.cc: New test.
5275 * testsuite/25_algorithms/shift_right/1.cc: New test.
5277 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
5279 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
5280 Make noexcept-specifier conditional.
5281 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
5284 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
5286 (operator==(istream_iterator, default_sentinel_t)): Add operator.
5287 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
5288 * include/bits/streambuf_iterator.h
5289 (istreambuf_iterator(default_sentinel_t)): Add constructor.
5290 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
5291 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
5293 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
5294 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
5296 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
5298 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
5299 (ranges::enable_view): Simplify (LWG 3326).
5300 * include/bits/range_access.h (ranges::enable_view): Declare.
5301 * include/bits/regex.h (__enable_view_impl): Remove partial
5303 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
5304 * include/bits/stl_set.h (__enable_view_impl): Likewise.
5305 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
5306 * include/debug/multiset.h (__enable_view_impl): Likewise.
5307 * include/debug/set.h (__enable_view_impl): Likewise.
5308 * include/debug/unordered_set (__enable_view_impl): Likewise.
5309 * include/experimental/string_view (ranges::enable_view): Define
5310 partial specialization.
5311 * include/std/span (ranges::enable_view): Likewise.
5312 * include/std/string_view (ranges::enable_view): Likewise.
5313 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
5315 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
5317 * include/std/optional (operator<=>(optional<T>, optional<U>))
5318 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
5320 * include/std/tuple (__tuple_cmp): New helper function for <=>.
5321 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
5322 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
5323 (operator<=>(monostate, monostate)): Define for C++20.
5324 * testsuite/20_util/optional/relops/three_way.cc: New test.
5325 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
5326 * testsuite/20_util/variant/89851.cc: Move to ...
5327 * testsuite/20_util/variant/relops/89851.cc: ... here.
5328 * testsuite/20_util/variant/90008.cc: Move to ...
5329 * testsuite/20_util/variant/relops/90008.cc: ... here.
5330 * testsuite/20_util/variant/relops/three_way.cc: New test.
5332 2020-02-20 Patrick Palka <ppalka@redhat.com>
5334 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
5336 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
5337 __maybe_refwrap to capture lvalue references by reference, and then use
5338 unwrap_reference_t to forward the by-reference captures as references.
5339 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5340 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
5342 * include/std/ranges (iota_view): Forward declare _Sentinel.
5343 (iota_view::_Iterator): Befriend _Sentinel.
5344 (iota_view::_Sentinel::_M_equal): New member function.
5345 (iota_view::_Sentinel::operator==): Use it.
5346 (views::_Iota::operator()): Forward __f using the correct type.
5347 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
5348 with integers of different signedness, to appease iota_view's deduction
5350 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
5352 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
5354 * include/bits/range_access.h (ranges::begin): Reject array of
5356 (ranges::end, ranges::size): Require arrays to be bounded.
5357 (ranges::data): Require lvalue or borrowed_range.
5358 (ranges::iterator_t): Remove constraint.
5359 * testsuite/std/ranges/access/begin.cc: Do not check array of
5361 * testsuite/std/ranges/access/begin_neg.cc: New test.
5362 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
5363 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
5364 * testsuite/std/ranges/access/ssize.cc: Do not check array of
5367 * include/std/system_error (error_category::operator<=>)
5368 (operator<=>(const error_code&, const error_code&))
5369 (operator<=>(const error_condition&, const error_condition&)): Define
5371 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
5372 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
5374 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
5376 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
5377 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
5379 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
5380 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
5382 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
5383 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
5384 Remove incorrect comment.
5385 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
5388 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
5390 * include/std/thread (thread::id::operator<=>): Define for C++20.
5391 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
5392 functions in namespace std.
5393 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
5395 2020-02-19 Patrick Palka <ppalka@redhat.com>
5397 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
5398 null terminator of the underlying string as part of the test_range.
5399 (main): Call test03.
5401 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
5403 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
5404 requirement (LWG 3385).
5405 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
5406 expected declaration.
5408 * include/std/ranges (take_while_view, drop_view, drop_while_view)
5409 (elements_view:_Iterator): Initialize data members (LWG 3364).
5411 * libsupc++/compare (three_way_comparable): Remove always-false check
5412 that should have been removed with weak_equality (P1959R0).
5413 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
5415 * include/std/concepts (__detail::__partially_ordered_with): Move here
5417 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
5418 to simplify definition (LWG 3331).
5419 * libsupc++/compare (__detail::__partially_ordered_with): Move to
5422 * include/std/concepts (totally_ordered_with): Remove redundant
5423 requirement (LWG 3329).
5425 * include/std/ranges (__detail::__convertible_to_non_slicing): New
5427 (__detail::__pair_like_convertible_to): Remove.
5428 (__detail::__pair_like_convertible_from): Add requirements for
5429 non-slicing conversions.
5430 (subrange): Constrain constructors with __convertible_to_non_slicing.
5431 Remove constructors from pair-like types. Add new deduction guide.
5432 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
5434 * include/bits/iterator_concepts.h (iter_move): Add declaration to
5435 prevent unqualified lookup finding a suitable declaration (LWG 3247).
5437 * include/std/memory_resource (polymorphic_allocator::allocate)
5438 (polymorphic_allocator::allocate_object): Change type of exception to
5439 bad_array_new_length (LWG 3237).
5440 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
5442 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
5443 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
5444 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
5445 * testsuite/20_util/unwrap_reference/3.cc: New test.
5447 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
5448 type during overload resolution, use static assert instead (LWG 3200).
5449 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
5451 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
5453 * include/std/span (span(T (&)[N])): Use non-deduced context to
5454 prevent first parameter from interfering with class template argument
5455 deduction (LWG 3369).
5456 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
5457 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
5460 * include/std/span (span::const_iterator, span::const_reverse_iterator)
5461 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
5463 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
5465 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
5467 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
5468 constrained.cc: Likewise.
5469 * testsuite/20_util/specialized_algorithms/
5470 uninitialized_default_construct/constrained.cc: Likewise.
5471 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
5472 constrained.cc: Likewise.
5473 * testsuite/20_util/specialized_algorithms/uninitialized_move/
5474 constrained.cc: Likewise.
5475 * testsuite/20_util/specialized_algorithms/
5476 uninitialized_value_construct/constrained.cc: Likewise.
5478 * include/bits/range_access.h (range_size_t): Define alias template.
5479 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
5480 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
5482 * include/std/ranges (filter_view, transform_view, take_view)
5483 (join_view, split_view, reverse_view): Remove commented-out converting
5484 constructors (LWG 3280).
5486 * include/std/memory (uninitialized_construct_using_allocator): Use
5487 std::construct_at (LWG 3321).
5489 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
5490 (polymorphic_allocator::allocate_object)
5491 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
5493 LWG 3379. "safe" in several library names is misleading
5494 * include/bits/range_access.h (enable_safe_range): Rename to
5495 enable_borrowed_range.
5496 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
5497 (safe_range): Rename to borrowed_range.
5498 * include/bits/ranges_algo.h: Adjust to use new names.
5499 * include/bits/ranges_algobase.h: Likewise.
5500 * include/bits/ranges_uninitialized.h: Likewise.
5501 * include/std/ranges: Likewise.
5502 (safe_iterator_t): Rename to borrowed_iterator_t.
5503 (safe_subrange_t): Rename to borrowed_subrange_t.
5504 * include/std/span: Adjust to use new names.
5505 * include/std/string_view: Likewise.
5506 * include/experimental/string_view: Likewise.
5507 * testsuite/std/ranges/access/begin.cc: Likewise.
5508 * testsuite/std/ranges/access/cbegin.cc: Likewise.
5509 * testsuite/std/ranges/access/cdata.cc: Likewise.
5510 * testsuite/std/ranges/access/cend.cc: Likewise.
5511 * testsuite/std/ranges/access/crbegin.cc: Likewise.
5512 * testsuite/std/ranges/access/crend.cc: Likewise.
5513 * testsuite/std/ranges/access/data.cc: Likewise.
5514 * testsuite/std/ranges/access/end.cc: Likewise.
5515 * testsuite/std/ranges/access/rbegin.cc: Likewise.
5516 * testsuite/std/ranges/access/rend.cc: Likewise.
5517 * testsuite/std/ranges/safe_range.cc: Likewise.
5518 * testsuite/std/ranges/safe_range_types.cc: Likewise.
5519 * testsuite/util/testsuite_iterators.h: Likewise.
5521 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
5522 (tuple_element<1, const subrange<I, S, K>>): Add partial
5523 specializations (LWG 3398).
5524 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
5526 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
5527 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
5528 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
5530 2020-02-18 Patrick Palka <ppalka@redhat.com>
5532 P1983R0 Wording for GB301, US296, US292, US291, and US283
5533 * include/std/ranges (filter_view::pred): New member function.
5534 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
5535 P1983R0 fixes the highlighted issue in the same way.
5536 (join_view::_Iterator<_Const>): Add friend
5537 join_view::_Iterator<!_Const>.
5538 (join_view::_M_inner): Remove mutable specifier, effectively reverting
5539 the proposed wording changes of P3278.
5540 (join_view::begin): Refine the condition for when to return a const
5542 (split_view::_OuterIter::_OuterIter): Adjust constraints.
5543 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
5546 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
5549 * include/std/ranges (_RangeAdaptor): Add deduction guide.
5550 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
5552 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
5553 (transform_view::_Iterator): Add alias _Base_iter and use in place of
5555 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
5556 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
5557 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
5558 (split_view::_InnerIter::_S_iter_cat()): Likewise.
5560 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
5561 assumption that long is wider than int.
5562 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
5563 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
5564 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
5565 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
5567 P1976R2 Fixed-size span construction from dynamic range
5568 * include/std/span (__cpp_lib_span): Update value.
5569 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
5571 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
5573 (span::first<Count>(), span::last<Count>()): Use explicit type in
5575 (as_bytes, as_writable_bytes): Likewise.
5576 * include/std/version (__cpp_lib_span): Update value.
5577 * testsuite/23_containers/span/1.cc: Check new value.
5578 * testsuite/23_containers/span/2.cc: Check new value.
5579 * testsuite/23_containers/span/explicit.cc: New test.
5581 * include/std/span (span::__is_compatible_array): Simplify alias
5582 template by using requires-clause.
5583 (span::__is_compatible_ref): New alias template for constraining
5585 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
5586 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
5587 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
5588 redundant parentheses.
5589 (span(R&&)): Add missing constraints.
5591 * include/std/span (span): Reorder members and rename template
5592 parameters to match declarations in the C++2a working paper.
5594 P2116R0 Remove tuple-like protocol support from fixed-extent span
5595 * include/std/span (get, tuple_size, tuple_element): Remove.
5596 * testsuite/23_containers/span/everything.cc: Remove checks for
5598 * testsuite/23_containers/span/get_neg.cc: Remove.
5599 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
5600 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
5601 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
5603 2020-02-17 Patrick Palka <ppalka@redhat.com>
5605 P2106R0 Alternative wording for GB315 and GB316
5606 * include/bits/ranges_algo.h (in_fun_result): New.
5607 (for_each_result, for_each_n_result): Change into an alias of
5609 (in_in_result): New.
5610 (mismatch_result): Change into an alias of in_in_result.
5611 (copy_if_result): Change into an alias of in_out_result.
5612 (swap_ranges_result): Change into an alias of in_in_result.
5613 (unary_transform_result): Change into an alias of in_out_result.
5614 (in_in_out_result): New.
5615 (binary_transform_result): Change into an alias of in_in_out_result.
5616 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
5617 remove_copy_result, unique_copy_result, reverse_copy_result,
5618 rotate_copy_result, partial_sort_copy_result): Change into an alias of
5620 (in_out_out_result): New.
5621 (partition_copy_result, merge_result): Change into an alias of
5623 (set_union_result, set_intersection_result): Change into an alias of
5625 (set_difference_result): Change into an alias of in_out_result.
5626 (set_symmetric_difference): Change into an alias of in_in_out_result.
5627 (min_max_result): New.
5628 (minmax_result, minmax_element_result): Change into an alias of
5630 (in_found_result): New.
5631 (next_permutation_result, prev_permutation_result): Change into an alias
5633 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
5634 Adjust following changes to next_permutation_result and
5635 prev_permutation_result.
5636 * include/bits/ranges_algobase.h (in_out_result): New.
5637 (copy_result, move_result, move_backward_result, copy_backward_result,
5638 copy_n_result): Change into an alias of in_out_result.
5639 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
5640 uninitialized_copy_n_result, uninitialized_move_result,
5641 uninitialized_move_n_result): Likewise.
5642 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
5643 structured bindings.
5644 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
5646 P1243R4 Rangify new algorithms
5647 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
5648 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
5649 * testsuite/25_algorithms/clamp/constrained.cc: New test.
5650 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
5651 * testsuite/25_algorithms/sample/constrained.cc: New test.
5653 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
5655 P1964R2 Wording for boolean-testable
5656 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
5657 (__adjacent_find_fn): Cast result of predicate to bool.
5658 * include/std/concepts (__boolean): Remove.
5659 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
5660 new helper concepts.
5661 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
5662 (predicate): Use __boolean_testable instead of boolean.
5663 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
5666 P1970R2 Consistency for size() functions: Add ranges::ssize
5667 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
5668 * testsuite/std/ranges/access/ssize.cc: New test.
5670 P1956R1 On the names of low-level bit manipulation functions
5671 * include/bits/hashtable_policy.h: Update comment.
5672 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
5673 (ispow2, ceil2, floor2, log2p1): Likewise.
5674 (__cpp_lib_int_pow2): Add feature test macro.
5675 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
5676 * include/std/memory (assume_aligned): Adjust use of ispow2.
5677 * include/std/version (__cpp_lib_int_pow2): Add.
5678 * libsupc++/new_opa.cc: Adjust use of __ispow2.
5679 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
5680 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
5681 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
5682 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
5683 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
5684 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
5685 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
5686 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
5687 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
5688 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
5689 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
5690 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
5692 * include/std/charconv: Add comment.
5694 PR libstdc++/92546 (partial)
5695 * include/bits/random.h (uniform_random_bit_generator): Move definition
5696 to <bits/uniform_int_dist.h>.
5697 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
5699 * include/bits/ranges_algobase.h: Do not include <cmath>.
5700 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
5702 * include/std/ranges: Do not include <limits>.
5703 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
5705 PR libstdc++/92546 (partial)
5706 * include/Makefile.am: Add new header.
5707 * include/Makefile.in: Regenerate.
5708 * include/bits/int_limits.h: New header.
5709 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
5710 numeric_limits with __detail::__int_limits.
5711 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
5712 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
5714 * include/std/charconv (__to_chars_8, __from_chars_binary)
5715 (__from_chars_alpha_to_num, from_chars): Likewise.
5716 * include/std/memory_resource (polymorphic_allocator::allocate)
5717 (polymorphic_allocator::allocate_object): Likewise.
5718 * include/std/string_view (basic_string_view::_S_compare): Likewise.
5719 * include/std/utility (in_range): Likewise.
5720 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
5721 extra error about incomplete type __int_limits<bool>.
5722 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
5723 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
5724 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
5725 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
5726 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
5727 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
5728 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
5729 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
5730 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
5731 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
5732 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
5733 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
5735 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
5736 value for partial_ordering::unordered.
5738 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
5739 const-qualified expression variations.
5740 * include/std/concepts (copyable): Likewise.
5742 * include/std/type_traits (__is_standard_integer): New helper trait.
5743 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
5744 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
5745 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
5746 * testsuite/20_util/integer_comparisons/1.cc: New test.
5747 * testsuite/20_util/integer_comparisons/2.cc: New test.
5748 * testsuite/20_util/integer_comparisons/equal.cc: New test.
5749 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
5750 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
5751 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
5752 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
5753 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
5754 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
5755 * testsuite/20_util/integer_comparisons/less.cc: New test.
5756 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
5757 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
5758 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
5759 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
5760 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
5762 2020-02-16 Patrick Palka <ppalka@redhat.com>
5764 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
5765 Move code after an early exit constexpr if to under an else branch.
5766 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
5768 2020-02-15 Patrick Palka <ppalka@redhat.com>
5770 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
5771 * include/bits/ranges_algobase.h: Likewise.
5772 * include/bits/ranges_uninitialized.h: Likewise.
5774 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
5775 binary_search, copy_if, count, count_if, equal_range, find, find_end,
5776 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
5777 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
5778 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
5779 lower_bound, make_heap, max, max_element, merge, min, min_element,
5780 minmax, minmax_element, mismatch, next_permutation, none_of,
5781 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
5782 partition_point, pop_heap, prev_permutation, push_heap, remove,
5783 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
5784 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
5785 search, search_n, set_difference, set_intersection,
5786 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
5787 stable_partition, stable_sort, swap_ranges, transform, unique,
5788 unique_copy, upper_bound): Convert into function objects.
5789 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
5790 fill, move_backward, copy_backward): Likewise.
5791 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
5792 uninitialized_default_construct_n, uninitialized_value_construct,
5793 uninitialized_value_construct_n, uninitialized_copy,
5794 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
5795 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
5796 destroy, destroy_n): Likewise.
5798 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
5799 (ranges::find_end): ... here.
5800 (ranges::__lexicographical_compare): Fold into ...
5801 (ranges::lexicographical_compare): ... here.
5802 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
5803 (ranges::equal): ... here.
5805 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
5807 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
5808 * include/std/deque: Likewise.
5809 * include/std/forward_list: Likewise.
5810 * include/std/list: Likewise.
5811 * include/std/string: Likewise.
5812 * include/std/vector: Likewise.
5813 * include/std/version: Likewise.
5814 * testsuite/23_containers/deque/erasure.cc: Test for new value.
5815 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5816 * testsuite/23_containers/list/erasure.cc: Likewise.
5817 * testsuite/23_containers/map/erasure.cc: Likewise.
5818 * testsuite/23_containers/set/erasure.cc: Likewise.
5819 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5820 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5821 * testsuite/23_containers/vector/erasure.cc: Likewise.
5823 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
5825 * include/bits/random.h (uniform_random_bit_generator): Require min()
5826 and max() to be constant expressions and min() to be less than max().
5827 * testsuite/26_numerics/random/concept.cc: Check additional cases.
5828 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
5830 2020-02-13 Patrick Palka <ppalka@redhat.com>
5832 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
5833 * include/Makefile.in: Regenerate.
5834 * include/bits/ranges_uninitialized.h: New header.
5835 * include/std/memory: Include it.
5836 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
5838 * .../uninitialized_copy/constrained.cc: New test.
5839 * .../uninitialized_default_construct/constrained.cc: New test.
5840 * .../uninitialized_fill/constrained.cc: New test.
5841 * .../uninitialized_move/constrained.cc: New test.
5842 * .../uninitialized_value_construct/constrained.cc: New test.
5844 * include/Makefile.am: Add bits/ranges_algobase.h
5845 * include/Makefile.in: Regenerate.
5846 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
5848 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
5849 __detail::__is_move_iterator, copy_result, move_result,
5850 __equal, equal, copy_result, move_result, move_backward_result,
5851 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
5852 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
5853 fill): Split out into ...
5854 * bits/range_algobase.h: ... this new header.
5856 2020-02-12 Patrick Palka <ppalka@redhat.com>
5858 LWG 3389 and LWG 3390
5859 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
5860 constructing the move_iterator with __i.
5861 (counted_iterator::counted_iterator): Use std::move when initializing
5863 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
5864 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
5866 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
5871 * configure: Regenerated.
5873 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
5875 * include/bits/hashtable.h
5876 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
5877 missing std namespace qualification to forward call.
5879 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
5881 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
5883 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
5885 * include/std/ranges: Fix non-ASCII characters in comment.
5887 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
5888 equality comparison to be valid and return bool.
5889 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
5890 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
5891 type with ambiguous conversion to fundamental types.
5892 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
5894 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
5896 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
5898 (readable_traits): Rename to indirectly_readable_traits.
5899 (readable): Rename to indirectly_readable.
5900 (writable): Rename to indirectly_writable.
5901 (__detail::__iter_exchange_move): Do not use remove_reference_t.
5902 (indirectly_swappable): Adjust requires expression parameter types.
5904 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
5905 (ranges::replace_if, ranges::generate_n, ranges::generate)
5906 (ranges::remove): Use new name for writable.
5907 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
5908 Use new name for readable.
5909 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
5910 new name for readable_traits.
5911 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
5912 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
5913 new definition of indirectly_readable.
5915 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
5916 to take parameters of common_iterator, instead of the common_iterator
5917 type itself. Fix argument for __common_iter_has_arrow constraint.
5918 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
5920 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
5922 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
5924 (basic_istream_view::_Iterator::operator++()): Add missing return.
5926 2020-02-07 Patrick Palka <ppalka@redhat.com>
5928 * include/bits/ranges_algo.h: Remove extraneous &&.
5930 * include/std/ranges (ranges::__detail::__stream_extractable,
5931 ranges::basic_istream_view, ranges::istream_view): Define.
5932 * testsuite/std/ranges/istream_view: New test.
5934 Implement C++20 range adaptors
5935 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
5936 (subrange::_S_store_size): Mark as const instead of constexpr to
5937 avoid what seems to be a bug in GCC.
5938 (__detail::__box): Give it defaulted copy and move constructors.
5939 (ranges::views::_Single::operator()): Mark constexpr.
5940 (ranges::views::_Iota::operator()): Mark constexpr.
5941 (__detail::Empty): Define.
5942 (ranges::views::__closure::_RangeAdaptor,
5943 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
5944 ranges::views::all, ranges::__detail::find_if,
5945 ranges::__detail::find_if_not, ranges::__detail::mismatch,
5946 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
5947 ranges::views::transform, take_view, ranges::views::take,
5948 take_while_view, ranges::views::take_while, drop_view,
5949 ranges::views::drop, join_view, ranges::views::join,
5950 __detail::require_constant, __detail::tiny_range, split_view,
5951 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
5952 common_view, ranges::views::common, reverse_view,
5953 ranges::views::reverse,
5954 ranges::views::__detail::__is_reversible_subrange,
5955 ranges::views::__detail::__is_reverse_view, reverse_view,
5956 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
5957 ranges::views::elements, ranges::views::keys, ranges::views::values):
5959 (views): Alias for ranges::views.
5960 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
5961 tuple_element<1, ranges::subrange>): New partial specializations.
5962 * testsuite/std/ranges/adaptors/all.cc: New test.
5963 * testsuite/std/ranges/adaptors/common.cc: Likewise.
5964 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
5965 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
5966 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
5967 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
5968 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
5969 * testsuite/std/ranges/adaptors/join.cc: Likewise.
5970 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
5971 * testsuite/std/ranges/adaptors/split.cc: Likewise.
5972 * testsuite/std/ranges/adaptors/take.cc: Likewise.
5973 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
5974 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
5976 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
5978 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
5979 type of enumerations and comparison category types.
5980 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
5981 (__cmp_cat::_Ncmp::unordered): Change value to 2.
5982 (partial_ordering::_M_value, weak_ordering::_M_value)
5983 (strong_ordering::_M_value): Change type to __cmp_cat::type.
5984 (partial_ordering::_M_is_ordered): Remove data member.
5985 (partial_ordering): Use second bit of _M_value for unordered. Adjust
5986 comparison operators.
5987 (weak_ordering::operator partial_ordering): Simplify to remove
5989 (operator<=>(unspecified, weak_ordering)): Likewise.
5990 (strong_ordering::operator partial_ordering): Likewise.
5991 (strong_ordering::operator weak_ordering): Likewise.
5992 (operator<=>(unspecified, strong_ordering)): Likewise.
5993 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
5994 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
5995 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
5997 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
5998 __cpp_lib_three_way_comparison macro and use deduced return type for
6000 * testsuite/std/ranges/iota/iterator.cc: New test.
6002 2020-02-07 Patrick Palka <ppalka@redhat.com>
6003 Jonathan Wakely <jwakely@redhat.com>
6005 Implement C++20 constrained algorithms
6006 * include/Makefile.am: Add new header.
6007 * include/Makefile.in: Regenerate.
6008 * include/std/algorithm: Include <bits/ranges_algo.h>.
6009 * include/bits/ranges_algo.h: New file.
6010 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
6011 * testsuite/25_algorithms/all_of/constrained.cc: New test.
6012 * testsuite/25_algorithms/any_of/constrained.cc: New test.
6013 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
6014 * testsuite/25_algorithms/copy/constrained.cc: New test.
6015 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
6016 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
6017 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
6018 * testsuite/25_algorithms/count/constrained.cc: New test.
6019 * testsuite/25_algorithms/count_if/constrained.cc: New test.
6020 * testsuite/25_algorithms/equal/constrained.cc: New test.
6021 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
6022 * testsuite/25_algorithms/fill/constrained.cc: New test.
6023 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
6024 * testsuite/25_algorithms/find/constrained.cc: New test.
6025 * testsuite/25_algorithms/find_end/constrained.cc: New test.
6026 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
6027 * testsuite/25_algorithms/find_if/constrained.cc: New test.
6028 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
6029 * testsuite/25_algorithms/for_each/constrained.cc: New test.
6030 * testsuite/25_algorithms/generate/constrained.cc: New test.
6031 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
6032 * testsuite/25_algorithms/heap/constrained.cc: New test.
6033 * testsuite/25_algorithms/includes/constrained.cc: New test.
6034 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
6035 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
6036 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
6037 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
6038 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
6039 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
6041 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
6042 * testsuite/25_algorithms/max/constrained.cc: New test.
6043 * testsuite/25_algorithms/max_element/constrained.cc: New test.
6044 * testsuite/25_algorithms/merge/constrained.cc: New test.
6045 * testsuite/25_algorithms/min/constrained.cc: New test.
6046 * testsuite/25_algorithms/min_element/constrained.cc: New test.
6047 * testsuite/25_algorithms/minmax/constrained.cc: New test.
6048 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
6049 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
6050 * testsuite/25_algorithms/move/constrained.cc: New test.
6051 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
6052 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
6053 * testsuite/25_algorithms/none_of/constrained.cc: New test.
6054 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
6055 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
6056 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
6057 * testsuite/25_algorithms/partition/constrained.cc: New test.
6058 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
6059 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
6060 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
6061 * testsuite/25_algorithms/remove/constrained.cc: New test.
6062 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
6063 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
6064 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
6065 * testsuite/25_algorithms/replace/constrained.cc: New test.
6066 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
6067 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
6068 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
6069 * testsuite/25_algorithms/reverse/constrained.cc: New test.
6070 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
6071 * testsuite/25_algorithms/rotate/constrained.cc: New test.
6072 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
6073 * testsuite/25_algorithms/search/constrained.cc: New test.
6074 * testsuite/25_algorithms/search_n/constrained.cc: New test.
6075 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
6076 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
6077 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
6079 * testsuite/25_algorithms/set_union/constrained.cc: New test.
6080 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
6081 * testsuite/25_algorithms/sort/constrained.cc: New test.
6082 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
6083 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
6084 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
6085 * testsuite/25_algorithms/transform/constrained.cc: New test.
6086 * testsuite/25_algorithms/unique/constrained.cc: New test.
6087 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
6088 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
6090 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
6092 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
6093 number in comment. Fix indentation.
6095 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
6096 redundant _GLIBCXX20_CONSTEXPR.
6098 * include/std/ranges (viewable_range): Replace decay_t with
6099 remove_cvref_t (LWG 3375).
6101 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
6103 * include/bits/iterator_concepts.h (iter_reference_t)
6104 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
6105 Remove workarounds for PR c++/67704.
6106 * testsuite/24_iterators/aliases.cc: New test.
6108 2020-02-05 Patrick Palka <ppalka@redhat.com>
6110 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
6111 when initializing _M_current.
6112 (move_iterator::base): Split into two overloads differing in
6113 ref-qualifiers as in P1207R4 for C++20.
6115 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
6117 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
6121 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
6122 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
6123 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
6125 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
6127 * configure: Regenerate.
6129 2020-01-31 Patrick Palka <ppalka@redhat.com>
6131 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
6132 test_range::end() returns the same type as test_range::begin().
6133 * testsuite/24_iterators/range_operations/next.cc: Likewise.
6134 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
6135 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
6136 Always return a sentinel<I>.
6138 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
6141 * include/std/stop_token (stop_token::stop_possible()): Call new
6142 _M_stop_possible() function.
6143 (stop_token::stop_requested()): Do not use stop_possible().
6144 (stop_token::binary_semaphore): New class, as temporary stand-in for
6145 std::binary_semaphore.
6146 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
6147 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
6148 New data members for symchronization with stop_callback destruction.
6149 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
6150 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
6152 (stop_token::_Stop_cb::_M_run): New member function.
6153 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
6155 (stop_token::_Stop_state::_M_owners): New data member to track
6156 reference count for ownership.
6157 (stop_token::_Stop_state::_M_value): New data member combining a
6158 spinlock, the stop requested flag, and the reference count for
6159 associated stop_source objects.
6160 (stop_token::_Stop_state::_M_requester): New data member for
6161 synchronization with stop_callback destruction.
6162 (stop_token::_Stop_state::_M_stop_possible()): New member function.
6163 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
6165 (stop_token::_Stop_state::_M_add_owner)
6166 (stop_token::_Stop_state::_M_release_ownership)
6167 (stop_token::_Stop_state::_M_add_ssrc)
6168 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
6169 updating reference counts.
6170 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
6171 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
6172 (stop_token::_Stop_state::_M_try_lock)
6173 (stop_token::_Stop_state::_M_try_lock_and_stop)
6174 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
6176 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
6177 read and update state. Release lock while running callbacks. Use new
6178 data members to synchronize with callback destruction.
6179 (stop_token::_Stop_state::_M_remove_callback): Likewise.
6180 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
6181 to read and update state.
6182 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
6183 replacing shared_ptr.
6184 (stop_source::stop_source(const stop_source&)): Update reference count.
6185 (stop_source::operator=(const stop_source&)): Likewise.
6186 (stop_source::~stop_source()): Likewise.
6187 (stop_source::stop_source(stop_source&&)): Define as defaulted.
6188 (stop_source::operator=(stop_source&&)): Establish postcondition on
6190 (stop_callback): Enforce preconditions on template parameter. Replace
6191 base class with data member of new _Cb_impl type.
6192 (stop_callback::stop_callback(const stop_token&, Cb&&))
6193 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
6194 (stop_callback::_Cb_impl): New type wrapping _Callback member and
6195 defining the _S_execute member function.
6196 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
6198 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
6199 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
6200 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
6202 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
6204 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
6205 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
6206 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
6209 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
6210 three_way_comparable_with.
6211 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
6212 (compare_three_way::operator()): Remove redundant constraint from
6214 (__detail::_Synth3way::operator()): Use three_way_comparable_with
6215 instead of workaround.
6216 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
6217 output due to simplified constraints on compare_three_way::operator().
6220 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
6221 * testsuite/18_support/comparisons/object/93479.cc: New test.
6223 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
6224 returns the same type as test_range::begin(). Add comments.
6225 * testsuite/std/ranges/access/rbegin.cc: Likewise.
6226 * testsuite/std/ranges/access/rend.cc: Likewise.
6227 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
6228 test_range is the same as its iterator type.
6229 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
6230 operator- overloads to satisfy sized_sentinel_for when the iterator
6231 satisfies random_access_iterator.
6233 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
6236 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
6237 static assertion to object types.
6240 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
6241 clock_gettime instead of explicit glibc version check.
6242 * configure: Regenerate.
6244 2020-01-28 Martin Liska <mliska@suse.cz>
6247 * include/std/atomic: Fix typo.
6248 * include/std/optional: Likewise.
6250 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
6252 * configure: Regenerate.
6254 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
6257 * include/std/span (span): Fix deduction guide.
6258 * testsuite/23_containers/span/deduction.cc: New test.
6260 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
6262 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
6263 (__cmp_cat::_Ord::equivalent): Add enumerator.
6264 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
6266 (partial_ordering, weak_ordering, strong_ordering): Remove
6267 constructors taking __cmp_cat::_Eq parameters. Use renamed
6270 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
6272 * acinclude.m4: Handle `--with-toolexeclibdir='.
6273 * Makefile.in: Regenerate.
6274 * aclocal.m4: Regenerate.
6275 * configure: Regenerate.
6276 * doc/Makefile.in: Regenerate.
6277 * include/Makefile.in: Regenerate.
6278 * libsupc++/Makefile.in: Regenerate.
6279 * po/Makefile.in: Regenerate.
6280 * python/Makefile.in: Regenerate.
6281 * src/Makefile.in: Regenerate.
6282 * src/c++11/Makefile.in: Regenerate.
6283 * src/c++17/Makefile.in: Regenerate.
6284 * src/c++98/Makefile.in: Regenerate.
6285 * src/filesystem/Makefile.in: Regenerate.
6286 * testsuite/Makefile.in: Regenerate.
6288 2020-01-23 Alexandre Oliva <oliva@adacore.com>
6290 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
6291 * configure: Rebuild.
6293 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
6295 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
6298 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
6300 * include/Makefile.in: Regenerate.
6302 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
6304 * doc/xml/faq.xml: Fix grammar.
6305 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
6306 * doc/xml/manual/spine.xml: Update copyright years.
6307 * doc/html/*: Regenerate.
6309 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
6311 * doc/xml/faq.xml: Update for SVN -> Git transition.
6312 * doc/xml/manual/appendix_contributing.xml: Likewise.
6313 * doc/xml/manual/status_cxx1998.xml: Likewise.
6314 * doc/xml/manual/status_cxx2011.xml: Likewise.
6315 * doc/xml/manual/status_cxx2014.xml: Likewise.
6316 * doc/xml/manual/status_cxx2017.xml: Likewise.
6317 * doc/xml/manual/status_cxx2020.xml: Likewise.
6318 * doc/xml/manual/status_cxxtr1.xml: Likewise.
6319 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
6321 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
6323 * include/Makefile.am: Add coroutine to the std set.
6324 * include/Makefile.in: Regenerated.
6325 * include/std/coroutine: New file.
6327 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
6330 * include/bits/c++config: Only do PSTL config when the header is
6331 present, to fix freestanding.
6332 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
6333 functions if they were detected by configure.
6335 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
6336 Matthew Bauer <mjbauer95@gmail.com>
6337 Jonathan Wakely <jwakely@redhat.com>
6339 PR bootstrap/64271 (partial)
6340 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
6342 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
6343 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
6344 definitions with NetBSD upstream.
6345 (ctype_base::blank): Use _CTYPE_BL.
6346 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
6348 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
6349 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
6350 parameters to unsigned char.
6351 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
6353 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
6356 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
6357 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
6358 (_Equality_base): Remove.
6359 (_Equality<>::_M_equal): Review implementation. Use
6360 std::is_permutation.
6361 * testsuite/23_containers/unordered_multiset/operators/1.cc
6362 (Hash, Equal, test02, test03): New.
6363 * testsuite/23_containers/unordered_set/operators/1.cc
6364 (Hash, Equal, test02, test03): New.
6366 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
6369 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
6370 Move here from <bits/range_access.h> and define using __int128 when
6372 (__is_integer_like, __is_signed_integer_like): Move here from
6373 <bits/range_access.h>.
6374 (weakly_incrementable): Use __is_signed_integer_like.
6375 * include/bits/range_access.h (__max_diff_type, __max_size_type)
6376 (__is_integer_like, __is_signed_integer_like): Move to
6377 <bits/iterator_concepts.h>.
6378 (__make_unsigned_like_t): Move here from <ranges>.
6379 * include/std/ranges (__make_unsigned_like_t): Move to
6380 <bits/range_access.h>.
6381 (iota_view): Replace using-directive with using-declarations.
6382 * testsuite/std/ranges/iota/93267.cc: New test.
6383 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
6385 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
6388 * include/bits/fs_path.h (path::generic_string<C,A>)
6389 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
6390 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
6391 root-dir is converted to forward slash in generic pathname.
6392 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
6393 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
6396 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
6398 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
6399 (__atomic_float): Add default member initializer for C++20.
6400 * include/std/atomic (atomic): Likewise.
6401 (atomic::atomic()): Remove noexcept-specifier on default constructor.
6402 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
6403 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
6405 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
6406 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
6407 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
6408 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
6409 expected result for is_trivially_default_constructible.
6410 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
6411 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
6412 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
6413 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
6414 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
6415 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
6416 expected results for is_trivially_default_constructible.
6417 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
6420 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
6422 * testsuite/util/testsuite_iterators.h: Improve comment.
6424 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
6425 initialization syntax.
6428 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
6429 of base class independent of __cplusplus value.
6430 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
6431 type defined in the base class
6432 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
6433 * testsuite/24_iterators/istreambuf_iterator/requirements/
6434 base_classes.cc: Adjust expected base class for C++98.
6436 2020-01-09 Olivier Hainque <hainque@adacore.com>
6438 * doc/xml/manual/appendix_contributing.xml: Document _C2
6439 as a reserved identifier, by VxWorks.
6440 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
6441 * include/bits/stl_multimap.h: Likewise.
6443 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
6445 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
6446 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
6447 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
6448 partial specialization to disambiguate the two constrained
6451 * include/experimental/type_traits (experimental::is_pod_v): Disable
6452 -Wdeprecated-declarations warnings around reference to std::is_pod.
6453 * include/std/type_traits (is_pod_v): Likewise.
6454 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
6455 is_standard_layout and is_trivial. Do not check is_pod for C++20.
6456 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
6457 Add -Wno-deprecated for C++20.
6458 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
6459 * testsuite/20_util/is_pod/value.cc: Likewise.
6460 * testsuite/experimental/type_traits/value.cc: Likewise.
6462 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
6464 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
6465 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
6466 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
6468 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
6471 * include/bits/random.h (operator>>): Check stream operation succeeds.
6472 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
6474 (operator>>): Remove redundant __istream_type typedefs. Check stream
6476 (__extract_params): New function to fill a vector from a stream.
6477 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
6480 * config/abi/pre/gnu.ver: Add new exports.
6481 * include/std/memory_resource (memory_resource::~memory_resource()):
6482 Do not define inline.
6483 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
6484 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
6486 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
6487 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
6489 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
6492 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
6494 (_Hashtable<>::__fwd_value_for): New.
6495 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
6497 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
6498 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
6499 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
6501 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
6502 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
6504 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
6506 * testsuite/23_containers/unordered_set/92124.cc: New.
6508 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
6511 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
6512 detailed error reporting for remove_all. Check result of recursive
6513 call before incrementing iterator.
6514 (remove_all(const path&), remove_all(const path&, error_code&)): Use
6516 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
6517 result of recursive call before incrementing iterator.
6518 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
6519 are reported correctly.
6520 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
6522 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
6524 * include/std/condition_variable
6525 (condition_variable_any::wait_on): Rename to match current draft
6527 (condition_variable_any::wait_on_until): Likewise.
6528 (condition_variable_any::wait_on_for): Likewise.
6529 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
6530 Adjust tests to account for renamed methods.
6532 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
6535 * include/bits/stl_tree.h
6536 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
6537 std::move_if_noexcept by std::move.
6538 * testsuite/23_containers/map/92124.cc: New.
6539 * testsuite/23_containers/set/92124.cc: New.
6541 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
6543 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
6544 (stop_source): Likewise (LWG 3362).
6545 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
6548 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
6549 (lexicographical_compare_three_way): Do not depend on
6551 * include/std/version (__cpp_lib_three_way_comparison): Only define
6552 when __cpp_lib_concepts is defined.
6553 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
6555 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
6557 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
6558 Only define four-argument overload when __cpp_lib_concepts is defined.
6560 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
6562 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
6564 2020-01-01 Jakub Jelinek <jakub@redhat.com>
6566 Update copyright years.
6568 Copyright (C) 2020 Free Software Foundation, Inc.
6570 Copying and distribution of this file, with or without modification,
6571 are permitted in any medium without royalty provided the copyright
6572 notice and this notice are preserved.