1 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
3 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
4 * include/bits/basic_string.h: (operator=(const basic_string&):
5 Move allocator decision to assign.
6 (assign(const basic_string&)): Move allocator decision here.
7 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
9 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
12 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
14 * testsuite/util/testsuite_allocator.h (memory_resource)
15 (default_resource_mgr): Fix indentation.
17 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
18 Use operator-> to access raw pointer member.
19 * testsuite/23_containers/vector/59829.cc: Likewise.
20 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
21 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
22 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
24 (PointerBase, PointerBase_void): Derive from NullablePointer and use
25 its constructors and equality operators. Change converting
26 constructors to use operator-> to access private member of the other
28 (PointerBase_void::operator->()): Add, for access to private member.
29 (operator-(PointerBase, PointerBase)): Change to hidden friend.
30 (operator==(PointerBase, PointerBase)): Remove.
31 (operator!=(PointerBase, PointerBase)): Remove.
33 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
34 not assume field called _M_head_impl is the first tuple element.
35 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
36 implementation more accurate.
37 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
38 empty pointer type and non-empty deleter.
40 LWG 2899 - Make is_move_constructible correct for unique_ptr
41 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
42 move assignment operator.
43 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
44 (__uniq_ptr_data): New class template with conditionally deleted
46 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
47 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
48 constructor and move assignment operator as defaulted.
49 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
50 __uniq_ptr_impl::release().
51 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
52 to __uniq_ptr_impl::reset(pointer).
53 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
54 Check for new __uniq_ptr_data type.
55 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
57 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
59 PR libstdc++/90454.cc path construction from void*
60 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
61 pointers to void are rejected as well as void.
62 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
63 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
65 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
67 * doc/xml/manual/policy_data_structures.xml: Comment out stray
68 <remark> elements. Fix formatting of bibliography references.
70 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
72 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
74 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
76 Remove Profile Mode, deprecated since 7.1.0
77 * doc/Makefile.am: Remove XML file for profile mode docs.
78 * doc/Makefile.in: Regenerate.
79 * doc/xml/authors.xml: Remove authors of profile mode docs.
80 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
82 * doc/xml/manual/debug.xml: Likewise.
83 * doc/xml/manual/evolution.xml: Document removal of profile mode.
84 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
85 * doc/xml/manual/spine.xml: Remove profile mode author credit.
86 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
88 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
90 * doc/html/*: Regenerate.
91 * include/Makefile.am: Remove profile mode headers.
92 * include/Makefile.in: Regenerate.
93 * include/bits/c++config (std::__profile): Remove namespace.
94 [_GLIBCXX_PROFILE]: Remove checks for macro.
95 * include/profile/array: Remove.
96 * include/profile/base.h: Remove.
97 * include/profile/bitset: Remove.
98 * include/profile/deque: Remove.
99 * include/profile/forward_list: Remove.
100 * include/profile/impl/profiler.h: Remove.
101 * include/profile/impl/profiler_algos.h: Remove.
102 * include/profile/impl/profiler_container_size.h: Remove.
103 * include/profile/impl/profiler_hash_func.h: Remove.
104 * include/profile/impl/profiler_hashtable_size.h: Remove.
105 * include/profile/impl/profiler_list_to_slist.h: Remove.
106 * include/profile/impl/profiler_list_to_vector.h: Remove.
107 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
108 * include/profile/impl/profiler_node.h: Remove.
109 * include/profile/impl/profiler_state.h: Remove.
110 * include/profile/impl/profiler_trace.h: Remove.
111 * include/profile/impl/profiler_vector_size.h: Remove.
112 * include/profile/impl/profiler_vector_to_list.h: Remove.
113 * include/profile/iterator_tracker.h: Remove.
114 * include/profile/list: Remove.
115 * include/profile/map: Remove.
116 * include/profile/map.h: Remove.
117 * include/profile/multimap.h: Remove.
118 * include/profile/multiset.h: Remove.
119 * include/profile/ordered_base.h: Remove.
120 * include/profile/set: Remove.
121 * include/profile/set.h: Remove.
122 * include/profile/unordered_base.h: Remove.
123 * include/profile/unordered_map: Remove.
124 * include/profile/unordered_set: Remove.
125 * include/profile/vector: Remove.
126 * scripts/run_doxygen: Do not process profile mode headers.
127 * testsuite/23_containers/array/element_access/60497.cc: Don't use
129 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
130 Remove dg-skip-if for profile mode.
131 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
132 preprocessor check for profile mode.
133 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
134 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
136 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
138 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
139 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
140 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
141 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
142 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
144 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
146 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
148 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
150 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
151 preprocessor check for profile mode.
152 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
154 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
155 Remove dg-skip-if for profile mode.
156 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
157 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
158 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
159 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
160 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
161 * testsuite/Makefile.am: Remove profile_flags variable and
162 * testsuite/Makefile.am: Remove profile_flags variable and
163 check-profile target.
164 * testsuite/Makefile.in: Regenerate.
165 * testsuite/ext/profile/all.cc: Remove.
166 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
167 * testsuite/ext/profile/profiler_algos.cc: Remove.
168 * testsuite/ext/profile/replace_new.cc: Remove.
169 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
170 preprocessor check for profile mode.
171 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
172 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
173 (check_v3_target_normal_mode): Do not check for profile mode macro.
174 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
176 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
177 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
178 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
179 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
180 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
181 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
182 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
183 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
184 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
185 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
187 Remove array_allocator extension, deprecated since 4.9.0
188 * doc/xml/manual/allocator.xml: Remove documentation for
190 * doc/xml/manual/evolution.xml: Document array_allocator removal.
191 * doc/xml/manual/using.xml: Remove header from documentation.
192 * include/Makefile.am: Remove <ext/array_allocator.h> header.
193 * include/Makefile.in: Regenerate.
194 * include/ext/array_allocator.h: Remove.
195 * include/precompiled/extc++.h: Do not include removed header.
196 * testsuite/ext/array_allocator/1.cc: Remove.
197 * testsuite/ext/array_allocator/2.cc: Remove.
198 * testsuite/ext/array_allocator/26875.cc: Remove.
199 * testsuite/ext/array_allocator/3.cc: Remove.
200 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
201 * testsuite/ext/array_allocator/check_delete.cc: Remove.
202 * testsuite/ext/array_allocator/check_new.cc: Remove.
203 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
204 * testsuite/ext/headers.cc: Do not include removed header.
206 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
208 * include/bits/stl_bvector.h
209 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
211 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
213 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
215 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
217 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
219 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
221 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
223 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
225 (_Bit_iterator::operator-(difference_type)): Likewise.
226 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
227 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
229 (_Bit_const_iterator::operator-(difference_type)): Likewise.
230 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
232 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
235 * testsuite/util/thread/all.h: Do not use remove_pointer for
236 std::thread::native_handle_type.
239 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
240 (_Variant_storage<true, Types...>::_M_reset()))
241 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
242 (__get_storage): Likewise.
243 (variant): Add noexcept to friend declarations for __get and
247 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
248 Use _Require for constraints.
249 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
251 (__uniq_ptr_hash): New base class with conditionally-disabled call
253 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
254 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
255 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
257 * include/bits/shared_ptr.h: Improve docs.
258 * include/bits/shared_ptr_base.h: Likewise.
259 * include/bits/stl_uninitialized.h: Likewise.
260 * include/bits/unique_ptr.h: Likewise.
261 * libsupc++/new: Likewise.
263 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
265 * include/bits/stl_deque.h
266 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
268 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
270 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
272 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
274 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
276 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
278 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
280 (_Deque_iterator<>::operator-(difference_type)): Likewise.
282 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
285 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
286 (test01): Reserve for number of insertions to avoid rehash during test.
287 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
289 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
294 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
296 * include/experimental/bits/fs_path.h: Improve docs.
297 * include/experimental/bits/net.h: Fix wrong header name in comment.
298 Do not document implementation details.
299 * include/experimental/netfwd: Fix doxygen grouping.
301 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
303 * include/bits/stl_pair.h: Improve docs.
304 * include/std/tuple: Likewise.
306 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
308 * include/std/chrono: Improve docs.
309 * include/std/ratio: Do not document implementation details.
310 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
312 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
315 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
316 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
317 (__duration_common_type): New helper.
318 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
319 __duration_common_type.
320 (__timepoint_common_type_wrapper): Replace with ...
321 (__timepoint_common_type): New helper.
322 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
323 Use __time_point_common_type.
324 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
325 (__common_type_impl): If either argument is transformed by decay,
326 use the common_type of the decayed types.
327 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
328 decayed, use __do_common_type_impl to get the common_type.
329 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
330 (__do_member_type_wrapper, __member_type_wrapper)
331 (__expanded_common_type_wrapper): Remove.
332 (__common_type_pack, __common_type_fold): New helpers.
333 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
334 __member_type_wrapper and __expanded_common_type_wrapper.
335 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
336 Test zero-length template argument list.
337 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
338 Test single argument cases and argument types that should decay.
339 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
340 Adjust expected error.
341 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
343 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
344 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
345 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
347 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
349 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
351 Make allocator propagation more consistent for
352 operator+(basic_string) (P1165R1)
353 * include/bits/basic_string.h
354 (operator+(basic_string&&, basic_string&&): Changed resulting
355 allocator to always be the one from the first parameter.
356 * include/bits/basic_string.tcc
357 (operator+(const _CharT*, const basic_string&)): Changed
358 resulting allocator to be SOCCC on the second parameter's allocator.
359 (operator+(_CharT, const basic_string&)): Likewise.
360 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
362 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
365 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
367 * include/bits/regex.h: Improve docs.
368 * include/bits/regex.tcc: Do not document implementation details.
370 * testsuite/19_diagnostics/error_code/hash.cc: New test.
372 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
374 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
375 Add type printer for container types in std::__debug namespace.
376 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
377 (gdb-tests): Use distinct parameters for the type of test and use of
379 (gdb-test): Check for regex test even if 'whatis' test.
380 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
382 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
383 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
384 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
385 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
386 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
387 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
388 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
390 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
392 * include/std/system_error (error_category): Fix comment.
395 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
396 argument is an empty path.
397 (absolute(const path&, error_code&)): Use invalid_argument as error
398 code instead of no_such_file_or_directory.
399 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
400 of non-existent paths and empty paths with both overloads of absolute.
402 * include/std/system_error (error_category, error_code)
403 (error_condition): Improve docs.
404 * libsupc++/exception: Add missing @addtogroup Doxygen command.
405 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
406 to class documentation. Suppress documentation for implementation
408 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
409 Suppress documentation for implementation details.
411 * include/std/system_error (error_code): Remove friend declaration
412 for hash<error_code>.
413 (hash<error_code>::operator()): Use public member functions to access
415 (hash<error_condition>::operator()): Use address of category, not
416 its object representation.
417 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
418 Use public member functions to access value and category.
419 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
421 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
423 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
424 * include/bits/hashtable_policy.h
425 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
426 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
427 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
428 smaller than input value rather than always greater. Preserve
429 _M_next_resize if called with 0 input. Use __builtin_floorl.
430 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
431 elements + number of insertions is greater than _M_next_resize. Start
432 with 11 buckets if not told otherwise. Use __builtin_floorl.
433 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
434 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
435 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
436 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
437 told otherwise. Use __builtin_floorl.
438 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
439 to also validate _Power2_rehash_policy.
440 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
443 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
446 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
450 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
451 overflow warning with -Wpedantic -Wsystem-headers.
453 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
456 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
457 * include/bits/move.h (swap): Remove extra parentheses.
459 * include/experimental/bits/lfts_config.h: Improve doc markup.
460 * include/experimental/optional: Improve docs.
461 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
462 (__constexpr_addressof): Remove.
463 (optional::operator->()): Use std::__addressof().
464 * include/std/optional (optional::operator->()): Adjust whitespace.
465 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
466 that operator-> is still constexpr with overloaded operator&. Change
467 to compile-only test.
468 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
471 * include/bits/shared_ptr.h: Improve docs.
472 * include/bits/shared_ptr_atomic.h: Likewise.
473 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
475 * include/bits/basic_string.h: Fix iterator/index confusion in
477 * include/bits/range_access.h: Fix Doxygen warnings.
478 * include/bits/refwrap.h: Do not document implementation details.
479 (ref, cref): Group docs with reference_wrapper.
480 * include/std/fstream: Fix Doxygen markup.
481 * libsupc++/initializer_list (begin, end): Group docs with
484 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
486 * include/bits/unique_lock.h: Fix/improve doxygen markup.
487 * include/std/mutex: Likewise.
488 * include/std/shared_mutex: Likewise.
490 * include/bits/fs_dir.h: Fix/improve doxygen markup.
491 * include/bits/fs_fwd.h: Likewise.
492 * include/bits/fs_ops.h: Likewise.
493 * include/bits/fs_path.h: Likewise.
494 * include/std/filesystem: Likewise.
496 * include/experimental/bits/net.h: Fix/improve doxygen markup.
497 * include/experimental/buffer: Likewise.
498 * include/experimental/executor: Likewise.
499 * include/experimental/internet: Likewise.
500 * include/experimental/io_context: Likewise.
501 * include/experimental/net: Likewise.
502 * include/experimental/netfwd: Likewise.
503 * include/experimental/socket: Likewise.
504 * include/experimental/timer: Likewise.
506 * doc/doxygen/doxygroups.cc: Move description of experimental group
508 * include/experimental/algorithm: Add to libfund-ts doc group.
509 * include/experimental/any: Likewise. Do not document implementation
511 * include/experimental/array: Add to libfund-ts doc group.
512 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
513 for Library Fundamentals.
514 * include/experimental/chrono: Add to libfund-ts doc group.
515 * include/experimental/deque: Likewise.
516 * include/experimental/forward_list: Likewise.
517 * include/experimental/functional: Likewise.
518 * include/experimental/iterator: Likewise.
519 * include/experimental/list: Likewise.
520 * include/experimental/map: Likewise.
521 * include/experimental/memory: Likewise.
522 * include/experimental/memory_resource: Likewise. Improve docs.
524 * include/experimental/numeric: Add to libfund-ts doc group.
525 * include/experimental/optional: Likewise.
526 * include/experimental/propagate_const: Likewise.
527 * include/experimental/random: Likewise.
528 * include/experimental/ratio: Likewise.
529 * include/experimental/regex: Likewise.
530 * include/experimental/set: Likewise.
531 * include/experimental/source_location: Likewise.
532 * include/experimental/string: Likewise.
533 * include/experimental/string_view: Likewise.
534 * include/experimental/system_error: Likewise.
535 * include/experimental/tuple: Likewise.
536 * include/experimental/type_traits: Likewise.
537 * include/experimental/unordered_map: Likewise.
538 * include/experimental/unordered_set: Likewise.
539 * include/experimental/utility: Likewise.
540 * include/experimental/vector: Likewise.
541 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
542 * testsuite/experimental/array/neg.cc: Adjust dg-error.
543 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
545 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
546 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
547 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
548 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
549 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
551 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
552 * include/experimental/bits/fs_fwd.h: Improve docs.
553 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
554 * include/experimental/bits/fs_path.h: Likewise.
555 (path, filesystem_error, u8path): Improve docs.
556 * include/experimental/filesystem: Link to docs for TS.
558 * config/allocator/new_allocator_base.h (__allocator_base): Add
559 workaround for Doxygen bug #6945.
560 * include/std/memory: Improve docs. Define group for pointer safety.
561 * include/std/scoped_allocator: Improve docs. Use "undocumented"
562 conditional to suppress documentation for implementation details.
564 * include/bits/specfun.h: Improve docs.
565 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
568 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
569 (std::experimental): Add docs.
570 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
571 namespace to nothing when generating docs.
572 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
573 * include/std/chrono (std::chrono): Likewise.
574 * include/std/functional (std::placeholders): Likewise.
575 * include/std/thread (std::this_thread): Likewise.
577 * include/parallel/settings.h: Fix Doxygen markup.
579 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
580 anything unless PB_DS_CLASS_C_DEC is defined.
581 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
582 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
583 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
584 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
585 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
586 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
587 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
589 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
590 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
591 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
592 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
593 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
594 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
595 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
596 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
597 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
598 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
599 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
601 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
602 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
604 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
607 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
608 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
609 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
612 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
614 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
615 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
616 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
617 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
618 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
619 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
621 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
622 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
625 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
628 * include/std/complex (__complex_proj): Return parameter unchanged.
629 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
630 floating-point types to take std::complex arguments.
631 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
632 floating-point types.
633 * testsuite/26_numerics/complex/proj.cc: New test.
635 2019-04-30 Jakub Jelinek <jakub@redhat.com>
637 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
638 to _Lock_policyE[012].
639 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
641 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
643 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
644 macros accidentally left in.
645 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
646 unnecessary -lstdc++fs option. Fix test for mingw.
647 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
650 2019-04-30 Jakub Jelinek <jakub@redhat.com>
652 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
654 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
656 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
658 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
659 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
662 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
664 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
667 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
668 class template and partial specialization.
671 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
673 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
674 functions to convert a value to an integral type.
675 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
676 (fill_n): Convert _Size parameter to an integral type.
677 * testsuite/25_algorithms/fill_n/87982.cc: New test.
678 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
679 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
680 * testsuite/25_algorithms/generate_n/87982.cc: New test.
681 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
682 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
684 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
686 Adding noexcept-specification on tuple constructors (LWG 2899)
687 * libstdc++-v3/include/std/tuple:
688 (tuple()): Add noexcept-specification.
689 (tuple(const _Elements&...)): Likewise
690 (tuple(_UElements&&...)): Likewise
691 (tuple(const tuple<_UElements...>&)): Likewise
692 (tuple(tuple<_UElements...>&&)): Likewise
693 (tuple(const _T1&, const _T2&)): Likewise
694 (tuple(_U1&&, _U2&&)): Likewise
695 (tuple(const tuple<_U1, _U2>&): Likewise
696 (tuple(tuple<_U1, _U2>&&): Likewise
697 (tuple(const pair<_U1, _U2>&): Likewise
698 (tuple(pair<_U1, _U2>&&): Likewise
699 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
701 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
704 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
705 arguments with __restrict.
707 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
709 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
711 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
713 * include/experimental/bits/fs_path.h
714 (path::_S_convert_loc<_InputIterator>): Create const std::string to
715 avoid redundant call to _S_convert_loc with non-const pointers.
717 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
718 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
719 * testsuite/21_strings/basic_string/hash/hash.cc
720 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
721 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
722 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
724 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
725 wstring::_M_replace_dispatch with more specific patterns.
726 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
727 Create const std::string to avoid redundant call to _S_convert_loc
728 with non-const pointers.
729 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
730 avoid unnecessary basic_string::assign instantiations.
732 * include/std/memory (__uses_alloc_args): Add string-literal to
733 static_assert, to match the one in __uses_alloc.
734 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
735 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
736 for recursive uses-allocator construction of nested pairs.
737 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
740 2019-04-26 Jakub Jelinek <jakub@redhat.com>
742 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
743 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
744 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
745 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
747 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
748 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
749 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
750 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
751 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
752 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
753 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
755 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
758 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
759 * include/std/scoped_allocator [__cplusplus > 201703L]
760 (scoped_allocator_adaptor::construct): Define in terms of
761 uses_allocator_construction_args, as per P0591R4.
762 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
763 * testsuite/util/testsuite_allocator.h: Remove name of unused
766 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
768 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
769 * doc/html/*: Regenerate.
771 * include/bits/fs_path.h (operator<, operator<=, operator>)
772 (operator>=, operator==, operator!=): Make hidden friends, as per
774 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
776 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
778 * include/std/any (any::any(ValueType&&)): Use __and_v.
779 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
782 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
784 * include/std/type_traits (__result_of_memfun): Use remove_reference
785 instead of __remove_cvref_t and remove redundant is_same check.
786 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
788 * include/experimental/string_view (basic_string_view::pointer)
789 (basic_string_view::reference): Fix to refer to non-const value_type.
790 * include/bits/basic_string.h (basic_string): Use __sv_check and
791 __sv_limit instead of basic_string_view::_M_check and
792 basic_string_view::_M_limit.
793 * include/std/string_view (__sv_check, __sv_limit): New
794 helper functions to replace basic_string_view::_M_check and
795 basic_string_view::_M_limit.
796 (basic_string_view): Add static assertions to enforce ill-formed
797 requirement for traits_type::char_type from P1148R0, and to enforce
798 required properties of char-like types.
799 (basic_string_view::pointer, basic_string_view::reference): Fix to
800 refer to non-const value_type.
801 (basic_string_view::operator[], basic_string_view::at)
802 (basic_string_view::front, basic_string_view::back)
803 (basic_string_view::data): Use const_reference and const_pointer
804 typedefs for return types.
805 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
806 (hash<wstring_view>): Fix argument_type typedef.
807 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
808 char/1.cc: Fix expected return type of basic_string_view::data().
809 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
810 wchar_t/1.cc: Likewise.
811 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
813 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
814 wchar_t/1.cc: Likewise.
815 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
817 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
818 Check reference and pointer typedefs.
819 * testsuite/experimental/string_view/requirements/typedefs.cc:
821 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
822 Fix expected return type of basic_string_view::data().
823 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
825 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
827 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
831 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
832 Avoid a runtime check for types that can never be stored in std::any.
833 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
836 PR libstdc++/90220 (partial)
837 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
838 not attempt ill-formed static_cast to pointers to non-object types.
839 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
842 * testsuite/20_util/variant/run.cc: Catch exception by reference to
843 prevent -Wcatch-value warning.
845 * include/std/variant (__variant_construct): Use template parameter
846 type instead of equivalent decltype-specifier.
847 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
848 Replace forward with move.
849 (_Move_ctor_base<false, Types...>::_M_destructive_move)
850 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
851 (_Move_ctor_base<true, Types...>::_M_destructive_move)
852 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
853 index after construction succeeds.
854 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
855 if-constexpr checks that are always true. Use __remove_cvref_t instead
856 of remove_reference so that is_nothrow_move_constructible check
857 doesn't use a const rvalue parameter. In the potentially-throwing case
858 construct a temporary and move assign it, as per LWG 2904.
859 (_Move_assign_base<false, Types...>::operator=): Remove redundant
860 if-constexpr checks that are always true. Use emplace as per LWG 2904.
861 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
862 construct a temporary and move assign from it, as per LWG 2904.
863 * testsuite/20_util/variant/exception_safety.cc: Check that
864 assignment operators have strong exception safety guarantee.
866 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
868 Document PSTL linker flags
870 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
872 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
874 * include/std/variant (__detail::__variant::_Traits): Make
875 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
876 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
878 (__detail::__variant::_Copy_assign_alias): Only depend on
879 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
880 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
881 move assignment operators.
884 * include/std/variant (variant::__not_self): New helper for the
885 is_same_v<remove_cvref_t<T>, variant>==false constraints.
886 (variant::__to_type_impl): Remove.
887 (variant::__to_type): Add default argument to check pack size, instead
888 of using __to_type_impl.
889 (variant::__accepted_type): Add default argument using __not_self.
890 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
891 for variant(T&&) constructor constraint.
892 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
893 Extract __accepted_type into a named template parameter for reuse in
894 other constraints and in the exception specification.
895 (variant::variant(in_place_type_t<T>, Args&&...))
896 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
897 (variant::variant(in_place_index_t<T>, Args&&...))
898 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
899 (variant::operator=T&&)): Remove redundant && from trait arguments.
900 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
901 isn't used for in_place_type or in_place_index arguments.
903 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
904 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
905 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
907 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
908 Bernd Edlinger <bernd.edlinger@hotmail.de>
909 Jakub Jelinek <jakub@redhat.com>
912 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
913 general-regs-only target attribute for ARM.
915 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
918 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
919 specialization also depend on is_nothrow_move_constructible.
920 * include/std/variant (__detail::__variant::__never_valueless()):
921 Only true if the variant would have a move assignment operator.
922 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
923 Check __never_valueless<T...>().
924 (variant::emplace): Only perform non-throwing move assignments
925 for never-valueless alternatives if the variant has a move assignment
927 * testsuite/20_util/variant/compile.cc: Check that never-valueless
928 types can be emplaced into non-assignable variants.
929 * testsuite/20_util/variant/run.cc: Check that never-valueless types
930 don't get copied when emplaced into non-assignable variants.
932 * include/std/variant (__detail::__variant::__ref_cast): Remove
934 (__detail::__variant::_Uninitialized::_M_get)
935 (__detail::__variant::__get)
936 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
938 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
940 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
942 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
943 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
944 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
945 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
947 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
949 Delegate PSTL configuration to pstl/pstl_config.h
951 * include/bits/c++config: Remove explicit PSTL configuration
952 macros and use definitions from <pstl/pstl_config.h>.
954 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
956 Cleanup algorithm implementations
957 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
959 (mismatch): Forward execution policy.
960 (equal): Qualify call to std::equal().
961 (partial_sort): Forward execution policy.
962 (inplace_merge): Forward execution policy.
964 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
966 Improve implementation of parallel equal()
967 * include/pstl/algorithm_impl.h
968 (__internal::__brick_equal): use "4 iterator" version of
970 (__internal::__brick_equal): use simd for random access
971 iterators on unsequenced execution policies.
972 (__internal::__pattern_equal): add "4 iterator" version
973 (__internal::__pattern_equal): dispatch to simd __brick_equal
974 for vector-only execution policies.
975 (__internal::__pattern_equal): dispatch to __parallel_or for
976 parallel execution policies.
977 * include/pstl/glue_algorithm_impl.h
978 (std::equal): dispatch to "4 iterator" version of
979 __internal::__pattern_equal().
981 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
984 * include/bits/forward_list.h (operator==): Do not use operator!= to
986 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
987 earlier in the list, so that sort is stable.
988 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
989 * testsuite/23_containers/forward_list/comparable.cc: Test with
990 types that meet the minimum EqualityComparable and LessThanComparable
991 requirements. Remove irrelevant comment.
993 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
994 Do not depend on whether all alternative types are move constructible.
995 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
996 from the operand when deciding whether to perform the assignment.
997 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
998 with deleted move constructor and deleted move assignment operator.
999 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1000 behaviour of variants with DeletedMoves as an alternative.
1001 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1002 (move_ctor, move_assign): Check that moving a variant with a
1003 DeletedMoves alternative falls back to copying instead of moving.
1005 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1006 from static_assert declarations.
1008 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1009 actually match its name.
1010 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1011 (test_swap()): Fix result for MoveCtorOnly and check
1012 MoveCtorAndSwapOnly.
1014 * include/std/optional (optional::value_or(U&&) &&): Add missing
1015 constexpr specifier.
1016 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1017 for disengaged optionals and rvalue optionals.
1018 * testsuite/20_util/optional/observers/4.cc: Likewise.
1020 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
1022 * include/pstl/algorithm_impl.h: Uglify identfiers.
1023 * include/pstl/numeric_impl.h: Uglify identfiers.
1024 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1026 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
1028 * include/bits/c++config:
1029 Add definition for __PSTL_ASSERT.
1030 Add definition for __PSTL_ASSERT_MSG.
1031 * include/pstl/algorithm_impl.h: Replace use of assert().
1032 * include/pstl/numeric_impl.h: Replace use of assert().
1033 * include/pstl/parallel_backend_tbb.h:
1034 Replace use of assert().
1035 Replace use of __TBB_ASSERT().
1036 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1038 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
1041 * src/c++17/memory_resource.cc
1042 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1043 needed to allow placing a _Chunk at the end of the buffer.
1044 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1046 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
1048 * doc/xml/faq.xml: Add information about emergency EH pool.
1049 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1050 Move outdated information on mt_allocator to a separate section.
1051 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1052 doesn't affect the default allocator.
1054 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1058 * testsuite/20_util/variant/89851.cc: New test.
1060 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
1062 * include/std/variant: Adjust whitespace. Add comments.
1063 (_Multi_array): Leave primary template undefined.
1064 (_Multi_array<_Tp>): Define partial specialization for base case of
1066 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1067 which is always a reference.
1068 (__gen_vtable::_S_apply()): Remove function, inline body into
1069 default member initializer.
1070 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1072 * include/std/variant (__variant_idx_cookie): Add member type.
1073 (__visitor_result_type): Remove.
1074 (__do_visit): Use invoke_result instead of __visitor_result_type.
1075 * testsuite/20_util/variant/visit.cc: New test.
1078 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1080 * testsuite/20_util/variant/90008.cc: New test.
1082 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
1084 * include/pstl/algorithm_impl.h: Add namespace qualification.
1085 * include/pstl/execution_defs.h: Add namespace qualification.
1086 * include/pstl/execution_impl.h: Add namespace qualification.
1087 * include/pstl/numeric_impl.h: Add namespace qualification.
1088 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1089 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1090 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1092 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1094 Fix visit<R> for variant.
1095 * include/std/variant (__do_visit): Add a template parameter
1096 for enforcing same return types for visit.
1097 (__gen_vtable_impl): Likewise.
1098 (_S_apply_single_alt): Adjust.
1099 (__visit_invoke_impl): New. Handle casting to void.
1100 (__do_visit_invoke): New. Enforces same return types.
1101 (__do_visit_invoke_r): New. Converts return types.
1102 (__visit_invoke): Adjust.
1103 (__gen_vtable): Add a template parameter for enforcing
1104 same return types for visit.
1105 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1106 different return types.
1107 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1108 visitors with different return types don't accidentally
1109 compile with regular visitation.
1111 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1113 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1114 dg-require-filesystem-ts.
1116 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
1118 * doc/xml/manual/status_cxx2020.xml: Update status.
1119 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1120 * testsuite/20_util/variant/visit_r.cc: New test.
1122 * include/bits/fs_dir.h (directory_iterator::operator*)
1123 (directory_iterator::operator->): Add noexcept.
1124 (operator==, operator!=): Replace namespace-scope equality operators
1125 for directory iterators with hidden friends.
1128 * config/abi/pre/gnu.ver: Add missing exports.
1129 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1132 * config/abi/pre/gnu.ver: Export new symbols.
1133 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1134 (recursive_directory_iterator::recursion_pending())
1135 (recursive_directory_iterator::disable_recursion_pending()): Remove
1136 inline definitions. Make noexcept.
1137 (recursive_directory_iterator::depth())
1138 (recursive_directory_iterator::operator*())
1139 (recursive_directory_iterator::operator->()): Make noexcept.
1140 (recursive_directory_iterator::_M_options)
1141 (recursive_directory_iterator::_M_pending): Remove data members.
1142 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1143 (recursive_directory_iterator::recursive_directory_iterator): Remove
1144 ctor-initializer. Use new constructor for _Dir_stack.
1145 (recursive_directory_iterator::options())
1146 (recursive_directory_iterator::recursion_pending())
1147 (recursive_directory_iterator::disable_recursion_pending()): Add
1148 non-inline definitions.
1149 (recursive_directory_iterator::depth()): Make noexcept.
1150 (recursive_directory_iterator::increment(error_code&))
1151 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1152 location of options and recursion_pending members.
1153 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1154 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1155 user-declared move constructor and assignment operator, to make the
1158 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1159 d_type == DT_UNKNOWN immediately.
1160 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1162 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1164 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1166 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1167 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1170 PR libstdc++/87431 (again)
1171 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1172 Define partial specialization for basic_string.
1173 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1174 shared_ptr and weak_ptr.
1175 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1177 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1179 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1181 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1183 * include/std/any (_Never_valueless_alt): Define explicit
1184 specialization for any.
1185 * include/std/variant (_Never_valueless_alt): Define primary template.
1186 (__never_valueless): Use _Never_valueless_alt instead of
1187 is_trivially_copyable.
1188 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1189 initializations to avoid try-catch overhead. Add special case for
1190 scalars produced by potentially-throwing conversions. Use
1191 _Never_valueless_alt instead of is_trivially_copyable for the
1192 remaining strong exception-safety cases.
1193 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1194 * testsuite/20_util/variant/87431.cc: Run both test functions.
1195 * testsuite/20_util/variant/exception_safety.cc: New test.
1196 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1197 so the variant becomes valueless.
1199 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
1202 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1204 (variant::emplace<_Tp>): Return result of emplace<N> directly.
1206 * include/std/string (__hash_string_base): New class template defining
1207 operator() for hashing strings.
1208 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1209 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1210 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1211 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1213 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1215 Use single-visitation in variant assignment and swap and relops.
1216 Also use indices instead of types when checking whether
1217 variants hold the same thing.
1218 * include/std/variant (__do_visit): Add a template parameter
1219 for index visitation, invoke with indices if index visitation
1221 (__variant_idx_cookie): New.
1222 (__visit_with_index): Likewise.
1223 (_Copy_assign_base::operator=): Do single-visitation with
1225 (_Move_assign_base::operator=): Likewise.
1226 (_Extra_visit_slot_needed): Adjust.
1227 (__visit_invoke): Call with indices if it's an index visitor.
1228 (relops): Do single-visitation with an index visitor.
1230 (__visitor_result_type): New.
1232 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1234 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1236 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1238 Don't revisit a variant we are already visiting.
1239 * include/std/variant (__variant_construct_single): New.
1240 (__variant_construct): Use it.
1241 (_M_destructive_move): Likewise.
1242 (_M_destructive_copy): Likewise.
1243 (_Copy_assign_base::operator=): Adjust.
1244 (_Move_assign_base::operator=): Likewise.
1247 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
1250 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1251 destructor so they are not evaluated until the _Key type is complete.
1252 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1253 * testsuite/23_containers/set/85965.cc: New test.
1254 * testsuite/23_containers/unordered_set/85965.cc: New test.
1255 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1256 with regexp matching the corresponding _Rb_tree specialization.
1257 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1258 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1259 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1260 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1261 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1262 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1263 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1265 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1268 Fix based on a suggestion by Antony Polukhin.
1269 * include/std/variant (__never_valueless): New.
1271 (_Extra_visit_slot_needed): New.
1272 (_Multi_array): Use it.
1273 (_S_apply_all_alts): Likewise.
1275 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1278 Fix based on a suggestion by Antony Polukhin.
1279 * include/std/variant (__gen_vtable): Don't reserve an
1280 additional table slot, _Multi_array already does that.
1282 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1285 Fix based on a suggestion by Antony Polukhin.
1286 * include/std/variant (__variant_construct): Capture a pointer
1287 to the storage and visit just one variant.
1289 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
1291 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1292 Doxygen-generated pages with unstable URL.
1293 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1294 * doc/xml/manual/extensions.xml: Likewise.
1295 * doc/xml/manual/parallel_mode.xml: Likewise.
1296 * doc/xml/manual/support.xml: Likewise.
1298 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1299 avoid -Wconversion warnings.
1301 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
1303 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1304 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
1305 (allstamped): Add stamp-pstl.
1306 (install-headers): Add ptsl_builddir.
1307 * include/Makefile.in: Regenerate.
1308 * include/bits/c++config: Add pstl configuration.
1309 * include/pstl/LICENSE.txt: New file.
1310 * include/pstl/algorithm_fwd.h: New file.
1311 * include/pstl/algorithm_impl.h: New file.
1312 * include/pstl/execution_defs.h: New file.
1313 * include/pstl/execution_impl.h: New file.
1314 * include/pstl/glue_algorithm_defs.h: New file.
1315 * include/pstl/glue_algorithm_impl.h: New file.
1316 * include/pstl/glue_execution_defs.h: New file.
1317 * include/pstl/glue_memory_defs.h: New file.
1318 * include/pstl/glue_memory_impl.h: New file.
1319 * include/pstl/glue_numeric_defs.h: New file.
1320 * include/pstl/glue_numeric_impl.h: New file.
1321 * include/pstl/memory_impl.h: New file.
1322 * include/pstl/numeric_fwd.h: New file.
1323 * include/pstl/numeric_impl.h: New file.
1324 * include/pstl/parallel_backend.h: New file.
1325 * include/pstl/parallel_backend_tbb.h: New file.
1326 * include/pstl/parallel_backend_utils.h: New file.
1327 * include/pstl/parallel_impl.h: New file.
1328 * include/pstl/pstl_config.h: New file.
1329 * include/pstl/unseq_backend_simd.h: New file.
1330 * include/pstl/utils.h: New file.
1331 * include/std/algorithm: Include parallel algorithm implementations.
1332 * include/std/execution: New file.
1333 * include/std/memory: Include parallel algorithm implementations.
1334 * include/std/numeric: Include parallel algorithm implementations.
1335 * include/std/version: Add parallel algorithms feature test macro.
1336 * testsuite/util/pstl/pstl_test_config.h: New file.
1337 * testsuite/util/pstl/test_utils.h: New file.
1338 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1339 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1340 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1341 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1342 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1343 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1344 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1345 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1346 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1347 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1348 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1349 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1350 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1351 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1352 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1353 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1354 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1355 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1356 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1357 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1358 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1359 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1360 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1361 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1362 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1363 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1364 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1365 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1366 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1367 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1368 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1369 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1370 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1371 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1372 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1373 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1374 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1375 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1376 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1377 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1378 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1379 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1380 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1381 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1382 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1383 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1384 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1385 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1386 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1387 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1388 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1389 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1390 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1391 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1392 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1393 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1394 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1395 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1396 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1397 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1398 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1399 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1400 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1401 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1402 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1403 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1404 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1405 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1406 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1407 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1408 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1409 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1410 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1411 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1412 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1413 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1414 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1415 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1416 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1417 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1418 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1419 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1420 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1421 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1422 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1423 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1424 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1425 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1426 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1427 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1428 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1429 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1430 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1431 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1432 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1433 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1434 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1435 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1436 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1437 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1438 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1439 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1440 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1441 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1442 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1443 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1445 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
1447 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
1448 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
1449 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
1450 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
1451 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
1452 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
1453 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
1454 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
1455 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
1456 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
1457 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
1458 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
1459 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
1460 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
1461 when the special functions IS is enabled, not for C++17.
1462 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
1464 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
1465 without checks for special functions in C++17.
1466 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
1470 * include/backward/hash_map: Use <> for includes not "".
1471 * include/backward/hash_set: Likewise.
1472 * include/backward/strstream: Likewise.
1473 * include/tr1/bessel_function.tcc: Likewise.
1474 * include/tr1/exp_integral.tcc: Likewise.
1475 * include/tr1/legendre_function.tcc: Likewise.
1476 * include/tr1/modified_bessel_func.tcc: Likewise.
1477 * include/tr1/riemann_zeta.tcc: Likewise.
1479 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
1481 * doc/xml/manual/allocator.xml: Link to table documenting evolution
1482 of extension allocators.
1483 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
1484 Document new headers in 7.2, 8.1 and 9.1 releases.
1485 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
1486 * doc/html/*: Regenerate.
1488 2019-03-12 John David Anglin <dave.anglin@bell.net>
1491 * testsuite/lib/libstdc++.exp: Locate libatomic.
1492 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
1493 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
1495 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1496 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
1497 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
1498 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1500 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
1503 * configure.ac: Check for sockatmark.
1504 * crossconfig.m4: Check for sockatmark.
1505 * config.h.in: Regenerate.
1506 * configure: Regenerate.
1507 * include/experimental/internet (address_v4::_S_hton): Rename
1508 overloaded functions to _S_hton_16 and _S_ntoh_16.
1509 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
1510 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
1511 * include/experimental/socket (basic_socket::at_mark): Check
1512 _GLIBCXX_HAVE_SOCKATMARK.
1514 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
1515 const variables instead of macros.
1518 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
1519 Use correct type for len_aligned.
1520 * testsuite/20_util/hash/89629.cc: New test.
1522 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1525 * include/std/atomic (atomic<T>::store, atomic<T>::load,
1526 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
1527 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
1528 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
1529 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
1530 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
1531 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
1532 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
1533 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
1534 memory_order_seq_cst to int.
1536 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
1538 * doc/xml/manual/using.xml: Use link element instead of xref.
1539 * doc/html/*: Regenerate.
1541 * include/bits/fs_path.h (path::format): Add fixed underlying type.
1543 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
1546 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
1547 parameters in deduction guides.
1548 * include/debug/multimap.h (multimap): Likewise.
1549 * include/debug/set.h (multimap): Likewise.
1550 * include/debug/multiset.h (multimap): Likewise.
1551 * include/debug/unordered_map (unordered_map): Likewise.
1552 (unordered_multimap): Likewise.
1553 * include/debug/unordered_set (unordered_set): Likewise.
1554 (unordered_multiset): Likewise.
1557 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
1558 Invalidate all iterators in case of rehash.
1559 (unordered_multimap<>::_M_check_rehashed): Likewise.
1560 * include/debug/unordered_set
1561 (unordered_set<>::_M_check_rehashed): Likewise.
1562 (unordered_multiset<>::_M_check_rehashed): Likewise.
1563 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
1565 2019-03-07 Andreas Schwab <schwab@suse.de>
1567 * config/abi/post/riscv64-linux-gnu: New directory.
1568 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
1570 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
1572 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
1573 compile test to run. Fix typo.
1575 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1576 * doc/html/*: Regenerate.
1578 P0356R5 Simplified partial function application
1579 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
1580 helpers for bind_front.
1581 (bind_front, __cpp_lib_bind_front): Define.
1582 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
1584 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1586 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
1587 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
1588 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
1589 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1591 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1593 PR libstdc++/86655 - std::assoc_legendre should not constrain
1594 the value of m (or x).
1595 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
1596 __sph_legendre): If degree > order Don't throw, return 0.
1597 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
1598 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
1599 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
1600 * testsuite/tr1/5_numerical_facilities/special_functions/
1601 02_assoc_legendre/pr86655.cc: New test.
1602 * testsuite/tr1/5_numerical_facilities/special_functions/
1603 22_sph_legendre/pr86655.cc: New test.
1605 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1608 Also PR libstdc++/85517
1609 * include/std/variant (__do_visit): New.
1610 (__variant_cast): Likewise.
1611 (__variant_cookie): Likewise.
1612 (__erased_*): Remove.
1613 (_Variant_storage::_S_vtable): Likewise.
1614 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
1615 (_Variant_storage::__M_reset): Adjust.
1616 (__variant_construct): New.
1617 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
1618 __variant_construct.
1619 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1620 (_Move_ctor_base::__M_destructive_copy): New.
1621 (_Move_ctor_base::__M_destructive_move): Adjust to use
1622 __variant_construct.
1623 (_Copy_assign_base::operator=): Adjust to use __do_visit.
1624 (_Copy_assign_alias): Adjust to check both copy assignment
1625 and copy construction for triviality.
1626 (_Move_assign_base::operator=): Adjust to use __do_visit.
1627 (_Multi_array): Add support for visitors that accept and return
1629 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
1630 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
1631 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
1632 a __variant_cookie temporary for a variant that is valueless and..
1633 (__gen_vtable_impl::__visit_invoke): ..adjust here.
1634 (__gen_vtable::_Array_type): Conditionally make space for
1635 the __variant_cookie visitor case.
1636 (__variant_construct_by_index): New.
1637 (get_if): Adjust to use std::addressof.
1638 (relops): Adjust to use __do_visit.
1639 (variant): Add __variant_cast and __variant_construct_by_index
1641 (variant::emplace): Use _M_reset() and __variant_construct_by_index
1642 instead of self-destruction.
1643 (variant::swap): Adjust to use __do_visit.
1644 (visit): Reimplement in terms of __do_visit.
1645 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
1646 * testsuite/20_util/variant/compile.cc: Adjust.
1647 * testsuite/20_util/variant/run.cc: Likewise.
1649 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1651 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
1653 * testsuite/experimental/feat-char8_t.cc: Likewise.
1655 * include/std/type_traits [C++20] (is_bounded_array)
1656 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
1658 * testsuite/20_util/is_bounded_array/requirements/
1659 explicit_instantiation.cc: New test.
1660 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
1662 * testsuite/20_util/is_bounded_array/value.cc: New test.
1663 * testsuite/20_util/is_unbounded_array/requirements/
1664 explicit_instantiation.cc: New test.
1665 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
1667 * testsuite/20_util/is_unbounded_array/value.cc: New test.
1669 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
1671 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
1673 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
1675 * include/c_compatibility/math.h [C++20] (lerp): Add using
1677 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
1678 (__lerp): Define function template to implement lerp.
1679 (lerp(float, float, float), lerp(double, double, double))
1680 (lerp(long double, long double, long double)): Define for C++20.
1681 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
1682 (midpoint(T, T), midpoint(T*, T*)): Define.
1683 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
1684 * testsuite/26_numerics/lerp.cc: New test.
1685 * testsuite/26_numerics/midpoint/floating.cc: New test.
1686 * testsuite/26_numerics/midpoint/integral.cc: New test.
1687 * testsuite/26_numerics/midpoint/pointer.cc: New test.
1689 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
1691 PR libstdc++/88996 Implement P0439R0
1692 Make std::memory_order a scoped enumeration.
1693 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
1694 add variables for the old enumerators. Adjust calls.
1695 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
1696 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
1698 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
1700 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
1703 * include/std/memory_resource (polymorphic_allocator): Add default
1704 template argument for C++20.
1705 (polymorphic_allocator::allocate_bytes)
1706 (polymorphic_allocator::deallocate_bytes)
1707 (polymorphic_allocator::allocate_object)
1708 (polymorphic_allocator::deallocate_object)
1709 (polymorphic_allocator::new_object)
1710 (polymorphic_allocator::delete_object): New member functions for
1712 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
1715 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
1718 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
1721 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
1723 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
1724 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
1726 * include/std/memory (uses_allocator_construction_args): New set of
1727 overloaded functions.
1728 (make_obj_using_allocator, uninitialized_construct_using_allocator):
1730 * include/std/memory_resource (polymorphic_allocator::construct)
1731 [__cplusplus > 201703l]: Replace all overloads with a single function
1732 using uses_allocator_construction_args.
1733 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
1735 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
1737 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
1740 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
1741 stylesheet directories before check for xsltproc. Try to use
1742 xmlcatalog to find local stylesheet directory before trying hardcoded
1743 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
1744 check to look for the same stylesheet as doc/Makefile.am uses. Don't
1745 use xsltproc if xmlcatalog fails to find a local stylesheet.
1746 * configure.ac: Check for xmlcatalog.
1747 * Makefile.in: Regenerate.
1748 * configure: Likewise.
1749 * doc/Makefile.in: Likewise.
1750 * include/Makefile.in: Likewise.
1751 * libsupc++/Makefile.in: Likewise.
1752 * po/Makefile.in: Likewise.
1753 * python/Makefile.in: Likewise.
1754 * src/Makefile.in: Likewise.
1755 * src/c++11/Makefile.in: Likewise.
1756 * src/c++17/Makefile.in: Likewise.
1757 * src/c++98/Makefile.in: Likewise.
1758 * src/filesystem/Makefile.in: Likewise.
1759 * testsuite/Makefile.in: Likewise.
1761 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
1764 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
1765 container deduction guides.
1766 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
1767 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
1768 parameters in deduction guides.
1769 * include/bits/stl_multimap.h (multimap): Likewise.
1770 * include/bits/stl_multiset.h (multiset): Likewise.
1771 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
1772 * include/bits/stl_set.h (set): Likewise.
1773 * include/bits/stl_stack.h (stack): Likewise.
1774 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
1775 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
1776 constrain parameters in deduction guides.
1777 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
1779 * testsuite/23_containers/map/cons/deduction.cc: Test additional
1781 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
1782 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
1783 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
1784 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
1786 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
1788 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
1791 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
1792 to class template and partial specialization using void_t.
1793 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1795 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
1798 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
1799 copy and move members public.
1801 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
1803 * include/std/type_traits (__underlying_type_impl): New helper to
1804 make underlying_type SFINAE-friendly.
1805 (underlying_type): Derive from __underlying_type_impl.
1806 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
1810 * include/bits/char_traits.h (__constant_char_array): Check index is
1811 in range before dereferencing.
1812 (char_traits<char>::compare, char_traits<char>::find)
1813 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
1814 immediately if n is zero.
1815 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
1816 Remove workarounds for PR 67026.
1817 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
1819 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
1822 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1824 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
1825 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
1827 2019-02-22 Jakub Jelinek <jakub@redhat.com>
1830 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
1831 type to std::size_t and argument to type to long double.
1833 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1835 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
1836 * config/abi/post/sparc64-linux-gnu: New directory.
1837 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
1838 * config/abi/post/sparc64-linux-gnu/32: New directory.
1839 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
1841 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
1843 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
1844 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
1847 2019-02-22 Tom Honermann <tom@honermann.net>
1849 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
1850 printers for u8string and u8string_view.
1852 2019-02-22 Tom Honermann <tom@honermann.net>
1854 * testsuite/18_support/byte/ops.cc: Validate
1855 std::to_integer<char8_t>, std::to_integer<char16_t>, and
1856 std::to_integer<char32_t>.
1857 * testsuite/18_support/numeric_limits/dr559.cc: Validate
1858 std::numeric_limits<char8_t>.
1859 * testsuite/18_support/numeric_limits/lowest.cc: Validate
1860 std::numeric_limits<char8_t>::lowest().
1861 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
1862 std::numeric_limits<char8_t>::max_digits10.
1863 * testsuite/18_support/type_info/fundamental.cc: Validate
1864 typeinfo for char8_t.
1865 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
1866 std::from_chars with char8_t.
1867 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
1868 Validate explicit instantiation of std::hash<char8_t>.
1869 * testsuite/20_util/is_integral/value.cc: Validate
1870 std::is_integral<char8_t>.
1871 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
1872 Validate std::make_signed<char8_t>.
1873 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
1874 Validate u8string construction from char8_t sources.
1875 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
1877 * testsuite/21_strings/basic_string_view/operations/compare/
1878 char/70483.cc: Validate substr operations on u8string_view.
1879 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
1880 the u8string_view typedef is defined.
1881 * testsuite/21_strings/char_traits/requirements/
1882 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
1884 * testsuite/21_strings/char_traits/requirements/
1885 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
1886 constexpr member functions.
1887 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
1888 that the u8string typedef is defined.
1889 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
1890 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
1891 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
1892 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
1894 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1895 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
1897 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1898 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
1899 Validate std::atomic<char8_t>::is_always_lock_free
1900 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
1901 Update line numbers.
1902 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
1904 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
1906 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1907 Validate std::experimental::pmr::u8string.
1908 * testsuite/experimental/string_view/typedefs.cc: Validate that the
1909 u8string_view typedef is defined.
1910 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
1911 char32_t to the typelists.
1913 2019-02-22 Tom Honermann <tom@honermann.net>
1915 * include/ext/typelist.h: Constrain a partial specialization of
1916 typelist::detail::append_ to only match chain<T1,T2>.
1918 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
1921 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
1922 class template with class. Replace move and copy member types with
1923 member alias templates, so they are only instantiated when needed.
1924 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1925 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
1926 test for C++11/14/17 as well.
1927 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
1930 2019-02-20 Jakub Jelinek <jakub@redhat.com>
1933 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
1934 _GLIBCXX_PURE to the alias declaration.
1936 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
1938 * testsuite/21_strings/basic_string/literals/types.cc
1939 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
1940 * testsuite/21_strings/basic_string/literals/values.cc
1941 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1942 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
1943 potentially having different type.
1944 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
1945 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
1947 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
1948 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
1949 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
1950 string literals only using basic character set.
1951 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
1952 u8 literals to char.
1953 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
1954 Test ATOMIC_CHAR8_T_LOCK_FREE.
1955 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
1956 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
1957 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
1958 * testsuite/experimental/string_view/literals/types.cc
1959 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
1961 * testsuite/experimental/string_view/literals/values.cc
1962 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1964 2019-02-19 Tom Honermann <tom@honermann.net>
1966 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
1967 from char16_32_t.cc; validates numeric_limits<char8_t>.
1968 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
1969 test cloned from types.cc; validates operator""s for char8_t
1971 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
1972 test cloned from values.cc; validates construction and comparison
1974 * testsuite/21_strings/basic_string/requirements/
1975 /explicit_instantiation/char8_t/1.cc: New test cloned from
1976 char16_t/1.cc; validates explicit instantiation of
1977 basic_string<char8_t>.
1978 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1979 New test cloned from types.cc; validates operator""sv for char8_t
1980 returns u8string_view.
1981 * testsuite/21_strings/basic_string_view/literals/
1982 values-char8_t.cc: New test cloned from values.cc; validates
1983 construction and comparison of u8string_view values.
1984 * testsuite/21_strings/basic_string_view/requirements/
1985 explicit_instantiation/char8_t/1.cc: New test cloned from
1986 char16_t/1.cc; validates explicit instantiation of
1987 basic_string_view<char8_t>.
1988 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
1989 New test cloned from char16_t/65049.cc; validates that
1990 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
1991 * testsuite/21_strings/char_traits/requirements/char8_t/
1992 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
1993 that char_traits<char8_t> member typedefs are present and correct.
1994 * testsuite/21_strings/char_traits/requirements/
1995 explicit_instantiation/char8_t/1.cc: New test cloned from
1996 char16_t/1.cc; validates explicit instantiation of
1997 char_traits<char8_t>.
1998 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
1999 from char16_t.cc: validates
2000 codecvt<char16_t, char8_t, mbstate_t>.
2001 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2002 from char32_t.cc: validates
2003 codecvt<char32_t, char8_t, mbstate_t>.
2004 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2005 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2006 codecvt<char32_t, char8_t, std::mbstate_t>.
2007 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2008 test cloned from string.cc; validates filesystem::path construction
2010 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2011 the __cpp_lib_char8_t feature test macro is defined with the
2013 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2014 New test cloned from string.cc; validates filesystem::path
2015 construction from char8_t input.
2016 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2017 test cloned from types.cc; validates operator""sv for char8_t
2018 returns u8string_view.
2019 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2020 New test cloned from values.cc; validates construction and
2021 comparison of u8string_view values.
2022 * testsuite/experimental/string_view/requirements/
2023 explicit_instantiation/char8_t/1.cc: New test cloned from
2024 char16_t/1.cc; validates explicit instantiation of
2025 basic_string_view<char8_t>.
2026 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2027 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2030 2019-02-19 Tom Honermann <tom@honermann.net>
2032 P0482R5 char8_t: Standard library support
2033 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2034 typeinfo symbols for char8_t.
2035 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2036 (GLIBCXX_3.4.26): Add symbols for specializations of
2037 numeric_limits and codecvt that involve char8_t.
2038 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2039 * include/bits/atomic_base.h: Add atomic_char8_t.
2040 * include/bits/basic_string.h: Add std::hash<u8string> and
2041 operator""s(const char8_t*, size_t).
2042 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2044 * include/bits/char_traits.h: Add char_traits<char8_t>.
2045 * include/bits/codecvt.h: Add
2046 codecvt<char16_t, char8_t, mbstate_t>,
2047 codecvt<char32_t, char8_t, mbstate_t>,
2048 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2049 codecvt_byname<char32_t, char8_t, mbstate_t>.
2050 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2051 recognize char8_t as an integral type.
2052 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2054 (path::u8string): Return std::u8string when char8_t support is
2056 (path::generic_u8string): Likewise.
2057 (path::_S_convert): Handle conversion from char8_t input.
2058 (path::_S_str_convert): Likewise.
2059 * include/bits/functional_hash.h: Add hash<char8_t>.
2060 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2062 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2063 for new char8_t specializations.
2064 * include/bits/localefwd.h: Add missing declarations of
2065 codecvt<char16_t, char, mbstate_t> and
2066 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2067 codecvt<char16_t, char8_t, mbstate_t> and
2068 codecvt<char32_t, char8_t, mbstate_t>.
2069 * include/bits/postypes.h: Add u8streampos
2070 * include/bits/stringfwd.h: Add declarations of
2071 char_traits<char8_t> and u8string.
2072 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2073 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2075 (path::u8string): Return std::u8string when char8_t support is
2077 (path::generic_u8string): Likewise.
2078 (path::_S_convert): Handle conversion from char8_t input.
2079 (path::_S_str_convert): Likewise.
2080 * include/experimental/string: Add u8string.
2081 * include/experimental/string_view: Add u8string_view,
2082 hash<experimental::u8string_view>, and
2083 operator""sv(const char8_t*, size_t).
2084 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2085 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2086 as a character type.
2087 * include/std/limits: Add numeric_limits<char8_t>.
2088 * include/std/string_view: Add u8string_view,
2089 hash<experimental::u8string_view>, and
2090 operator""sv(const char8_t*, size_t).
2091 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2092 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2093 * libsupc++/atomic_lockfree_defines.h: Define
2094 ATOMIC_CHAR8_T_LOCK_FREE.
2095 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2096 codecvt.cc and limits.cc so that char8_t specializations of
2097 numeric_limits and codecvt and emitted.
2098 * src/c++11/Makefile.in: Likewise.
2099 * src/c++11/codecvt.cc: Define members of
2100 codecvt<char16_t, char8_t, mbstate_t>,
2101 codecvt<char32_t, char8_t, mbstate_t>,
2102 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2103 codecvt_byname<char32_t, char8_t, mbstate_t>.
2104 * src/c++11/limits.cc: Define members of
2105 numeric_limits<char8_t>.
2106 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2107 locale_init.cc and localename.cc.
2108 * src/c++98/Makefile.in: Likewise.
2109 * src/c++98/locale_init.cc: Add initialization for the
2110 codecvt<char16_t, char8_t, mbstate_t> and
2111 codecvt<char32_t, char8_t, mbstate_t> facets.
2112 * src/c++98/localename.cc: Likewise.
2113 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2115 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2117 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2118 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2119 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2121 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
2123 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2124 * doc/html/*: Regenerate.
2126 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2127 * doc/html/*: Regenerate.
2129 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2130 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2131 allocator type in is_constructible checks.
2132 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2133 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2134 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2135 problematic type from LWG 2586 discussion.
2136 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2137 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2139 * configure.ac: Check for C11 timespec_get function.
2140 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2142 * config.h.in: Regenerate.
2143 * configure: Regenerate.
2144 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2145 std for C++17 and up.
2147 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2148 * include/bits/stl_queue.h
2149 (priority_queue(const Compare&, const Container&, const Alloc&))
2150 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2152 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2154 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2155 * include/bits/stl_queue.h (queue, priority_queue): Add static
2156 assertions to enforce LWG 2566 requirement on value_type.
2157 * include/bits/stl_stack.h (stack): Likewise.
2160 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2162 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2163 * include/bits/std_abs.h: Add comment about LWG 2735.
2164 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2166 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
2169 * include/std/version [__cpp_impl_destroying_delete]
2170 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2171 * libsupc++/new [__cpp_impl_destroying_delete]
2172 (__cpp_lib_destroying_delete): Likewise.
2173 (destroying_delete_t, destroying_delete): Likewise, but define even
2174 when __cpp_impl_destroying_delete is not defined.
2175 * testsuite/18_support/destroying_delete.cc: New test.
2177 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
2180 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2181 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2182 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2183 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2185 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
2188 * include/bits/fs_path.h (path::has_root_name)
2189 (path::has_root_directory, path::has_root_path)
2190 (path::has_relative_path, path::has_parent_path)
2191 (path::has_filename, path::has_stem, path::has_extension)
2192 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2194 * src/c++17/fs_path.cc (path::has_root_name)
2195 (path::has_root_directory, path::has_root_path)
2196 (path::has_relative_path, path::has_parent_path)
2197 (path::has_filename, path::_M_find_extension): Add noexcept.
2199 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
2201 PR libstdc++/89102 (partial)
2202 * include/std/type_traits (common_type<>): Define.
2203 (common_type<T>): Derive from common_type<T, T>.
2204 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2205 Test zero-length template argument list.
2206 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2207 Test additional single argument cases.
2208 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2209 Adjust expected error.
2211 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
2214 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2216 * include/bits/stl_stack.h (stack): Likewise.
2217 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2218 * testsuite/23_containers/queue/deduction.cc: New test.
2219 * testsuite/23_containers/stack/deduction.cc: New test.
2222 * include/std/type_traits (__is_convertible_helper)
2223 (__is_convertible_helper<_From, _To, false>): Revert changes to
2224 support is_nothrow_convertible.
2225 (__is_nt_convertible_helper): New helper.
2226 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2228 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2229 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2232 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2233 __is_alloc_insertable_impl. Replace single type member with two
2234 members, one for each of copy and move insertable.
2235 (__is_move_insertable): New trait for internal use.
2236 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2237 (vector::_S_nothrow_relocate(true_type)): New functions to
2238 conditionally check if __relocate_a can throw.
2239 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2240 on __is_move_insertable.
2241 (vector::_S_do_relocate): New overloaded functions to conditionally
2243 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2244 based on _S_use_relocate.
2245 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2246 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2247 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2250 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2251 parameter unnamed. Add message to static assertion.
2252 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2253 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2256 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
2259 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2261 (__is_bitwise_relocatable): ... to this.
2262 (__relocate_a_1): Adapt.
2263 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2264 (__is_bitwise_relocatable): ... to this.
2266 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
2269 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2270 final component as well as from _M_pathname. Append the dot using
2271 operator+= instead of only to _M_pathname.
2272 (path::_M_find_extension): Reformat slightly.
2273 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2274 Add more test cases.
2276 2019-01-30 Ulrich Drepper <drepper@redhat.com>
2278 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2280 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
2282 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2283 constexpr specifiers from arg and proj.
2285 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2286 __shared_ptr instantiations used by gcc4-compatible ABI.
2288 * include/experimental/forward_list (experimental::erase): Qualify
2290 * include/experimental/list (experimental::erase): Likewise.
2291 * include/std/forward_list (std::erase): Likewise.
2292 * include/std/list (std::erase): Likewise.
2294 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2296 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2297 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2298 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2299 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2300 * testsuite/ext/array_allocator/26875.cc: Likewise.
2301 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2302 * testsuite/util/replacement_memory_operators.h: Likewise.
2303 * testsuite/util/testsuite_allocator.h: Likewise.
2305 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
2306 normal mode vector, even for debug mode.
2307 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
2308 Define alias template for normal mode vector.
2310 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
2313 * config/locale/generic/c_locale.h (__convert_from_v)
2314 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2315 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2316 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
2317 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2319 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
2322 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
2323 data member with static member function _S_use_relocate().
2324 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2325 (vector::_M_default_append): Use _S_use_relocate() instead of
2328 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
2331 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
2334 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
2335 write to stderr instead of using printf.
2337 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2340 * include/bits/char_traits.h (__constant_string_p,
2341 __constant_char_array_p): Use __builtin_is_constant_evaluated if
2344 2019-01-20 Ulrich Drepper <drepper@redhat.com>
2346 Implement C++20 P0600r1.
2347 * include/backward/hash_map: Add nodiscard attribute to empty.
2348 * include/backward/hash_set: Likewise.
2349 * backward/hashtable.h: Likewise.
2350 * include/bits/basic_string.h: Likewise.
2351 * include/bits/forward_list.h: Likewise.
2352 * include/bits/hashtable.h: Likewise.
2353 * include/bits/regex.h: Likewise.
2354 * include/bits/stl_deque.h: Likewise.
2355 * include/bits/stl_list.h: Likewise.
2356 * include/bits/stl_map.h: Likewise.
2357 * include/bits/stl_multimap.h: Likewise.
2358 * include/bits/stl_multiset.h: Likewise.
2359 * include/bits/stl_queue.h: Likewise.
2360 * include/bits/stl_set.h: Likewise.
2361 * include/bits/stl_stack.h: Likewise.
2362 * include/bits/stl_tree.h: Likewise.
2363 * include/bits/stl_vector.h: Likewise.
2364 * include/bits/unordered_map.h: Likewise.
2365 * include/bits/unordered_set.h: Likewise.
2366 * include/debug/array: Likewise.
2367 * include/experimental/any: Likewise.
2368 * include/experimental/bits/fs_path.h: Likewise.
2369 * include/experimental/internet: Likewise.
2370 * include/experimental/string_view: Likewise.
2371 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
2373 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
2375 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
2377 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
2379 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
2381 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
2383 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
2385 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
2387 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2388 info_fn_imps.hpp: Likewise.
2389 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2390 left_child_next_sibling_heap_.hpp: Likewise.
2391 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
2393 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
2395 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
2397 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
2399 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
2401 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
2403 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
2405 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
2406 * include/ext/pb_ds/trie_policy.hpp: Likewise.
2407 * include/ext/rope: Likewise.
2408 * include/ext/slist: Likewise.
2409 * include/ext/vstring.h: Likewise.
2410 * include/profile/array: Likewise.
2411 * include/std/array: Likewise.
2412 * include/tr1/array: Likewise.
2413 * include/tr1/hashtable.h: Likewise.
2414 * include/tr1/regex: Likewise.
2415 * include/tr2/dynamic_bitset: Likewise.
2416 * include/bits/alloc_traits.h: Add nodiscard attribute to
2418 * include/experimental/memory_resource: Likewise.
2419 * include/ext/alloc_traits.h: Likewise.
2420 * include/ext/array_allocator.h: Likewise.
2421 * include/ext/bitmap_allocator.h: Likewise.
2422 * include/ext/debug_allocator.h: Likewise.
2423 * include/ext/extptr_allocator.h: Likewise.
2424 * include/ext/mt_allocator.h: Likewise.
2425 * include/ext/new_allocator.h: Likewise.
2426 * include/ext/pool_allocator.h: Likewise.
2427 * include/ext/throw_allocator.h: Likewise.
2428 * include/std/scoped_allocator: Likewise.
2429 * libsupc++/eh_alloc.cc: Likewise.
2430 * include/std/future: Add nodiscard attribute to async.
2431 * libsupc++/new: Add nodiscard attribute to new.
2433 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
2438 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
2439 * include/bits/shared_ptr.h
2440 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
2441 (allocate_shared): Change to use new tag type.
2442 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
2443 Declare new member function.
2444 (_Sp_alloc_shared_tag): Define new type.
2445 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
2446 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
2447 _Sp_make_shared_tag::_S_eq to check type_info.
2448 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
2449 Constrain to prevent being called with _Sp_alloc_shared_tag.
2450 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
2451 Replace constructor with ...
2452 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
2453 reference parameter so address of the new object can be returned to
2454 the caller. Obtain the allocator from the tag type.
2455 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
2456 constructor with ...
2457 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
2458 to the __shared_count constructor.
2459 (__allocate_shared): Change to use new tag type.
2460 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
2462 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
2464 * src/c++17/fs_ops.cc
2465 (equivalent(const path&, const path&, error_code&))
2466 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
2467 compare files instead of relying on incomplete info returned by stat.
2470 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
2471 if the path is already absolute.
2472 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
2473 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
2476 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
2477 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
2478 of filesystem::exists.
2479 (create_directories(const path&, error_code&)): Add assertions.
2480 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2481 Add workaround for bug in _wstat for paths with trailing slash.
2482 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
2483 for expected behaviour on mingw.
2484 * testsuite/experimental/filesystem/operations/create_directories.cc:
2486 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
2487 "TMP" instead of "TMPDIR" and clean environment before each test. Do
2488 not test permissions on mingw targets.
2490 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
2492 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
2493 constructors and open members taking wide strings. Fix patterns for
2494 filesystem::path members to match wstring_view parameters. Add
2495 exports for shared_ptr members used by directory iterators.
2496 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
2497 error code parameter if the file doesn't exist.
2498 * src/filesystem/ops.cc (remove(const path&, error_code&)):
2500 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
2501 values for mingw targets, where "/" is not an absolute path. Do not
2502 test symlinks on mingw targets.
2503 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2504 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
2506 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2507 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
2508 that each component of the path is created.
2509 * testsuite/experimental/filesystem/operations/create_directories.cc:
2511 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
2512 permissions on mingw targets.
2513 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2514 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2515 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2516 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
2518 * testsuite/experimental/filesystem/operations/permissions.cc:
2520 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
2521 symlinks or permissions on mingw targets.
2522 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2523 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
2524 symlinks on mingw targets.
2525 * testsuite/experimental/filesystem/operations/remove_all.cc:
2527 * testsuite/27_io/filesystem/operations/status.cc: Do not test
2528 permissions on mingw targets.
2529 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
2530 test symlinks on mingw targets.
2531 * testsuite/experimental/filesystem/operations/space.cc: Fix test
2534 2019-02-14 Ulrich Drepper <drepper@redhat.com>
2537 Warn about unused comparisons of shared_ptr/unique_ptr
2538 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
2539 * include/bits/shared_ptr.h: Use it for operator ==, !=,
2540 <, <=, >, >= for shared_ptr.
2541 * include/bits/unique_ptr.h: Likewise for unique_ptr.
2543 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
2545 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
2546 as 201611L, because P0497R0 changes are supported.
2547 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
2549 * include/bits/erase_if.h [__cplusplus > 201703L]
2550 (__cpp_lib_erase_if): Only define for C++2a.
2551 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2552 (__cpp_lib_null_iterators): Define.
2553 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2554 (__cpp_lib_null_iterators): Define.
2555 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
2557 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
2559 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
2561 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
2562 changes are supported.
2563 * include/std/optional (__cpp_lib_optional): Likewise.
2564 * include/std/variant (__cpp_lib_variant): Likewise.
2565 * include/std/version [!__STRICT_ANSI__]
2566 (__cpp_lib_uncaught_exceptions): Define as long integer.
2567 [__cplusplus >= 201703L] (__cpp_lib_any)
2568 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
2569 (__cpp_lib_variant): Define for C++17.
2570 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
2572 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
2575 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
2577 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
2581 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
2583 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
2586 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2588 * doc/xml/manual/intro.xml: Include new section.
2589 * doc/xml/manual/status_cxx2017.xml: Document more
2590 implementation-defined properties of the library.
2591 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
2592 * doc/html/*: Regenerate.
2594 * include/bits/refwrap.h [__cplusplus > 201703L]
2595 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
2596 (_Reference_wrapper_base_memfun): Do not define for C++2a.
2597 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
2599 (reference_wrapper::operator()): Add static assertion.
2600 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
2602 * include/std/chrono (duration_values::zero(), duration_values::min())
2603 (duration_values::max()): Add noexcept.
2604 (duration::zero(), duration::min(), duration::max()): Likewise.
2605 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
2606 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
2607 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
2609 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
2611 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2613 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
2614 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
2616 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2619 * include/bits/functional_hash.h (hash<nullptr_t>): Define
2620 specialization for C++17 (P0513R0, LWG 2817).
2621 * testsuite/20_util/hash/nullptr.cc: New test.
2624 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
2625 pattern for std::basic_stringbuf::str().
2627 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
2628 basic_ostream::operator<< patterns.
2630 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2632 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
2633 test failures on targets with 32-bit time_t.
2635 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
2636 * include/std/deque: Likewise.
2637 * include/std/forward_list: Likewise.
2638 * include/std/list: Likewise.
2639 * include/std/string: Likewise.
2640 * include/std/vector: Likewise.
2641 * include/std/version: Likewise.
2642 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
2643 * testsuite/23_containers/deque/erasure.cc: Likewise.
2644 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2645 * testsuite/23_containers/list/erasure.cc: Likewise.
2646 * testsuite/23_containers/map/erasure.cc: Likewise.
2647 * testsuite/23_containers/set/erasure.cc: Likewise.
2648 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2649 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2650 * testsuite/23_containers/vector/erasure.cc: Likewise.
2652 * include/experimental/internet [AI_NUMERICSERV]
2653 (resolver_base::numeric_service): Define conditionally.
2654 * testsuite/experimental/net/internet/resolver/base.cc: Test it
2656 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2659 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2660 Jonathan Wakely <jwakely@redhat.com>
2663 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
2664 (GLIBCXX_3.4.26): Add new exports.
2665 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
2666 correct list of sources.
2667 * include/Makefile.in: Regenerate.
2668 * include/std/ostream (operator<<(nullptr_t)): New member function.
2669 * src/c++17/ostream-inst.cc: New file.
2670 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
2673 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2675 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
2676 of the source file containing the caller.
2677 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
2678 directories created by test.
2679 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2681 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2683 * testsuite/experimental/filesystem/iterators/
2684 recursive_directory_iterator.cc: Likewise.
2686 2019-01-10 Jakub Jelinek <jakub@redhat.com>
2688 PR tree-optimization/88775
2689 * include/bits/stl_function.h (greater<_Tp*>::operator(),
2690 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
2691 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
2692 instead of __builtin_constant_p if available. Don't bother with
2693 the pointer comparison in C++11 and earlier.
2695 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2699 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
2702 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
2704 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
2705 for filesystem::path. Give variables more distinctive names.
2707 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
2708 member function to perform non-trivial assignment.
2709 (_Optional_payload_base::_M_move_assign): Likewise.
2710 (_Optional_payload<T, true, false, true>::operator=)
2711 (_Optional_payload<T, true, true, false>::operator=)
2712 (_Optional_payload<T, true, false, false>::operator=): Call
2713 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
2716 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
2717 test std::complex<long double> if long double format is IBM128.
2718 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
2721 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2723 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
2724 for old std::unique_ptr layout.
2725 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
2726 to become valueless. Add filesystem::path tests.
2729 * include/std/optional (_Optional_payload_base): New class template
2730 for common code hoisted from _Optional_payload specializations. Use
2731 a template for the union, to allow a partial specialization for
2732 types with non-trivial destructors. Add constructors for in-place
2733 initialization to the union.
2734 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
2735 to perform non-trivial copy construction, instead of relying on
2736 non-standard copy elision in a delegating constructor.
2737 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
2738 non-trivial move construction.
2739 (_Optional_payload): Derive from _Optional_payload_base and use it
2740 for everything except the non-trivial assignment operators, which are
2742 (_Optional_payload<false, C, M>): Derive from the specialization
2743 _Optional_payload<true, false, false> and add a destructor.
2744 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
2745 Forward to corresponding members of _Optional_payload.
2746 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
2747 Hoist common members from _Optional_base.
2748 (_Optional_base): Make all members and base class public.
2749 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
2750 _Optional_base_impl.
2751 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
2752 support for new std::optional layout.
2753 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
2756 * include/bits/locale_conv.h: Use <> for includes not "".
2757 * include/ext/random: Likewise.
2758 * include/ext/vstring.h: Likewise.
2760 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2762 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
2763 (GLIBCXX_3.4.21): Likewise.
2765 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2768 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
2769 to match the one that controls whether utimbuf and utime are declared.
2771 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
2774 * include/bits/char_traits.h (char_traits::move): Do not pass null
2775 pointers to memmove.
2776 * include/bits/locale_facets.h
2777 (ctype<char>::widen(const char*, const char*, char*)): Do not
2778 pass null pointers to memcpy.
2779 (ctype<char>::narrow(const char*, const char*, char, char*)):
2781 (ctype<char>::do_widen(const char*, const char*, char*)):
2783 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
2786 * doc/xml/manual/spine.xml: Update copyright years.
2787 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
2788 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
2789 for C++17 filesystem library.
2790 * doc/html/*: Regenerate.
2792 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
2793 * config.h.in: Regenerate.
2794 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
2795 alphabetically and add missing entries for copy_symlink,
2796 hard_link_count, rename, and resize_file.
2797 * configure: Regenerate.
2798 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
2799 used unconditionally.
2800 * src/filesystem/ops-common.h (__gnu_posix::truncate)
2801 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
2802 supports truncating to zero length.
2803 * testsuite/27_io/filesystem/operations/all.cc: New test.
2804 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
2806 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
2809 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
2810 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
2811 * config.h.in: Regenerate.
2812 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
2813 remaining std::filesystem types and functions.
2814 * configure: Regenerate.
2815 * src/c++17/Makefile.am: Add C++17 filesystem sources.
2816 * src/c++17/Makefile.in: Regenerate.
2817 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
2818 here, and change name of included file.
2819 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
2820 here, and change name of included file.
2821 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
2822 path to dir-common.h.
2823 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
2824 path to ops-common.h. Disable -Wunused-parameter warnings.
2825 (internal_file_clock): Define unconditionally.
2826 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
2828 (do_copy_file, do_space): Move definitions to ops.common.h.
2829 (copy, file_size, hard_link_count, last_write_time, space): Only
2830 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
2832 (last_write_time, read_symlink): Remove unused attributes from
2834 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
2835 * src/filesystem/Makefile.in: Regenerate.
2836 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
2837 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
2838 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
2839 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
2840 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
2841 dummy types and functions instead of using #error.
2842 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
2843 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
2845 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
2846 (do_copy_file, do_space): Move definitions here from std-ops.cc.
2847 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
2848 to account for new namespace.
2849 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
2850 -lstdc++fs from dg-options.
2851 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
2852 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
2853 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
2854 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
2855 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
2857 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
2858 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2860 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
2861 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
2862 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
2863 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
2864 * testsuite/27_io/filesystem/operations/create_directories.cc:
2866 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
2867 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
2868 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
2869 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
2870 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
2871 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
2872 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2873 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
2874 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
2875 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
2876 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
2877 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
2878 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
2879 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
2880 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
2881 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2882 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2883 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
2885 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
2889 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
2890 typeinfo and vtables less greedy.
2891 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
2892 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
2893 * src/c++17/Makefile.in: Regenerate.
2894 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
2895 here, and change name of included file.
2896 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
2897 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
2899 * src/filesystem/Makefile.in: Regenerate.
2900 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
2901 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
2902 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
2903 from dg-options and remove dg-require-filesystem-ts.
2904 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
2905 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
2906 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
2907 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
2908 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
2909 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
2910 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
2911 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
2912 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
2913 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
2914 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
2915 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
2916 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
2917 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
2918 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
2919 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
2920 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
2921 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
2922 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
2923 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
2924 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
2926 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
2927 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
2928 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
2929 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
2930 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
2931 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
2932 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
2933 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
2934 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
2935 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
2936 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
2937 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
2939 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
2941 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2943 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
2945 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
2946 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2947 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
2948 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
2949 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2950 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2951 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2952 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2953 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
2954 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2956 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2957 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2958 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2959 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
2960 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2963 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
2964 Check is_trivially_copyable instead of is_scalar.
2965 (variant::emplace<N, Args>(Args&&...)): If construction of the new
2966 contained value can throw and its type is trivially copyable then
2967 construct into a temporary variant and move from it, to provide the
2968 strong exception safety guarantee.
2969 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
2971 * testsuite/20_util/variant/87431.cc: New test.
2972 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
2973 conversion causes valueless state.
2976 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
2977 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
2978 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
2979 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
2980 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
2982 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
2984 * include/bits/fs_fwd.h (__file_clock): Define new clock.
2985 (file_time_type): Redefine in terms of __file_clock.
2986 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
2988 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
2990 (internal_file_lock): New helper type for accessing __file_clock.
2991 (do_copy_file): Use internal_file_lock to convert system time to
2993 (last_write_time(const path&, error_code&)): Likewise.
2994 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
2996 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
2998 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
2999 for const member functions of std::basic_string.
3000 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3002 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3003 Make non-standard constructor private.
3004 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3006 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3007 explicit instantiations for C++17 as well as earlier dialects.
3008 * src/c++17/Makefile.am: Add new source files.
3009 * src/c++17/Makefile.in: Regenerate.
3010 * src/c++17/cow-string-inst.cc: New file defining explicit
3011 instantiations for basic_string member functions added in C++17.
3012 * src/c++17/string-inst.cc: Likewise.
3014 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3015 copy/move constructors for old std::basic_string.
3016 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3017 (basic_string::reference, basic_string::const_reference): Define
3018 as plain references for C++11 and later.
3019 (basic_string::basic_string()): Put constructor body outside
3020 preprocessor conditional groups.
3021 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3022 instead of copying it.
3023 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3025 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3027 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3028 cases for old basic_string.
3029 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3030 allocator-extended constructors unconditionally. Add extra members to
3031 allocator type when using old string ABI.
3032 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3034 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3036 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3037 -fno-inline added to test flags.
3039 * testsuite/21_strings/basic_string/requirements/
3040 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3042 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3043 assertion failures with old std::string ABI.
3045 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3047 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3048 functions that will only erase elements at the end.
3049 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3050 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3051 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3053 (path::_List::pop_back()): Define.
3054 (path::_List::_M_erase_from(const_iterator)): Define.
3055 (path::operator/=(const path&)): Use pop_back to remove last component
3056 and _M_erase_from to remove multiple components.
3057 (path::_M_append(basic_string_view<value_type>)): Likewise.
3058 (path::operator+=(const path&)): Likewise.
3059 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3060 (path::remove_filename()): Likewise.
3061 (path::lexically_normal()): Use _List::_Impl iterators instead of
3062 path::iterator. Use pop_back to remove components from the end. Clear
3063 trailing filename, instead of using erase(const_iterator) to remove
3064 a non-final component.
3065 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3067 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3069 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3070 incorrect treatment of empty filename after trailing slash.
3071 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3073 * testsuite/21_strings/basic_string/modifiers/assign/char/
3074 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3076 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3077 move_assign_optim.cc: Likewise.
3079 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3080 Jakub Jelinek <jakub@redhat.com>
3083 * include/experimental/memory: Replace UTF-8 quote characters.
3084 * include/std/future: Replace UTF-8 "em dash" characters.
3086 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3089 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3090 * include/debug/forward_list: Likewise.
3091 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3093 * include/experimental/chrono: Likewise.
3094 * include/experimental/functional: Likewise.
3095 * include/experimental/ratio: Likewise.
3096 * include/experimental/system_error: Likewise.
3097 * include/experimental/tuple: Likewise.
3098 * include/experimental/type_traits: Likewise.
3099 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3100 * include/parallel/multiseq_selection.h: Likewise.
3103 * config/abi/pre/gnu.ver: Add missing exports.
3104 * testsuite/22_locale/collate_byname/88681.cc: New test.
3105 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3106 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3108 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
3110 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3111 initializer_list<value_type> and from input iterator ranges.
3112 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3114 * testsuite/experimental/string_view/element_access/char/empty.cc:
3115 Fix year range in copyright header.
3117 2019-01-02 Joel Brobecker <brobecker@adacore.com>
3119 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3120 Fix year range in copyright header.
3122 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3124 Update copyright years.
3126 Copyright (C) 2019 Free Software Foundation, Inc.
3128 Copying and distribution of this file, with or without modification,
3129 are permitted in any medium without royalty provided the copyright
3130 notice and this notice are preserved.