1 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
3 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
4 documentation of implementation-defined types for [thread.req.native].
5 * doc/xml/manual/status_cxx2017.xml: Update documentation of
6 implementation-defined strings for [variant.bad.access]. Fix typo in
7 documentation of implementation-defined support for [fs.conform.9945].
8 * doc/html/*: Regenerate.
10 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
13 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
14 that fails on mingw-w64.
17 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
18 (status(const path&, error_code&)): Use parent_path() to remove
20 (symlink_status(const path&, error_code&)): Duplicate workaround for
21 bug in _wstat for paths with trailing slash.
22 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
24 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
25 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
27 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
28 once instead of building it iteratively.
30 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
32 PR libstdc++/85494 use rdseed and rand_s in std::random_device
33 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
34 the assembler supports rdseed.
35 * config.h.in: Regenerate.
36 * configure: Regenerate.
37 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
38 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
39 * doc/html/*: Regenerate.
40 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
41 * include/bits/random.h (random_device::random_device()): Always call
42 _M_init rather than _M_init_pretr1.
43 (random_device::random_device(const string&)): Likewise.
44 (random_device::operator()()): Always call _M_getval().
45 (random_device::_M_file): Replace first member of union with an
46 anonymous struct, with _M_file as its first member.
47 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
48 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
49 (USE_MT19937): Define if none of the above are defined.
50 (USE_POSIX_FILE_IO): Define.
52 [USE_RDSEED] (__x86_rdseed): Define new function.
53 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
54 (random_device::_M_init(const string&)): Initialize new union members.
55 Add support for "rdseed" and "rand_s" tokens. Decide what the
56 "default" token does according to which USE_* macros are defined.
57 [USE_POSIX_FILE_IO]: Store a file descriptor.
58 [USE_MT19937]: Forward to _M_init_pretr1 instead.
59 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
61 [!USE_MT19937]: Call _M_init, transforming the old default token or
62 numeric tokens to "default".
63 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
64 (random_device::_M_getval()): Use new union members to obtain a
65 random number from the stored function pointer or file descriptor.
66 [USE_MT19937]: Obtain a value from the mt19937 engine.
67 (random_device::_M_getval_pretr1()): Call _M_getval().
68 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
70 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
71 * testsuite/26_numerics/random/random_device/85494.cc: New test.
73 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
76 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
77 _M_split_cmpts() for a path with multiple components.
78 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
79 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
80 components and reserve space in vector. Return early when there is
82 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
83 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
85 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
86 form of std::equals for C++11 compatibility.
88 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
90 * doc/xml/manual/appendix_contributing.xml: Update pointer to
91 C++ standard at ansi.org.
93 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
95 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
96 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
99 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
100 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
102 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
104 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
106 * testsuite/20_util/function_objects/invoke/3.cc: New test.
107 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
108 "compile" test to "run".
110 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
111 * doc/html/*: Regenerate.
112 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
113 rvalue aliasing constructor.
114 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
115 (reinterpret_pointer_cast): Add overloads taking rvalues.
116 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
117 Add rvalue aliasing constructor.
118 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
119 "run" and check return values as well as types.
120 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
121 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
122 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
123 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
126 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
127 * doc/xml/manual/intro.xml: Likewise.
128 * include/std/future (__create_task_state): Add default arguments
129 to make providing an allocator optional.
130 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
131 instead of delegating to another constructor.
132 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
133 define allocator-extended constructors for C++17 and later.
134 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
136 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
137 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
138 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
140 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
142 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
143 Don't run the libstdc++/83237 part on simulator targets.
145 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
147 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
149 * doc/html/*: Regenerate.
151 * include/experimental/any (__any_caster): Use RTTI if comparing
152 addresses fails, to support non-unique addresses in shared libraries.
153 * include/std/any (__any_caster): Likewise.
156 * include/experimental/any (__any_caster): Constrain to only be
157 callable for object types. Use remove_cv_t instead of decay_t.
158 If the type decays or isn't copy constructible, compare the manager
159 function to a dummy specialization.
160 (__any_caster): Add overload constrained for non-object types.
161 (any::_Manager_internal<_Op>): Add dummy specialization.
162 * testsuite/experimental/any/misc/any_cast.cc: Test function types
165 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
168 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
169 reversed arguments to uninitialized_copy_n.
170 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
171 is unchanged by copy assignment.
172 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
173 compare path components.
176 * include/experimental/memory_resource: Add system header pragma and
177 do not define anything unless compiled as C++14 or later.
178 (__resource_adaptor_common::__guaranteed_alignment): Remove.
179 (__resource_adaptor_imp::do_allocate): If the requested alignment
180 is a fundamental alignment then either allocate directly from _M_alloc
181 or call the new _M_allocate function.
182 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
183 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
184 of the allocator rebound to a POD type with the specified alignment.
185 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
186 * testsuite/experimental/memory_resource/new_delete_resource.cc:
187 Adjust expected allocation sizes.
188 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
189 xfail for Solaris x86.
191 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
193 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
194 * include/pstl/execution_defs.h (__enable_if_execution_policy):
195 Use std::__remove_cvref_t when building with GCC.
197 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
200 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
201 Use "additional_flags" to pass -ltbb to v3_target_compile command.
202 Use check_v3_target_prop_cached to cache the result of the test.
204 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
206 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
209 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
210 Changed v3_target_compile check from preprocess to executable.
211 Added "-ltbb" to v3_target_compile flags.
213 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
215 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
216 Add check for Thread Building Blocks 2018 or later.
218 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
220 * testsuite/experimental/names.cc: Only include Networking TS headers
221 on targets with the necessary Gthreads support.
223 2019-05-20 Marek Polacek <polacek@redhat.com>
225 CWG 2094 - volatile scalars are trivially copyable.
227 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
228 result for volatile int.
230 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
232 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
233 * testsuite/experimental/names.cc: Include <experimental/filesystem>
236 PR c++/90532 Ensure __is_constructible(T[]) is false
237 * include/std/type_traits (__do_is_default_constructible_impl)
238 (__is_default_constructible_atom, __is_default_constructible_safe):
240 (is_default_constructible): Use is_constructible.
241 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
242 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
243 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
244 * testsuite/20_util/is_trivially_default_constructible/value.cc:
247 2019-05-20 Pádraig Brady <pbrady@fb.com>
249 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
250 to the deallocator with -fsized-deallocation.
252 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
254 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
255 test by passing correct alignment to deallocate function.
257 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
260 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
261 Raise exception if unique_ptr tuple member has unknown structure.
262 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
263 Adjust worker to support new __uniq_ptr_data base class. Do not
264 assume field called _M_head_impl is the first tuple element.
266 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
268 * include/bits/stl_deque.h
269 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
270 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
271 (_Deque_base::_Deque_impl_data): New.
272 (_Deque_base::_Deque_impl): Inherit latter.
273 (_Deque_base::_Deque_impl::_M_swap_data): Move...
274 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
275 (_Deque_base::_Deque_impl()): Add noexcept qualification.
276 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
277 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
278 (deque<>::deque()): Default.
279 (deque<>::deque(deque&&)): Default.
280 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
281 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
282 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
283 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
285 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
286 (deque<>::resize(size_type, const value_type&)): Share a single
288 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
290 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
291 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
292 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
293 * testsuite/23_containers/deque/allocator/default_init.cc: New.
295 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
298 * include/std/variant (holds_alternative, get, get_if): Improve
299 static assertion messages.
300 (bad_variant_access::bad_variant_access()): Change default message.
301 (__throw_bad_variant_access(bool)): New overload.
302 (get): Use new overload.
303 (visit, visit<R>): Improve exception message.
305 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
306 targets. Add more cases from P0608R3.
307 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
309 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
310 * include/experimental/type_traits (is_detected_exact)
311 (is_detected_exact_v): Likewise.
312 * include/pstl/execution_defs.h (is_execution_policy)
313 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
314 * include/pstl/execution_impl.h (__policy_traits): Likewise.
315 * testsuite/17_intro/names.cc: Check for more non-reserved names.
316 * testsuite/experimental/names.cc: New test.
319 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
320 assertions from the destructor.
321 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
322 Move static_assert for hash function to here.
323 (_Hash_table_base::_M_equals): Move static_assert for equality
325 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
327 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
328 the value directly instead of calling _S_value.
329 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
330 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
331 _S_key(_Const_Link_type).
332 * testsuite/23_containers/set/85965.cc: Check construction,
333 destruction, assignment and size() do not trigger the assertions.
334 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
335 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
337 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
338 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
339 * testsuite/23_containers/set/48101_neg.cc: Likewise.
340 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
341 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
342 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
343 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
345 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
346 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
349 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
351 * doc/html/*: Regenerate.
352 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
353 of decay_t (P0777R1).
355 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
357 Move from state of allocators (LWG2593)
358 * include/bits/stl_deque.h
359 (_Deque_base(_Deque_base&&, false_type)): Remove.
360 (_Deque_base(_Deque_base&&, true_type)): Remove.
361 (_Deque_base(_Deque_base&&)): Adapt.
362 (_Deque_base::_M_move_impl()): Remove.
363 * testsuite/util/testsuite_allocator.h
364 (propagating_allocator(propagating_allocator&&)): Preserve move from
366 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
368 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
370 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
371 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
372 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
374 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
376 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
377 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
379 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
381 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
383 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
385 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
387 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
389 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
391 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
394 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
396 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
397 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
399 * include/std/variant (__overload_set): Remove.
401 (_Build_FUN): New class template to define a single FUN overload,
402 with specializations to prevent unwanted conversions, as per P0608R3.
403 (_Build_FUNs): New class template to build an overload set of FUN.
404 (_FUN_type): New alias template to perform overload resolution.
405 (__accepted_type): Use integer_constant base for failure case. Use
406 _FUN_type for successful case.
407 (variant::__accepted_index): Use _Tp instead of _Tp&&.
408 (variant::variant(_Tp&&)): Likewise.
409 (variant::operator=(_Tp&&)): Likewise.
411 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
412 Replace raw visitation with a runtime check for the valueless state
413 and a non-raw visitor.
414 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
415 (variant::index()): Remove branch.
416 (variant::swap(variant&)): Use valueless_by_exception() instead of
417 comparing the index to variant_npos, and add likelihood attribute.
419 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
420 (_Hashtable_base::_Equal_hash_code): Define new class template.
421 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
424 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
425 Replace with _M_get non-static member function.
426 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
428 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
429 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
431 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
432 _S_get accessors for members in EBO helpers.
433 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
434 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
436 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
438 (_Hashtable_base::_M_eq()): Remove non-const overload.
440 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
442 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
444 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
446 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
449 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
451 * config/os/solaris/solaris2.10: Move to ...
452 * config/os/solaris: ... this.
453 * configure.host (os_include_dir): Adapt.
454 (abi_baseline_pair): Remove Solaris 10 handling.
455 * config/abi/post/i386-solaris2.10: Remove.
456 * config/abi/post/sparc-solaris2.10: Remove.
457 * config/abi/post/i386-solaris2.11: Rename to ...
458 * config/abi/post/i386-solaris: ... this.
459 * config/abi/post/sparc-solaris2.11: Rename to ...
460 * config/abi/post/sparc-solaris: ... this.
462 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
465 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
468 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
470 * include/std/variant (__visit_with_index): Remove typedef.
471 (__deduce_visit_result): New tag type.
472 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
473 visitation of possibly-valueless variants, forwarding to __do_visit
474 with the relevant tag type.
475 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
476 and make lambda return void.
477 (__variant_construct): Likewise.
478 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
479 __raw_idx_visit and make lambda return void.
480 (_Multi_array::__untag_result): Add metafunction to check the function
481 pointer type for a tag type that dictates the kind of visitation.
482 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
483 Use decltype(auto) instead of tagged function pointer type.
484 (__gen_vtable_impl): Remove bool non-type parameter and unused
485 _Variant_tuple parameter.
486 (__gen_vtable_impl::__visit_invoke_impl): Remove.
487 (__gen_vtable_impl::__do_visit_invoke): Remove.
488 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
489 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
490 for the visit<R> case, rather than dispatching to separate functions.
491 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
493 (variant::swap): Likewise.
494 (__do_visit): Replace two non-type template parameters with a single
495 type parameter, so that the caller must specify the visitor's return
496 type (or one of the tag types).
497 (visit): Deduce a return type from the visitor and use the
498 __deduce_visit_result tag to enforce that all overloads return the
500 (visit<R>): Call __do_visit<R> with explicit result type.
501 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
504 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
506 nonesuch is insufficiently useless (lwg2996)
507 * include/std/type_traits (struct __nonesuch): Added private base
508 class to make __nonesuch not an aggregate and removed deleted default
510 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
511 (operator=(const pair&)): Use __nonesuch instead of
512 __nonesuch_no_braces.
513 (operator=(pair&&)): Likewise
514 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
515 of __nonesuch_no_braces.
516 (operator=(tuple&&)): Likewise
517 * include/experimental/type_traits (struct nonesuch): Added private
518 base class to make nonesuch not an aggregate and removed deleted
520 * testsuite/20_util/nonesuch/nonesuch.cc: New.
521 * testsuite/experimental/type_traits/nonesuch.cc: New.
523 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
525 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
526 (_Function_handler): Remove partial specializations for void return
527 types and pointers to member.
528 (_Function_handler::_M_manager): Adapt to removal of
529 _Simple_type_wrapper.
530 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
531 * include/std/functional (_Bind_result::__enable_if_void)
532 (_Bind_result::__disable_if_void): Remove sfinae helpers.
533 (_Bind_result::__call): Use __invoke_r and remove overloads for void
535 * include/std/future (__future_base::_Task_state::_M_run)
536 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
537 change return type of lambda expressions.
539 * include/bits/invoke.h (__invoke_r): Define new function implementing
540 the INVOKE<R> pseudo-function.
541 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
542 * testsuite/20_util/function_objects/invoke/2.cc: New test.
544 * include/std/type_traits (__is_nt_convertible_helper): Define it
545 unconditionally, not only for C++20.
546 (__is_nothrow_convertible): Define internal trait for use in C++11.
547 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
548 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
549 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
550 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
551 that has nothrow explicit conversion but potentially-throwing implicit
553 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
554 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
555 function to only consider implicit conversions.
556 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
558 * include/std/iterator: Include <iosfwd> instead of <istream> and
561 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
562 Remove unused, non-standard function.
564 * include/bits/regex.h (match_results::max_size()): Adjust return
565 value to account for prefix/suffix/unmatched subs.
566 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
567 reset the contained sub matches.
568 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
569 function to set result state following a failed match.
570 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
571 sub_match states after _M_resize. Use _M_establish_failed_match.
574 * include/std/thread (thread::_State_impl, thread::_S_make_state):
575 Replace single _Callable parameter with variadic _Args pack, to
576 forward them directly to the tuple of decayed copies.
577 * testsuite/30_threads/thread/cons/69724.cc: New test.
579 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
581 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
582 * include/bits/basic_string.h: (operator=(const basic_string&):
583 Move allocator decision to assign.
584 (assign(const basic_string&)): Move allocator decision here.
585 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
587 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
590 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
592 * testsuite/util/testsuite_allocator.h (memory_resource)
593 (default_resource_mgr): Fix indentation.
595 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
596 Use operator-> to access raw pointer member.
597 * testsuite/23_containers/vector/59829.cc: Likewise.
598 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
599 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
600 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
602 (PointerBase, PointerBase_void): Derive from NullablePointer and use
603 its constructors and equality operators. Change converting
604 constructors to use operator-> to access private member of the other
606 (PointerBase_void::operator->()): Add, for access to private member.
607 (operator-(PointerBase, PointerBase)): Change to hidden friend.
608 (operator==(PointerBase, PointerBase)): Remove.
609 (operator!=(PointerBase, PointerBase)): Remove.
611 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
612 not assume field called _M_head_impl is the first tuple element.
613 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
614 implementation more accurate.
615 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
616 empty pointer type and non-empty deleter.
618 LWG 2899 - Make is_move_constructible correct for unique_ptr
619 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
620 move assignment operator.
621 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
622 (__uniq_ptr_data): New class template with conditionally deleted
624 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
625 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
626 constructor and move assignment operator as defaulted.
627 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
628 __uniq_ptr_impl::release().
629 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
630 to __uniq_ptr_impl::reset(pointer).
631 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
632 Check for new __uniq_ptr_data type.
633 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
635 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
637 PR libstdc++/90454.cc path construction from void*
638 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
639 pointers to void are rejected as well as void.
640 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
641 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
643 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
645 * doc/xml/manual/policy_data_structures.xml: Comment out stray
646 <remark> elements. Fix formatting of bibliography references.
648 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
650 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
652 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
654 Remove Profile Mode, deprecated since 7.1.0
655 * doc/Makefile.am: Remove XML file for profile mode docs.
656 * doc/Makefile.in: Regenerate.
657 * doc/xml/authors.xml: Remove authors of profile mode docs.
658 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
660 * doc/xml/manual/debug.xml: Likewise.
661 * doc/xml/manual/evolution.xml: Document removal of profile mode.
662 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
663 * doc/xml/manual/spine.xml: Remove profile mode author credit.
664 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
666 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
668 * doc/html/*: Regenerate.
669 * include/Makefile.am: Remove profile mode headers.
670 * include/Makefile.in: Regenerate.
671 * include/bits/c++config (std::__profile): Remove namespace.
672 [_GLIBCXX_PROFILE]: Remove checks for macro.
673 * include/profile/array: Remove.
674 * include/profile/base.h: Remove.
675 * include/profile/bitset: Remove.
676 * include/profile/deque: Remove.
677 * include/profile/forward_list: Remove.
678 * include/profile/impl/profiler.h: Remove.
679 * include/profile/impl/profiler_algos.h: Remove.
680 * include/profile/impl/profiler_container_size.h: Remove.
681 * include/profile/impl/profiler_hash_func.h: Remove.
682 * include/profile/impl/profiler_hashtable_size.h: Remove.
683 * include/profile/impl/profiler_list_to_slist.h: Remove.
684 * include/profile/impl/profiler_list_to_vector.h: Remove.
685 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
686 * include/profile/impl/profiler_node.h: Remove.
687 * include/profile/impl/profiler_state.h: Remove.
688 * include/profile/impl/profiler_trace.h: Remove.
689 * include/profile/impl/profiler_vector_size.h: Remove.
690 * include/profile/impl/profiler_vector_to_list.h: Remove.
691 * include/profile/iterator_tracker.h: Remove.
692 * include/profile/list: Remove.
693 * include/profile/map: Remove.
694 * include/profile/map.h: Remove.
695 * include/profile/multimap.h: Remove.
696 * include/profile/multiset.h: Remove.
697 * include/profile/ordered_base.h: Remove.
698 * include/profile/set: Remove.
699 * include/profile/set.h: Remove.
700 * include/profile/unordered_base.h: Remove.
701 * include/profile/unordered_map: Remove.
702 * include/profile/unordered_set: Remove.
703 * include/profile/vector: Remove.
704 * scripts/run_doxygen: Do not process profile mode headers.
705 * testsuite/23_containers/array/element_access/60497.cc: Don't use
707 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
708 Remove dg-skip-if for profile mode.
709 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
710 preprocessor check for profile mode.
711 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
712 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
714 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
716 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
717 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
718 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
719 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
720 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
722 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
724 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
726 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
728 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
729 preprocessor check for profile mode.
730 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
732 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
733 Remove dg-skip-if for profile mode.
734 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
735 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
736 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
737 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
738 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
739 * testsuite/Makefile.am: Remove profile_flags variable and
740 * testsuite/Makefile.am: Remove profile_flags variable and
741 check-profile target.
742 * testsuite/Makefile.in: Regenerate.
743 * testsuite/ext/profile/all.cc: Remove.
744 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
745 * testsuite/ext/profile/profiler_algos.cc: Remove.
746 * testsuite/ext/profile/replace_new.cc: Remove.
747 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
748 preprocessor check for profile mode.
749 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
750 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
751 (check_v3_target_normal_mode): Do not check for profile mode macro.
752 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
754 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
755 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
756 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
757 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
758 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
759 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
760 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
761 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
762 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
763 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
765 Remove array_allocator extension, deprecated since 4.9.0
766 * doc/xml/manual/allocator.xml: Remove documentation for
768 * doc/xml/manual/evolution.xml: Document array_allocator removal.
769 * doc/xml/manual/using.xml: Remove header from documentation.
770 * include/Makefile.am: Remove <ext/array_allocator.h> header.
771 * include/Makefile.in: Regenerate.
772 * include/ext/array_allocator.h: Remove.
773 * include/precompiled/extc++.h: Do not include removed header.
774 * testsuite/ext/array_allocator/1.cc: Remove.
775 * testsuite/ext/array_allocator/2.cc: Remove.
776 * testsuite/ext/array_allocator/26875.cc: Remove.
777 * testsuite/ext/array_allocator/3.cc: Remove.
778 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
779 * testsuite/ext/array_allocator/check_delete.cc: Remove.
780 * testsuite/ext/array_allocator/check_new.cc: Remove.
781 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
782 * testsuite/ext/headers.cc: Do not include removed header.
784 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
786 * include/bits/stl_bvector.h
787 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
789 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
791 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
793 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
795 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
797 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
799 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
801 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
803 (_Bit_iterator::operator-(difference_type)): Likewise.
804 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
805 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
807 (_Bit_const_iterator::operator-(difference_type)): Likewise.
808 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
810 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
813 * testsuite/util/thread/all.h: Do not use remove_pointer for
814 std::thread::native_handle_type.
817 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
818 (_Variant_storage<true, Types...>::_M_reset()))
819 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
820 (__get_storage): Likewise.
821 (variant): Add noexcept to friend declarations for __get and
825 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
826 Use _Require for constraints.
827 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
829 (__uniq_ptr_hash): New base class with conditionally-disabled call
831 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
832 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
833 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
835 * include/bits/shared_ptr.h: Improve docs.
836 * include/bits/shared_ptr_base.h: Likewise.
837 * include/bits/stl_uninitialized.h: Likewise.
838 * include/bits/unique_ptr.h: Likewise.
839 * libsupc++/new: Likewise.
841 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
843 * include/bits/stl_deque.h
844 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
846 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
848 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
850 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
852 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
854 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
856 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
858 (_Deque_iterator<>::operator-(difference_type)): Likewise.
860 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
863 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
864 (test01): Reserve for number of insertions to avoid rehash during test.
865 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
867 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
872 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
874 * include/experimental/bits/fs_path.h: Improve docs.
875 * include/experimental/bits/net.h: Fix wrong header name in comment.
876 Do not document implementation details.
877 * include/experimental/netfwd: Fix doxygen grouping.
879 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
881 * include/bits/stl_pair.h: Improve docs.
882 * include/std/tuple: Likewise.
884 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
886 * include/std/chrono: Improve docs.
887 * include/std/ratio: Do not document implementation details.
888 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
890 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
893 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
894 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
895 (__duration_common_type): New helper.
896 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
897 __duration_common_type.
898 (__timepoint_common_type_wrapper): Replace with ...
899 (__timepoint_common_type): New helper.
900 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
901 Use __time_point_common_type.
902 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
903 (__common_type_impl): If either argument is transformed by decay,
904 use the common_type of the decayed types.
905 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
906 decayed, use __do_common_type_impl to get the common_type.
907 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
908 (__do_member_type_wrapper, __member_type_wrapper)
909 (__expanded_common_type_wrapper): Remove.
910 (__common_type_pack, __common_type_fold): New helpers.
911 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
912 __member_type_wrapper and __expanded_common_type_wrapper.
913 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
914 Test zero-length template argument list.
915 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
916 Test single argument cases and argument types that should decay.
917 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
918 Adjust expected error.
919 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
921 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
922 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
923 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
925 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
927 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
929 Make allocator propagation more consistent for
930 operator+(basic_string) (P1165R1)
931 * include/bits/basic_string.h
932 (operator+(basic_string&&, basic_string&&): Changed resulting
933 allocator to always be the one from the first parameter.
934 * include/bits/basic_string.tcc
935 (operator+(const _CharT*, const basic_string&)): Changed
936 resulting allocator to be SOCCC on the second parameter's allocator.
937 (operator+(_CharT, const basic_string&)): Likewise.
938 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
940 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
943 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
945 * include/bits/regex.h: Improve docs.
946 * include/bits/regex.tcc: Do not document implementation details.
948 * testsuite/19_diagnostics/error_code/hash.cc: New test.
950 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
952 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
953 Add type printer for container types in std::__debug namespace.
954 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
955 (gdb-tests): Use distinct parameters for the type of test and use of
957 (gdb-test): Check for regex test even if 'whatis' test.
958 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
960 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
961 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
962 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
963 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
964 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
965 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
966 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
968 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
970 * include/std/system_error (error_category): Fix comment.
973 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
974 argument is an empty path.
975 (absolute(const path&, error_code&)): Use invalid_argument as error
976 code instead of no_such_file_or_directory.
977 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
978 of non-existent paths and empty paths with both overloads of absolute.
980 * include/std/system_error (error_category, error_code)
981 (error_condition): Improve docs.
982 * libsupc++/exception: Add missing @addtogroup Doxygen command.
983 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
984 to class documentation. Suppress documentation for implementation
986 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
987 Suppress documentation for implementation details.
989 * include/std/system_error (error_code): Remove friend declaration
990 for hash<error_code>.
991 (hash<error_code>::operator()): Use public member functions to access
993 (hash<error_condition>::operator()): Use address of category, not
994 its object representation.
995 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
996 Use public member functions to access value and category.
997 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
999 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1001 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1002 * include/bits/hashtable_policy.h
1003 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1004 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1005 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1006 smaller than input value rather than always greater. Preserve
1007 _M_next_resize if called with 0 input. Use __builtin_floorl.
1008 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1009 elements + number of insertions is greater than _M_next_resize. Start
1010 with 11 buckets if not told otherwise. Use __builtin_floorl.
1011 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1012 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1013 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1014 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1015 told otherwise. Use __builtin_floorl.
1016 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1017 to also validate _Power2_rehash_policy.
1018 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1021 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1024 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1028 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1029 overflow warning with -Wpedantic -Wsystem-headers.
1031 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1034 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1035 * include/bits/move.h (swap): Remove extra parentheses.
1037 * include/experimental/bits/lfts_config.h: Improve doc markup.
1038 * include/experimental/optional: Improve docs.
1039 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1040 (__constexpr_addressof): Remove.
1041 (optional::operator->()): Use std::__addressof().
1042 * include/std/optional (optional::operator->()): Adjust whitespace.
1043 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1044 that operator-> is still constexpr with overloaded operator&. Change
1045 to compile-only test.
1046 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1049 * include/bits/shared_ptr.h: Improve docs.
1050 * include/bits/shared_ptr_atomic.h: Likewise.
1051 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1053 * include/bits/basic_string.h: Fix iterator/index confusion in
1055 * include/bits/range_access.h: Fix Doxygen warnings.
1056 * include/bits/refwrap.h: Do not document implementation details.
1057 (ref, cref): Group docs with reference_wrapper.
1058 * include/std/fstream: Fix Doxygen markup.
1059 * libsupc++/initializer_list (begin, end): Group docs with
1062 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1064 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1065 * include/std/mutex: Likewise.
1066 * include/std/shared_mutex: Likewise.
1068 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1069 * include/bits/fs_fwd.h: Likewise.
1070 * include/bits/fs_ops.h: Likewise.
1071 * include/bits/fs_path.h: Likewise.
1072 * include/std/filesystem: Likewise.
1074 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1075 * include/experimental/buffer: Likewise.
1076 * include/experimental/executor: Likewise.
1077 * include/experimental/internet: Likewise.
1078 * include/experimental/io_context: Likewise.
1079 * include/experimental/net: Likewise.
1080 * include/experimental/netfwd: Likewise.
1081 * include/experimental/socket: Likewise.
1082 * include/experimental/timer: Likewise.
1084 * doc/doxygen/doxygroups.cc: Move description of experimental group
1086 * include/experimental/algorithm: Add to libfund-ts doc group.
1087 * include/experimental/any: Likewise. Do not document implementation
1089 * include/experimental/array: Add to libfund-ts doc group.
1090 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1091 for Library Fundamentals.
1092 * include/experimental/chrono: Add to libfund-ts doc group.
1093 * include/experimental/deque: Likewise.
1094 * include/experimental/forward_list: Likewise.
1095 * include/experimental/functional: Likewise.
1096 * include/experimental/iterator: Likewise.
1097 * include/experimental/list: Likewise.
1098 * include/experimental/map: Likewise.
1099 * include/experimental/memory: Likewise.
1100 * include/experimental/memory_resource: Likewise. Improve docs.
1102 * include/experimental/numeric: Add to libfund-ts doc group.
1103 * include/experimental/optional: Likewise.
1104 * include/experimental/propagate_const: Likewise.
1105 * include/experimental/random: Likewise.
1106 * include/experimental/ratio: Likewise.
1107 * include/experimental/regex: Likewise.
1108 * include/experimental/set: Likewise.
1109 * include/experimental/source_location: Likewise.
1110 * include/experimental/string: Likewise.
1111 * include/experimental/string_view: Likewise.
1112 * include/experimental/system_error: Likewise.
1113 * include/experimental/tuple: Likewise.
1114 * include/experimental/type_traits: Likewise.
1115 * include/experimental/unordered_map: Likewise.
1116 * include/experimental/unordered_set: Likewise.
1117 * include/experimental/utility: Likewise.
1118 * include/experimental/vector: Likewise.
1119 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1120 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1121 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1123 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1124 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1125 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1126 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1127 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1129 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1130 * include/experimental/bits/fs_fwd.h: Improve docs.
1131 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1132 * include/experimental/bits/fs_path.h: Likewise.
1133 (path, filesystem_error, u8path): Improve docs.
1134 * include/experimental/filesystem: Link to docs for TS.
1136 * config/allocator/new_allocator_base.h (__allocator_base): Add
1137 workaround for Doxygen bug #6945.
1138 * include/std/memory: Improve docs. Define group for pointer safety.
1139 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1140 conditional to suppress documentation for implementation details.
1142 * include/bits/specfun.h: Improve docs.
1143 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1146 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1147 (std::experimental): Add docs.
1148 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1149 namespace to nothing when generating docs.
1150 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1151 * include/std/chrono (std::chrono): Likewise.
1152 * include/std/functional (std::placeholders): Likewise.
1153 * include/std/thread (std::this_thread): Likewise.
1155 * include/parallel/settings.h: Fix Doxygen markup.
1157 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1158 anything unless PB_DS_CLASS_C_DEC is defined.
1159 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1160 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1161 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1162 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1163 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1164 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1165 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1167 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1168 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1169 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1170 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1171 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1172 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1173 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1174 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1175 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1176 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1177 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1179 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1180 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1182 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1185 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1186 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1187 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1190 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1192 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1193 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1194 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1195 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1196 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1197 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1199 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1200 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1203 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
1206 * include/std/complex (__complex_proj): Return parameter unchanged.
1207 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1208 floating-point types to take std::complex arguments.
1209 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1210 floating-point types.
1211 * testsuite/26_numerics/complex/proj.cc: New test.
1213 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1215 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1216 to _Lock_policyE[012].
1217 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1219 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
1221 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1222 macros accidentally left in.
1223 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1224 unnecessary -lstdc++fs option. Fix test for mingw.
1225 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1228 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1230 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1232 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
1234 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1236 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1237 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1240 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1242 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1245 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1246 class template and partial specialization.
1249 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1251 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1252 functions to convert a value to an integral type.
1253 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1254 (fill_n): Convert _Size parameter to an integral type.
1255 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1256 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1257 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1258 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1259 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1260 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1262 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
1264 Adding noexcept-specification on tuple constructors (LWG 2899)
1265 * libstdc++-v3/include/std/tuple:
1266 (tuple()): Add noexcept-specification.
1267 (tuple(const _Elements&...)): Likewise
1268 (tuple(_UElements&&...)): Likewise
1269 (tuple(const tuple<_UElements...>&)): Likewise
1270 (tuple(tuple<_UElements...>&&)): Likewise
1271 (tuple(const _T1&, const _T2&)): Likewise
1272 (tuple(_U1&&, _U2&&)): Likewise
1273 (tuple(const tuple<_U1, _U2>&): Likewise
1274 (tuple(tuple<_U1, _U2>&&): Likewise
1275 (tuple(const pair<_U1, _U2>&): Likewise
1276 (tuple(pair<_U1, _U2>&&): Likewise
1277 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1279 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
1282 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1283 arguments with __restrict.
1285 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1287 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1289 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
1291 * include/experimental/bits/fs_path.h
1292 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1293 avoid redundant call to _S_convert_loc with non-const pointers.
1295 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1296 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1297 * testsuite/21_strings/basic_string/hash/hash.cc
1298 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1299 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1300 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1302 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1303 wstring::_M_replace_dispatch with more specific patterns.
1304 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1305 Create const std::string to avoid redundant call to _S_convert_loc
1306 with non-const pointers.
1307 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1308 avoid unnecessary basic_string::assign instantiations.
1310 * include/std/memory (__uses_alloc_args): Add string-literal to
1311 static_assert, to match the one in __uses_alloc.
1312 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1313 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1314 for recursive uses-allocator construction of nested pairs.
1315 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1318 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1320 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1321 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1322 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1323 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1325 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1326 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1327 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1328 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1329 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1330 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1331 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1333 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
1336 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1337 * include/std/scoped_allocator [__cplusplus > 201703L]
1338 (scoped_allocator_adaptor::construct): Define in terms of
1339 uses_allocator_construction_args, as per P0591R4.
1340 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1341 * testsuite/util/testsuite_allocator.h: Remove name of unused
1344 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
1346 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1347 * doc/html/*: Regenerate.
1349 * include/bits/fs_path.h (operator<, operator<=, operator>)
1350 (operator>=, operator==, operator!=): Make hidden friends, as per
1352 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1353 string type in test.
1354 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1356 * include/std/any (any::any(ValueType&&)): Use __and_v.
1357 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1360 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1362 * include/std/type_traits (__result_of_memfun): Use remove_reference
1363 instead of __remove_cvref_t and remove redundant is_same check.
1364 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1366 * include/experimental/string_view (basic_string_view::pointer)
1367 (basic_string_view::reference): Fix to refer to non-const value_type.
1368 * include/bits/basic_string.h (basic_string): Use __sv_check and
1369 __sv_limit instead of basic_string_view::_M_check and
1370 basic_string_view::_M_limit.
1371 * include/std/string_view (__sv_check, __sv_limit): New
1372 helper functions to replace basic_string_view::_M_check and
1373 basic_string_view::_M_limit.
1374 (basic_string_view): Add static assertions to enforce ill-formed
1375 requirement for traits_type::char_type from P1148R0, and to enforce
1376 required properties of char-like types.
1377 (basic_string_view::pointer, basic_string_view::reference): Fix to
1378 refer to non-const value_type.
1379 (basic_string_view::operator[], basic_string_view::at)
1380 (basic_string_view::front, basic_string_view::back)
1381 (basic_string_view::data): Use const_reference and const_pointer
1382 typedefs for return types.
1383 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1384 (hash<wstring_view>): Fix argument_type typedef.
1385 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1386 char/1.cc: Fix expected return type of basic_string_view::data().
1387 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1388 wchar_t/1.cc: Likewise.
1389 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1390 char/1.cc: Likewise.
1391 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1392 wchar_t/1.cc: Likewise.
1393 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1395 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1396 Check reference and pointer typedefs.
1397 * testsuite/experimental/string_view/requirements/typedefs.cc:
1399 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1400 Fix expected return type of basic_string_view::data().
1401 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1403 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1405 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
1409 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
1410 Avoid a runtime check for types that can never be stored in std::any.
1411 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1414 PR libstdc++/90220 (partial)
1415 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
1416 not attempt ill-formed static_cast to pointers to non-object types.
1417 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1420 * testsuite/20_util/variant/run.cc: Catch exception by reference to
1421 prevent -Wcatch-value warning.
1423 * include/std/variant (__variant_construct): Use template parameter
1424 type instead of equivalent decltype-specifier.
1425 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
1426 Replace forward with move.
1427 (_Move_ctor_base<false, Types...>::_M_destructive_move)
1428 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
1429 (_Move_ctor_base<true, Types...>::_M_destructive_move)
1430 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
1431 index after construction succeeds.
1432 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
1433 if-constexpr checks that are always true. Use __remove_cvref_t instead
1434 of remove_reference so that is_nothrow_move_constructible check
1435 doesn't use a const rvalue parameter. In the potentially-throwing case
1436 construct a temporary and move assign it, as per LWG 2904.
1437 (_Move_assign_base<false, Types...>::operator=): Remove redundant
1438 if-constexpr checks that are always true. Use emplace as per LWG 2904.
1439 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
1440 construct a temporary and move assign from it, as per LWG 2904.
1441 * testsuite/20_util/variant/exception_safety.cc: Check that
1442 assignment operators have strong exception safety guarantee.
1444 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
1446 Document PSTL linker flags
1448 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
1450 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1452 * include/std/variant (__detail::__variant::_Traits): Make
1453 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
1454 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
1456 (__detail::__variant::_Copy_assign_alias): Only depend on
1457 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
1458 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
1459 move assignment operators.
1462 * include/std/variant (variant::__not_self): New helper for the
1463 is_same_v<remove_cvref_t<T>, variant>==false constraints.
1464 (variant::__to_type_impl): Remove.
1465 (variant::__to_type): Add default argument to check pack size, instead
1466 of using __to_type_impl.
1467 (variant::__accepted_type): Add default argument using __not_self.
1468 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
1469 for variant(T&&) constructor constraint.
1470 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
1471 Extract __accepted_type into a named template parameter for reuse in
1472 other constraints and in the exception specification.
1473 (variant::variant(in_place_type_t<T>, Args&&...))
1474 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
1475 (variant::variant(in_place_index_t<T>, Args&&...))
1476 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
1477 (variant::operator=T&&)): Remove redundant && from trait arguments.
1478 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
1479 isn't used for in_place_type or in_place_index arguments.
1481 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
1482 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
1483 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
1485 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1486 Bernd Edlinger <bernd.edlinger@hotmail.de>
1487 Jakub Jelinek <jakub@redhat.com>
1490 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
1491 general-regs-only target attribute for ARM.
1493 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1496 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
1497 specialization also depend on is_nothrow_move_constructible.
1498 * include/std/variant (__detail::__variant::__never_valueless()):
1499 Only true if the variant would have a move assignment operator.
1500 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
1501 Check __never_valueless<T...>().
1502 (variant::emplace): Only perform non-throwing move assignments
1503 for never-valueless alternatives if the variant has a move assignment
1505 * testsuite/20_util/variant/compile.cc: Check that never-valueless
1506 types can be emplaced into non-assignable variants.
1507 * testsuite/20_util/variant/run.cc: Check that never-valueless types
1508 don't get copied when emplaced into non-assignable variants.
1510 * include/std/variant (__detail::__variant::__ref_cast): Remove
1512 (__detail::__variant::_Uninitialized::_M_get)
1513 (__detail::__variant::__get)
1514 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
1516 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
1518 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
1520 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1521 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1522 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1523 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1525 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1527 Delegate PSTL configuration to pstl/pstl_config.h
1529 * include/bits/c++config: Remove explicit PSTL configuration
1530 macros and use definitions from <pstl/pstl_config.h>.
1532 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1534 Cleanup algorithm implementations
1535 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
1537 (mismatch): Forward execution policy.
1538 (equal): Qualify call to std::equal().
1539 (partial_sort): Forward execution policy.
1540 (inplace_merge): Forward execution policy.
1542 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
1544 Improve implementation of parallel equal()
1545 * include/pstl/algorithm_impl.h
1546 (__internal::__brick_equal): use "4 iterator" version of
1548 (__internal::__brick_equal): use simd for random access
1549 iterators on unsequenced execution policies.
1550 (__internal::__pattern_equal): add "4 iterator" version
1551 (__internal::__pattern_equal): dispatch to simd __brick_equal
1552 for vector-only execution policies.
1553 (__internal::__pattern_equal): dispatch to __parallel_or for
1554 parallel execution policies.
1555 * include/pstl/glue_algorithm_impl.h
1556 (std::equal): dispatch to "4 iterator" version of
1557 __internal::__pattern_equal().
1559 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
1562 * include/bits/forward_list.h (operator==): Do not use operator!= to
1564 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1565 earlier in the list, so that sort is stable.
1566 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1567 * testsuite/23_containers/forward_list/comparable.cc: Test with
1568 types that meet the minimum EqualityComparable and LessThanComparable
1569 requirements. Remove irrelevant comment.
1571 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1572 Do not depend on whether all alternative types are move constructible.
1573 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1574 from the operand when deciding whether to perform the assignment.
1575 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1576 with deleted move constructor and deleted move assignment operator.
1577 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1578 behaviour of variants with DeletedMoves as an alternative.
1579 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1580 (move_ctor, move_assign): Check that moving a variant with a
1581 DeletedMoves alternative falls back to copying instead of moving.
1583 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1584 from static_assert declarations.
1586 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1587 actually match its name.
1588 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1589 (test_swap()): Fix result for MoveCtorOnly and check
1590 MoveCtorAndSwapOnly.
1592 * include/std/optional (optional::value_or(U&&) &&): Add missing
1593 constexpr specifier.
1594 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1595 for disengaged optionals and rvalue optionals.
1596 * testsuite/20_util/optional/observers/4.cc: Likewise.
1598 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
1600 * include/pstl/algorithm_impl.h: Uglify identfiers.
1601 * include/pstl/numeric_impl.h: Uglify identfiers.
1602 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1604 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
1606 * include/bits/c++config:
1607 Add definition for __PSTL_ASSERT.
1608 Add definition for __PSTL_ASSERT_MSG.
1609 * include/pstl/algorithm_impl.h: Replace use of assert().
1610 * include/pstl/numeric_impl.h: Replace use of assert().
1611 * include/pstl/parallel_backend_tbb.h:
1612 Replace use of assert().
1613 Replace use of __TBB_ASSERT().
1614 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1616 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
1619 * src/c++17/memory_resource.cc
1620 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1621 needed to allow placing a _Chunk at the end of the buffer.
1622 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1624 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
1626 * doc/xml/faq.xml: Add information about emergency EH pool.
1627 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1628 Move outdated information on mt_allocator to a separate section.
1629 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1630 doesn't affect the default allocator.
1632 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1636 * testsuite/20_util/variant/89851.cc: New test.
1638 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
1640 * include/std/variant: Adjust whitespace. Add comments.
1641 (_Multi_array): Leave primary template undefined.
1642 (_Multi_array<_Tp>): Define partial specialization for base case of
1644 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1645 which is always a reference.
1646 (__gen_vtable::_S_apply()): Remove function, inline body into
1647 default member initializer.
1648 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1650 * include/std/variant (__variant_idx_cookie): Add member type.
1651 (__visitor_result_type): Remove.
1652 (__do_visit): Use invoke_result instead of __visitor_result_type.
1653 * testsuite/20_util/variant/visit.cc: New test.
1656 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1658 * testsuite/20_util/variant/90008.cc: New test.
1660 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
1662 * include/pstl/algorithm_impl.h: Add namespace qualification.
1663 * include/pstl/execution_defs.h: Add namespace qualification.
1664 * include/pstl/execution_impl.h: Add namespace qualification.
1665 * include/pstl/numeric_impl.h: Add namespace qualification.
1666 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1667 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1668 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1670 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1672 Fix visit<R> for variant.
1673 * include/std/variant (__do_visit): Add a template parameter
1674 for enforcing same return types for visit.
1675 (__gen_vtable_impl): Likewise.
1676 (_S_apply_single_alt): Adjust.
1677 (__visit_invoke_impl): New. Handle casting to void.
1678 (__do_visit_invoke): New. Enforces same return types.
1679 (__do_visit_invoke_r): New. Converts return types.
1680 (__visit_invoke): Adjust.
1681 (__gen_vtable): Add a template parameter for enforcing
1682 same return types for visit.
1683 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1684 different return types.
1685 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1686 visitors with different return types don't accidentally
1687 compile with regular visitation.
1689 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1691 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1692 dg-require-filesystem-ts.
1694 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
1696 * doc/xml/manual/status_cxx2020.xml: Update status.
1697 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1698 * testsuite/20_util/variant/visit_r.cc: New test.
1700 * include/bits/fs_dir.h (directory_iterator::operator*)
1701 (directory_iterator::operator->): Add noexcept.
1702 (operator==, operator!=): Replace namespace-scope equality operators
1703 for directory iterators with hidden friends.
1706 * config/abi/pre/gnu.ver: Add missing exports.
1707 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1710 * config/abi/pre/gnu.ver: Export new symbols.
1711 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1712 (recursive_directory_iterator::recursion_pending())
1713 (recursive_directory_iterator::disable_recursion_pending()): Remove
1714 inline definitions. Make noexcept.
1715 (recursive_directory_iterator::depth())
1716 (recursive_directory_iterator::operator*())
1717 (recursive_directory_iterator::operator->()): Make noexcept.
1718 (recursive_directory_iterator::_M_options)
1719 (recursive_directory_iterator::_M_pending): Remove data members.
1720 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1721 (recursive_directory_iterator::recursive_directory_iterator): Remove
1722 ctor-initializer. Use new constructor for _Dir_stack.
1723 (recursive_directory_iterator::options())
1724 (recursive_directory_iterator::recursion_pending())
1725 (recursive_directory_iterator::disable_recursion_pending()): Add
1726 non-inline definitions.
1727 (recursive_directory_iterator::depth()): Make noexcept.
1728 (recursive_directory_iterator::increment(error_code&))
1729 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1730 location of options and recursion_pending members.
1731 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1732 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1733 user-declared move constructor and assignment operator, to make the
1736 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1737 d_type == DT_UNKNOWN immediately.
1738 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1740 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1742 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1744 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1745 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1748 PR libstdc++/87431 (again)
1749 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1750 Define partial specialization for basic_string.
1751 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1752 shared_ptr and weak_ptr.
1753 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1755 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1757 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1759 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1761 * include/std/any (_Never_valueless_alt): Define explicit
1762 specialization for any.
1763 * include/std/variant (_Never_valueless_alt): Define primary template.
1764 (__never_valueless): Use _Never_valueless_alt instead of
1765 is_trivially_copyable.
1766 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1767 initializations to avoid try-catch overhead. Add special case for
1768 scalars produced by potentially-throwing conversions. Use
1769 _Never_valueless_alt instead of is_trivially_copyable for the
1770 remaining strong exception-safety cases.
1771 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1772 * testsuite/20_util/variant/87431.cc: Run both test functions.
1773 * testsuite/20_util/variant/exception_safety.cc: New test.
1774 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1775 so the variant becomes valueless.
1777 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
1780 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1782 (variant::emplace<_Tp>): Return result of emplace<N> directly.
1784 * include/std/string (__hash_string_base): New class template defining
1785 operator() for hashing strings.
1786 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1787 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1788 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1789 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1791 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1793 Use single-visitation in variant assignment and swap and relops.
1794 Also use indices instead of types when checking whether
1795 variants hold the same thing.
1796 * include/std/variant (__do_visit): Add a template parameter
1797 for index visitation, invoke with indices if index visitation
1799 (__variant_idx_cookie): New.
1800 (__visit_with_index): Likewise.
1801 (_Copy_assign_base::operator=): Do single-visitation with
1803 (_Move_assign_base::operator=): Likewise.
1804 (_Extra_visit_slot_needed): Adjust.
1805 (__visit_invoke): Call with indices if it's an index visitor.
1806 (relops): Do single-visitation with an index visitor.
1808 (__visitor_result_type): New.
1810 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1812 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1814 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1816 Don't revisit a variant we are already visiting.
1817 * include/std/variant (__variant_construct_single): New.
1818 (__variant_construct): Use it.
1819 (_M_destructive_move): Likewise.
1820 (_M_destructive_copy): Likewise.
1821 (_Copy_assign_base::operator=): Adjust.
1822 (_Move_assign_base::operator=): Likewise.
1825 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
1828 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1829 destructor so they are not evaluated until the _Key type is complete.
1830 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1831 * testsuite/23_containers/set/85965.cc: New test.
1832 * testsuite/23_containers/unordered_set/85965.cc: New test.
1833 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1834 with regexp matching the corresponding _Rb_tree specialization.
1835 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1836 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1837 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1838 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1839 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1840 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1841 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1843 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1846 Fix based on a suggestion by Antony Polukhin.
1847 * include/std/variant (__never_valueless): New.
1849 (_Extra_visit_slot_needed): New.
1850 (_Multi_array): Use it.
1851 (_S_apply_all_alts): Likewise.
1853 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1856 Fix based on a suggestion by Antony Polukhin.
1857 * include/std/variant (__gen_vtable): Don't reserve an
1858 additional table slot, _Multi_array already does that.
1860 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1863 Fix based on a suggestion by Antony Polukhin.
1864 * include/std/variant (__variant_construct): Capture a pointer
1865 to the storage and visit just one variant.
1867 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
1869 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1870 Doxygen-generated pages with unstable URL.
1871 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1872 * doc/xml/manual/extensions.xml: Likewise.
1873 * doc/xml/manual/parallel_mode.xml: Likewise.
1874 * doc/xml/manual/support.xml: Likewise.
1876 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1877 avoid -Wconversion warnings.
1879 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
1881 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1882 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
1883 (allstamped): Add stamp-pstl.
1884 (install-headers): Add ptsl_builddir.
1885 * include/Makefile.in: Regenerate.
1886 * include/bits/c++config: Add pstl configuration.
1887 * include/pstl/LICENSE.txt: New file.
1888 * include/pstl/algorithm_fwd.h: New file.
1889 * include/pstl/algorithm_impl.h: New file.
1890 * include/pstl/execution_defs.h: New file.
1891 * include/pstl/execution_impl.h: New file.
1892 * include/pstl/glue_algorithm_defs.h: New file.
1893 * include/pstl/glue_algorithm_impl.h: New file.
1894 * include/pstl/glue_execution_defs.h: New file.
1895 * include/pstl/glue_memory_defs.h: New file.
1896 * include/pstl/glue_memory_impl.h: New file.
1897 * include/pstl/glue_numeric_defs.h: New file.
1898 * include/pstl/glue_numeric_impl.h: New file.
1899 * include/pstl/memory_impl.h: New file.
1900 * include/pstl/numeric_fwd.h: New file.
1901 * include/pstl/numeric_impl.h: New file.
1902 * include/pstl/parallel_backend.h: New file.
1903 * include/pstl/parallel_backend_tbb.h: New file.
1904 * include/pstl/parallel_backend_utils.h: New file.
1905 * include/pstl/parallel_impl.h: New file.
1906 * include/pstl/pstl_config.h: New file.
1907 * include/pstl/unseq_backend_simd.h: New file.
1908 * include/pstl/utils.h: New file.
1909 * include/std/algorithm: Include parallel algorithm implementations.
1910 * include/std/execution: New file.
1911 * include/std/memory: Include parallel algorithm implementations.
1912 * include/std/numeric: Include parallel algorithm implementations.
1913 * include/std/version: Add parallel algorithms feature test macro.
1914 * testsuite/util/pstl/pstl_test_config.h: New file.
1915 * testsuite/util/pstl/test_utils.h: New file.
1916 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1917 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1918 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1919 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1920 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1921 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1922 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1923 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1924 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1925 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1926 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1927 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1928 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1929 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1930 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1931 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1932 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1933 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1934 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1935 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1936 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1937 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1938 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1939 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1940 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1941 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1942 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1943 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1944 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1945 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1946 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1947 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1948 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1949 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1950 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1951 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1952 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1953 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1954 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1955 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1956 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1957 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1958 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1959 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1960 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1961 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1962 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1963 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1964 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1965 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1966 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1967 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1968 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1969 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1970 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1971 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1972 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1973 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1974 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1975 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1976 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1977 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1978 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1979 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1980 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1981 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1982 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1983 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1984 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1985 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1986 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1987 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1988 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1989 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1990 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1991 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1992 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1993 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1994 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1995 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1996 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1997 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1998 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1999 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2000 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2001 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2002 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2003 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2004 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2005 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2006 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2007 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2008 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2009 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2010 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2011 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2012 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2013 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2014 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2015 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2016 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2017 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2018 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2019 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2020 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2021 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2023 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2025 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2026 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2027 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2028 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2029 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2030 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2031 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2032 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2033 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2034 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2035 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2036 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2037 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2038 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2039 when the special functions IS is enabled, not for C++17.
2040 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2042 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2043 without checks for special functions in C++17.
2044 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2048 * include/backward/hash_map: Use <> for includes not "".
2049 * include/backward/hash_set: Likewise.
2050 * include/backward/strstream: Likewise.
2051 * include/tr1/bessel_function.tcc: Likewise.
2052 * include/tr1/exp_integral.tcc: Likewise.
2053 * include/tr1/legendre_function.tcc: Likewise.
2054 * include/tr1/modified_bessel_func.tcc: Likewise.
2055 * include/tr1/riemann_zeta.tcc: Likewise.
2057 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2059 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2060 of extension allocators.
2061 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2062 Document new headers in 7.2, 8.1 and 9.1 releases.
2063 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2064 * doc/html/*: Regenerate.
2066 2019-03-12 John David Anglin <dave.anglin@bell.net>
2069 * testsuite/lib/libstdc++.exp: Locate libatomic.
2070 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2071 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2073 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2074 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2075 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2076 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2078 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2081 * configure.ac: Check for sockatmark.
2082 * crossconfig.m4: Check for sockatmark.
2083 * config.h.in: Regenerate.
2084 * configure: Regenerate.
2085 * include/experimental/internet (address_v4::_S_hton): Rename
2086 overloaded functions to _S_hton_16 and _S_ntoh_16.
2087 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2088 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2089 * include/experimental/socket (basic_socket::at_mark): Check
2090 _GLIBCXX_HAVE_SOCKATMARK.
2092 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2093 const variables instead of macros.
2096 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2097 Use correct type for len_aligned.
2098 * testsuite/20_util/hash/89629.cc: New test.
2100 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2103 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2104 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2105 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2106 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2107 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2108 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2109 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2110 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2111 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2112 memory_order_seq_cst to int.
2114 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2116 * doc/xml/manual/using.xml: Use link element instead of xref.
2117 * doc/html/*: Regenerate.
2119 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2121 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2124 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2125 parameters in deduction guides.
2126 * include/debug/multimap.h (multimap): Likewise.
2127 * include/debug/set.h (multimap): Likewise.
2128 * include/debug/multiset.h (multimap): Likewise.
2129 * include/debug/unordered_map (unordered_map): Likewise.
2130 (unordered_multimap): Likewise.
2131 * include/debug/unordered_set (unordered_set): Likewise.
2132 (unordered_multiset): Likewise.
2135 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2136 Invalidate all iterators in case of rehash.
2137 (unordered_multimap<>::_M_check_rehashed): Likewise.
2138 * include/debug/unordered_set
2139 (unordered_set<>::_M_check_rehashed): Likewise.
2140 (unordered_multiset<>::_M_check_rehashed): Likewise.
2141 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2143 2019-03-07 Andreas Schwab <schwab@suse.de>
2145 * config/abi/post/riscv64-linux-gnu: New directory.
2146 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2148 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2150 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2151 compile test to run. Fix typo.
2153 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2154 * doc/html/*: Regenerate.
2156 P0356R5 Simplified partial function application
2157 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2158 helpers for bind_front.
2159 (bind_front, __cpp_lib_bind_front): Define.
2160 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2162 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2164 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2165 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2166 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2167 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2169 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2171 PR libstdc++/86655 - std::assoc_legendre should not constrain
2172 the value of m (or x).
2173 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2174 __sph_legendre): If degree > order Don't throw, return 0.
2175 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2176 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2177 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2178 * testsuite/tr1/5_numerical_facilities/special_functions/
2179 02_assoc_legendre/pr86655.cc: New test.
2180 * testsuite/tr1/5_numerical_facilities/special_functions/
2181 22_sph_legendre/pr86655.cc: New test.
2183 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2186 Also PR libstdc++/85517
2187 * include/std/variant (__do_visit): New.
2188 (__variant_cast): Likewise.
2189 (__variant_cookie): Likewise.
2190 (__erased_*): Remove.
2191 (_Variant_storage::_S_vtable): Likewise.
2192 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2193 (_Variant_storage::__M_reset): Adjust.
2194 (__variant_construct): New.
2195 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2196 __variant_construct.
2197 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2198 (_Move_ctor_base::__M_destructive_copy): New.
2199 (_Move_ctor_base::__M_destructive_move): Adjust to use
2200 __variant_construct.
2201 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2202 (_Copy_assign_alias): Adjust to check both copy assignment
2203 and copy construction for triviality.
2204 (_Move_assign_base::operator=): Adjust to use __do_visit.
2205 (_Multi_array): Add support for visitors that accept and return
2207 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2208 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2209 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2210 a __variant_cookie temporary for a variant that is valueless and..
2211 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2212 (__gen_vtable::_Array_type): Conditionally make space for
2213 the __variant_cookie visitor case.
2214 (__variant_construct_by_index): New.
2215 (get_if): Adjust to use std::addressof.
2216 (relops): Adjust to use __do_visit.
2217 (variant): Add __variant_cast and __variant_construct_by_index
2219 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2220 instead of self-destruction.
2221 (variant::swap): Adjust to use __do_visit.
2222 (visit): Reimplement in terms of __do_visit.
2223 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2224 * testsuite/20_util/variant/compile.cc: Adjust.
2225 * testsuite/20_util/variant/run.cc: Likewise.
2227 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2229 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2231 * testsuite/experimental/feat-char8_t.cc: Likewise.
2233 * include/std/type_traits [C++20] (is_bounded_array)
2234 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2236 * testsuite/20_util/is_bounded_array/requirements/
2237 explicit_instantiation.cc: New test.
2238 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2240 * testsuite/20_util/is_bounded_array/value.cc: New test.
2241 * testsuite/20_util/is_unbounded_array/requirements/
2242 explicit_instantiation.cc: New test.
2243 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2245 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2247 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2249 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2251 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
2253 * include/c_compatibility/math.h [C++20] (lerp): Add using
2255 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2256 (__lerp): Define function template to implement lerp.
2257 (lerp(float, float, float), lerp(double, double, double))
2258 (lerp(long double, long double, long double)): Define for C++20.
2259 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2260 (midpoint(T, T), midpoint(T*, T*)): Define.
2261 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2262 * testsuite/26_numerics/lerp.cc: New test.
2263 * testsuite/26_numerics/midpoint/floating.cc: New test.
2264 * testsuite/26_numerics/midpoint/integral.cc: New test.
2265 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2267 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2269 PR libstdc++/88996 Implement P0439R0
2270 Make std::memory_order a scoped enumeration.
2271 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2272 add variables for the old enumerators. Adjust calls.
2273 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2274 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2276 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
2278 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2281 * include/std/memory_resource (polymorphic_allocator): Add default
2282 template argument for C++20.
2283 (polymorphic_allocator::allocate_bytes)
2284 (polymorphic_allocator::deallocate_bytes)
2285 (polymorphic_allocator::allocate_object)
2286 (polymorphic_allocator::deallocate_object)
2287 (polymorphic_allocator::new_object)
2288 (polymorphic_allocator::delete_object): New member functions for
2290 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2293 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2296 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2299 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2301 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2302 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2304 * include/std/memory (uses_allocator_construction_args): New set of
2305 overloaded functions.
2306 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2308 * include/std/memory_resource (polymorphic_allocator::construct)
2309 [__cplusplus > 201703l]: Replace all overloads with a single function
2310 using uses_allocator_construction_args.
2311 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2313 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2315 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
2318 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2319 stylesheet directories before check for xsltproc. Try to use
2320 xmlcatalog to find local stylesheet directory before trying hardcoded
2321 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2322 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2323 use xsltproc if xmlcatalog fails to find a local stylesheet.
2324 * configure.ac: Check for xmlcatalog.
2325 * Makefile.in: Regenerate.
2326 * configure: Likewise.
2327 * doc/Makefile.in: Likewise.
2328 * include/Makefile.in: Likewise.
2329 * libsupc++/Makefile.in: Likewise.
2330 * po/Makefile.in: Likewise.
2331 * python/Makefile.in: Likewise.
2332 * src/Makefile.in: Likewise.
2333 * src/c++11/Makefile.in: Likewise.
2334 * src/c++17/Makefile.in: Likewise.
2335 * src/c++98/Makefile.in: Likewise.
2336 * src/filesystem/Makefile.in: Likewise.
2337 * testsuite/Makefile.in: Likewise.
2339 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
2342 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2343 container deduction guides.
2344 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2345 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2346 parameters in deduction guides.
2347 * include/bits/stl_multimap.h (multimap): Likewise.
2348 * include/bits/stl_multiset.h (multiset): Likewise.
2349 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2350 * include/bits/stl_set.h (set): Likewise.
2351 * include/bits/stl_stack.h (stack): Likewise.
2352 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2353 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2354 constrain parameters in deduction guides.
2355 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2357 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2359 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2360 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2361 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2362 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2364 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2366 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2369 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2370 to class template and partial specialization using void_t.
2371 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2373 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
2376 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2377 copy and move members public.
2379 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
2381 * include/std/type_traits (__underlying_type_impl): New helper to
2382 make underlying_type SFINAE-friendly.
2383 (underlying_type): Derive from __underlying_type_impl.
2384 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2388 * include/bits/char_traits.h (__constant_char_array): Check index is
2389 in range before dereferencing.
2390 (char_traits<char>::compare, char_traits<char>::find)
2391 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2392 immediately if n is zero.
2393 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2394 Remove workarounds for PR 67026.
2395 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2397 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2400 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2402 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2403 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2405 2019-02-22 Jakub Jelinek <jakub@redhat.com>
2408 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
2409 type to std::size_t and argument to type to long double.
2411 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2413 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
2414 * config/abi/post/sparc64-linux-gnu: New directory.
2415 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
2416 * config/abi/post/sparc64-linux-gnu/32: New directory.
2417 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
2419 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2421 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
2422 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
2425 2019-02-22 Tom Honermann <tom@honermann.net>
2427 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
2428 printers for u8string and u8string_view.
2430 2019-02-22 Tom Honermann <tom@honermann.net>
2432 * testsuite/18_support/byte/ops.cc: Validate
2433 std::to_integer<char8_t>, std::to_integer<char16_t>, and
2434 std::to_integer<char32_t>.
2435 * testsuite/18_support/numeric_limits/dr559.cc: Validate
2436 std::numeric_limits<char8_t>.
2437 * testsuite/18_support/numeric_limits/lowest.cc: Validate
2438 std::numeric_limits<char8_t>::lowest().
2439 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
2440 std::numeric_limits<char8_t>::max_digits10.
2441 * testsuite/18_support/type_info/fundamental.cc: Validate
2442 typeinfo for char8_t.
2443 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
2444 std::from_chars with char8_t.
2445 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
2446 Validate explicit instantiation of std::hash<char8_t>.
2447 * testsuite/20_util/is_integral/value.cc: Validate
2448 std::is_integral<char8_t>.
2449 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
2450 Validate std::make_signed<char8_t>.
2451 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2452 Validate u8string construction from char8_t sources.
2453 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
2455 * testsuite/21_strings/basic_string_view/operations/compare/
2456 char/70483.cc: Validate substr operations on u8string_view.
2457 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
2458 the u8string_view typedef is defined.
2459 * testsuite/21_strings/char_traits/requirements/
2460 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
2462 * testsuite/21_strings/char_traits/requirements/
2463 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
2464 constexpr member functions.
2465 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
2466 that the u8string typedef is defined.
2467 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
2468 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
2469 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
2470 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
2472 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2473 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
2475 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2476 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2477 Validate std::atomic<char8_t>::is_always_lock_free
2478 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
2479 Update line numbers.
2480 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
2482 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
2484 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2485 Validate std::experimental::pmr::u8string.
2486 * testsuite/experimental/string_view/typedefs.cc: Validate that the
2487 u8string_view typedef is defined.
2488 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
2489 char32_t to the typelists.
2491 2019-02-22 Tom Honermann <tom@honermann.net>
2493 * include/ext/typelist.h: Constrain a partial specialization of
2494 typelist::detail::append_ to only match chain<T1,T2>.
2496 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2499 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
2500 class template with class. Replace move and copy member types with
2501 member alias templates, so they are only instantiated when needed.
2502 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2503 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
2504 test for C++11/14/17 as well.
2505 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
2508 2019-02-20 Jakub Jelinek <jakub@redhat.com>
2511 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
2512 _GLIBCXX_PURE to the alias declaration.
2514 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
2516 * testsuite/21_strings/basic_string/literals/types.cc
2517 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
2518 * testsuite/21_strings/basic_string/literals/values.cc
2519 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2520 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
2521 potentially having different type.
2522 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2523 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
2525 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
2526 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2527 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
2528 string literals only using basic character set.
2529 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
2530 u8 literals to char.
2531 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
2532 Test ATOMIC_CHAR8_T_LOCK_FREE.
2533 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
2534 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
2535 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
2536 * testsuite/experimental/string_view/literals/types.cc
2537 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
2539 * testsuite/experimental/string_view/literals/values.cc
2540 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2542 2019-02-19 Tom Honermann <tom@honermann.net>
2544 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
2545 from char16_32_t.cc; validates numeric_limits<char8_t>.
2546 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
2547 test cloned from types.cc; validates operator""s for char8_t
2549 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
2550 test cloned from values.cc; validates construction and comparison
2552 * testsuite/21_strings/basic_string/requirements/
2553 /explicit_instantiation/char8_t/1.cc: New test cloned from
2554 char16_t/1.cc; validates explicit instantiation of
2555 basic_string<char8_t>.
2556 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2557 New test cloned from types.cc; validates operator""sv for char8_t
2558 returns u8string_view.
2559 * testsuite/21_strings/basic_string_view/literals/
2560 values-char8_t.cc: New test cloned from values.cc; validates
2561 construction and comparison of u8string_view values.
2562 * testsuite/21_strings/basic_string_view/requirements/
2563 explicit_instantiation/char8_t/1.cc: New test cloned from
2564 char16_t/1.cc; validates explicit instantiation of
2565 basic_string_view<char8_t>.
2566 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2567 New test cloned from char16_t/65049.cc; validates that
2568 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2569 * testsuite/21_strings/char_traits/requirements/char8_t/
2570 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2571 that char_traits<char8_t> member typedefs are present and correct.
2572 * testsuite/21_strings/char_traits/requirements/
2573 explicit_instantiation/char8_t/1.cc: New test cloned from
2574 char16_t/1.cc; validates explicit instantiation of
2575 char_traits<char8_t>.
2576 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2577 from char16_t.cc: validates
2578 codecvt<char16_t, char8_t, mbstate_t>.
2579 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2580 from char32_t.cc: validates
2581 codecvt<char32_t, char8_t, mbstate_t>.
2582 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2583 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2584 codecvt<char32_t, char8_t, std::mbstate_t>.
2585 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2586 test cloned from string.cc; validates filesystem::path construction
2588 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2589 the __cpp_lib_char8_t feature test macro is defined with the
2591 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2592 New test cloned from string.cc; validates filesystem::path
2593 construction from char8_t input.
2594 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2595 test cloned from types.cc; validates operator""sv for char8_t
2596 returns u8string_view.
2597 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2598 New test cloned from values.cc; validates construction and
2599 comparison of u8string_view values.
2600 * testsuite/experimental/string_view/requirements/
2601 explicit_instantiation/char8_t/1.cc: New test cloned from
2602 char16_t/1.cc; validates explicit instantiation of
2603 basic_string_view<char8_t>.
2604 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2605 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2608 2019-02-19 Tom Honermann <tom@honermann.net>
2610 P0482R5 char8_t: Standard library support
2611 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2612 typeinfo symbols for char8_t.
2613 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2614 (GLIBCXX_3.4.26): Add symbols for specializations of
2615 numeric_limits and codecvt that involve char8_t.
2616 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2617 * include/bits/atomic_base.h: Add atomic_char8_t.
2618 * include/bits/basic_string.h: Add std::hash<u8string> and
2619 operator""s(const char8_t*, size_t).
2620 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2622 * include/bits/char_traits.h: Add char_traits<char8_t>.
2623 * include/bits/codecvt.h: Add
2624 codecvt<char16_t, char8_t, mbstate_t>,
2625 codecvt<char32_t, char8_t, mbstate_t>,
2626 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2627 codecvt_byname<char32_t, char8_t, mbstate_t>.
2628 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2629 recognize char8_t as an integral type.
2630 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2632 (path::u8string): Return std::u8string when char8_t support is
2634 (path::generic_u8string): Likewise.
2635 (path::_S_convert): Handle conversion from char8_t input.
2636 (path::_S_str_convert): Likewise.
2637 * include/bits/functional_hash.h: Add hash<char8_t>.
2638 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2640 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2641 for new char8_t specializations.
2642 * include/bits/localefwd.h: Add missing declarations of
2643 codecvt<char16_t, char, mbstate_t> and
2644 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2645 codecvt<char16_t, char8_t, mbstate_t> and
2646 codecvt<char32_t, char8_t, mbstate_t>.
2647 * include/bits/postypes.h: Add u8streampos
2648 * include/bits/stringfwd.h: Add declarations of
2649 char_traits<char8_t> and u8string.
2650 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2651 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2653 (path::u8string): Return std::u8string when char8_t support is
2655 (path::generic_u8string): Likewise.
2656 (path::_S_convert): Handle conversion from char8_t input.
2657 (path::_S_str_convert): Likewise.
2658 * include/experimental/string: Add u8string.
2659 * include/experimental/string_view: Add u8string_view,
2660 hash<experimental::u8string_view>, and
2661 operator""sv(const char8_t*, size_t).
2662 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2663 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2664 as a character type.
2665 * include/std/limits: Add numeric_limits<char8_t>.
2666 * include/std/string_view: Add u8string_view,
2667 hash<experimental::u8string_view>, and
2668 operator""sv(const char8_t*, size_t).
2669 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2670 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2671 * libsupc++/atomic_lockfree_defines.h: Define
2672 ATOMIC_CHAR8_T_LOCK_FREE.
2673 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2674 codecvt.cc and limits.cc so that char8_t specializations of
2675 numeric_limits and codecvt and emitted.
2676 * src/c++11/Makefile.in: Likewise.
2677 * src/c++11/codecvt.cc: Define members of
2678 codecvt<char16_t, char8_t, mbstate_t>,
2679 codecvt<char32_t, char8_t, mbstate_t>,
2680 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2681 codecvt_byname<char32_t, char8_t, mbstate_t>.
2682 * src/c++11/limits.cc: Define members of
2683 numeric_limits<char8_t>.
2684 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2685 locale_init.cc and localename.cc.
2686 * src/c++98/Makefile.in: Likewise.
2687 * src/c++98/locale_init.cc: Add initialization for the
2688 codecvt<char16_t, char8_t, mbstate_t> and
2689 codecvt<char32_t, char8_t, mbstate_t> facets.
2690 * src/c++98/localename.cc: Likewise.
2691 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2693 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2695 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2696 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2697 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2699 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
2701 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2702 * doc/html/*: Regenerate.
2704 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2705 * doc/html/*: Regenerate.
2707 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2708 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2709 allocator type in is_constructible checks.
2710 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2711 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2712 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2713 problematic type from LWG 2586 discussion.
2714 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2715 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2717 * configure.ac: Check for C11 timespec_get function.
2718 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2720 * config.h.in: Regenerate.
2721 * configure: Regenerate.
2722 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2723 std for C++17 and up.
2725 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2726 * include/bits/stl_queue.h
2727 (priority_queue(const Compare&, const Container&, const Alloc&))
2728 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2730 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2732 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2733 * include/bits/stl_queue.h (queue, priority_queue): Add static
2734 assertions to enforce LWG 2566 requirement on value_type.
2735 * include/bits/stl_stack.h (stack): Likewise.
2738 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2740 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2741 * include/bits/std_abs.h: Add comment about LWG 2735.
2742 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2744 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
2747 * include/std/version [__cpp_impl_destroying_delete]
2748 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2749 * libsupc++/new [__cpp_impl_destroying_delete]
2750 (__cpp_lib_destroying_delete): Likewise.
2751 (destroying_delete_t, destroying_delete): Likewise, but define even
2752 when __cpp_impl_destroying_delete is not defined.
2753 * testsuite/18_support/destroying_delete.cc: New test.
2755 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
2758 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2759 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2760 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2761 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2763 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
2766 * include/bits/fs_path.h (path::has_root_name)
2767 (path::has_root_directory, path::has_root_path)
2768 (path::has_relative_path, path::has_parent_path)
2769 (path::has_filename, path::has_stem, path::has_extension)
2770 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2772 * src/c++17/fs_path.cc (path::has_root_name)
2773 (path::has_root_directory, path::has_root_path)
2774 (path::has_relative_path, path::has_parent_path)
2775 (path::has_filename, path::_M_find_extension): Add noexcept.
2777 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
2779 PR libstdc++/89102 (partial)
2780 * include/std/type_traits (common_type<>): Define.
2781 (common_type<T>): Derive from common_type<T, T>.
2782 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2783 Test zero-length template argument list.
2784 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2785 Test additional single argument cases.
2786 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2787 Adjust expected error.
2789 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
2792 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2794 * include/bits/stl_stack.h (stack): Likewise.
2795 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2796 * testsuite/23_containers/queue/deduction.cc: New test.
2797 * testsuite/23_containers/stack/deduction.cc: New test.
2800 * include/std/type_traits (__is_convertible_helper)
2801 (__is_convertible_helper<_From, _To, false>): Revert changes to
2802 support is_nothrow_convertible.
2803 (__is_nt_convertible_helper): New helper.
2804 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2806 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2807 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2810 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2811 __is_alloc_insertable_impl. Replace single type member with two
2812 members, one for each of copy and move insertable.
2813 (__is_move_insertable): New trait for internal use.
2814 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2815 (vector::_S_nothrow_relocate(true_type)): New functions to
2816 conditionally check if __relocate_a can throw.
2817 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2818 on __is_move_insertable.
2819 (vector::_S_do_relocate): New overloaded functions to conditionally
2821 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2822 based on _S_use_relocate.
2823 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2824 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2825 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2828 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2829 parameter unnamed. Add message to static assertion.
2830 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2831 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2834 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
2837 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2839 (__is_bitwise_relocatable): ... to this.
2840 (__relocate_a_1): Adapt.
2841 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2842 (__is_bitwise_relocatable): ... to this.
2844 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
2847 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2848 final component as well as from _M_pathname. Append the dot using
2849 operator+= instead of only to _M_pathname.
2850 (path::_M_find_extension): Reformat slightly.
2851 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2852 Add more test cases.
2854 2019-01-30 Ulrich Drepper <drepper@redhat.com>
2856 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2858 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
2860 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2861 constexpr specifiers from arg and proj.
2863 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2864 __shared_ptr instantiations used by gcc4-compatible ABI.
2866 * include/experimental/forward_list (experimental::erase): Qualify
2868 * include/experimental/list (experimental::erase): Likewise.
2869 * include/std/forward_list (std::erase): Likewise.
2870 * include/std/list (std::erase): Likewise.
2872 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2874 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2875 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2876 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2877 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2878 * testsuite/ext/array_allocator/26875.cc: Likewise.
2879 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2880 * testsuite/util/replacement_memory_operators.h: Likewise.
2881 * testsuite/util/testsuite_allocator.h: Likewise.
2883 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
2884 normal mode vector, even for debug mode.
2885 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
2886 Define alias template for normal mode vector.
2888 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
2891 * config/locale/generic/c_locale.h (__convert_from_v)
2892 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2893 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2894 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
2895 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2897 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
2900 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
2901 data member with static member function _S_use_relocate().
2902 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2903 (vector::_M_default_append): Use _S_use_relocate() instead of
2906 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
2909 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
2912 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
2913 write to stderr instead of using printf.
2915 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2918 * include/bits/char_traits.h (__constant_string_p,
2919 __constant_char_array_p): Use __builtin_is_constant_evaluated if
2922 2019-01-20 Ulrich Drepper <drepper@redhat.com>
2924 Implement C++20 P0600r1.
2925 * include/backward/hash_map: Add nodiscard attribute to empty.
2926 * include/backward/hash_set: Likewise.
2927 * backward/hashtable.h: Likewise.
2928 * include/bits/basic_string.h: Likewise.
2929 * include/bits/forward_list.h: Likewise.
2930 * include/bits/hashtable.h: Likewise.
2931 * include/bits/regex.h: Likewise.
2932 * include/bits/stl_deque.h: Likewise.
2933 * include/bits/stl_list.h: Likewise.
2934 * include/bits/stl_map.h: Likewise.
2935 * include/bits/stl_multimap.h: Likewise.
2936 * include/bits/stl_multiset.h: Likewise.
2937 * include/bits/stl_queue.h: Likewise.
2938 * include/bits/stl_set.h: Likewise.
2939 * include/bits/stl_stack.h: Likewise.
2940 * include/bits/stl_tree.h: Likewise.
2941 * include/bits/stl_vector.h: Likewise.
2942 * include/bits/unordered_map.h: Likewise.
2943 * include/bits/unordered_set.h: Likewise.
2944 * include/debug/array: Likewise.
2945 * include/experimental/any: Likewise.
2946 * include/experimental/bits/fs_path.h: Likewise.
2947 * include/experimental/internet: Likewise.
2948 * include/experimental/string_view: Likewise.
2949 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
2951 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
2953 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
2955 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
2957 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
2959 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
2961 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
2963 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
2965 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2966 info_fn_imps.hpp: Likewise.
2967 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2968 left_child_next_sibling_heap_.hpp: Likewise.
2969 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
2971 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
2973 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
2975 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
2977 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
2979 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
2981 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
2983 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
2984 * include/ext/pb_ds/trie_policy.hpp: Likewise.
2985 * include/ext/rope: Likewise.
2986 * include/ext/slist: Likewise.
2987 * include/ext/vstring.h: Likewise.
2988 * include/profile/array: Likewise.
2989 * include/std/array: Likewise.
2990 * include/tr1/array: Likewise.
2991 * include/tr1/hashtable.h: Likewise.
2992 * include/tr1/regex: Likewise.
2993 * include/tr2/dynamic_bitset: Likewise.
2994 * include/bits/alloc_traits.h: Add nodiscard attribute to
2996 * include/experimental/memory_resource: Likewise.
2997 * include/ext/alloc_traits.h: Likewise.
2998 * include/ext/array_allocator.h: Likewise.
2999 * include/ext/bitmap_allocator.h: Likewise.
3000 * include/ext/debug_allocator.h: Likewise.
3001 * include/ext/extptr_allocator.h: Likewise.
3002 * include/ext/mt_allocator.h: Likewise.
3003 * include/ext/new_allocator.h: Likewise.
3004 * include/ext/pool_allocator.h: Likewise.
3005 * include/ext/throw_allocator.h: Likewise.
3006 * include/std/scoped_allocator: Likewise.
3007 * libsupc++/eh_alloc.cc: Likewise.
3008 * include/std/future: Add nodiscard attribute to async.
3009 * libsupc++/new: Add nodiscard attribute to new.
3011 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3016 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3017 * include/bits/shared_ptr.h
3018 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3019 (allocate_shared): Change to use new tag type.
3020 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3021 Declare new member function.
3022 (_Sp_alloc_shared_tag): Define new type.
3023 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3024 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3025 _Sp_make_shared_tag::_S_eq to check type_info.
3026 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3027 Constrain to prevent being called with _Sp_alloc_shared_tag.
3028 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3029 Replace constructor with ...
3030 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3031 reference parameter so address of the new object can be returned to
3032 the caller. Obtain the allocator from the tag type.
3033 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3034 constructor with ...
3035 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3036 to the __shared_count constructor.
3037 (__allocate_shared): Change to use new tag type.
3038 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3040 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3042 * src/c++17/fs_ops.cc
3043 (equivalent(const path&, const path&, error_code&))
3044 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3045 compare files instead of relying on incomplete info returned by stat.
3048 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3049 if the path is already absolute.
3050 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3051 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3054 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3055 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3056 of filesystem::exists.
3057 (create_directories(const path&, error_code&)): Add assertions.
3058 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3059 Add workaround for bug in _wstat for paths with trailing slash.
3060 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3061 for expected behaviour on mingw.
3062 * testsuite/experimental/filesystem/operations/create_directories.cc:
3064 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3065 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3066 not test permissions on mingw targets.
3068 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3070 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3071 constructors and open members taking wide strings. Fix patterns for
3072 filesystem::path members to match wstring_view parameters. Add
3073 exports for shared_ptr members used by directory iterators.
3074 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3075 error code parameter if the file doesn't exist.
3076 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3078 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3079 values for mingw targets, where "/" is not an absolute path. Do not
3080 test symlinks on mingw targets.
3081 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3082 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3084 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3085 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3086 that each component of the path is created.
3087 * testsuite/experimental/filesystem/operations/create_directories.cc:
3089 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3090 permissions on mingw targets.
3091 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3092 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3093 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3094 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3096 * testsuite/experimental/filesystem/operations/permissions.cc:
3098 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3099 symlinks or permissions on mingw targets.
3100 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3101 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3102 symlinks on mingw targets.
3103 * testsuite/experimental/filesystem/operations/remove_all.cc:
3105 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3106 permissions on mingw targets.
3107 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3108 test symlinks on mingw targets.
3109 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3112 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3115 Warn about unused comparisons of shared_ptr/unique_ptr
3116 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3117 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3118 <, <=, >, >= for shared_ptr.
3119 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3121 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3123 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3124 as 201611L, because P0497R0 changes are supported.
3125 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3127 * include/bits/erase_if.h [__cplusplus > 201703L]
3128 (__cpp_lib_erase_if): Only define for C++2a.
3129 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3130 (__cpp_lib_null_iterators): Define.
3131 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3132 (__cpp_lib_null_iterators): Define.
3133 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3135 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3137 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3139 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3140 changes are supported.
3141 * include/std/optional (__cpp_lib_optional): Likewise.
3142 * include/std/variant (__cpp_lib_variant): Likewise.
3143 * include/std/version [!__STRICT_ANSI__]
3144 (__cpp_lib_uncaught_exceptions): Define as long integer.
3145 [__cplusplus >= 201703L] (__cpp_lib_any)
3146 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3147 (__cpp_lib_variant): Define for C++17.
3148 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3150 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3153 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3155 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3159 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3161 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3164 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3166 * doc/xml/manual/intro.xml: Include new section.
3167 * doc/xml/manual/status_cxx2017.xml: Document more
3168 implementation-defined properties of the library.
3169 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3170 * doc/html/*: Regenerate.
3172 * include/bits/refwrap.h [__cplusplus > 201703L]
3173 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3174 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3175 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3177 (reference_wrapper::operator()): Add static assertion.
3178 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3180 * include/std/chrono (duration_values::zero(), duration_values::min())
3181 (duration_values::max()): Add noexcept.
3182 (duration::zero(), duration::min(), duration::max()): Likewise.
3183 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3184 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3185 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3187 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3189 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3191 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3192 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3194 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3197 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3198 specialization for C++17 (P0513R0, LWG 2817).
3199 * testsuite/20_util/hash/nullptr.cc: New test.
3202 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3203 pattern for std::basic_stringbuf::str().
3205 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3206 basic_ostream::operator<< patterns.
3208 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3210 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3211 test failures on targets with 32-bit time_t.
3213 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3214 * include/std/deque: Likewise.
3215 * include/std/forward_list: Likewise.
3216 * include/std/list: Likewise.
3217 * include/std/string: Likewise.
3218 * include/std/vector: Likewise.
3219 * include/std/version: Likewise.
3220 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3221 * testsuite/23_containers/deque/erasure.cc: Likewise.
3222 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3223 * testsuite/23_containers/list/erasure.cc: Likewise.
3224 * testsuite/23_containers/map/erasure.cc: Likewise.
3225 * testsuite/23_containers/set/erasure.cc: Likewise.
3226 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3227 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3228 * testsuite/23_containers/vector/erasure.cc: Likewise.
3230 * include/experimental/internet [AI_NUMERICSERV]
3231 (resolver_base::numeric_service): Define conditionally.
3232 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3234 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3237 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3238 Jonathan Wakely <jwakely@redhat.com>
3241 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3242 (GLIBCXX_3.4.26): Add new exports.
3243 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3244 correct list of sources.
3245 * include/Makefile.in: Regenerate.
3246 * include/std/ostream (operator<<(nullptr_t)): New member function.
3247 * src/c++17/ostream-inst.cc: New file.
3248 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3251 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3253 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3254 of the source file containing the caller.
3255 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3256 directories created by test.
3257 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3259 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3261 * testsuite/experimental/filesystem/iterators/
3262 recursive_directory_iterator.cc: Likewise.
3264 2019-01-10 Jakub Jelinek <jakub@redhat.com>
3266 PR tree-optimization/88775
3267 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3268 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3269 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3270 instead of __builtin_constant_p if available. Don't bother with
3271 the pointer comparison in C++11 and earlier.
3273 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3277 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3280 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
3282 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3283 for filesystem::path. Give variables more distinctive names.
3285 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3286 member function to perform non-trivial assignment.
3287 (_Optional_payload_base::_M_move_assign): Likewise.
3288 (_Optional_payload<T, true, false, true>::operator=)
3289 (_Optional_payload<T, true, true, false>::operator=)
3290 (_Optional_payload<T, true, false, false>::operator=): Call
3291 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3294 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3295 test std::complex<long double> if long double format is IBM128.
3296 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3299 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3301 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3302 for old std::unique_ptr layout.
3303 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3304 to become valueless. Add filesystem::path tests.
3307 * include/std/optional (_Optional_payload_base): New class template
3308 for common code hoisted from _Optional_payload specializations. Use
3309 a template for the union, to allow a partial specialization for
3310 types with non-trivial destructors. Add constructors for in-place
3311 initialization to the union.
3312 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3313 to perform non-trivial copy construction, instead of relying on
3314 non-standard copy elision in a delegating constructor.
3315 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3316 non-trivial move construction.
3317 (_Optional_payload): Derive from _Optional_payload_base and use it
3318 for everything except the non-trivial assignment operators, which are
3320 (_Optional_payload<false, C, M>): Derive from the specialization
3321 _Optional_payload<true, false, false> and add a destructor.
3322 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3323 Forward to corresponding members of _Optional_payload.
3324 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3325 Hoist common members from _Optional_base.
3326 (_Optional_base): Make all members and base class public.
3327 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3328 _Optional_base_impl.
3329 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3330 support for new std::optional layout.
3331 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3334 * include/bits/locale_conv.h: Use <> for includes not "".
3335 * include/ext/random: Likewise.
3336 * include/ext/vstring.h: Likewise.
3338 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3340 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3341 (GLIBCXX_3.4.21): Likewise.
3343 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3346 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3347 to match the one that controls whether utimbuf and utime are declared.
3349 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
3352 * include/bits/char_traits.h (char_traits::move): Do not pass null
3353 pointers to memmove.
3354 * include/bits/locale_facets.h
3355 (ctype<char>::widen(const char*, const char*, char*)): Do not
3356 pass null pointers to memcpy.
3357 (ctype<char>::narrow(const char*, const char*, char, char*)):
3359 (ctype<char>::do_widen(const char*, const char*, char*)):
3361 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3364 * doc/xml/manual/spine.xml: Update copyright years.
3365 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3366 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3367 for C++17 filesystem library.
3368 * doc/html/*: Regenerate.
3370 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3371 * config.h.in: Regenerate.
3372 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3373 alphabetically and add missing entries for copy_symlink,
3374 hard_link_count, rename, and resize_file.
3375 * configure: Regenerate.
3376 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3377 used unconditionally.
3378 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3379 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3380 supports truncating to zero length.
3381 * testsuite/27_io/filesystem/operations/all.cc: New test.
3382 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3384 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
3387 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3388 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3389 * config.h.in: Regenerate.
3390 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3391 remaining std::filesystem types and functions.
3392 * configure: Regenerate.
3393 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3394 * src/c++17/Makefile.in: Regenerate.
3395 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3396 here, and change name of included file.
3397 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3398 here, and change name of included file.
3399 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3400 path to dir-common.h.
3401 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3402 path to ops-common.h. Disable -Wunused-parameter warnings.
3403 (internal_file_clock): Define unconditionally.
3404 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3406 (do_copy_file, do_space): Move definitions to ops.common.h.
3407 (copy, file_size, hard_link_count, last_write_time, space): Only
3408 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
3410 (last_write_time, read_symlink): Remove unused attributes from
3412 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
3413 * src/filesystem/Makefile.in: Regenerate.
3414 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
3415 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
3416 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
3417 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
3418 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
3419 dummy types and functions instead of using #error.
3420 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
3421 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
3423 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
3424 (do_copy_file, do_space): Move definitions here from std-ops.cc.
3425 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
3426 to account for new namespace.
3427 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
3428 -lstdc++fs from dg-options.
3429 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
3430 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
3431 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
3432 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
3433 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3435 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
3436 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3438 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
3439 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3440 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
3441 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3442 * testsuite/27_io/filesystem/operations/create_directories.cc:
3444 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
3445 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
3446 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
3447 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
3448 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3449 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
3450 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3451 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
3452 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
3453 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
3454 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
3455 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
3456 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3457 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3458 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
3459 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3460 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3461 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3463 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
3467 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
3468 typeinfo and vtables less greedy.
3469 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
3470 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
3471 * src/c++17/Makefile.in: Regenerate.
3472 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
3473 here, and change name of included file.
3474 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
3475 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
3477 * src/filesystem/Makefile.in: Regenerate.
3478 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
3479 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
3480 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
3481 from dg-options and remove dg-require-filesystem-ts.
3482 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
3483 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
3484 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
3485 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
3486 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3487 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3488 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3489 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
3490 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
3491 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
3492 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
3493 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
3494 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
3495 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
3496 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
3497 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
3498 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
3499 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
3500 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
3501 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
3502 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
3504 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
3505 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
3506 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
3507 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
3508 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
3509 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
3510 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
3511 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
3512 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
3513 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
3514 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
3515 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
3517 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
3519 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3521 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
3523 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
3524 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3525 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
3526 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
3527 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3528 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3529 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3530 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3531 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
3532 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3534 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3535 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3536 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3537 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
3538 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3541 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
3542 Check is_trivially_copyable instead of is_scalar.
3543 (variant::emplace<N, Args>(Args&&...)): If construction of the new
3544 contained value can throw and its type is trivially copyable then
3545 construct into a temporary variant and move from it, to provide the
3546 strong exception safety guarantee.
3547 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
3549 * testsuite/20_util/variant/87431.cc: New test.
3550 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
3551 conversion causes valueless state.
3554 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
3555 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
3556 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
3557 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
3558 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
3560 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
3562 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3563 (file_time_type): Redefine in terms of __file_clock.
3564 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3566 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3568 (internal_file_lock): New helper type for accessing __file_clock.
3569 (do_copy_file): Use internal_file_lock to convert system time to
3571 (last_write_time(const path&, error_code&)): Likewise.
3572 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3574 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
3576 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3577 for const member functions of std::basic_string.
3578 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3580 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3581 Make non-standard constructor private.
3582 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3584 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3585 explicit instantiations for C++17 as well as earlier dialects.
3586 * src/c++17/Makefile.am: Add new source files.
3587 * src/c++17/Makefile.in: Regenerate.
3588 * src/c++17/cow-string-inst.cc: New file defining explicit
3589 instantiations for basic_string member functions added in C++17.
3590 * src/c++17/string-inst.cc: Likewise.
3592 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3593 copy/move constructors for old std::basic_string.
3594 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3595 (basic_string::reference, basic_string::const_reference): Define
3596 as plain references for C++11 and later.
3597 (basic_string::basic_string()): Put constructor body outside
3598 preprocessor conditional groups.
3599 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3600 instead of copying it.
3601 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3603 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3605 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3606 cases for old basic_string.
3607 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3608 allocator-extended constructors unconditionally. Add extra members to
3609 allocator type when using old string ABI.
3610 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3612 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3614 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3615 -fno-inline added to test flags.
3617 * testsuite/21_strings/basic_string/requirements/
3618 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3620 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3621 assertion failures with old std::string ABI.
3623 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3625 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3626 functions that will only erase elements at the end.
3627 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3628 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3629 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3631 (path::_List::pop_back()): Define.
3632 (path::_List::_M_erase_from(const_iterator)): Define.
3633 (path::operator/=(const path&)): Use pop_back to remove last component
3634 and _M_erase_from to remove multiple components.
3635 (path::_M_append(basic_string_view<value_type>)): Likewise.
3636 (path::operator+=(const path&)): Likewise.
3637 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3638 (path::remove_filename()): Likewise.
3639 (path::lexically_normal()): Use _List::_Impl iterators instead of
3640 path::iterator. Use pop_back to remove components from the end. Clear
3641 trailing filename, instead of using erase(const_iterator) to remove
3642 a non-final component.
3643 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3645 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3647 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3648 incorrect treatment of empty filename after trailing slash.
3649 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3651 * testsuite/21_strings/basic_string/modifiers/assign/char/
3652 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3654 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3655 move_assign_optim.cc: Likewise.
3657 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3658 Jakub Jelinek <jakub@redhat.com>
3661 * include/experimental/memory: Replace UTF-8 quote characters.
3662 * include/std/future: Replace UTF-8 "em dash" characters.
3664 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3667 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3668 * include/debug/forward_list: Likewise.
3669 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3671 * include/experimental/chrono: Likewise.
3672 * include/experimental/functional: Likewise.
3673 * include/experimental/ratio: Likewise.
3674 * include/experimental/system_error: Likewise.
3675 * include/experimental/tuple: Likewise.
3676 * include/experimental/type_traits: Likewise.
3677 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3678 * include/parallel/multiseq_selection.h: Likewise.
3681 * config/abi/pre/gnu.ver: Add missing exports.
3682 * testsuite/22_locale/collate_byname/88681.cc: New test.
3683 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3684 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3686 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
3688 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3689 initializer_list<value_type> and from input iterator ranges.
3690 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3692 * testsuite/experimental/string_view/element_access/char/empty.cc:
3693 Fix year range in copyright header.
3695 2019-01-02 Joel Brobecker <brobecker@adacore.com>
3697 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3698 Fix year range in copyright header.
3700 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3702 Update copyright years.
3704 Copyright (C) 2019 Free Software Foundation, Inc.
3706 Copying and distribution of this file, with or without modification,
3707 are permitted in any medium without royalty provided the copyright
3708 notice and this notice are preserved.