1 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
4 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
5 that fails on mingw-w64.
8 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
9 (status(const path&, error_code&)): Use parent_path() to remove
11 (symlink_status(const path&, error_code&)): Duplicate workaround for
12 bug in _wstat for paths with trailing slash.
13 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
15 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
16 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
18 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
19 once instead of building it iteratively.
21 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
23 PR libstdc++/85494 use rdseed and rand_s in std::random_device
24 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
25 the assembler supports rdseed.
26 * config.h.in: Regenerate.
27 * configure: Regenerate.
28 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
29 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
30 * doc/html/*: Regenerate.
31 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
32 * include/bits/random.h (random_device::random_device()): Always call
33 _M_init rather than _M_init_pretr1.
34 (random_device::random_device(const string&)): Likewise.
35 (random_device::operator()()): Always call _M_getval().
36 (random_device::_M_file): Replace first member of union with an
37 anonymous struct, with _M_file as its first member.
38 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
39 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
40 (USE_MT19937): Define if none of the above are defined.
41 (USE_POSIX_FILE_IO): Define.
43 [USE_RDSEED] (__x86_rdseed): Define new function.
44 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
45 (random_device::_M_init(const string&)): Initialize new union members.
46 Add support for "rdseed" and "rand_s" tokens. Decide what the
47 "default" token does according to which USE_* macros are defined.
48 [USE_POSIX_FILE_IO]: Store a file descriptor.
49 [USE_MT19937]: Forward to _M_init_pretr1 instead.
50 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
52 [!USE_MT19937]: Call _M_init, transforming the old default token or
53 numeric tokens to "default".
54 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
55 (random_device::_M_getval()): Use new union members to obtain a
56 random number from the stored function pointer or file descriptor.
57 [USE_MT19937]: Obtain a value from the mt19937 engine.
58 (random_device::_M_getval_pretr1()): Call _M_getval().
59 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
61 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
62 * testsuite/26_numerics/random/random_device/85494.cc: New test.
64 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
67 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
68 _M_split_cmpts() for a path with multiple components.
69 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
70 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
71 components and reserve space in vector. Return early when there is
73 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
74 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
76 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
77 form of std::equals for C++11 compatibility.
79 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
81 * doc/xml/manual/appendix_contributing.xml: Update pointer to
82 C++ standard at ansi.org.
84 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
86 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
87 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
90 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
91 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
93 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
95 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
97 * testsuite/20_util/function_objects/invoke/3.cc: New test.
98 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
99 "compile" test to "run".
101 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
102 * doc/html/*: Regenerate.
103 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
104 rvalue aliasing constructor.
105 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
106 (reinterpret_pointer_cast): Add overloads taking rvalues.
107 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
108 Add rvalue aliasing constructor.
109 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
110 "run" and check return values as well as types.
111 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
112 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
113 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
114 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
117 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
118 * doc/xml/manual/intro.xml: Likewise.
119 * include/std/future (__create_task_state): Add default arguments
120 to make providing an allocator optional.
121 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
122 instead of delegating to another constructor.
123 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
124 define allocator-extended constructors for C++17 and later.
125 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
127 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
128 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
129 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
131 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
133 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
134 Don't run the libstdc++/83237 part on simulator targets.
136 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
138 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
140 * doc/html/*: Regenerate.
142 * include/experimental/any (__any_caster): Use RTTI if comparing
143 addresses fails, to support non-unique addresses in shared libraries.
144 * include/std/any (__any_caster): Likewise.
147 * include/experimental/any (__any_caster): Constrain to only be
148 callable for object types. Use remove_cv_t instead of decay_t.
149 If the type decays or isn't copy constructible, compare the manager
150 function to a dummy specialization.
151 (__any_caster): Add overload constrained for non-object types.
152 (any::_Manager_internal<_Op>): Add dummy specialization.
153 * testsuite/experimental/any/misc/any_cast.cc: Test function types
156 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
159 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
160 reversed arguments to uninitialized_copy_n.
161 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
162 is unchanged by copy assignment.
163 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
164 compare path components.
167 * include/experimental/memory_resource: Add system header pragma and
168 do not define anything unless compiled as C++14 or later.
169 (__resource_adaptor_common::__guaranteed_alignment): Remove.
170 (__resource_adaptor_imp::do_allocate): If the requested alignment
171 is a fundamental alignment then either allocate directly from _M_alloc
172 or call the new _M_allocate function.
173 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
174 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
175 of the allocator rebound to a POD type with the specified alignment.
176 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
177 * testsuite/experimental/memory_resource/new_delete_resource.cc:
178 Adjust expected allocation sizes.
179 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
180 xfail for Solaris x86.
182 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
184 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
185 * include/pstl/execution_defs.h (__enable_if_execution_policy):
186 Use std::__remove_cvref_t when building with GCC.
188 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
191 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
192 Use "additional_flags" to pass -ltbb to v3_target_compile command.
193 Use check_v3_target_prop_cached to cache the result of the test.
195 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
197 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
200 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
201 Changed v3_target_compile check from preprocess to executable.
202 Added "-ltbb" to v3_target_compile flags.
204 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
206 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
207 Add check for Thread Building Blocks 2018 or later.
209 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
211 * testsuite/experimental/names.cc: Only include Networking TS headers
212 on targets with the necessary Gthreads support.
214 2019-05-20 Marek Polacek <polacek@redhat.com>
216 CWG 2094 - volatile scalars are trivially copyable.
218 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
219 result for volatile int.
221 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
223 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
224 * testsuite/experimental/names.cc: Include <experimental/filesystem>
227 PR c++/90532 Ensure __is_constructible(T[]) is false
228 * include/std/type_traits (__do_is_default_constructible_impl)
229 (__is_default_constructible_atom, __is_default_constructible_safe):
231 (is_default_constructible): Use is_constructible.
232 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
233 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
234 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
235 * testsuite/20_util/is_trivially_default_constructible/value.cc:
238 2019-05-20 Pádraig Brady <pbrady@fb.com>
240 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
241 to the deallocator with -fsized-deallocation.
243 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
245 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
246 test by passing correct alignment to deallocate function.
248 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
251 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
252 Raise exception if unique_ptr tuple member has unknown structure.
253 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
254 Adjust worker to support new __uniq_ptr_data base class. Do not
255 assume field called _M_head_impl is the first tuple element.
257 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
259 * include/bits/stl_deque.h
260 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
261 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
262 (_Deque_base::_Deque_impl_data): New.
263 (_Deque_base::_Deque_impl): Inherit latter.
264 (_Deque_base::_Deque_impl::_M_swap_data): Move...
265 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
266 (_Deque_base::_Deque_impl()): Add noexcept qualification.
267 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
268 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
269 (deque<>::deque()): Default.
270 (deque<>::deque(deque&&)): Default.
271 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
272 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
273 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
274 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
276 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
277 (deque<>::resize(size_type, const value_type&)): Share a single
279 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
281 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
282 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
283 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
284 * testsuite/23_containers/deque/allocator/default_init.cc: New.
286 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
289 * include/std/variant (holds_alternative, get, get_if): Improve
290 static assertion messages.
291 (bad_variant_access::bad_variant_access()): Change default message.
292 (__throw_bad_variant_access(bool)): New overload.
293 (get): Use new overload.
294 (visit, visit<R>): Improve exception message.
296 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
297 targets. Add more cases from P0608R3.
298 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
300 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
301 * include/experimental/type_traits (is_detected_exact)
302 (is_detected_exact_v): Likewise.
303 * include/pstl/execution_defs.h (is_execution_policy)
304 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
305 * include/pstl/execution_impl.h (__policy_traits): Likewise.
306 * testsuite/17_intro/names.cc: Check for more non-reserved names.
307 * testsuite/experimental/names.cc: New test.
310 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
311 assertions from the destructor.
312 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
313 Move static_assert for hash function to here.
314 (_Hash_table_base::_M_equals): Move static_assert for equality
316 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
318 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
319 the value directly instead of calling _S_value.
320 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
321 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
322 _S_key(_Const_Link_type).
323 * testsuite/23_containers/set/85965.cc: Check construction,
324 destruction, assignment and size() do not trigger the assertions.
325 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
326 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
328 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
329 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
330 * testsuite/23_containers/set/48101_neg.cc: Likewise.
331 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
332 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
333 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
334 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
336 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
337 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
340 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
342 * doc/html/*: Regenerate.
343 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
344 of decay_t (P0777R1).
346 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
348 Move from state of allocators (LWG2593)
349 * include/bits/stl_deque.h
350 (_Deque_base(_Deque_base&&, false_type)): Remove.
351 (_Deque_base(_Deque_base&&, true_type)): Remove.
352 (_Deque_base(_Deque_base&&)): Adapt.
353 (_Deque_base::_M_move_impl()): Remove.
354 * testsuite/util/testsuite_allocator.h
355 (propagating_allocator(propagating_allocator&&)): Preserve move from
357 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
359 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
361 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
362 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
363 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
365 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
367 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
368 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
370 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
372 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
374 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
376 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
378 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
380 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
382 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
385 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
387 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
388 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
390 * include/std/variant (__overload_set): Remove.
392 (_Build_FUN): New class template to define a single FUN overload,
393 with specializations to prevent unwanted conversions, as per P0608R3.
394 (_Build_FUNs): New class template to build an overload set of FUN.
395 (_FUN_type): New alias template to perform overload resolution.
396 (__accepted_type): Use integer_constant base for failure case. Use
397 _FUN_type for successful case.
398 (variant::__accepted_index): Use _Tp instead of _Tp&&.
399 (variant::variant(_Tp&&)): Likewise.
400 (variant::operator=(_Tp&&)): Likewise.
402 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
403 Replace raw visitation with a runtime check for the valueless state
404 and a non-raw visitor.
405 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
406 (variant::index()): Remove branch.
407 (variant::swap(variant&)): Use valueless_by_exception() instead of
408 comparing the index to variant_npos, and add likelihood attribute.
410 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
411 (_Hashtable_base::_Equal_hash_code): Define new class template.
412 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
415 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
416 Replace with _M_get non-static member function.
417 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
419 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
420 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
422 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
423 _S_get accessors for members in EBO helpers.
424 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
425 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
427 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
429 (_Hashtable_base::_M_eq()): Remove non-const overload.
431 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
433 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
435 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
437 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
440 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
442 * config/os/solaris/solaris2.10: Move to ...
443 * config/os/solaris: ... this.
444 * configure.host (os_include_dir): Adapt.
445 (abi_baseline_pair): Remove Solaris 10 handling.
446 * config/abi/post/i386-solaris2.10: Remove.
447 * config/abi/post/sparc-solaris2.10: Remove.
448 * config/abi/post/i386-solaris2.11: Rename to ...
449 * config/abi/post/i386-solaris: ... this.
450 * config/abi/post/sparc-solaris2.11: Rename to ...
451 * config/abi/post/sparc-solaris: ... this.
453 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
456 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
459 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
461 * include/std/variant (__visit_with_index): Remove typedef.
462 (__deduce_visit_result): New tag type.
463 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
464 visitation of possibly-valueless variants, forwarding to __do_visit
465 with the relevant tag type.
466 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
467 and make lambda return void.
468 (__variant_construct): Likewise.
469 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
470 __raw_idx_visit and make lambda return void.
471 (_Multi_array::__untag_result): Add metafunction to check the function
472 pointer type for a tag type that dictates the kind of visitation.
473 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
474 Use decltype(auto) instead of tagged function pointer type.
475 (__gen_vtable_impl): Remove bool non-type parameter and unused
476 _Variant_tuple parameter.
477 (__gen_vtable_impl::__visit_invoke_impl): Remove.
478 (__gen_vtable_impl::__do_visit_invoke): Remove.
479 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
480 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
481 for the visit<R> case, rather than dispatching to separate functions.
482 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
484 (variant::swap): Likewise.
485 (__do_visit): Replace two non-type template parameters with a single
486 type parameter, so that the caller must specify the visitor's return
487 type (or one of the tag types).
488 (visit): Deduce a return type from the visitor and use the
489 __deduce_visit_result tag to enforce that all overloads return the
491 (visit<R>): Call __do_visit<R> with explicit result type.
492 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
495 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
497 nonesuch is insufficiently useless (lwg2996)
498 * include/std/type_traits (struct __nonesuch): Added private base
499 class to make __nonesuch not an aggregate and removed deleted default
501 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
502 (operator=(const pair&)): Use __nonesuch instead of
503 __nonesuch_no_braces.
504 (operator=(pair&&)): Likewise
505 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
506 of __nonesuch_no_braces.
507 (operator=(tuple&&)): Likewise
508 * include/experimental/type_traits (struct nonesuch): Added private
509 base class to make nonesuch not an aggregate and removed deleted
511 * testsuite/20_util/nonesuch/nonesuch.cc: New.
512 * testsuite/experimental/type_traits/nonesuch.cc: New.
514 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
516 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
517 (_Function_handler): Remove partial specializations for void return
518 types and pointers to member.
519 (_Function_handler::_M_manager): Adapt to removal of
520 _Simple_type_wrapper.
521 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
522 * include/std/functional (_Bind_result::__enable_if_void)
523 (_Bind_result::__disable_if_void): Remove sfinae helpers.
524 (_Bind_result::__call): Use __invoke_r and remove overloads for void
526 * include/std/future (__future_base::_Task_state::_M_run)
527 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
528 change return type of lambda expressions.
530 * include/bits/invoke.h (__invoke_r): Define new function implementing
531 the INVOKE<R> pseudo-function.
532 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
533 * testsuite/20_util/function_objects/invoke/2.cc: New test.
535 * include/std/type_traits (__is_nt_convertible_helper): Define it
536 unconditionally, not only for C++20.
537 (__is_nothrow_convertible): Define internal trait for use in C++11.
538 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
539 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
540 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
541 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
542 that has nothrow explicit conversion but potentially-throwing implicit
544 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
545 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
546 function to only consider implicit conversions.
547 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
549 * include/std/iterator: Include <iosfwd> instead of <istream> and
552 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
553 Remove unused, non-standard function.
555 * include/bits/regex.h (match_results::max_size()): Adjust return
556 value to account for prefix/suffix/unmatched subs.
557 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
558 reset the contained sub matches.
559 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
560 function to set result state following a failed match.
561 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
562 sub_match states after _M_resize. Use _M_establish_failed_match.
565 * include/std/thread (thread::_State_impl, thread::_S_make_state):
566 Replace single _Callable parameter with variadic _Args pack, to
567 forward them directly to the tuple of decayed copies.
568 * testsuite/30_threads/thread/cons/69724.cc: New test.
570 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
572 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
573 * include/bits/basic_string.h: (operator=(const basic_string&):
574 Move allocator decision to assign.
575 (assign(const basic_string&)): Move allocator decision here.
576 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
578 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
581 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
583 * testsuite/util/testsuite_allocator.h (memory_resource)
584 (default_resource_mgr): Fix indentation.
586 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
587 Use operator-> to access raw pointer member.
588 * testsuite/23_containers/vector/59829.cc: Likewise.
589 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
590 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
591 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
593 (PointerBase, PointerBase_void): Derive from NullablePointer and use
594 its constructors and equality operators. Change converting
595 constructors to use operator-> to access private member of the other
597 (PointerBase_void::operator->()): Add, for access to private member.
598 (operator-(PointerBase, PointerBase)): Change to hidden friend.
599 (operator==(PointerBase, PointerBase)): Remove.
600 (operator!=(PointerBase, PointerBase)): Remove.
602 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
603 not assume field called _M_head_impl is the first tuple element.
604 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
605 implementation more accurate.
606 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
607 empty pointer type and non-empty deleter.
609 LWG 2899 - Make is_move_constructible correct for unique_ptr
610 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
611 move assignment operator.
612 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
613 (__uniq_ptr_data): New class template with conditionally deleted
615 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
616 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
617 constructor and move assignment operator as defaulted.
618 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
619 __uniq_ptr_impl::release().
620 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
621 to __uniq_ptr_impl::reset(pointer).
622 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
623 Check for new __uniq_ptr_data type.
624 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
626 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
628 PR libstdc++/90454.cc path construction from void*
629 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
630 pointers to void are rejected as well as void.
631 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
632 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
634 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
636 * doc/xml/manual/policy_data_structures.xml: Comment out stray
637 <remark> elements. Fix formatting of bibliography references.
639 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
641 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
643 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
645 Remove Profile Mode, deprecated since 7.1.0
646 * doc/Makefile.am: Remove XML file for profile mode docs.
647 * doc/Makefile.in: Regenerate.
648 * doc/xml/authors.xml: Remove authors of profile mode docs.
649 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
651 * doc/xml/manual/debug.xml: Likewise.
652 * doc/xml/manual/evolution.xml: Document removal of profile mode.
653 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
654 * doc/xml/manual/spine.xml: Remove profile mode author credit.
655 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
657 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
659 * doc/html/*: Regenerate.
660 * include/Makefile.am: Remove profile mode headers.
661 * include/Makefile.in: Regenerate.
662 * include/bits/c++config (std::__profile): Remove namespace.
663 [_GLIBCXX_PROFILE]: Remove checks for macro.
664 * include/profile/array: Remove.
665 * include/profile/base.h: Remove.
666 * include/profile/bitset: Remove.
667 * include/profile/deque: Remove.
668 * include/profile/forward_list: Remove.
669 * include/profile/impl/profiler.h: Remove.
670 * include/profile/impl/profiler_algos.h: Remove.
671 * include/profile/impl/profiler_container_size.h: Remove.
672 * include/profile/impl/profiler_hash_func.h: Remove.
673 * include/profile/impl/profiler_hashtable_size.h: Remove.
674 * include/profile/impl/profiler_list_to_slist.h: Remove.
675 * include/profile/impl/profiler_list_to_vector.h: Remove.
676 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
677 * include/profile/impl/profiler_node.h: Remove.
678 * include/profile/impl/profiler_state.h: Remove.
679 * include/profile/impl/profiler_trace.h: Remove.
680 * include/profile/impl/profiler_vector_size.h: Remove.
681 * include/profile/impl/profiler_vector_to_list.h: Remove.
682 * include/profile/iterator_tracker.h: Remove.
683 * include/profile/list: Remove.
684 * include/profile/map: Remove.
685 * include/profile/map.h: Remove.
686 * include/profile/multimap.h: Remove.
687 * include/profile/multiset.h: Remove.
688 * include/profile/ordered_base.h: Remove.
689 * include/profile/set: Remove.
690 * include/profile/set.h: Remove.
691 * include/profile/unordered_base.h: Remove.
692 * include/profile/unordered_map: Remove.
693 * include/profile/unordered_set: Remove.
694 * include/profile/vector: Remove.
695 * scripts/run_doxygen: Do not process profile mode headers.
696 * testsuite/23_containers/array/element_access/60497.cc: Don't use
698 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
699 Remove dg-skip-if for profile mode.
700 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
701 preprocessor check for profile mode.
702 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
703 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
705 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
707 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
708 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
709 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
710 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
711 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
713 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
715 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
717 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
719 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
720 preprocessor check for profile mode.
721 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
723 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
724 Remove dg-skip-if for profile mode.
725 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
726 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
727 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
728 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
729 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
730 * testsuite/Makefile.am: Remove profile_flags variable and
731 * testsuite/Makefile.am: Remove profile_flags variable and
732 check-profile target.
733 * testsuite/Makefile.in: Regenerate.
734 * testsuite/ext/profile/all.cc: Remove.
735 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
736 * testsuite/ext/profile/profiler_algos.cc: Remove.
737 * testsuite/ext/profile/replace_new.cc: Remove.
738 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
739 preprocessor check for profile mode.
740 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
741 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
742 (check_v3_target_normal_mode): Do not check for profile mode macro.
743 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
745 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
746 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
747 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
748 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
749 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
750 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
751 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
752 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
753 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
754 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
756 Remove array_allocator extension, deprecated since 4.9.0
757 * doc/xml/manual/allocator.xml: Remove documentation for
759 * doc/xml/manual/evolution.xml: Document array_allocator removal.
760 * doc/xml/manual/using.xml: Remove header from documentation.
761 * include/Makefile.am: Remove <ext/array_allocator.h> header.
762 * include/Makefile.in: Regenerate.
763 * include/ext/array_allocator.h: Remove.
764 * include/precompiled/extc++.h: Do not include removed header.
765 * testsuite/ext/array_allocator/1.cc: Remove.
766 * testsuite/ext/array_allocator/2.cc: Remove.
767 * testsuite/ext/array_allocator/26875.cc: Remove.
768 * testsuite/ext/array_allocator/3.cc: Remove.
769 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
770 * testsuite/ext/array_allocator/check_delete.cc: Remove.
771 * testsuite/ext/array_allocator/check_new.cc: Remove.
772 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
773 * testsuite/ext/headers.cc: Do not include removed header.
775 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
777 * include/bits/stl_bvector.h
778 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
780 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
782 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
784 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
786 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
788 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
790 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
792 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
794 (_Bit_iterator::operator-(difference_type)): Likewise.
795 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
796 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
798 (_Bit_const_iterator::operator-(difference_type)): Likewise.
799 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
801 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
804 * testsuite/util/thread/all.h: Do not use remove_pointer for
805 std::thread::native_handle_type.
808 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
809 (_Variant_storage<true, Types...>::_M_reset()))
810 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
811 (__get_storage): Likewise.
812 (variant): Add noexcept to friend declarations for __get and
816 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
817 Use _Require for constraints.
818 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
820 (__uniq_ptr_hash): New base class with conditionally-disabled call
822 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
823 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
824 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
826 * include/bits/shared_ptr.h: Improve docs.
827 * include/bits/shared_ptr_base.h: Likewise.
828 * include/bits/stl_uninitialized.h: Likewise.
829 * include/bits/unique_ptr.h: Likewise.
830 * libsupc++/new: Likewise.
832 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
834 * include/bits/stl_deque.h
835 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
837 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
839 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
841 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
843 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
845 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
847 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
849 (_Deque_iterator<>::operator-(difference_type)): Likewise.
851 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
854 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
855 (test01): Reserve for number of insertions to avoid rehash during test.
856 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
858 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
863 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
865 * include/experimental/bits/fs_path.h: Improve docs.
866 * include/experimental/bits/net.h: Fix wrong header name in comment.
867 Do not document implementation details.
868 * include/experimental/netfwd: Fix doxygen grouping.
870 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
872 * include/bits/stl_pair.h: Improve docs.
873 * include/std/tuple: Likewise.
875 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
877 * include/std/chrono: Improve docs.
878 * include/std/ratio: Do not document implementation details.
879 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
881 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
884 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
885 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
886 (__duration_common_type): New helper.
887 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
888 __duration_common_type.
889 (__timepoint_common_type_wrapper): Replace with ...
890 (__timepoint_common_type): New helper.
891 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
892 Use __time_point_common_type.
893 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
894 (__common_type_impl): If either argument is transformed by decay,
895 use the common_type of the decayed types.
896 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
897 decayed, use __do_common_type_impl to get the common_type.
898 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
899 (__do_member_type_wrapper, __member_type_wrapper)
900 (__expanded_common_type_wrapper): Remove.
901 (__common_type_pack, __common_type_fold): New helpers.
902 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
903 __member_type_wrapper and __expanded_common_type_wrapper.
904 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
905 Test zero-length template argument list.
906 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
907 Test single argument cases and argument types that should decay.
908 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
909 Adjust expected error.
910 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
912 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
913 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
914 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
916 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
918 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
920 Make allocator propagation more consistent for
921 operator+(basic_string) (P1165R1)
922 * include/bits/basic_string.h
923 (operator+(basic_string&&, basic_string&&): Changed resulting
924 allocator to always be the one from the first parameter.
925 * include/bits/basic_string.tcc
926 (operator+(const _CharT*, const basic_string&)): Changed
927 resulting allocator to be SOCCC on the second parameter's allocator.
928 (operator+(_CharT, const basic_string&)): Likewise.
929 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
931 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
934 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
936 * include/bits/regex.h: Improve docs.
937 * include/bits/regex.tcc: Do not document implementation details.
939 * testsuite/19_diagnostics/error_code/hash.cc: New test.
941 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
943 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
944 Add type printer for container types in std::__debug namespace.
945 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
946 (gdb-tests): Use distinct parameters for the type of test and use of
948 (gdb-test): Check for regex test even if 'whatis' test.
949 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
951 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
952 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
953 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
954 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
955 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
956 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
957 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
959 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
961 * include/std/system_error (error_category): Fix comment.
964 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
965 argument is an empty path.
966 (absolute(const path&, error_code&)): Use invalid_argument as error
967 code instead of no_such_file_or_directory.
968 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
969 of non-existent paths and empty paths with both overloads of absolute.
971 * include/std/system_error (error_category, error_code)
972 (error_condition): Improve docs.
973 * libsupc++/exception: Add missing @addtogroup Doxygen command.
974 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
975 to class documentation. Suppress documentation for implementation
977 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
978 Suppress documentation for implementation details.
980 * include/std/system_error (error_code): Remove friend declaration
981 for hash<error_code>.
982 (hash<error_code>::operator()): Use public member functions to access
984 (hash<error_condition>::operator()): Use address of category, not
985 its object representation.
986 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
987 Use public member functions to access value and category.
988 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
990 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
992 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
993 * include/bits/hashtable_policy.h
994 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
995 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
996 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
997 smaller than input value rather than always greater. Preserve
998 _M_next_resize if called with 0 input. Use __builtin_floorl.
999 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1000 elements + number of insertions is greater than _M_next_resize. Start
1001 with 11 buckets if not told otherwise. Use __builtin_floorl.
1002 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1003 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1004 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1005 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1006 told otherwise. Use __builtin_floorl.
1007 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1008 to also validate _Power2_rehash_policy.
1009 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1012 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1015 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1019 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1020 overflow warning with -Wpedantic -Wsystem-headers.
1022 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1025 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1026 * include/bits/move.h (swap): Remove extra parentheses.
1028 * include/experimental/bits/lfts_config.h: Improve doc markup.
1029 * include/experimental/optional: Improve docs.
1030 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1031 (__constexpr_addressof): Remove.
1032 (optional::operator->()): Use std::__addressof().
1033 * include/std/optional (optional::operator->()): Adjust whitespace.
1034 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1035 that operator-> is still constexpr with overloaded operator&. Change
1036 to compile-only test.
1037 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1040 * include/bits/shared_ptr.h: Improve docs.
1041 * include/bits/shared_ptr_atomic.h: Likewise.
1042 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1044 * include/bits/basic_string.h: Fix iterator/index confusion in
1046 * include/bits/range_access.h: Fix Doxygen warnings.
1047 * include/bits/refwrap.h: Do not document implementation details.
1048 (ref, cref): Group docs with reference_wrapper.
1049 * include/std/fstream: Fix Doxygen markup.
1050 * libsupc++/initializer_list (begin, end): Group docs with
1053 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1055 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1056 * include/std/mutex: Likewise.
1057 * include/std/shared_mutex: Likewise.
1059 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1060 * include/bits/fs_fwd.h: Likewise.
1061 * include/bits/fs_ops.h: Likewise.
1062 * include/bits/fs_path.h: Likewise.
1063 * include/std/filesystem: Likewise.
1065 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1066 * include/experimental/buffer: Likewise.
1067 * include/experimental/executor: Likewise.
1068 * include/experimental/internet: Likewise.
1069 * include/experimental/io_context: Likewise.
1070 * include/experimental/net: Likewise.
1071 * include/experimental/netfwd: Likewise.
1072 * include/experimental/socket: Likewise.
1073 * include/experimental/timer: Likewise.
1075 * doc/doxygen/doxygroups.cc: Move description of experimental group
1077 * include/experimental/algorithm: Add to libfund-ts doc group.
1078 * include/experimental/any: Likewise. Do not document implementation
1080 * include/experimental/array: Add to libfund-ts doc group.
1081 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1082 for Library Fundamentals.
1083 * include/experimental/chrono: Add to libfund-ts doc group.
1084 * include/experimental/deque: Likewise.
1085 * include/experimental/forward_list: Likewise.
1086 * include/experimental/functional: Likewise.
1087 * include/experimental/iterator: Likewise.
1088 * include/experimental/list: Likewise.
1089 * include/experimental/map: Likewise.
1090 * include/experimental/memory: Likewise.
1091 * include/experimental/memory_resource: Likewise. Improve docs.
1093 * include/experimental/numeric: Add to libfund-ts doc group.
1094 * include/experimental/optional: Likewise.
1095 * include/experimental/propagate_const: Likewise.
1096 * include/experimental/random: Likewise.
1097 * include/experimental/ratio: Likewise.
1098 * include/experimental/regex: Likewise.
1099 * include/experimental/set: Likewise.
1100 * include/experimental/source_location: Likewise.
1101 * include/experimental/string: Likewise.
1102 * include/experimental/string_view: Likewise.
1103 * include/experimental/system_error: Likewise.
1104 * include/experimental/tuple: Likewise.
1105 * include/experimental/type_traits: Likewise.
1106 * include/experimental/unordered_map: Likewise.
1107 * include/experimental/unordered_set: Likewise.
1108 * include/experimental/utility: Likewise.
1109 * include/experimental/vector: Likewise.
1110 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1111 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1112 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1114 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1115 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1116 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1117 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1118 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1120 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1121 * include/experimental/bits/fs_fwd.h: Improve docs.
1122 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1123 * include/experimental/bits/fs_path.h: Likewise.
1124 (path, filesystem_error, u8path): Improve docs.
1125 * include/experimental/filesystem: Link to docs for TS.
1127 * config/allocator/new_allocator_base.h (__allocator_base): Add
1128 workaround for Doxygen bug #6945.
1129 * include/std/memory: Improve docs. Define group for pointer safety.
1130 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1131 conditional to suppress documentation for implementation details.
1133 * include/bits/specfun.h: Improve docs.
1134 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1137 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1138 (std::experimental): Add docs.
1139 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1140 namespace to nothing when generating docs.
1141 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1142 * include/std/chrono (std::chrono): Likewise.
1143 * include/std/functional (std::placeholders): Likewise.
1144 * include/std/thread (std::this_thread): Likewise.
1146 * include/parallel/settings.h: Fix Doxygen markup.
1148 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1149 anything unless PB_DS_CLASS_C_DEC is defined.
1150 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1151 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1152 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1153 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1154 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1155 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1156 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1158 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1159 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1160 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1161 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1162 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1163 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1164 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1165 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1166 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1167 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1168 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1170 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1171 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1173 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1176 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1177 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1178 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1181 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1183 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1184 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1185 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1186 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1187 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1188 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1190 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1191 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1194 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
1197 * include/std/complex (__complex_proj): Return parameter unchanged.
1198 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1199 floating-point types to take std::complex arguments.
1200 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1201 floating-point types.
1202 * testsuite/26_numerics/complex/proj.cc: New test.
1204 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1206 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1207 to _Lock_policyE[012].
1208 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1210 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
1212 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1213 macros accidentally left in.
1214 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1215 unnecessary -lstdc++fs option. Fix test for mingw.
1216 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1219 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1221 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1223 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
1225 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1227 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1228 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1231 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1233 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1236 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1237 class template and partial specialization.
1240 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1242 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1243 functions to convert a value to an integral type.
1244 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1245 (fill_n): Convert _Size parameter to an integral type.
1246 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1247 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1248 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1249 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1250 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1251 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1253 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
1255 Adding noexcept-specification on tuple constructors (LWG 2899)
1256 * libstdc++-v3/include/std/tuple:
1257 (tuple()): Add noexcept-specification.
1258 (tuple(const _Elements&...)): Likewise
1259 (tuple(_UElements&&...)): Likewise
1260 (tuple(const tuple<_UElements...>&)): Likewise
1261 (tuple(tuple<_UElements...>&&)): Likewise
1262 (tuple(const _T1&, const _T2&)): Likewise
1263 (tuple(_U1&&, _U2&&)): Likewise
1264 (tuple(const tuple<_U1, _U2>&): Likewise
1265 (tuple(tuple<_U1, _U2>&&): Likewise
1266 (tuple(const pair<_U1, _U2>&): Likewise
1267 (tuple(pair<_U1, _U2>&&): Likewise
1268 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1270 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
1273 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1274 arguments with __restrict.
1276 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1278 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1280 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
1282 * include/experimental/bits/fs_path.h
1283 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1284 avoid redundant call to _S_convert_loc with non-const pointers.
1286 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1287 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1288 * testsuite/21_strings/basic_string/hash/hash.cc
1289 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1290 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1291 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1293 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1294 wstring::_M_replace_dispatch with more specific patterns.
1295 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1296 Create const std::string to avoid redundant call to _S_convert_loc
1297 with non-const pointers.
1298 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1299 avoid unnecessary basic_string::assign instantiations.
1301 * include/std/memory (__uses_alloc_args): Add string-literal to
1302 static_assert, to match the one in __uses_alloc.
1303 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1304 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1305 for recursive uses-allocator construction of nested pairs.
1306 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1309 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1311 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1312 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1313 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1314 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1316 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1317 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1318 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1319 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1320 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1321 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1322 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1324 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
1327 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1328 * include/std/scoped_allocator [__cplusplus > 201703L]
1329 (scoped_allocator_adaptor::construct): Define in terms of
1330 uses_allocator_construction_args, as per P0591R4.
1331 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1332 * testsuite/util/testsuite_allocator.h: Remove name of unused
1335 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
1337 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1338 * doc/html/*: Regenerate.
1340 * include/bits/fs_path.h (operator<, operator<=, operator>)
1341 (operator>=, operator==, operator!=): Make hidden friends, as per
1343 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1344 string type in test.
1345 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1347 * include/std/any (any::any(ValueType&&)): Use __and_v.
1348 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1351 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1353 * include/std/type_traits (__result_of_memfun): Use remove_reference
1354 instead of __remove_cvref_t and remove redundant is_same check.
1355 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1357 * include/experimental/string_view (basic_string_view::pointer)
1358 (basic_string_view::reference): Fix to refer to non-const value_type.
1359 * include/bits/basic_string.h (basic_string): Use __sv_check and
1360 __sv_limit instead of basic_string_view::_M_check and
1361 basic_string_view::_M_limit.
1362 * include/std/string_view (__sv_check, __sv_limit): New
1363 helper functions to replace basic_string_view::_M_check and
1364 basic_string_view::_M_limit.
1365 (basic_string_view): Add static assertions to enforce ill-formed
1366 requirement for traits_type::char_type from P1148R0, and to enforce
1367 required properties of char-like types.
1368 (basic_string_view::pointer, basic_string_view::reference): Fix to
1369 refer to non-const value_type.
1370 (basic_string_view::operator[], basic_string_view::at)
1371 (basic_string_view::front, basic_string_view::back)
1372 (basic_string_view::data): Use const_reference and const_pointer
1373 typedefs for return types.
1374 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1375 (hash<wstring_view>): Fix argument_type typedef.
1376 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1377 char/1.cc: Fix expected return type of basic_string_view::data().
1378 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1379 wchar_t/1.cc: Likewise.
1380 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1381 char/1.cc: Likewise.
1382 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1383 wchar_t/1.cc: Likewise.
1384 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1386 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1387 Check reference and pointer typedefs.
1388 * testsuite/experimental/string_view/requirements/typedefs.cc:
1390 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1391 Fix expected return type of basic_string_view::data().
1392 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1394 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1396 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
1400 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
1401 Avoid a runtime check for types that can never be stored in std::any.
1402 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1405 PR libstdc++/90220 (partial)
1406 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
1407 not attempt ill-formed static_cast to pointers to non-object types.
1408 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1411 * testsuite/20_util/variant/run.cc: Catch exception by reference to
1412 prevent -Wcatch-value warning.
1414 * include/std/variant (__variant_construct): Use template parameter
1415 type instead of equivalent decltype-specifier.
1416 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
1417 Replace forward with move.
1418 (_Move_ctor_base<false, Types...>::_M_destructive_move)
1419 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
1420 (_Move_ctor_base<true, Types...>::_M_destructive_move)
1421 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
1422 index after construction succeeds.
1423 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
1424 if-constexpr checks that are always true. Use __remove_cvref_t instead
1425 of remove_reference so that is_nothrow_move_constructible check
1426 doesn't use a const rvalue parameter. In the potentially-throwing case
1427 construct a temporary and move assign it, as per LWG 2904.
1428 (_Move_assign_base<false, Types...>::operator=): Remove redundant
1429 if-constexpr checks that are always true. Use emplace as per LWG 2904.
1430 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
1431 construct a temporary and move assign from it, as per LWG 2904.
1432 * testsuite/20_util/variant/exception_safety.cc: Check that
1433 assignment operators have strong exception safety guarantee.
1435 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
1437 Document PSTL linker flags
1439 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
1441 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1443 * include/std/variant (__detail::__variant::_Traits): Make
1444 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
1445 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
1447 (__detail::__variant::_Copy_assign_alias): Only depend on
1448 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
1449 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
1450 move assignment operators.
1453 * include/std/variant (variant::__not_self): New helper for the
1454 is_same_v<remove_cvref_t<T>, variant>==false constraints.
1455 (variant::__to_type_impl): Remove.
1456 (variant::__to_type): Add default argument to check pack size, instead
1457 of using __to_type_impl.
1458 (variant::__accepted_type): Add default argument using __not_self.
1459 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
1460 for variant(T&&) constructor constraint.
1461 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
1462 Extract __accepted_type into a named template parameter for reuse in
1463 other constraints and in the exception specification.
1464 (variant::variant(in_place_type_t<T>, Args&&...))
1465 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
1466 (variant::variant(in_place_index_t<T>, Args&&...))
1467 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
1468 (variant::operator=T&&)): Remove redundant && from trait arguments.
1469 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
1470 isn't used for in_place_type or in_place_index arguments.
1472 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
1473 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
1474 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
1476 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1477 Bernd Edlinger <bernd.edlinger@hotmail.de>
1478 Jakub Jelinek <jakub@redhat.com>
1481 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
1482 general-regs-only target attribute for ARM.
1484 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1487 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
1488 specialization also depend on is_nothrow_move_constructible.
1489 * include/std/variant (__detail::__variant::__never_valueless()):
1490 Only true if the variant would have a move assignment operator.
1491 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
1492 Check __never_valueless<T...>().
1493 (variant::emplace): Only perform non-throwing move assignments
1494 for never-valueless alternatives if the variant has a move assignment
1496 * testsuite/20_util/variant/compile.cc: Check that never-valueless
1497 types can be emplaced into non-assignable variants.
1498 * testsuite/20_util/variant/run.cc: Check that never-valueless types
1499 don't get copied when emplaced into non-assignable variants.
1501 * include/std/variant (__detail::__variant::__ref_cast): Remove
1503 (__detail::__variant::_Uninitialized::_M_get)
1504 (__detail::__variant::__get)
1505 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
1507 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
1509 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
1511 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1512 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1513 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1514 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1516 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1518 Delegate PSTL configuration to pstl/pstl_config.h
1520 * include/bits/c++config: Remove explicit PSTL configuration
1521 macros and use definitions from <pstl/pstl_config.h>.
1523 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1525 Cleanup algorithm implementations
1526 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
1528 (mismatch): Forward execution policy.
1529 (equal): Qualify call to std::equal().
1530 (partial_sort): Forward execution policy.
1531 (inplace_merge): Forward execution policy.
1533 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
1535 Improve implementation of parallel equal()
1536 * include/pstl/algorithm_impl.h
1537 (__internal::__brick_equal): use "4 iterator" version of
1539 (__internal::__brick_equal): use simd for random access
1540 iterators on unsequenced execution policies.
1541 (__internal::__pattern_equal): add "4 iterator" version
1542 (__internal::__pattern_equal): dispatch to simd __brick_equal
1543 for vector-only execution policies.
1544 (__internal::__pattern_equal): dispatch to __parallel_or for
1545 parallel execution policies.
1546 * include/pstl/glue_algorithm_impl.h
1547 (std::equal): dispatch to "4 iterator" version of
1548 __internal::__pattern_equal().
1550 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
1553 * include/bits/forward_list.h (operator==): Do not use operator!= to
1555 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1556 earlier in the list, so that sort is stable.
1557 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1558 * testsuite/23_containers/forward_list/comparable.cc: Test with
1559 types that meet the minimum EqualityComparable and LessThanComparable
1560 requirements. Remove irrelevant comment.
1562 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1563 Do not depend on whether all alternative types are move constructible.
1564 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1565 from the operand when deciding whether to perform the assignment.
1566 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1567 with deleted move constructor and deleted move assignment operator.
1568 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1569 behaviour of variants with DeletedMoves as an alternative.
1570 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1571 (move_ctor, move_assign): Check that moving a variant with a
1572 DeletedMoves alternative falls back to copying instead of moving.
1574 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1575 from static_assert declarations.
1577 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1578 actually match its name.
1579 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1580 (test_swap()): Fix result for MoveCtorOnly and check
1581 MoveCtorAndSwapOnly.
1583 * include/std/optional (optional::value_or(U&&) &&): Add missing
1584 constexpr specifier.
1585 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1586 for disengaged optionals and rvalue optionals.
1587 * testsuite/20_util/optional/observers/4.cc: Likewise.
1589 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
1591 * include/pstl/algorithm_impl.h: Uglify identfiers.
1592 * include/pstl/numeric_impl.h: Uglify identfiers.
1593 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1595 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
1597 * include/bits/c++config:
1598 Add definition for __PSTL_ASSERT.
1599 Add definition for __PSTL_ASSERT_MSG.
1600 * include/pstl/algorithm_impl.h: Replace use of assert().
1601 * include/pstl/numeric_impl.h: Replace use of assert().
1602 * include/pstl/parallel_backend_tbb.h:
1603 Replace use of assert().
1604 Replace use of __TBB_ASSERT().
1605 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1607 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
1610 * src/c++17/memory_resource.cc
1611 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1612 needed to allow placing a _Chunk at the end of the buffer.
1613 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1615 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
1617 * doc/xml/faq.xml: Add information about emergency EH pool.
1618 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1619 Move outdated information on mt_allocator to a separate section.
1620 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1621 doesn't affect the default allocator.
1623 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1627 * testsuite/20_util/variant/89851.cc: New test.
1629 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
1631 * include/std/variant: Adjust whitespace. Add comments.
1632 (_Multi_array): Leave primary template undefined.
1633 (_Multi_array<_Tp>): Define partial specialization for base case of
1635 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1636 which is always a reference.
1637 (__gen_vtable::_S_apply()): Remove function, inline body into
1638 default member initializer.
1639 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1641 * include/std/variant (__variant_idx_cookie): Add member type.
1642 (__visitor_result_type): Remove.
1643 (__do_visit): Use invoke_result instead of __visitor_result_type.
1644 * testsuite/20_util/variant/visit.cc: New test.
1647 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1649 * testsuite/20_util/variant/90008.cc: New test.
1651 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
1653 * include/pstl/algorithm_impl.h: Add namespace qualification.
1654 * include/pstl/execution_defs.h: Add namespace qualification.
1655 * include/pstl/execution_impl.h: Add namespace qualification.
1656 * include/pstl/numeric_impl.h: Add namespace qualification.
1657 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1658 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1659 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1661 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1663 Fix visit<R> for variant.
1664 * include/std/variant (__do_visit): Add a template parameter
1665 for enforcing same return types for visit.
1666 (__gen_vtable_impl): Likewise.
1667 (_S_apply_single_alt): Adjust.
1668 (__visit_invoke_impl): New. Handle casting to void.
1669 (__do_visit_invoke): New. Enforces same return types.
1670 (__do_visit_invoke_r): New. Converts return types.
1671 (__visit_invoke): Adjust.
1672 (__gen_vtable): Add a template parameter for enforcing
1673 same return types for visit.
1674 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1675 different return types.
1676 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1677 visitors with different return types don't accidentally
1678 compile with regular visitation.
1680 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1682 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1683 dg-require-filesystem-ts.
1685 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
1687 * doc/xml/manual/status_cxx2020.xml: Update status.
1688 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1689 * testsuite/20_util/variant/visit_r.cc: New test.
1691 * include/bits/fs_dir.h (directory_iterator::operator*)
1692 (directory_iterator::operator->): Add noexcept.
1693 (operator==, operator!=): Replace namespace-scope equality operators
1694 for directory iterators with hidden friends.
1697 * config/abi/pre/gnu.ver: Add missing exports.
1698 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1701 * config/abi/pre/gnu.ver: Export new symbols.
1702 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1703 (recursive_directory_iterator::recursion_pending())
1704 (recursive_directory_iterator::disable_recursion_pending()): Remove
1705 inline definitions. Make noexcept.
1706 (recursive_directory_iterator::depth())
1707 (recursive_directory_iterator::operator*())
1708 (recursive_directory_iterator::operator->()): Make noexcept.
1709 (recursive_directory_iterator::_M_options)
1710 (recursive_directory_iterator::_M_pending): Remove data members.
1711 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1712 (recursive_directory_iterator::recursive_directory_iterator): Remove
1713 ctor-initializer. Use new constructor for _Dir_stack.
1714 (recursive_directory_iterator::options())
1715 (recursive_directory_iterator::recursion_pending())
1716 (recursive_directory_iterator::disable_recursion_pending()): Add
1717 non-inline definitions.
1718 (recursive_directory_iterator::depth()): Make noexcept.
1719 (recursive_directory_iterator::increment(error_code&))
1720 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1721 location of options and recursion_pending members.
1722 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1723 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1724 user-declared move constructor and assignment operator, to make the
1727 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1728 d_type == DT_UNKNOWN immediately.
1729 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1731 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1733 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1735 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1736 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1739 PR libstdc++/87431 (again)
1740 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1741 Define partial specialization for basic_string.
1742 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1743 shared_ptr and weak_ptr.
1744 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1746 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1748 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1750 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1752 * include/std/any (_Never_valueless_alt): Define explicit
1753 specialization for any.
1754 * include/std/variant (_Never_valueless_alt): Define primary template.
1755 (__never_valueless): Use _Never_valueless_alt instead of
1756 is_trivially_copyable.
1757 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1758 initializations to avoid try-catch overhead. Add special case for
1759 scalars produced by potentially-throwing conversions. Use
1760 _Never_valueless_alt instead of is_trivially_copyable for the
1761 remaining strong exception-safety cases.
1762 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1763 * testsuite/20_util/variant/87431.cc: Run both test functions.
1764 * testsuite/20_util/variant/exception_safety.cc: New test.
1765 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1766 so the variant becomes valueless.
1768 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
1771 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1773 (variant::emplace<_Tp>): Return result of emplace<N> directly.
1775 * include/std/string (__hash_string_base): New class template defining
1776 operator() for hashing strings.
1777 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1778 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1779 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1780 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1782 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1784 Use single-visitation in variant assignment and swap and relops.
1785 Also use indices instead of types when checking whether
1786 variants hold the same thing.
1787 * include/std/variant (__do_visit): Add a template parameter
1788 for index visitation, invoke with indices if index visitation
1790 (__variant_idx_cookie): New.
1791 (__visit_with_index): Likewise.
1792 (_Copy_assign_base::operator=): Do single-visitation with
1794 (_Move_assign_base::operator=): Likewise.
1795 (_Extra_visit_slot_needed): Adjust.
1796 (__visit_invoke): Call with indices if it's an index visitor.
1797 (relops): Do single-visitation with an index visitor.
1799 (__visitor_result_type): New.
1801 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1803 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1805 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1807 Don't revisit a variant we are already visiting.
1808 * include/std/variant (__variant_construct_single): New.
1809 (__variant_construct): Use it.
1810 (_M_destructive_move): Likewise.
1811 (_M_destructive_copy): Likewise.
1812 (_Copy_assign_base::operator=): Adjust.
1813 (_Move_assign_base::operator=): Likewise.
1816 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
1819 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1820 destructor so they are not evaluated until the _Key type is complete.
1821 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1822 * testsuite/23_containers/set/85965.cc: New test.
1823 * testsuite/23_containers/unordered_set/85965.cc: New test.
1824 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1825 with regexp matching the corresponding _Rb_tree specialization.
1826 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1827 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1828 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1829 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1830 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1831 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1832 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1834 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1837 Fix based on a suggestion by Antony Polukhin.
1838 * include/std/variant (__never_valueless): New.
1840 (_Extra_visit_slot_needed): New.
1841 (_Multi_array): Use it.
1842 (_S_apply_all_alts): Likewise.
1844 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1847 Fix based on a suggestion by Antony Polukhin.
1848 * include/std/variant (__gen_vtable): Don't reserve an
1849 additional table slot, _Multi_array already does that.
1851 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1854 Fix based on a suggestion by Antony Polukhin.
1855 * include/std/variant (__variant_construct): Capture a pointer
1856 to the storage and visit just one variant.
1858 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
1860 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1861 Doxygen-generated pages with unstable URL.
1862 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1863 * doc/xml/manual/extensions.xml: Likewise.
1864 * doc/xml/manual/parallel_mode.xml: Likewise.
1865 * doc/xml/manual/support.xml: Likewise.
1867 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1868 avoid -Wconversion warnings.
1870 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
1872 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1873 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
1874 (allstamped): Add stamp-pstl.
1875 (install-headers): Add ptsl_builddir.
1876 * include/Makefile.in: Regenerate.
1877 * include/bits/c++config: Add pstl configuration.
1878 * include/pstl/LICENSE.txt: New file.
1879 * include/pstl/algorithm_fwd.h: New file.
1880 * include/pstl/algorithm_impl.h: New file.
1881 * include/pstl/execution_defs.h: New file.
1882 * include/pstl/execution_impl.h: New file.
1883 * include/pstl/glue_algorithm_defs.h: New file.
1884 * include/pstl/glue_algorithm_impl.h: New file.
1885 * include/pstl/glue_execution_defs.h: New file.
1886 * include/pstl/glue_memory_defs.h: New file.
1887 * include/pstl/glue_memory_impl.h: New file.
1888 * include/pstl/glue_numeric_defs.h: New file.
1889 * include/pstl/glue_numeric_impl.h: New file.
1890 * include/pstl/memory_impl.h: New file.
1891 * include/pstl/numeric_fwd.h: New file.
1892 * include/pstl/numeric_impl.h: New file.
1893 * include/pstl/parallel_backend.h: New file.
1894 * include/pstl/parallel_backend_tbb.h: New file.
1895 * include/pstl/parallel_backend_utils.h: New file.
1896 * include/pstl/parallel_impl.h: New file.
1897 * include/pstl/pstl_config.h: New file.
1898 * include/pstl/unseq_backend_simd.h: New file.
1899 * include/pstl/utils.h: New file.
1900 * include/std/algorithm: Include parallel algorithm implementations.
1901 * include/std/execution: New file.
1902 * include/std/memory: Include parallel algorithm implementations.
1903 * include/std/numeric: Include parallel algorithm implementations.
1904 * include/std/version: Add parallel algorithms feature test macro.
1905 * testsuite/util/pstl/pstl_test_config.h: New file.
1906 * testsuite/util/pstl/test_utils.h: New file.
1907 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1908 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1909 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1910 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1911 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1912 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1913 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1914 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1915 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1916 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1917 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1918 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1919 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1920 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1921 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1922 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1923 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1924 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1925 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1926 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1927 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1928 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1929 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1930 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1931 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1932 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1933 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1934 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1935 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1936 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1937 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1938 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1939 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1940 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1941 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1942 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1943 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1944 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1945 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1946 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1947 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1948 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1949 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1950 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1951 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1952 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1953 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1954 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1955 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1956 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1957 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1958 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1959 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1960 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1961 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1962 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1963 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1964 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1965 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1966 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1967 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1968 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1969 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1970 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1971 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1972 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1973 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1974 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1975 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1976 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1977 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1978 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1979 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1980 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1981 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1982 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1983 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1984 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1985 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1986 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1987 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1988 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1989 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1990 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1991 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1992 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1993 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1994 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1995 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1996 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1997 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1998 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1999 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2000 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2001 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2002 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2003 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2004 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2005 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2006 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2007 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2008 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2009 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2010 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2011 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2012 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2014 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2016 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2017 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2018 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2019 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2020 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2021 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2022 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2023 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2024 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2025 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2026 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2027 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2028 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2029 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2030 when the special functions IS is enabled, not for C++17.
2031 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2033 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2034 without checks for special functions in C++17.
2035 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2039 * include/backward/hash_map: Use <> for includes not "".
2040 * include/backward/hash_set: Likewise.
2041 * include/backward/strstream: Likewise.
2042 * include/tr1/bessel_function.tcc: Likewise.
2043 * include/tr1/exp_integral.tcc: Likewise.
2044 * include/tr1/legendre_function.tcc: Likewise.
2045 * include/tr1/modified_bessel_func.tcc: Likewise.
2046 * include/tr1/riemann_zeta.tcc: Likewise.
2048 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2050 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2051 of extension allocators.
2052 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2053 Document new headers in 7.2, 8.1 and 9.1 releases.
2054 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2055 * doc/html/*: Regenerate.
2057 2019-03-12 John David Anglin <dave.anglin@bell.net>
2060 * testsuite/lib/libstdc++.exp: Locate libatomic.
2061 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2062 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2064 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2065 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2066 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2067 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2069 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2072 * configure.ac: Check for sockatmark.
2073 * crossconfig.m4: Check for sockatmark.
2074 * config.h.in: Regenerate.
2075 * configure: Regenerate.
2076 * include/experimental/internet (address_v4::_S_hton): Rename
2077 overloaded functions to _S_hton_16 and _S_ntoh_16.
2078 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2079 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2080 * include/experimental/socket (basic_socket::at_mark): Check
2081 _GLIBCXX_HAVE_SOCKATMARK.
2083 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2084 const variables instead of macros.
2087 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2088 Use correct type for len_aligned.
2089 * testsuite/20_util/hash/89629.cc: New test.
2091 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2094 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2095 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2096 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2097 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2098 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2099 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2100 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2101 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2102 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2103 memory_order_seq_cst to int.
2105 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2107 * doc/xml/manual/using.xml: Use link element instead of xref.
2108 * doc/html/*: Regenerate.
2110 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2112 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2115 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2116 parameters in deduction guides.
2117 * include/debug/multimap.h (multimap): Likewise.
2118 * include/debug/set.h (multimap): Likewise.
2119 * include/debug/multiset.h (multimap): Likewise.
2120 * include/debug/unordered_map (unordered_map): Likewise.
2121 (unordered_multimap): Likewise.
2122 * include/debug/unordered_set (unordered_set): Likewise.
2123 (unordered_multiset): Likewise.
2126 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2127 Invalidate all iterators in case of rehash.
2128 (unordered_multimap<>::_M_check_rehashed): Likewise.
2129 * include/debug/unordered_set
2130 (unordered_set<>::_M_check_rehashed): Likewise.
2131 (unordered_multiset<>::_M_check_rehashed): Likewise.
2132 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2134 2019-03-07 Andreas Schwab <schwab@suse.de>
2136 * config/abi/post/riscv64-linux-gnu: New directory.
2137 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2139 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2141 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2142 compile test to run. Fix typo.
2144 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2145 * doc/html/*: Regenerate.
2147 P0356R5 Simplified partial function application
2148 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2149 helpers for bind_front.
2150 (bind_front, __cpp_lib_bind_front): Define.
2151 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2153 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2155 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2156 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2157 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2158 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2160 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2162 PR libstdc++/86655 - std::assoc_legendre should not constrain
2163 the value of m (or x).
2164 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2165 __sph_legendre): If degree > order Don't throw, return 0.
2166 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2167 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2168 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2169 * testsuite/tr1/5_numerical_facilities/special_functions/
2170 02_assoc_legendre/pr86655.cc: New test.
2171 * testsuite/tr1/5_numerical_facilities/special_functions/
2172 22_sph_legendre/pr86655.cc: New test.
2174 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2177 Also PR libstdc++/85517
2178 * include/std/variant (__do_visit): New.
2179 (__variant_cast): Likewise.
2180 (__variant_cookie): Likewise.
2181 (__erased_*): Remove.
2182 (_Variant_storage::_S_vtable): Likewise.
2183 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2184 (_Variant_storage::__M_reset): Adjust.
2185 (__variant_construct): New.
2186 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2187 __variant_construct.
2188 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2189 (_Move_ctor_base::__M_destructive_copy): New.
2190 (_Move_ctor_base::__M_destructive_move): Adjust to use
2191 __variant_construct.
2192 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2193 (_Copy_assign_alias): Adjust to check both copy assignment
2194 and copy construction for triviality.
2195 (_Move_assign_base::operator=): Adjust to use __do_visit.
2196 (_Multi_array): Add support for visitors that accept and return
2198 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2199 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2200 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2201 a __variant_cookie temporary for a variant that is valueless and..
2202 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2203 (__gen_vtable::_Array_type): Conditionally make space for
2204 the __variant_cookie visitor case.
2205 (__variant_construct_by_index): New.
2206 (get_if): Adjust to use std::addressof.
2207 (relops): Adjust to use __do_visit.
2208 (variant): Add __variant_cast and __variant_construct_by_index
2210 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2211 instead of self-destruction.
2212 (variant::swap): Adjust to use __do_visit.
2213 (visit): Reimplement in terms of __do_visit.
2214 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2215 * testsuite/20_util/variant/compile.cc: Adjust.
2216 * testsuite/20_util/variant/run.cc: Likewise.
2218 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2220 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2222 * testsuite/experimental/feat-char8_t.cc: Likewise.
2224 * include/std/type_traits [C++20] (is_bounded_array)
2225 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2227 * testsuite/20_util/is_bounded_array/requirements/
2228 explicit_instantiation.cc: New test.
2229 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2231 * testsuite/20_util/is_bounded_array/value.cc: New test.
2232 * testsuite/20_util/is_unbounded_array/requirements/
2233 explicit_instantiation.cc: New test.
2234 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2236 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2238 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2240 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2242 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
2244 * include/c_compatibility/math.h [C++20] (lerp): Add using
2246 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2247 (__lerp): Define function template to implement lerp.
2248 (lerp(float, float, float), lerp(double, double, double))
2249 (lerp(long double, long double, long double)): Define for C++20.
2250 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2251 (midpoint(T, T), midpoint(T*, T*)): Define.
2252 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2253 * testsuite/26_numerics/lerp.cc: New test.
2254 * testsuite/26_numerics/midpoint/floating.cc: New test.
2255 * testsuite/26_numerics/midpoint/integral.cc: New test.
2256 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2258 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2260 PR libstdc++/88996 Implement P0439R0
2261 Make std::memory_order a scoped enumeration.
2262 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2263 add variables for the old enumerators. Adjust calls.
2264 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2265 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2267 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
2269 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2272 * include/std/memory_resource (polymorphic_allocator): Add default
2273 template argument for C++20.
2274 (polymorphic_allocator::allocate_bytes)
2275 (polymorphic_allocator::deallocate_bytes)
2276 (polymorphic_allocator::allocate_object)
2277 (polymorphic_allocator::deallocate_object)
2278 (polymorphic_allocator::new_object)
2279 (polymorphic_allocator::delete_object): New member functions for
2281 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2284 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2287 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2290 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2292 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2293 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2295 * include/std/memory (uses_allocator_construction_args): New set of
2296 overloaded functions.
2297 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2299 * include/std/memory_resource (polymorphic_allocator::construct)
2300 [__cplusplus > 201703l]: Replace all overloads with a single function
2301 using uses_allocator_construction_args.
2302 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2304 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2306 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
2309 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2310 stylesheet directories before check for xsltproc. Try to use
2311 xmlcatalog to find local stylesheet directory before trying hardcoded
2312 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2313 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2314 use xsltproc if xmlcatalog fails to find a local stylesheet.
2315 * configure.ac: Check for xmlcatalog.
2316 * Makefile.in: Regenerate.
2317 * configure: Likewise.
2318 * doc/Makefile.in: Likewise.
2319 * include/Makefile.in: Likewise.
2320 * libsupc++/Makefile.in: Likewise.
2321 * po/Makefile.in: Likewise.
2322 * python/Makefile.in: Likewise.
2323 * src/Makefile.in: Likewise.
2324 * src/c++11/Makefile.in: Likewise.
2325 * src/c++17/Makefile.in: Likewise.
2326 * src/c++98/Makefile.in: Likewise.
2327 * src/filesystem/Makefile.in: Likewise.
2328 * testsuite/Makefile.in: Likewise.
2330 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
2333 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2334 container deduction guides.
2335 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2336 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2337 parameters in deduction guides.
2338 * include/bits/stl_multimap.h (multimap): Likewise.
2339 * include/bits/stl_multiset.h (multiset): Likewise.
2340 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2341 * include/bits/stl_set.h (set): Likewise.
2342 * include/bits/stl_stack.h (stack): Likewise.
2343 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2344 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2345 constrain parameters in deduction guides.
2346 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2348 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2350 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2351 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2352 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2353 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2355 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2357 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2360 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2361 to class template and partial specialization using void_t.
2362 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2364 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
2367 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2368 copy and move members public.
2370 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
2372 * include/std/type_traits (__underlying_type_impl): New helper to
2373 make underlying_type SFINAE-friendly.
2374 (underlying_type): Derive from __underlying_type_impl.
2375 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2379 * include/bits/char_traits.h (__constant_char_array): Check index is
2380 in range before dereferencing.
2381 (char_traits<char>::compare, char_traits<char>::find)
2382 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2383 immediately if n is zero.
2384 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2385 Remove workarounds for PR 67026.
2386 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2388 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2391 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2393 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2394 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2396 2019-02-22 Jakub Jelinek <jakub@redhat.com>
2399 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
2400 type to std::size_t and argument to type to long double.
2402 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2404 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
2405 * config/abi/post/sparc64-linux-gnu: New directory.
2406 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
2407 * config/abi/post/sparc64-linux-gnu/32: New directory.
2408 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
2410 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2412 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
2413 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
2416 2019-02-22 Tom Honermann <tom@honermann.net>
2418 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
2419 printers for u8string and u8string_view.
2421 2019-02-22 Tom Honermann <tom@honermann.net>
2423 * testsuite/18_support/byte/ops.cc: Validate
2424 std::to_integer<char8_t>, std::to_integer<char16_t>, and
2425 std::to_integer<char32_t>.
2426 * testsuite/18_support/numeric_limits/dr559.cc: Validate
2427 std::numeric_limits<char8_t>.
2428 * testsuite/18_support/numeric_limits/lowest.cc: Validate
2429 std::numeric_limits<char8_t>::lowest().
2430 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
2431 std::numeric_limits<char8_t>::max_digits10.
2432 * testsuite/18_support/type_info/fundamental.cc: Validate
2433 typeinfo for char8_t.
2434 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
2435 std::from_chars with char8_t.
2436 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
2437 Validate explicit instantiation of std::hash<char8_t>.
2438 * testsuite/20_util/is_integral/value.cc: Validate
2439 std::is_integral<char8_t>.
2440 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
2441 Validate std::make_signed<char8_t>.
2442 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2443 Validate u8string construction from char8_t sources.
2444 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
2446 * testsuite/21_strings/basic_string_view/operations/compare/
2447 char/70483.cc: Validate substr operations on u8string_view.
2448 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
2449 the u8string_view typedef is defined.
2450 * testsuite/21_strings/char_traits/requirements/
2451 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
2453 * testsuite/21_strings/char_traits/requirements/
2454 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
2455 constexpr member functions.
2456 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
2457 that the u8string typedef is defined.
2458 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
2459 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
2460 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
2461 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
2463 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2464 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
2466 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2467 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2468 Validate std::atomic<char8_t>::is_always_lock_free
2469 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
2470 Update line numbers.
2471 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
2473 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
2475 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2476 Validate std::experimental::pmr::u8string.
2477 * testsuite/experimental/string_view/typedefs.cc: Validate that the
2478 u8string_view typedef is defined.
2479 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
2480 char32_t to the typelists.
2482 2019-02-22 Tom Honermann <tom@honermann.net>
2484 * include/ext/typelist.h: Constrain a partial specialization of
2485 typelist::detail::append_ to only match chain<T1,T2>.
2487 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2490 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
2491 class template with class. Replace move and copy member types with
2492 member alias templates, so they are only instantiated when needed.
2493 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2494 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
2495 test for C++11/14/17 as well.
2496 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
2499 2019-02-20 Jakub Jelinek <jakub@redhat.com>
2502 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
2503 _GLIBCXX_PURE to the alias declaration.
2505 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
2507 * testsuite/21_strings/basic_string/literals/types.cc
2508 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
2509 * testsuite/21_strings/basic_string/literals/values.cc
2510 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2511 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
2512 potentially having different type.
2513 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2514 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
2516 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
2517 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2518 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
2519 string literals only using basic character set.
2520 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
2521 u8 literals to char.
2522 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
2523 Test ATOMIC_CHAR8_T_LOCK_FREE.
2524 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
2525 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
2526 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
2527 * testsuite/experimental/string_view/literals/types.cc
2528 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
2530 * testsuite/experimental/string_view/literals/values.cc
2531 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2533 2019-02-19 Tom Honermann <tom@honermann.net>
2535 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
2536 from char16_32_t.cc; validates numeric_limits<char8_t>.
2537 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
2538 test cloned from types.cc; validates operator""s for char8_t
2540 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
2541 test cloned from values.cc; validates construction and comparison
2543 * testsuite/21_strings/basic_string/requirements/
2544 /explicit_instantiation/char8_t/1.cc: New test cloned from
2545 char16_t/1.cc; validates explicit instantiation of
2546 basic_string<char8_t>.
2547 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2548 New test cloned from types.cc; validates operator""sv for char8_t
2549 returns u8string_view.
2550 * testsuite/21_strings/basic_string_view/literals/
2551 values-char8_t.cc: New test cloned from values.cc; validates
2552 construction and comparison of u8string_view values.
2553 * testsuite/21_strings/basic_string_view/requirements/
2554 explicit_instantiation/char8_t/1.cc: New test cloned from
2555 char16_t/1.cc; validates explicit instantiation of
2556 basic_string_view<char8_t>.
2557 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2558 New test cloned from char16_t/65049.cc; validates that
2559 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2560 * testsuite/21_strings/char_traits/requirements/char8_t/
2561 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2562 that char_traits<char8_t> member typedefs are present and correct.
2563 * testsuite/21_strings/char_traits/requirements/
2564 explicit_instantiation/char8_t/1.cc: New test cloned from
2565 char16_t/1.cc; validates explicit instantiation of
2566 char_traits<char8_t>.
2567 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2568 from char16_t.cc: validates
2569 codecvt<char16_t, char8_t, mbstate_t>.
2570 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2571 from char32_t.cc: validates
2572 codecvt<char32_t, char8_t, mbstate_t>.
2573 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2574 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2575 codecvt<char32_t, char8_t, std::mbstate_t>.
2576 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2577 test cloned from string.cc; validates filesystem::path construction
2579 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2580 the __cpp_lib_char8_t feature test macro is defined with the
2582 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2583 New test cloned from string.cc; validates filesystem::path
2584 construction from char8_t input.
2585 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2586 test cloned from types.cc; validates operator""sv for char8_t
2587 returns u8string_view.
2588 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2589 New test cloned from values.cc; validates construction and
2590 comparison of u8string_view values.
2591 * testsuite/experimental/string_view/requirements/
2592 explicit_instantiation/char8_t/1.cc: New test cloned from
2593 char16_t/1.cc; validates explicit instantiation of
2594 basic_string_view<char8_t>.
2595 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2596 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2599 2019-02-19 Tom Honermann <tom@honermann.net>
2601 P0482R5 char8_t: Standard library support
2602 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2603 typeinfo symbols for char8_t.
2604 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2605 (GLIBCXX_3.4.26): Add symbols for specializations of
2606 numeric_limits and codecvt that involve char8_t.
2607 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2608 * include/bits/atomic_base.h: Add atomic_char8_t.
2609 * include/bits/basic_string.h: Add std::hash<u8string> and
2610 operator""s(const char8_t*, size_t).
2611 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2613 * include/bits/char_traits.h: Add char_traits<char8_t>.
2614 * include/bits/codecvt.h: Add
2615 codecvt<char16_t, char8_t, mbstate_t>,
2616 codecvt<char32_t, char8_t, mbstate_t>,
2617 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2618 codecvt_byname<char32_t, char8_t, mbstate_t>.
2619 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2620 recognize char8_t as an integral type.
2621 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2623 (path::u8string): Return std::u8string when char8_t support is
2625 (path::generic_u8string): Likewise.
2626 (path::_S_convert): Handle conversion from char8_t input.
2627 (path::_S_str_convert): Likewise.
2628 * include/bits/functional_hash.h: Add hash<char8_t>.
2629 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2631 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2632 for new char8_t specializations.
2633 * include/bits/localefwd.h: Add missing declarations of
2634 codecvt<char16_t, char, mbstate_t> and
2635 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2636 codecvt<char16_t, char8_t, mbstate_t> and
2637 codecvt<char32_t, char8_t, mbstate_t>.
2638 * include/bits/postypes.h: Add u8streampos
2639 * include/bits/stringfwd.h: Add declarations of
2640 char_traits<char8_t> and u8string.
2641 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2642 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2644 (path::u8string): Return std::u8string when char8_t support is
2646 (path::generic_u8string): Likewise.
2647 (path::_S_convert): Handle conversion from char8_t input.
2648 (path::_S_str_convert): Likewise.
2649 * include/experimental/string: Add u8string.
2650 * include/experimental/string_view: Add u8string_view,
2651 hash<experimental::u8string_view>, and
2652 operator""sv(const char8_t*, size_t).
2653 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2654 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2655 as a character type.
2656 * include/std/limits: Add numeric_limits<char8_t>.
2657 * include/std/string_view: Add u8string_view,
2658 hash<experimental::u8string_view>, and
2659 operator""sv(const char8_t*, size_t).
2660 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2661 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2662 * libsupc++/atomic_lockfree_defines.h: Define
2663 ATOMIC_CHAR8_T_LOCK_FREE.
2664 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2665 codecvt.cc and limits.cc so that char8_t specializations of
2666 numeric_limits and codecvt and emitted.
2667 * src/c++11/Makefile.in: Likewise.
2668 * src/c++11/codecvt.cc: Define members of
2669 codecvt<char16_t, char8_t, mbstate_t>,
2670 codecvt<char32_t, char8_t, mbstate_t>,
2671 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2672 codecvt_byname<char32_t, char8_t, mbstate_t>.
2673 * src/c++11/limits.cc: Define members of
2674 numeric_limits<char8_t>.
2675 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2676 locale_init.cc and localename.cc.
2677 * src/c++98/Makefile.in: Likewise.
2678 * src/c++98/locale_init.cc: Add initialization for the
2679 codecvt<char16_t, char8_t, mbstate_t> and
2680 codecvt<char32_t, char8_t, mbstate_t> facets.
2681 * src/c++98/localename.cc: Likewise.
2682 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2684 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2686 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2687 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2688 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2690 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
2692 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2693 * doc/html/*: Regenerate.
2695 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2696 * doc/html/*: Regenerate.
2698 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2699 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2700 allocator type in is_constructible checks.
2701 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2702 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2703 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2704 problematic type from LWG 2586 discussion.
2705 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2706 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2708 * configure.ac: Check for C11 timespec_get function.
2709 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2711 * config.h.in: Regenerate.
2712 * configure: Regenerate.
2713 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2714 std for C++17 and up.
2716 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2717 * include/bits/stl_queue.h
2718 (priority_queue(const Compare&, const Container&, const Alloc&))
2719 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2721 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2723 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2724 * include/bits/stl_queue.h (queue, priority_queue): Add static
2725 assertions to enforce LWG 2566 requirement on value_type.
2726 * include/bits/stl_stack.h (stack): Likewise.
2729 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2731 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2732 * include/bits/std_abs.h: Add comment about LWG 2735.
2733 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2735 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
2738 * include/std/version [__cpp_impl_destroying_delete]
2739 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2740 * libsupc++/new [__cpp_impl_destroying_delete]
2741 (__cpp_lib_destroying_delete): Likewise.
2742 (destroying_delete_t, destroying_delete): Likewise, but define even
2743 when __cpp_impl_destroying_delete is not defined.
2744 * testsuite/18_support/destroying_delete.cc: New test.
2746 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
2749 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2750 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2751 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2752 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2754 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
2757 * include/bits/fs_path.h (path::has_root_name)
2758 (path::has_root_directory, path::has_root_path)
2759 (path::has_relative_path, path::has_parent_path)
2760 (path::has_filename, path::has_stem, path::has_extension)
2761 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2763 * src/c++17/fs_path.cc (path::has_root_name)
2764 (path::has_root_directory, path::has_root_path)
2765 (path::has_relative_path, path::has_parent_path)
2766 (path::has_filename, path::_M_find_extension): Add noexcept.
2768 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
2770 PR libstdc++/89102 (partial)
2771 * include/std/type_traits (common_type<>): Define.
2772 (common_type<T>): Derive from common_type<T, T>.
2773 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2774 Test zero-length template argument list.
2775 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2776 Test additional single argument cases.
2777 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2778 Adjust expected error.
2780 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
2783 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2785 * include/bits/stl_stack.h (stack): Likewise.
2786 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2787 * testsuite/23_containers/queue/deduction.cc: New test.
2788 * testsuite/23_containers/stack/deduction.cc: New test.
2791 * include/std/type_traits (__is_convertible_helper)
2792 (__is_convertible_helper<_From, _To, false>): Revert changes to
2793 support is_nothrow_convertible.
2794 (__is_nt_convertible_helper): New helper.
2795 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2797 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2798 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2801 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2802 __is_alloc_insertable_impl. Replace single type member with two
2803 members, one for each of copy and move insertable.
2804 (__is_move_insertable): New trait for internal use.
2805 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2806 (vector::_S_nothrow_relocate(true_type)): New functions to
2807 conditionally check if __relocate_a can throw.
2808 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2809 on __is_move_insertable.
2810 (vector::_S_do_relocate): New overloaded functions to conditionally
2812 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2813 based on _S_use_relocate.
2814 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2815 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2816 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2819 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2820 parameter unnamed. Add message to static assertion.
2821 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2822 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2825 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
2828 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2830 (__is_bitwise_relocatable): ... to this.
2831 (__relocate_a_1): Adapt.
2832 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2833 (__is_bitwise_relocatable): ... to this.
2835 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
2838 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2839 final component as well as from _M_pathname. Append the dot using
2840 operator+= instead of only to _M_pathname.
2841 (path::_M_find_extension): Reformat slightly.
2842 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2843 Add more test cases.
2845 2019-01-30 Ulrich Drepper <drepper@redhat.com>
2847 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2849 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
2851 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2852 constexpr specifiers from arg and proj.
2854 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2855 __shared_ptr instantiations used by gcc4-compatible ABI.
2857 * include/experimental/forward_list (experimental::erase): Qualify
2859 * include/experimental/list (experimental::erase): Likewise.
2860 * include/std/forward_list (std::erase): Likewise.
2861 * include/std/list (std::erase): Likewise.
2863 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2865 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2866 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2867 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2868 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2869 * testsuite/ext/array_allocator/26875.cc: Likewise.
2870 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2871 * testsuite/util/replacement_memory_operators.h: Likewise.
2872 * testsuite/util/testsuite_allocator.h: Likewise.
2874 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
2875 normal mode vector, even for debug mode.
2876 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
2877 Define alias template for normal mode vector.
2879 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
2882 * config/locale/generic/c_locale.h (__convert_from_v)
2883 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2884 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2885 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
2886 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2888 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
2891 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
2892 data member with static member function _S_use_relocate().
2893 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2894 (vector::_M_default_append): Use _S_use_relocate() instead of
2897 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
2900 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
2903 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
2904 write to stderr instead of using printf.
2906 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2909 * include/bits/char_traits.h (__constant_string_p,
2910 __constant_char_array_p): Use __builtin_is_constant_evaluated if
2913 2019-01-20 Ulrich Drepper <drepper@redhat.com>
2915 Implement C++20 P0600r1.
2916 * include/backward/hash_map: Add nodiscard attribute to empty.
2917 * include/backward/hash_set: Likewise.
2918 * backward/hashtable.h: Likewise.
2919 * include/bits/basic_string.h: Likewise.
2920 * include/bits/forward_list.h: Likewise.
2921 * include/bits/hashtable.h: Likewise.
2922 * include/bits/regex.h: Likewise.
2923 * include/bits/stl_deque.h: Likewise.
2924 * include/bits/stl_list.h: Likewise.
2925 * include/bits/stl_map.h: Likewise.
2926 * include/bits/stl_multimap.h: Likewise.
2927 * include/bits/stl_multiset.h: Likewise.
2928 * include/bits/stl_queue.h: Likewise.
2929 * include/bits/stl_set.h: Likewise.
2930 * include/bits/stl_stack.h: Likewise.
2931 * include/bits/stl_tree.h: Likewise.
2932 * include/bits/stl_vector.h: Likewise.
2933 * include/bits/unordered_map.h: Likewise.
2934 * include/bits/unordered_set.h: Likewise.
2935 * include/debug/array: Likewise.
2936 * include/experimental/any: Likewise.
2937 * include/experimental/bits/fs_path.h: Likewise.
2938 * include/experimental/internet: Likewise.
2939 * include/experimental/string_view: Likewise.
2940 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
2942 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
2944 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
2946 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
2948 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
2950 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
2952 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
2954 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
2956 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2957 info_fn_imps.hpp: Likewise.
2958 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2959 left_child_next_sibling_heap_.hpp: Likewise.
2960 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
2962 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
2964 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
2966 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
2968 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
2970 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
2972 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
2974 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
2975 * include/ext/pb_ds/trie_policy.hpp: Likewise.
2976 * include/ext/rope: Likewise.
2977 * include/ext/slist: Likewise.
2978 * include/ext/vstring.h: Likewise.
2979 * include/profile/array: Likewise.
2980 * include/std/array: Likewise.
2981 * include/tr1/array: Likewise.
2982 * include/tr1/hashtable.h: Likewise.
2983 * include/tr1/regex: Likewise.
2984 * include/tr2/dynamic_bitset: Likewise.
2985 * include/bits/alloc_traits.h: Add nodiscard attribute to
2987 * include/experimental/memory_resource: Likewise.
2988 * include/ext/alloc_traits.h: Likewise.
2989 * include/ext/array_allocator.h: Likewise.
2990 * include/ext/bitmap_allocator.h: Likewise.
2991 * include/ext/debug_allocator.h: Likewise.
2992 * include/ext/extptr_allocator.h: Likewise.
2993 * include/ext/mt_allocator.h: Likewise.
2994 * include/ext/new_allocator.h: Likewise.
2995 * include/ext/pool_allocator.h: Likewise.
2996 * include/ext/throw_allocator.h: Likewise.
2997 * include/std/scoped_allocator: Likewise.
2998 * libsupc++/eh_alloc.cc: Likewise.
2999 * include/std/future: Add nodiscard attribute to async.
3000 * libsupc++/new: Add nodiscard attribute to new.
3002 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3007 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3008 * include/bits/shared_ptr.h
3009 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3010 (allocate_shared): Change to use new tag type.
3011 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3012 Declare new member function.
3013 (_Sp_alloc_shared_tag): Define new type.
3014 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3015 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3016 _Sp_make_shared_tag::_S_eq to check type_info.
3017 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3018 Constrain to prevent being called with _Sp_alloc_shared_tag.
3019 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3020 Replace constructor with ...
3021 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3022 reference parameter so address of the new object can be returned to
3023 the caller. Obtain the allocator from the tag type.
3024 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3025 constructor with ...
3026 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3027 to the __shared_count constructor.
3028 (__allocate_shared): Change to use new tag type.
3029 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3031 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3033 * src/c++17/fs_ops.cc
3034 (equivalent(const path&, const path&, error_code&))
3035 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3036 compare files instead of relying on incomplete info returned by stat.
3039 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3040 if the path is already absolute.
3041 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3042 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3045 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3046 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3047 of filesystem::exists.
3048 (create_directories(const path&, error_code&)): Add assertions.
3049 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3050 Add workaround for bug in _wstat for paths with trailing slash.
3051 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3052 for expected behaviour on mingw.
3053 * testsuite/experimental/filesystem/operations/create_directories.cc:
3055 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3056 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3057 not test permissions on mingw targets.
3059 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3061 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3062 constructors and open members taking wide strings. Fix patterns for
3063 filesystem::path members to match wstring_view parameters. Add
3064 exports for shared_ptr members used by directory iterators.
3065 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3066 error code parameter if the file doesn't exist.
3067 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3069 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3070 values for mingw targets, where "/" is not an absolute path. Do not
3071 test symlinks on mingw targets.
3072 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3073 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3075 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3076 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3077 that each component of the path is created.
3078 * testsuite/experimental/filesystem/operations/create_directories.cc:
3080 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3081 permissions on mingw targets.
3082 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3083 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3084 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3085 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3087 * testsuite/experimental/filesystem/operations/permissions.cc:
3089 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3090 symlinks or permissions on mingw targets.
3091 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3092 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3093 symlinks on mingw targets.
3094 * testsuite/experimental/filesystem/operations/remove_all.cc:
3096 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3097 permissions on mingw targets.
3098 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3099 test symlinks on mingw targets.
3100 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3103 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3106 Warn about unused comparisons of shared_ptr/unique_ptr
3107 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3108 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3109 <, <=, >, >= for shared_ptr.
3110 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3112 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3114 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3115 as 201611L, because P0497R0 changes are supported.
3116 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3118 * include/bits/erase_if.h [__cplusplus > 201703L]
3119 (__cpp_lib_erase_if): Only define for C++2a.
3120 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3121 (__cpp_lib_null_iterators): Define.
3122 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3123 (__cpp_lib_null_iterators): Define.
3124 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3126 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3128 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3130 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3131 changes are supported.
3132 * include/std/optional (__cpp_lib_optional): Likewise.
3133 * include/std/variant (__cpp_lib_variant): Likewise.
3134 * include/std/version [!__STRICT_ANSI__]
3135 (__cpp_lib_uncaught_exceptions): Define as long integer.
3136 [__cplusplus >= 201703L] (__cpp_lib_any)
3137 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3138 (__cpp_lib_variant): Define for C++17.
3139 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3141 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3144 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3146 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3150 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3152 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3155 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3157 * doc/xml/manual/intro.xml: Include new section.
3158 * doc/xml/manual/status_cxx2017.xml: Document more
3159 implementation-defined properties of the library.
3160 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3161 * doc/html/*: Regenerate.
3163 * include/bits/refwrap.h [__cplusplus > 201703L]
3164 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3165 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3166 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3168 (reference_wrapper::operator()): Add static assertion.
3169 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3171 * include/std/chrono (duration_values::zero(), duration_values::min())
3172 (duration_values::max()): Add noexcept.
3173 (duration::zero(), duration::min(), duration::max()): Likewise.
3174 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3175 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3176 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3178 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3180 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3182 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3183 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3185 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3188 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3189 specialization for C++17 (P0513R0, LWG 2817).
3190 * testsuite/20_util/hash/nullptr.cc: New test.
3193 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3194 pattern for std::basic_stringbuf::str().
3196 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3197 basic_ostream::operator<< patterns.
3199 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3201 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3202 test failures on targets with 32-bit time_t.
3204 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3205 * include/std/deque: Likewise.
3206 * include/std/forward_list: Likewise.
3207 * include/std/list: Likewise.
3208 * include/std/string: Likewise.
3209 * include/std/vector: Likewise.
3210 * include/std/version: Likewise.
3211 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3212 * testsuite/23_containers/deque/erasure.cc: Likewise.
3213 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3214 * testsuite/23_containers/list/erasure.cc: Likewise.
3215 * testsuite/23_containers/map/erasure.cc: Likewise.
3216 * testsuite/23_containers/set/erasure.cc: Likewise.
3217 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3218 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3219 * testsuite/23_containers/vector/erasure.cc: Likewise.
3221 * include/experimental/internet [AI_NUMERICSERV]
3222 (resolver_base::numeric_service): Define conditionally.
3223 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3225 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3228 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3229 Jonathan Wakely <jwakely@redhat.com>
3232 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3233 (GLIBCXX_3.4.26): Add new exports.
3234 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3235 correct list of sources.
3236 * include/Makefile.in: Regenerate.
3237 * include/std/ostream (operator<<(nullptr_t)): New member function.
3238 * src/c++17/ostream-inst.cc: New file.
3239 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3242 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3244 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3245 of the source file containing the caller.
3246 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3247 directories created by test.
3248 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3250 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3252 * testsuite/experimental/filesystem/iterators/
3253 recursive_directory_iterator.cc: Likewise.
3255 2019-01-10 Jakub Jelinek <jakub@redhat.com>
3257 PR tree-optimization/88775
3258 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3259 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3260 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3261 instead of __builtin_constant_p if available. Don't bother with
3262 the pointer comparison in C++11 and earlier.
3264 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3268 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3271 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
3273 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3274 for filesystem::path. Give variables more distinctive names.
3276 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3277 member function to perform non-trivial assignment.
3278 (_Optional_payload_base::_M_move_assign): Likewise.
3279 (_Optional_payload<T, true, false, true>::operator=)
3280 (_Optional_payload<T, true, true, false>::operator=)
3281 (_Optional_payload<T, true, false, false>::operator=): Call
3282 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3285 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3286 test std::complex<long double> if long double format is IBM128.
3287 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3290 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3292 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3293 for old std::unique_ptr layout.
3294 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3295 to become valueless. Add filesystem::path tests.
3298 * include/std/optional (_Optional_payload_base): New class template
3299 for common code hoisted from _Optional_payload specializations. Use
3300 a template for the union, to allow a partial specialization for
3301 types with non-trivial destructors. Add constructors for in-place
3302 initialization to the union.
3303 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3304 to perform non-trivial copy construction, instead of relying on
3305 non-standard copy elision in a delegating constructor.
3306 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3307 non-trivial move construction.
3308 (_Optional_payload): Derive from _Optional_payload_base and use it
3309 for everything except the non-trivial assignment operators, which are
3311 (_Optional_payload<false, C, M>): Derive from the specialization
3312 _Optional_payload<true, false, false> and add a destructor.
3313 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3314 Forward to corresponding members of _Optional_payload.
3315 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3316 Hoist common members from _Optional_base.
3317 (_Optional_base): Make all members and base class public.
3318 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3319 _Optional_base_impl.
3320 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3321 support for new std::optional layout.
3322 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3325 * include/bits/locale_conv.h: Use <> for includes not "".
3326 * include/ext/random: Likewise.
3327 * include/ext/vstring.h: Likewise.
3329 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3331 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3332 (GLIBCXX_3.4.21): Likewise.
3334 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3337 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3338 to match the one that controls whether utimbuf and utime are declared.
3340 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
3343 * include/bits/char_traits.h (char_traits::move): Do not pass null
3344 pointers to memmove.
3345 * include/bits/locale_facets.h
3346 (ctype<char>::widen(const char*, const char*, char*)): Do not
3347 pass null pointers to memcpy.
3348 (ctype<char>::narrow(const char*, const char*, char, char*)):
3350 (ctype<char>::do_widen(const char*, const char*, char*)):
3352 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3355 * doc/xml/manual/spine.xml: Update copyright years.
3356 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3357 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3358 for C++17 filesystem library.
3359 * doc/html/*: Regenerate.
3361 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3362 * config.h.in: Regenerate.
3363 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3364 alphabetically and add missing entries for copy_symlink,
3365 hard_link_count, rename, and resize_file.
3366 * configure: Regenerate.
3367 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3368 used unconditionally.
3369 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3370 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3371 supports truncating to zero length.
3372 * testsuite/27_io/filesystem/operations/all.cc: New test.
3373 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3375 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
3378 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3379 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3380 * config.h.in: Regenerate.
3381 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3382 remaining std::filesystem types and functions.
3383 * configure: Regenerate.
3384 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3385 * src/c++17/Makefile.in: Regenerate.
3386 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3387 here, and change name of included file.
3388 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3389 here, and change name of included file.
3390 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3391 path to dir-common.h.
3392 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3393 path to ops-common.h. Disable -Wunused-parameter warnings.
3394 (internal_file_clock): Define unconditionally.
3395 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3397 (do_copy_file, do_space): Move definitions to ops.common.h.
3398 (copy, file_size, hard_link_count, last_write_time, space): Only
3399 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
3401 (last_write_time, read_symlink): Remove unused attributes from
3403 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
3404 * src/filesystem/Makefile.in: Regenerate.
3405 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
3406 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
3407 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
3408 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
3409 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
3410 dummy types and functions instead of using #error.
3411 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
3412 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
3414 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
3415 (do_copy_file, do_space): Move definitions here from std-ops.cc.
3416 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
3417 to account for new namespace.
3418 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
3419 -lstdc++fs from dg-options.
3420 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
3421 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
3422 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
3423 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
3424 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3426 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
3427 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3429 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
3430 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3431 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
3432 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3433 * testsuite/27_io/filesystem/operations/create_directories.cc:
3435 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
3436 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
3437 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
3438 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
3439 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3440 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
3441 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3442 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
3443 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
3444 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
3445 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
3446 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
3447 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3448 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3449 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
3450 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3451 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3452 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3454 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
3458 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
3459 typeinfo and vtables less greedy.
3460 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
3461 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
3462 * src/c++17/Makefile.in: Regenerate.
3463 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
3464 here, and change name of included file.
3465 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
3466 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
3468 * src/filesystem/Makefile.in: Regenerate.
3469 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
3470 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
3471 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
3472 from dg-options and remove dg-require-filesystem-ts.
3473 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
3474 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
3475 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
3476 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
3477 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3478 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3479 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3480 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
3481 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
3482 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
3483 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
3484 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
3485 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
3486 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
3487 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
3488 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
3489 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
3490 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
3491 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
3492 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
3493 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
3495 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
3496 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
3497 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
3498 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
3499 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
3500 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
3501 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
3502 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
3503 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
3504 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
3505 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
3506 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
3508 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
3510 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3512 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
3514 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
3515 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3516 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
3517 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
3518 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3519 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3520 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3521 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3522 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
3523 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3525 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3526 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3527 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3528 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
3529 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3532 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
3533 Check is_trivially_copyable instead of is_scalar.
3534 (variant::emplace<N, Args>(Args&&...)): If construction of the new
3535 contained value can throw and its type is trivially copyable then
3536 construct into a temporary variant and move from it, to provide the
3537 strong exception safety guarantee.
3538 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
3540 * testsuite/20_util/variant/87431.cc: New test.
3541 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
3542 conversion causes valueless state.
3545 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
3546 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
3547 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
3548 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
3549 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
3551 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
3553 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3554 (file_time_type): Redefine in terms of __file_clock.
3555 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3557 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3559 (internal_file_lock): New helper type for accessing __file_clock.
3560 (do_copy_file): Use internal_file_lock to convert system time to
3562 (last_write_time(const path&, error_code&)): Likewise.
3563 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3565 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
3567 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3568 for const member functions of std::basic_string.
3569 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3571 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3572 Make non-standard constructor private.
3573 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3575 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3576 explicit instantiations for C++17 as well as earlier dialects.
3577 * src/c++17/Makefile.am: Add new source files.
3578 * src/c++17/Makefile.in: Regenerate.
3579 * src/c++17/cow-string-inst.cc: New file defining explicit
3580 instantiations for basic_string member functions added in C++17.
3581 * src/c++17/string-inst.cc: Likewise.
3583 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3584 copy/move constructors for old std::basic_string.
3585 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3586 (basic_string::reference, basic_string::const_reference): Define
3587 as plain references for C++11 and later.
3588 (basic_string::basic_string()): Put constructor body outside
3589 preprocessor conditional groups.
3590 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3591 instead of copying it.
3592 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3594 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3596 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3597 cases for old basic_string.
3598 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3599 allocator-extended constructors unconditionally. Add extra members to
3600 allocator type when using old string ABI.
3601 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3603 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3605 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3606 -fno-inline added to test flags.
3608 * testsuite/21_strings/basic_string/requirements/
3609 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3611 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3612 assertion failures with old std::string ABI.
3614 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3616 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3617 functions that will only erase elements at the end.
3618 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3619 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3620 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3622 (path::_List::pop_back()): Define.
3623 (path::_List::_M_erase_from(const_iterator)): Define.
3624 (path::operator/=(const path&)): Use pop_back to remove last component
3625 and _M_erase_from to remove multiple components.
3626 (path::_M_append(basic_string_view<value_type>)): Likewise.
3627 (path::operator+=(const path&)): Likewise.
3628 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3629 (path::remove_filename()): Likewise.
3630 (path::lexically_normal()): Use _List::_Impl iterators instead of
3631 path::iterator. Use pop_back to remove components from the end. Clear
3632 trailing filename, instead of using erase(const_iterator) to remove
3633 a non-final component.
3634 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3636 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3638 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3639 incorrect treatment of empty filename after trailing slash.
3640 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3642 * testsuite/21_strings/basic_string/modifiers/assign/char/
3643 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3645 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3646 move_assign_optim.cc: Likewise.
3648 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3649 Jakub Jelinek <jakub@redhat.com>
3652 * include/experimental/memory: Replace UTF-8 quote characters.
3653 * include/std/future: Replace UTF-8 "em dash" characters.
3655 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3658 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3659 * include/debug/forward_list: Likewise.
3660 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3662 * include/experimental/chrono: Likewise.
3663 * include/experimental/functional: Likewise.
3664 * include/experimental/ratio: Likewise.
3665 * include/experimental/system_error: Likewise.
3666 * include/experimental/tuple: Likewise.
3667 * include/experimental/type_traits: Likewise.
3668 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3669 * include/parallel/multiseq_selection.h: Likewise.
3672 * config/abi/pre/gnu.ver: Add missing exports.
3673 * testsuite/22_locale/collate_byname/88681.cc: New test.
3674 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3675 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3677 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
3679 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3680 initializer_list<value_type> and from input iterator ranges.
3681 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3683 * testsuite/experimental/string_view/element_access/char/empty.cc:
3684 Fix year range in copyright header.
3686 2019-01-02 Joel Brobecker <brobecker@adacore.com>
3688 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3689 Fix year range in copyright header.
3691 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3693 Update copyright years.
3695 Copyright (C) 2019 Free Software Foundation, Inc.
3697 Copying and distribution of this file, with or without modification,
3698 are permitted in any medium without royalty provided the copyright
3699 notice and this notice are preserved.