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