1 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
3 PR libstdc++/90454.cc path construction from void*
4 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
5 pointers to void are rejected as well as void.
6 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
7 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
9 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
11 * doc/xml/manual/policy_data_structures.xml: Comment out stray
12 <remark> elements. Fix formatting of bibliography references.
14 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
16 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
18 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
20 Remove Profile Mode, deprecated since 7.1.0
21 * doc/Makefile.am: Remove XML file for profile mode docs.
22 * doc/Makefile.in: Regenerate.
23 * doc/xml/authors.xml: Remove authors of profile mode docs.
24 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
26 * doc/xml/manual/debug.xml: Likewise.
27 * doc/xml/manual/evolution.xml: Document removal of profile mode.
28 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
29 * doc/xml/manual/spine.xml: Remove profile mode author credit.
30 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
32 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
34 * doc/html/*: Regenerate.
35 * include/Makefile.am: Remove profile mode headers.
36 * include/Makefile.in: Regenerate.
37 * include/bits/c++config (std::__profile): Remove namespace.
38 [_GLIBCXX_PROFILE]: Remove checks for macro.
39 * include/profile/array: Remove.
40 * include/profile/base.h: Remove.
41 * include/profile/bitset: Remove.
42 * include/profile/deque: Remove.
43 * include/profile/forward_list: Remove.
44 * include/profile/impl/profiler.h: Remove.
45 * include/profile/impl/profiler_algos.h: Remove.
46 * include/profile/impl/profiler_container_size.h: Remove.
47 * include/profile/impl/profiler_hash_func.h: Remove.
48 * include/profile/impl/profiler_hashtable_size.h: Remove.
49 * include/profile/impl/profiler_list_to_slist.h: Remove.
50 * include/profile/impl/profiler_list_to_vector.h: Remove.
51 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
52 * include/profile/impl/profiler_node.h: Remove.
53 * include/profile/impl/profiler_state.h: Remove.
54 * include/profile/impl/profiler_trace.h: Remove.
55 * include/profile/impl/profiler_vector_size.h: Remove.
56 * include/profile/impl/profiler_vector_to_list.h: Remove.
57 * include/profile/iterator_tracker.h: Remove.
58 * include/profile/list: Remove.
59 * include/profile/map: Remove.
60 * include/profile/map.h: Remove.
61 * include/profile/multimap.h: Remove.
62 * include/profile/multiset.h: Remove.
63 * include/profile/ordered_base.h: Remove.
64 * include/profile/set: Remove.
65 * include/profile/set.h: Remove.
66 * include/profile/unordered_base.h: Remove.
67 * include/profile/unordered_map: Remove.
68 * include/profile/unordered_set: Remove.
69 * include/profile/vector: Remove.
70 * scripts/run_doxygen: Do not process profile mode headers.
71 * testsuite/23_containers/array/element_access/60497.cc: Don't use
73 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
74 Remove dg-skip-if for profile mode.
75 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
76 preprocessor check for profile mode.
77 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
78 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
80 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
82 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
83 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
84 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
85 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
86 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
88 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
90 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
92 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
94 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
95 preprocessor check for profile mode.
96 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
98 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
99 Remove dg-skip-if for profile mode.
100 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
101 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
102 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
103 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
104 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
105 * testsuite/Makefile.am: Remove profile_flags variable and
106 * testsuite/Makefile.am: Remove profile_flags variable and
107 check-profile target.
108 * testsuite/Makefile.in: Regenerate.
109 * testsuite/ext/profile/all.cc: Remove.
110 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
111 * testsuite/ext/profile/profiler_algos.cc: Remove.
112 * testsuite/ext/profile/replace_new.cc: Remove.
113 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
114 preprocessor check for profile mode.
115 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
116 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
117 (check_v3_target_normal_mode): Do not check for profile mode macro.
118 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
120 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
121 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
122 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
123 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
124 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
125 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
126 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
127 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
128 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
129 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
131 Remove array_allocator extension, deprecated since 4.9.0
132 * doc/xml/manual/allocator.xml: Remove documentation for
134 * doc/xml/manual/evolution.xml: Document array_allocator removal.
135 * doc/xml/manual/using.xml: Remove header from documentation.
136 * include/Makefile.am: Remove <ext/array_allocator.h> header.
137 * include/Makefile.in: Regenerate.
138 * include/ext/array_allocator.h: Remove.
139 * include/precompiled/extc++.h: Do not include removed header.
140 * testsuite/ext/array_allocator/1.cc: Remove.
141 * testsuite/ext/array_allocator/2.cc: Remove.
142 * testsuite/ext/array_allocator/26875.cc: Remove.
143 * testsuite/ext/array_allocator/3.cc: Remove.
144 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
145 * testsuite/ext/array_allocator/check_delete.cc: Remove.
146 * testsuite/ext/array_allocator/check_new.cc: Remove.
147 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
148 * testsuite/ext/headers.cc: Do not include removed header.
150 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
152 * include/bits/stl_bvector.h
153 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
155 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
157 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
159 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
161 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
163 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
165 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
167 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
169 (_Bit_iterator::operator-(difference_type)): Likewise.
170 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
171 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
173 (_Bit_const_iterator::operator-(difference_type)): Likewise.
174 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
176 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
179 * testsuite/util/thread/all.h: Do not use remove_pointer for
180 std::thread::native_handle_type.
183 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
184 (_Variant_storage<true, Types...>::_M_reset()))
185 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
186 (__get_storage): Likewise.
187 (variant): Add noexcept to friend declarations for __get and
191 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
192 Use _Require for constraints.
193 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
195 (__uniq_ptr_hash): New base class with conditionally-disabled call
197 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
198 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
199 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
201 * include/bits/shared_ptr.h: Improve docs.
202 * include/bits/shared_ptr_base.h: Likewise.
203 * include/bits/stl_uninitialized.h: Likewise.
204 * include/bits/unique_ptr.h: Likewise.
205 * libsupc++/new: Likewise.
207 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
209 * include/bits/stl_deque.h
210 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
212 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
214 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
216 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
218 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
220 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
222 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
224 (_Deque_iterator<>::operator-(difference_type)): Likewise.
226 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
229 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
230 (test01): Reserve for number of insertions to avoid rehash during test.
231 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
233 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
238 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
240 * include/experimental/bits/fs_path.h: Improve docs.
241 * include/experimental/bits/net.h: Fix wrong header name in comment.
242 Do not document implementation details.
243 * include/experimental/netfwd: Fix doxygen grouping.
245 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
247 * include/bits/stl_pair.h: Improve docs.
248 * include/std/tuple: Likewise.
250 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
252 * include/std/chrono: Improve docs.
253 * include/std/ratio: Do not document implementation details.
254 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
256 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
259 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
260 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
261 (__duration_common_type): New helper.
262 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
263 __duration_common_type.
264 (__timepoint_common_type_wrapper): Replace with ...
265 (__timepoint_common_type): New helper.
266 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
267 Use __time_point_common_type.
268 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
269 (__common_type_impl): If either argument is transformed by decay,
270 use the common_type of the decayed types.
271 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
272 decayed, use __do_common_type_impl to get the common_type.
273 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
274 (__do_member_type_wrapper, __member_type_wrapper)
275 (__expanded_common_type_wrapper): Remove.
276 (__common_type_pack, __common_type_fold): New helpers.
277 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
278 __member_type_wrapper and __expanded_common_type_wrapper.
279 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
280 Test zero-length template argument list.
281 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
282 Test single argument cases and argument types that should decay.
283 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
284 Adjust expected error.
285 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
287 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
288 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
289 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
291 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
293 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
295 Make allocator propagation more consistent for
296 operator+(basic_string) (P1165R1)
297 * include/bits/basic_string.h
298 (operator+(basic_string&&, basic_string&&): Changed resulting
299 allocator to always be the one from the first parameter.
300 * include/bits/basic_string.tcc
301 (operator+(const _CharT*, const basic_string&)): Changed
302 resulting allocator to be SOCCC on the second parameter's allocator.
303 (operator+(_CharT, const basic_string&)): Likewise.
304 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
306 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
309 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
311 * include/bits/regex.h: Improve docs.
312 * include/bits/regex.tcc: Do not document implementation details.
314 * testsuite/19_diagnostics/error_code/hash.cc: New test.
316 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
318 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
319 Add type printer for container types in std::__debug namespace.
320 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
321 (gdb-tests): Use distinct parameters for the type of test and use of
323 (gdb-test): Check for regex test even if 'whatis' test.
324 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
326 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
327 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
328 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
329 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
330 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
331 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
332 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
334 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
336 * include/std/system_error (error_category): Fix comment.
339 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
340 argument is an empty path.
341 (absolute(const path&, error_code&)): Use invalid_argument as error
342 code instead of no_such_file_or_directory.
343 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
344 of non-existent paths and empty paths with both overloads of absolute.
346 * include/std/system_error (error_category, error_code)
347 (error_condition): Improve docs.
348 * libsupc++/exception: Add missing @addtogroup Doxygen command.
349 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
350 to class documentation. Suppress documentation for implementation
352 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
353 Suppress documentation for implementation details.
355 * include/std/system_error (error_code): Remove friend declaration
356 for hash<error_code>.
357 (hash<error_code>::operator()): Use public member functions to access
359 (hash<error_condition>::operator()): Use address of category, not
360 its object representation.
361 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
362 Use public member functions to access value and category.
363 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
365 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
367 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
368 * include/bits/hashtable_policy.h
369 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
370 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
371 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
372 smaller than input value rather than always greater. Preserve
373 _M_next_resize if called with 0 input. Use __builtin_floorl.
374 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
375 elements + number of insertions is greater than _M_next_resize. Start
376 with 11 buckets if not told otherwise. Use __builtin_floorl.
377 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
378 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
379 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
380 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
381 told otherwise. Use __builtin_floorl.
382 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
383 to also validate _Power2_rehash_policy.
384 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
387 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
390 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
394 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
395 overflow warning with -Wpedantic -Wsystem-headers.
397 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
400 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
401 * include/bits/move.h (swap): Remove extra parentheses.
403 * include/experimental/bits/lfts_config.h: Improve doc markup.
404 * include/experimental/optional: Improve docs.
405 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
406 (__constexpr_addressof): Remove.
407 (optional::operator->()): Use std::__addressof().
408 * include/std/optional (optional::operator->()): Adjust whitespace.
409 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
410 that operator-> is still constexpr with overloaded operator&. Change
411 to compile-only test.
412 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
415 * include/bits/shared_ptr.h: Improve docs.
416 * include/bits/shared_ptr_atomic.h: Likewise.
417 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
419 * include/bits/basic_string.h: Fix iterator/index confusion in
421 * include/bits/range_access.h: Fix Doxygen warnings.
422 * include/bits/refwrap.h: Do not document implementation details.
423 (ref, cref): Group docs with reference_wrapper.
424 * include/std/fstream: Fix Doxygen markup.
425 * libsupc++/initializer_list (begin, end): Group docs with
428 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
430 * include/bits/unique_lock.h: Fix/improve doxygen markup.
431 * include/std/mutex: Likewise.
432 * include/std/shared_mutex: Likewise.
434 * include/bits/fs_dir.h: Fix/improve doxygen markup.
435 * include/bits/fs_fwd.h: Likewise.
436 * include/bits/fs_ops.h: Likewise.
437 * include/bits/fs_path.h: Likewise.
438 * include/std/filesystem: Likewise.
440 * include/experimental/bits/net.h: Fix/improve doxygen markup.
441 * include/experimental/buffer: Likewise.
442 * include/experimental/executor: Likewise.
443 * include/experimental/internet: Likewise.
444 * include/experimental/io_context: Likewise.
445 * include/experimental/net: Likewise.
446 * include/experimental/netfwd: Likewise.
447 * include/experimental/socket: Likewise.
448 * include/experimental/timer: Likewise.
450 * doc/doxygen/doxygroups.cc: Move description of experimental group
452 * include/experimental/algorithm: Add to libfund-ts doc group.
453 * include/experimental/any: Likewise. Do not document implementation
455 * include/experimental/array: Add to libfund-ts doc group.
456 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
457 for Library Fundamentals.
458 * include/experimental/chrono: Add to libfund-ts doc group.
459 * include/experimental/deque: Likewise.
460 * include/experimental/forward_list: Likewise.
461 * include/experimental/functional: Likewise.
462 * include/experimental/iterator: Likewise.
463 * include/experimental/list: Likewise.
464 * include/experimental/map: Likewise.
465 * include/experimental/memory: Likewise.
466 * include/experimental/memory_resource: Likewise. Improve docs.
468 * include/experimental/numeric: Add to libfund-ts doc group.
469 * include/experimental/optional: Likewise.
470 * include/experimental/propagate_const: Likewise.
471 * include/experimental/random: Likewise.
472 * include/experimental/ratio: Likewise.
473 * include/experimental/regex: Likewise.
474 * include/experimental/set: Likewise.
475 * include/experimental/source_location: Likewise.
476 * include/experimental/string: Likewise.
477 * include/experimental/string_view: Likewise.
478 * include/experimental/system_error: Likewise.
479 * include/experimental/tuple: Likewise.
480 * include/experimental/type_traits: Likewise.
481 * include/experimental/unordered_map: Likewise.
482 * include/experimental/unordered_set: Likewise.
483 * include/experimental/utility: Likewise.
484 * include/experimental/vector: Likewise.
485 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
486 * testsuite/experimental/array/neg.cc: Adjust dg-error.
487 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
489 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
490 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
491 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
492 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
493 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
495 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
496 * include/experimental/bits/fs_fwd.h: Improve docs.
497 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
498 * include/experimental/bits/fs_path.h: Likewise.
499 (path, filesystem_error, u8path): Improve docs.
500 * include/experimental/filesystem: Link to docs for TS.
502 * config/allocator/new_allocator_base.h (__allocator_base): Add
503 workaround for Doxygen bug #6945.
504 * include/std/memory: Improve docs. Define group for pointer safety.
505 * include/std/scoped_allocator: Improve docs. Use "undocumented"
506 conditional to suppress documentation for implementation details.
508 * include/bits/specfun.h: Improve docs.
509 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
512 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
513 (std::experimental): Add docs.
514 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
515 namespace to nothing when generating docs.
516 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
517 * include/std/chrono (std::chrono): Likewise.
518 * include/std/functional (std::placeholders): Likewise.
519 * include/std/thread (std::this_thread): Likewise.
521 * include/parallel/settings.h: Fix Doxygen markup.
523 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
524 anything unless PB_DS_CLASS_C_DEC is defined.
525 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
526 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
527 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
528 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
529 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
530 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
531 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
533 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
534 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
535 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
536 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
537 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
538 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
539 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
540 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
541 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
542 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
543 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
545 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
546 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
548 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
551 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
552 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
553 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
556 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
558 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
559 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
560 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
561 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
562 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
563 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
565 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
566 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
569 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
572 * include/std/complex (__complex_proj): Return parameter unchanged.
573 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
574 floating-point types to take std::complex arguments.
575 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
576 floating-point types.
577 * testsuite/26_numerics/complex/proj.cc: New test.
579 2019-04-30 Jakub Jelinek <jakub@redhat.com>
581 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
582 to _Lock_policyE[012].
583 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
585 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
587 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
588 macros accidentally left in.
589 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
590 unnecessary -lstdc++fs option. Fix test for mingw.
591 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
594 2019-04-30 Jakub Jelinek <jakub@redhat.com>
596 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
598 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
600 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
602 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
603 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
606 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
608 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
611 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
612 class template and partial specialization.
615 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
617 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
618 functions to convert a value to an integral type.
619 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
620 (fill_n): Convert _Size parameter to an integral type.
621 * testsuite/25_algorithms/fill_n/87982.cc: New test.
622 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
623 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
624 * testsuite/25_algorithms/generate_n/87982.cc: New test.
625 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
626 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
628 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
630 Adding noexcept-specification on tuple constructors (LWG 2899)
631 * libstdc++-v3/include/std/tuple:
632 (tuple()): Add noexcept-specification.
633 (tuple(const _Elements&...)): Likewise
634 (tuple(_UElements&&...)): Likewise
635 (tuple(const tuple<_UElements...>&)): Likewise
636 (tuple(tuple<_UElements...>&&)): Likewise
637 (tuple(const _T1&, const _T2&)): Likewise
638 (tuple(_U1&&, _U2&&)): Likewise
639 (tuple(const tuple<_U1, _U2>&): Likewise
640 (tuple(tuple<_U1, _U2>&&): Likewise
641 (tuple(const pair<_U1, _U2>&): Likewise
642 (tuple(pair<_U1, _U2>&&): Likewise
643 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
645 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
648 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
649 arguments with __restrict.
651 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
653 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
655 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
657 * include/experimental/bits/fs_path.h
658 (path::_S_convert_loc<_InputIterator>): Create const std::string to
659 avoid redundant call to _S_convert_loc with non-const pointers.
661 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
662 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
663 * testsuite/21_strings/basic_string/hash/hash.cc
664 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
665 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
666 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
668 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
669 wstring::_M_replace_dispatch with more specific patterns.
670 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
671 Create const std::string to avoid redundant call to _S_convert_loc
672 with non-const pointers.
673 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
674 avoid unnecessary basic_string::assign instantiations.
676 * include/std/memory (__uses_alloc_args): Add string-literal to
677 static_assert, to match the one in __uses_alloc.
678 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
679 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
680 for recursive uses-allocator construction of nested pairs.
681 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
684 2019-04-26 Jakub Jelinek <jakub@redhat.com>
686 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
687 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
688 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
689 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
691 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
692 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
693 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
694 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
695 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
696 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
697 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
699 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
702 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
703 * include/std/scoped_allocator [__cplusplus > 201703L]
704 (scoped_allocator_adaptor::construct): Define in terms of
705 uses_allocator_construction_args, as per P0591R4.
706 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
707 * testsuite/util/testsuite_allocator.h: Remove name of unused
710 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
712 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
713 * doc/html/*: Regenerate.
715 * include/bits/fs_path.h (operator<, operator<=, operator>)
716 (operator>=, operator==, operator!=): Make hidden friends, as per
718 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
720 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
722 * include/std/any (any::any(ValueType&&)): Use __and_v.
723 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
726 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
728 * include/std/type_traits (__result_of_memfun): Use remove_reference
729 instead of __remove_cvref_t and remove redundant is_same check.
730 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
732 * include/experimental/string_view (basic_string_view::pointer)
733 (basic_string_view::reference): Fix to refer to non-const value_type.
734 * include/bits/basic_string.h (basic_string): Use __sv_check and
735 __sv_limit instead of basic_string_view::_M_check and
736 basic_string_view::_M_limit.
737 * include/std/string_view (__sv_check, __sv_limit): New
738 helper functions to replace basic_string_view::_M_check and
739 basic_string_view::_M_limit.
740 (basic_string_view): Add static assertions to enforce ill-formed
741 requirement for traits_type::char_type from P1148R0, and to enforce
742 required properties of char-like types.
743 (basic_string_view::pointer, basic_string_view::reference): Fix to
744 refer to non-const value_type.
745 (basic_string_view::operator[], basic_string_view::at)
746 (basic_string_view::front, basic_string_view::back)
747 (basic_string_view::data): Use const_reference and const_pointer
748 typedefs for return types.
749 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
750 (hash<wstring_view>): Fix argument_type typedef.
751 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
752 char/1.cc: Fix expected return type of basic_string_view::data().
753 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
754 wchar_t/1.cc: Likewise.
755 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
757 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
758 wchar_t/1.cc: Likewise.
759 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
761 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
762 Check reference and pointer typedefs.
763 * testsuite/experimental/string_view/requirements/typedefs.cc:
765 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
766 Fix expected return type of basic_string_view::data().
767 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
769 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
771 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
775 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
776 Avoid a runtime check for types that can never be stored in std::any.
777 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
780 PR libstdc++/90220 (partial)
781 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
782 not attempt ill-formed static_cast to pointers to non-object types.
783 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
786 * testsuite/20_util/variant/run.cc: Catch exception by reference to
787 prevent -Wcatch-value warning.
789 * include/std/variant (__variant_construct): Use template parameter
790 type instead of equivalent decltype-specifier.
791 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
792 Replace forward with move.
793 (_Move_ctor_base<false, Types...>::_M_destructive_move)
794 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
795 (_Move_ctor_base<true, Types...>::_M_destructive_move)
796 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
797 index after construction succeeds.
798 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
799 if-constexpr checks that are always true. Use __remove_cvref_t instead
800 of remove_reference so that is_nothrow_move_constructible check
801 doesn't use a const rvalue parameter. In the potentially-throwing case
802 construct a temporary and move assign it, as per LWG 2904.
803 (_Move_assign_base<false, Types...>::operator=): Remove redundant
804 if-constexpr checks that are always true. Use emplace as per LWG 2904.
805 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
806 construct a temporary and move assign from it, as per LWG 2904.
807 * testsuite/20_util/variant/exception_safety.cc: Check that
808 assignment operators have strong exception safety guarantee.
810 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
812 Document PSTL linker flags
814 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
816 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
818 * include/std/variant (__detail::__variant::_Traits): Make
819 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
820 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
822 (__detail::__variant::_Copy_assign_alias): Only depend on
823 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
824 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
825 move assignment operators.
828 * include/std/variant (variant::__not_self): New helper for the
829 is_same_v<remove_cvref_t<T>, variant>==false constraints.
830 (variant::__to_type_impl): Remove.
831 (variant::__to_type): Add default argument to check pack size, instead
832 of using __to_type_impl.
833 (variant::__accepted_type): Add default argument using __not_self.
834 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
835 for variant(T&&) constructor constraint.
836 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
837 Extract __accepted_type into a named template parameter for reuse in
838 other constraints and in the exception specification.
839 (variant::variant(in_place_type_t<T>, Args&&...))
840 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
841 (variant::variant(in_place_index_t<T>, Args&&...))
842 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
843 (variant::operator=T&&)): Remove redundant && from trait arguments.
844 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
845 isn't used for in_place_type or in_place_index arguments.
847 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
848 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
849 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
851 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
852 Bernd Edlinger <bernd.edlinger@hotmail.de>
853 Jakub Jelinek <jakub@redhat.com>
856 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
857 general-regs-only target attribute for ARM.
859 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
862 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
863 specialization also depend on is_nothrow_move_constructible.
864 * include/std/variant (__detail::__variant::__never_valueless()):
865 Only true if the variant would have a move assignment operator.
866 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
867 Check __never_valueless<T...>().
868 (variant::emplace): Only perform non-throwing move assignments
869 for never-valueless alternatives if the variant has a move assignment
871 * testsuite/20_util/variant/compile.cc: Check that never-valueless
872 types can be emplaced into non-assignable variants.
873 * testsuite/20_util/variant/run.cc: Check that never-valueless types
874 don't get copied when emplaced into non-assignable variants.
876 * include/std/variant (__detail::__variant::__ref_cast): Remove
878 (__detail::__variant::_Uninitialized::_M_get)
879 (__detail::__variant::__get)
880 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
882 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
884 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
886 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
887 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
888 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
889 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
891 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
893 Delegate PSTL configuration to pstl/pstl_config.h
895 * include/bits/c++config: Remove explicit PSTL configuration
896 macros and use definitions from <pstl/pstl_config.h>.
898 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
900 Cleanup algorithm implementations
901 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
903 (mismatch): Forward execution policy.
904 (equal): Qualify call to std::equal().
905 (partial_sort): Forward execution policy.
906 (inplace_merge): Forward execution policy.
908 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
910 Improve implementation of parallel equal()
911 * include/pstl/algorithm_impl.h
912 (__internal::__brick_equal): use "4 iterator" version of
914 (__internal::__brick_equal): use simd for random access
915 iterators on unsequenced execution policies.
916 (__internal::__pattern_equal): add "4 iterator" version
917 (__internal::__pattern_equal): dispatch to simd __brick_equal
918 for vector-only execution policies.
919 (__internal::__pattern_equal): dispatch to __parallel_or for
920 parallel execution policies.
921 * include/pstl/glue_algorithm_impl.h
922 (std::equal): dispatch to "4 iterator" version of
923 __internal::__pattern_equal().
925 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
928 * include/bits/forward_list.h (operator==): Do not use operator!= to
930 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
931 earlier in the list, so that sort is stable.
932 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
933 * testsuite/23_containers/forward_list/comparable.cc: Test with
934 types that meet the minimum EqualityComparable and LessThanComparable
935 requirements. Remove irrelevant comment.
937 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
938 Do not depend on whether all alternative types are move constructible.
939 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
940 from the operand when deciding whether to perform the assignment.
941 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
942 with deleted move constructor and deleted move assignment operator.
943 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
944 behaviour of variants with DeletedMoves as an alternative.
945 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
946 (move_ctor, move_assign): Check that moving a variant with a
947 DeletedMoves alternative falls back to copying instead of moving.
949 * testsuite/20_util/variant/compile.cc: Remove empty string literals
950 from static_assert declarations.
952 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
953 actually match its name.
954 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
955 (test_swap()): Fix result for MoveCtorOnly and check
958 * include/std/optional (optional::value_or(U&&) &&): Add missing
960 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
961 for disengaged optionals and rvalue optionals.
962 * testsuite/20_util/optional/observers/4.cc: Likewise.
964 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
966 * include/pstl/algorithm_impl.h: Uglify identfiers.
967 * include/pstl/numeric_impl.h: Uglify identfiers.
968 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
970 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
972 * include/bits/c++config:
973 Add definition for __PSTL_ASSERT.
974 Add definition for __PSTL_ASSERT_MSG.
975 * include/pstl/algorithm_impl.h: Replace use of assert().
976 * include/pstl/numeric_impl.h: Replace use of assert().
977 * include/pstl/parallel_backend_tbb.h:
978 Replace use of assert().
979 Replace use of __TBB_ASSERT().
980 * include/pstl/parallel_backend_utils.h: Replace use of assert().
982 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
985 * src/c++17/memory_resource.cc
986 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
987 needed to allow placing a _Chunk at the end of the buffer.
988 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
990 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
992 * doc/xml/faq.xml: Add information about emergency EH pool.
993 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
994 Move outdated information on mt_allocator to a separate section.
995 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
996 doesn't affect the default allocator.
998 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1002 * testsuite/20_util/variant/89851.cc: New test.
1004 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
1006 * include/std/variant: Adjust whitespace. Add comments.
1007 (_Multi_array): Leave primary template undefined.
1008 (_Multi_array<_Tp>): Define partial specialization for base case of
1010 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1011 which is always a reference.
1012 (__gen_vtable::_S_apply()): Remove function, inline body into
1013 default member initializer.
1014 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1016 * include/std/variant (__variant_idx_cookie): Add member type.
1017 (__visitor_result_type): Remove.
1018 (__do_visit): Use invoke_result instead of __visitor_result_type.
1019 * testsuite/20_util/variant/visit.cc: New test.
1022 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1024 * testsuite/20_util/variant/90008.cc: New test.
1026 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
1028 * include/pstl/algorithm_impl.h: Add namespace qualification.
1029 * include/pstl/execution_defs.h: Add namespace qualification.
1030 * include/pstl/execution_impl.h: Add namespace qualification.
1031 * include/pstl/numeric_impl.h: Add namespace qualification.
1032 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1033 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1034 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1036 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1038 Fix visit<R> for variant.
1039 * include/std/variant (__do_visit): Add a template parameter
1040 for enforcing same return types for visit.
1041 (__gen_vtable_impl): Likewise.
1042 (_S_apply_single_alt): Adjust.
1043 (__visit_invoke_impl): New. Handle casting to void.
1044 (__do_visit_invoke): New. Enforces same return types.
1045 (__do_visit_invoke_r): New. Converts return types.
1046 (__visit_invoke): Adjust.
1047 (__gen_vtable): Add a template parameter for enforcing
1048 same return types for visit.
1049 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1050 different return types.
1051 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1052 visitors with different return types don't accidentally
1053 compile with regular visitation.
1055 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1057 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1058 dg-require-filesystem-ts.
1060 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
1062 * doc/xml/manual/status_cxx2020.xml: Update status.
1063 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1064 * testsuite/20_util/variant/visit_r.cc: New test.
1066 * include/bits/fs_dir.h (directory_iterator::operator*)
1067 (directory_iterator::operator->): Add noexcept.
1068 (operator==, operator!=): Replace namespace-scope equality operators
1069 for directory iterators with hidden friends.
1072 * config/abi/pre/gnu.ver: Add missing exports.
1073 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1076 * config/abi/pre/gnu.ver: Export new symbols.
1077 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1078 (recursive_directory_iterator::recursion_pending())
1079 (recursive_directory_iterator::disable_recursion_pending()): Remove
1080 inline definitions. Make noexcept.
1081 (recursive_directory_iterator::depth())
1082 (recursive_directory_iterator::operator*())
1083 (recursive_directory_iterator::operator->()): Make noexcept.
1084 (recursive_directory_iterator::_M_options)
1085 (recursive_directory_iterator::_M_pending): Remove data members.
1086 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1087 (recursive_directory_iterator::recursive_directory_iterator): Remove
1088 ctor-initializer. Use new constructor for _Dir_stack.
1089 (recursive_directory_iterator::options())
1090 (recursive_directory_iterator::recursion_pending())
1091 (recursive_directory_iterator::disable_recursion_pending()): Add
1092 non-inline definitions.
1093 (recursive_directory_iterator::depth()): Make noexcept.
1094 (recursive_directory_iterator::increment(error_code&))
1095 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1096 location of options and recursion_pending members.
1097 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1098 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1099 user-declared move constructor and assignment operator, to make the
1102 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1103 d_type == DT_UNKNOWN immediately.
1104 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1106 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1108 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1110 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1111 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1114 PR libstdc++/87431 (again)
1115 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1116 Define partial specialization for basic_string.
1117 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1118 shared_ptr and weak_ptr.
1119 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1121 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1123 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1125 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1127 * include/std/any (_Never_valueless_alt): Define explicit
1128 specialization for any.
1129 * include/std/variant (_Never_valueless_alt): Define primary template.
1130 (__never_valueless): Use _Never_valueless_alt instead of
1131 is_trivially_copyable.
1132 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1133 initializations to avoid try-catch overhead. Add special case for
1134 scalars produced by potentially-throwing conversions. Use
1135 _Never_valueless_alt instead of is_trivially_copyable for the
1136 remaining strong exception-safety cases.
1137 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1138 * testsuite/20_util/variant/87431.cc: Run both test functions.
1139 * testsuite/20_util/variant/exception_safety.cc: New test.
1140 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1141 so the variant becomes valueless.
1143 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
1146 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1148 (variant::emplace<_Tp>): Return result of emplace<N> directly.
1150 * include/std/string (__hash_string_base): New class template defining
1151 operator() for hashing strings.
1152 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1153 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1154 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1155 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1157 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1159 Use single-visitation in variant assignment and swap and relops.
1160 Also use indices instead of types when checking whether
1161 variants hold the same thing.
1162 * include/std/variant (__do_visit): Add a template parameter
1163 for index visitation, invoke with indices if index visitation
1165 (__variant_idx_cookie): New.
1166 (__visit_with_index): Likewise.
1167 (_Copy_assign_base::operator=): Do single-visitation with
1169 (_Move_assign_base::operator=): Likewise.
1170 (_Extra_visit_slot_needed): Adjust.
1171 (__visit_invoke): Call with indices if it's an index visitor.
1172 (relops): Do single-visitation with an index visitor.
1174 (__visitor_result_type): New.
1176 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1178 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1180 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1182 Don't revisit a variant we are already visiting.
1183 * include/std/variant (__variant_construct_single): New.
1184 (__variant_construct): Use it.
1185 (_M_destructive_move): Likewise.
1186 (_M_destructive_copy): Likewise.
1187 (_Copy_assign_base::operator=): Adjust.
1188 (_Move_assign_base::operator=): Likewise.
1191 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
1194 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1195 destructor so they are not evaluated until the _Key type is complete.
1196 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1197 * testsuite/23_containers/set/85965.cc: New test.
1198 * testsuite/23_containers/unordered_set/85965.cc: New test.
1199 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1200 with regexp matching the corresponding _Rb_tree specialization.
1201 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1202 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1203 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1204 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1205 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1206 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1207 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1209 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1212 Fix based on a suggestion by Antony Polukhin.
1213 * include/std/variant (__never_valueless): New.
1215 (_Extra_visit_slot_needed): New.
1216 (_Multi_array): Use it.
1217 (_S_apply_all_alts): Likewise.
1219 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1222 Fix based on a suggestion by Antony Polukhin.
1223 * include/std/variant (__gen_vtable): Don't reserve an
1224 additional table slot, _Multi_array already does that.
1226 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1229 Fix based on a suggestion by Antony Polukhin.
1230 * include/std/variant (__variant_construct): Capture a pointer
1231 to the storage and visit just one variant.
1233 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
1235 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1236 Doxygen-generated pages with unstable URL.
1237 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1238 * doc/xml/manual/extensions.xml: Likewise.
1239 * doc/xml/manual/parallel_mode.xml: Likewise.
1240 * doc/xml/manual/support.xml: Likewise.
1242 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1243 avoid -Wconversion warnings.
1245 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
1247 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1248 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
1249 (allstamped): Add stamp-pstl.
1250 (install-headers): Add ptsl_builddir.
1251 * include/Makefile.in: Regenerate.
1252 * include/bits/c++config: Add pstl configuration.
1253 * include/pstl/LICENSE.txt: New file.
1254 * include/pstl/algorithm_fwd.h: New file.
1255 * include/pstl/algorithm_impl.h: New file.
1256 * include/pstl/execution_defs.h: New file.
1257 * include/pstl/execution_impl.h: New file.
1258 * include/pstl/glue_algorithm_defs.h: New file.
1259 * include/pstl/glue_algorithm_impl.h: New file.
1260 * include/pstl/glue_execution_defs.h: New file.
1261 * include/pstl/glue_memory_defs.h: New file.
1262 * include/pstl/glue_memory_impl.h: New file.
1263 * include/pstl/glue_numeric_defs.h: New file.
1264 * include/pstl/glue_numeric_impl.h: New file.
1265 * include/pstl/memory_impl.h: New file.
1266 * include/pstl/numeric_fwd.h: New file.
1267 * include/pstl/numeric_impl.h: New file.
1268 * include/pstl/parallel_backend.h: New file.
1269 * include/pstl/parallel_backend_tbb.h: New file.
1270 * include/pstl/parallel_backend_utils.h: New file.
1271 * include/pstl/parallel_impl.h: New file.
1272 * include/pstl/pstl_config.h: New file.
1273 * include/pstl/unseq_backend_simd.h: New file.
1274 * include/pstl/utils.h: New file.
1275 * include/std/algorithm: Include parallel algorithm implementations.
1276 * include/std/execution: New file.
1277 * include/std/memory: Include parallel algorithm implementations.
1278 * include/std/numeric: Include parallel algorithm implementations.
1279 * include/std/version: Add parallel algorithms feature test macro.
1280 * testsuite/util/pstl/pstl_test_config.h: New file.
1281 * testsuite/util/pstl/test_utils.h: New file.
1282 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1283 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1284 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1285 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1286 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1287 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1288 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1289 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1290 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1291 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1292 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1293 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1294 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1295 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1296 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1297 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1298 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1299 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1300 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1301 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1302 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1303 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1304 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1305 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1306 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1307 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1308 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1309 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1310 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1311 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1312 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1313 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1314 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1315 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1316 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1317 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1318 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1319 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1320 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1321 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1322 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1323 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1324 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1325 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1326 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1327 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1328 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1329 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1330 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1331 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1332 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1333 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1334 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1335 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1336 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1337 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1338 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1339 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1340 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1341 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1342 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1343 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1344 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1345 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1346 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1347 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1348 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1349 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1350 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1351 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1352 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1353 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1354 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1355 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1356 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1357 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1358 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1359 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1360 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1361 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1362 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1363 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1364 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1365 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1366 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1367 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1368 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1369 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1370 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1371 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1372 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1373 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1374 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1375 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1376 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1377 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1378 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1379 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1380 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1381 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1382 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1383 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1384 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1385 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1386 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1387 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1389 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
1391 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
1392 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
1393 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
1394 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
1395 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
1396 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
1397 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
1398 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
1399 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
1400 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
1401 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
1402 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
1403 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
1404 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
1405 when the special functions IS is enabled, not for C++17.
1406 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
1408 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
1409 without checks for special functions in C++17.
1410 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
1414 * include/backward/hash_map: Use <> for includes not "".
1415 * include/backward/hash_set: Likewise.
1416 * include/backward/strstream: Likewise.
1417 * include/tr1/bessel_function.tcc: Likewise.
1418 * include/tr1/exp_integral.tcc: Likewise.
1419 * include/tr1/legendre_function.tcc: Likewise.
1420 * include/tr1/modified_bessel_func.tcc: Likewise.
1421 * include/tr1/riemann_zeta.tcc: Likewise.
1423 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
1425 * doc/xml/manual/allocator.xml: Link to table documenting evolution
1426 of extension allocators.
1427 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
1428 Document new headers in 7.2, 8.1 and 9.1 releases.
1429 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
1430 * doc/html/*: Regenerate.
1432 2019-03-12 John David Anglin <dave.anglin@bell.net>
1435 * testsuite/lib/libstdc++.exp: Locate libatomic.
1436 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
1437 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
1439 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1440 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
1441 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
1442 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1444 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
1447 * configure.ac: Check for sockatmark.
1448 * crossconfig.m4: Check for sockatmark.
1449 * config.h.in: Regenerate.
1450 * configure: Regenerate.
1451 * include/experimental/internet (address_v4::_S_hton): Rename
1452 overloaded functions to _S_hton_16 and _S_ntoh_16.
1453 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
1454 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
1455 * include/experimental/socket (basic_socket::at_mark): Check
1456 _GLIBCXX_HAVE_SOCKATMARK.
1458 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
1459 const variables instead of macros.
1462 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
1463 Use correct type for len_aligned.
1464 * testsuite/20_util/hash/89629.cc: New test.
1466 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1469 * include/std/atomic (atomic<T>::store, atomic<T>::load,
1470 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
1471 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
1472 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
1473 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
1474 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
1475 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
1476 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
1477 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
1478 memory_order_seq_cst to int.
1480 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
1482 * doc/xml/manual/using.xml: Use link element instead of xref.
1483 * doc/html/*: Regenerate.
1485 * include/bits/fs_path.h (path::format): Add fixed underlying type.
1487 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
1490 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
1491 parameters in deduction guides.
1492 * include/debug/multimap.h (multimap): Likewise.
1493 * include/debug/set.h (multimap): Likewise.
1494 * include/debug/multiset.h (multimap): Likewise.
1495 * include/debug/unordered_map (unordered_map): Likewise.
1496 (unordered_multimap): Likewise.
1497 * include/debug/unordered_set (unordered_set): Likewise.
1498 (unordered_multiset): Likewise.
1501 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
1502 Invalidate all iterators in case of rehash.
1503 (unordered_multimap<>::_M_check_rehashed): Likewise.
1504 * include/debug/unordered_set
1505 (unordered_set<>::_M_check_rehashed): Likewise.
1506 (unordered_multiset<>::_M_check_rehashed): Likewise.
1507 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
1509 2019-03-07 Andreas Schwab <schwab@suse.de>
1511 * config/abi/post/riscv64-linux-gnu: New directory.
1512 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
1514 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
1516 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
1517 compile test to run. Fix typo.
1519 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1520 * doc/html/*: Regenerate.
1522 P0356R5 Simplified partial function application
1523 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
1524 helpers for bind_front.
1525 (bind_front, __cpp_lib_bind_front): Define.
1526 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
1528 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1530 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
1531 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
1532 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
1533 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1535 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1537 PR libstdc++/86655 - std::assoc_legendre should not constrain
1538 the value of m (or x).
1539 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
1540 __sph_legendre): If degree > order Don't throw, return 0.
1541 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
1542 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
1543 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
1544 * testsuite/tr1/5_numerical_facilities/special_functions/
1545 02_assoc_legendre/pr86655.cc: New test.
1546 * testsuite/tr1/5_numerical_facilities/special_functions/
1547 22_sph_legendre/pr86655.cc: New test.
1549 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1552 Also PR libstdc++/85517
1553 * include/std/variant (__do_visit): New.
1554 (__variant_cast): Likewise.
1555 (__variant_cookie): Likewise.
1556 (__erased_*): Remove.
1557 (_Variant_storage::_S_vtable): Likewise.
1558 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
1559 (_Variant_storage::__M_reset): Adjust.
1560 (__variant_construct): New.
1561 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
1562 __variant_construct.
1563 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1564 (_Move_ctor_base::__M_destructive_copy): New.
1565 (_Move_ctor_base::__M_destructive_move): Adjust to use
1566 __variant_construct.
1567 (_Copy_assign_base::operator=): Adjust to use __do_visit.
1568 (_Copy_assign_alias): Adjust to check both copy assignment
1569 and copy construction for triviality.
1570 (_Move_assign_base::operator=): Adjust to use __do_visit.
1571 (_Multi_array): Add support for visitors that accept and return
1573 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
1574 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
1575 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
1576 a __variant_cookie temporary for a variant that is valueless and..
1577 (__gen_vtable_impl::__visit_invoke): ..adjust here.
1578 (__gen_vtable::_Array_type): Conditionally make space for
1579 the __variant_cookie visitor case.
1580 (__variant_construct_by_index): New.
1581 (get_if): Adjust to use std::addressof.
1582 (relops): Adjust to use __do_visit.
1583 (variant): Add __variant_cast and __variant_construct_by_index
1585 (variant::emplace): Use _M_reset() and __variant_construct_by_index
1586 instead of self-destruction.
1587 (variant::swap): Adjust to use __do_visit.
1588 (visit): Reimplement in terms of __do_visit.
1589 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
1590 * testsuite/20_util/variant/compile.cc: Adjust.
1591 * testsuite/20_util/variant/run.cc: Likewise.
1593 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1595 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
1597 * testsuite/experimental/feat-char8_t.cc: Likewise.
1599 * include/std/type_traits [C++20] (is_bounded_array)
1600 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
1602 * testsuite/20_util/is_bounded_array/requirements/
1603 explicit_instantiation.cc: New test.
1604 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
1606 * testsuite/20_util/is_bounded_array/value.cc: New test.
1607 * testsuite/20_util/is_unbounded_array/requirements/
1608 explicit_instantiation.cc: New test.
1609 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
1611 * testsuite/20_util/is_unbounded_array/value.cc: New test.
1613 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
1615 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
1617 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
1619 * include/c_compatibility/math.h [C++20] (lerp): Add using
1621 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
1622 (__lerp): Define function template to implement lerp.
1623 (lerp(float, float, float), lerp(double, double, double))
1624 (lerp(long double, long double, long double)): Define for C++20.
1625 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
1626 (midpoint(T, T), midpoint(T*, T*)): Define.
1627 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
1628 * testsuite/26_numerics/lerp.cc: New test.
1629 * testsuite/26_numerics/midpoint/floating.cc: New test.
1630 * testsuite/26_numerics/midpoint/integral.cc: New test.
1631 * testsuite/26_numerics/midpoint/pointer.cc: New test.
1633 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
1635 PR libstdc++/88996 Implement P0439R0
1636 Make std::memory_order a scoped enumeration.
1637 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
1638 add variables for the old enumerators. Adjust calls.
1639 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
1640 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
1642 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
1644 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
1647 * include/std/memory_resource (polymorphic_allocator): Add default
1648 template argument for C++20.
1649 (polymorphic_allocator::allocate_bytes)
1650 (polymorphic_allocator::deallocate_bytes)
1651 (polymorphic_allocator::allocate_object)
1652 (polymorphic_allocator::deallocate_object)
1653 (polymorphic_allocator::new_object)
1654 (polymorphic_allocator::delete_object): New member functions for
1656 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
1659 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
1662 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
1665 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
1667 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
1668 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
1670 * include/std/memory (uses_allocator_construction_args): New set of
1671 overloaded functions.
1672 (make_obj_using_allocator, uninitialized_construct_using_allocator):
1674 * include/std/memory_resource (polymorphic_allocator::construct)
1675 [__cplusplus > 201703l]: Replace all overloads with a single function
1676 using uses_allocator_construction_args.
1677 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
1679 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
1681 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
1684 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
1685 stylesheet directories before check for xsltproc. Try to use
1686 xmlcatalog to find local stylesheet directory before trying hardcoded
1687 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
1688 check to look for the same stylesheet as doc/Makefile.am uses. Don't
1689 use xsltproc if xmlcatalog fails to find a local stylesheet.
1690 * configure.ac: Check for xmlcatalog.
1691 * Makefile.in: Regenerate.
1692 * configure: Likewise.
1693 * doc/Makefile.in: Likewise.
1694 * include/Makefile.in: Likewise.
1695 * libsupc++/Makefile.in: Likewise.
1696 * po/Makefile.in: Likewise.
1697 * python/Makefile.in: Likewise.
1698 * src/Makefile.in: Likewise.
1699 * src/c++11/Makefile.in: Likewise.
1700 * src/c++17/Makefile.in: Likewise.
1701 * src/c++98/Makefile.in: Likewise.
1702 * src/filesystem/Makefile.in: Likewise.
1703 * testsuite/Makefile.in: Likewise.
1705 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
1708 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
1709 container deduction guides.
1710 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
1711 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
1712 parameters in deduction guides.
1713 * include/bits/stl_multimap.h (multimap): Likewise.
1714 * include/bits/stl_multiset.h (multiset): Likewise.
1715 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
1716 * include/bits/stl_set.h (set): Likewise.
1717 * include/bits/stl_stack.h (stack): Likewise.
1718 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
1719 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
1720 constrain parameters in deduction guides.
1721 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
1723 * testsuite/23_containers/map/cons/deduction.cc: Test additional
1725 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
1726 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
1727 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
1728 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
1730 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
1732 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
1735 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
1736 to class template and partial specialization using void_t.
1737 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1739 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
1742 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
1743 copy and move members public.
1745 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
1747 * include/std/type_traits (__underlying_type_impl): New helper to
1748 make underlying_type SFINAE-friendly.
1749 (underlying_type): Derive from __underlying_type_impl.
1750 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
1754 * include/bits/char_traits.h (__constant_char_array): Check index is
1755 in range before dereferencing.
1756 (char_traits<char>::compare, char_traits<char>::find)
1757 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
1758 immediately if n is zero.
1759 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
1760 Remove workarounds for PR 67026.
1761 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
1763 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
1766 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1768 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
1769 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
1771 2019-02-22 Jakub Jelinek <jakub@redhat.com>
1774 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
1775 type to std::size_t and argument to type to long double.
1777 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1779 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
1780 * config/abi/post/sparc64-linux-gnu: New directory.
1781 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
1782 * config/abi/post/sparc64-linux-gnu/32: New directory.
1783 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
1785 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
1787 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
1788 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
1791 2019-02-22 Tom Honermann <tom@honermann.net>
1793 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
1794 printers for u8string and u8string_view.
1796 2019-02-22 Tom Honermann <tom@honermann.net>
1798 * testsuite/18_support/byte/ops.cc: Validate
1799 std::to_integer<char8_t>, std::to_integer<char16_t>, and
1800 std::to_integer<char32_t>.
1801 * testsuite/18_support/numeric_limits/dr559.cc: Validate
1802 std::numeric_limits<char8_t>.
1803 * testsuite/18_support/numeric_limits/lowest.cc: Validate
1804 std::numeric_limits<char8_t>::lowest().
1805 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
1806 std::numeric_limits<char8_t>::max_digits10.
1807 * testsuite/18_support/type_info/fundamental.cc: Validate
1808 typeinfo for char8_t.
1809 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
1810 std::from_chars with char8_t.
1811 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
1812 Validate explicit instantiation of std::hash<char8_t>.
1813 * testsuite/20_util/is_integral/value.cc: Validate
1814 std::is_integral<char8_t>.
1815 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
1816 Validate std::make_signed<char8_t>.
1817 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
1818 Validate u8string construction from char8_t sources.
1819 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
1821 * testsuite/21_strings/basic_string_view/operations/compare/
1822 char/70483.cc: Validate substr operations on u8string_view.
1823 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
1824 the u8string_view typedef is defined.
1825 * testsuite/21_strings/char_traits/requirements/
1826 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
1828 * testsuite/21_strings/char_traits/requirements/
1829 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
1830 constexpr member functions.
1831 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
1832 that the u8string typedef is defined.
1833 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
1834 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
1835 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
1836 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
1838 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1839 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
1841 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1842 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
1843 Validate std::atomic<char8_t>::is_always_lock_free
1844 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
1845 Update line numbers.
1846 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
1848 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
1850 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1851 Validate std::experimental::pmr::u8string.
1852 * testsuite/experimental/string_view/typedefs.cc: Validate that the
1853 u8string_view typedef is defined.
1854 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
1855 char32_t to the typelists.
1857 2019-02-22 Tom Honermann <tom@honermann.net>
1859 * include/ext/typelist.h: Constrain a partial specialization of
1860 typelist::detail::append_ to only match chain<T1,T2>.
1862 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
1865 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
1866 class template with class. Replace move and copy member types with
1867 member alias templates, so they are only instantiated when needed.
1868 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1869 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
1870 test for C++11/14/17 as well.
1871 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
1874 2019-02-20 Jakub Jelinek <jakub@redhat.com>
1877 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
1878 _GLIBCXX_PURE to the alias declaration.
1880 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
1882 * testsuite/21_strings/basic_string/literals/types.cc
1883 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
1884 * testsuite/21_strings/basic_string/literals/values.cc
1885 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1886 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
1887 potentially having different type.
1888 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
1889 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
1891 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
1892 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
1893 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
1894 string literals only using basic character set.
1895 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
1896 u8 literals to char.
1897 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
1898 Test ATOMIC_CHAR8_T_LOCK_FREE.
1899 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
1900 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
1901 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
1902 * testsuite/experimental/string_view/literals/types.cc
1903 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
1905 * testsuite/experimental/string_view/literals/values.cc
1906 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1908 2019-02-19 Tom Honermann <tom@honermann.net>
1910 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
1911 from char16_32_t.cc; validates numeric_limits<char8_t>.
1912 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
1913 test cloned from types.cc; validates operator""s for char8_t
1915 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
1916 test cloned from values.cc; validates construction and comparison
1918 * testsuite/21_strings/basic_string/requirements/
1919 /explicit_instantiation/char8_t/1.cc: New test cloned from
1920 char16_t/1.cc; validates explicit instantiation of
1921 basic_string<char8_t>.
1922 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1923 New test cloned from types.cc; validates operator""sv for char8_t
1924 returns u8string_view.
1925 * testsuite/21_strings/basic_string_view/literals/
1926 values-char8_t.cc: New test cloned from values.cc; validates
1927 construction and comparison of u8string_view values.
1928 * testsuite/21_strings/basic_string_view/requirements/
1929 explicit_instantiation/char8_t/1.cc: New test cloned from
1930 char16_t/1.cc; validates explicit instantiation of
1931 basic_string_view<char8_t>.
1932 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
1933 New test cloned from char16_t/65049.cc; validates that
1934 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
1935 * testsuite/21_strings/char_traits/requirements/char8_t/
1936 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
1937 that char_traits<char8_t> member typedefs are present and correct.
1938 * testsuite/21_strings/char_traits/requirements/
1939 explicit_instantiation/char8_t/1.cc: New test cloned from
1940 char16_t/1.cc; validates explicit instantiation of
1941 char_traits<char8_t>.
1942 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
1943 from char16_t.cc: validates
1944 codecvt<char16_t, char8_t, mbstate_t>.
1945 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
1946 from char32_t.cc: validates
1947 codecvt<char32_t, char8_t, mbstate_t>.
1948 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
1949 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
1950 codecvt<char32_t, char8_t, std::mbstate_t>.
1951 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
1952 test cloned from string.cc; validates filesystem::path construction
1954 * testsuite/experimental/feat-char8_t.cc: New test; validates that
1955 the __cpp_lib_char8_t feature test macro is defined with the
1957 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1958 New test cloned from string.cc; validates filesystem::path
1959 construction from char8_t input.
1960 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
1961 test cloned from types.cc; validates operator""sv for char8_t
1962 returns u8string_view.
1963 * testsuite/experimental/string_view/literals/values-char8_t.cc:
1964 New test cloned from values.cc; validates construction and
1965 comparison of u8string_view values.
1966 * testsuite/experimental/string_view/requirements/
1967 explicit_instantiation/char8_t/1.cc: New test cloned from
1968 char16_t/1.cc; validates explicit instantiation of
1969 basic_string_view<char8_t>.
1970 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
1971 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
1974 2019-02-19 Tom Honermann <tom@honermann.net>
1976 P0482R5 char8_t: Standard library support
1977 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
1978 typeinfo symbols for char8_t.
1979 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
1980 (GLIBCXX_3.4.26): Add symbols for specializations of
1981 numeric_limits and codecvt that involve char8_t.
1982 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
1983 * include/bits/atomic_base.h: Add atomic_char8_t.
1984 * include/bits/basic_string.h: Add std::hash<u8string> and
1985 operator""s(const char8_t*, size_t).
1986 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
1988 * include/bits/char_traits.h: Add char_traits<char8_t>.
1989 * include/bits/codecvt.h: Add
1990 codecvt<char16_t, char8_t, mbstate_t>,
1991 codecvt<char32_t, char8_t, mbstate_t>,
1992 codecvt_byname<char16_t, char8_t, mbstate_t>, and
1993 codecvt_byname<char32_t, char8_t, mbstate_t>.
1994 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
1995 recognize char8_t as an integral type.
1996 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
1998 (path::u8string): Return std::u8string when char8_t support is
2000 (path::generic_u8string): Likewise.
2001 (path::_S_convert): Handle conversion from char8_t input.
2002 (path::_S_str_convert): Likewise.
2003 * include/bits/functional_hash.h: Add hash<char8_t>.
2004 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2006 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2007 for new char8_t specializations.
2008 * include/bits/localefwd.h: Add missing declarations of
2009 codecvt<char16_t, char, mbstate_t> and
2010 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2011 codecvt<char16_t, char8_t, mbstate_t> and
2012 codecvt<char32_t, char8_t, mbstate_t>.
2013 * include/bits/postypes.h: Add u8streampos
2014 * include/bits/stringfwd.h: Add declarations of
2015 char_traits<char8_t> and u8string.
2016 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2017 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2019 (path::u8string): Return std::u8string when char8_t support is
2021 (path::generic_u8string): Likewise.
2022 (path::_S_convert): Handle conversion from char8_t input.
2023 (path::_S_str_convert): Likewise.
2024 * include/experimental/string: Add u8string.
2025 * include/experimental/string_view: Add u8string_view,
2026 hash<experimental::u8string_view>, and
2027 operator""sv(const char8_t*, size_t).
2028 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2029 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2030 as a character type.
2031 * include/std/limits: Add numeric_limits<char8_t>.
2032 * include/std/string_view: Add u8string_view,
2033 hash<experimental::u8string_view>, and
2034 operator""sv(const char8_t*, size_t).
2035 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2036 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2037 * libsupc++/atomic_lockfree_defines.h: Define
2038 ATOMIC_CHAR8_T_LOCK_FREE.
2039 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2040 codecvt.cc and limits.cc so that char8_t specializations of
2041 numeric_limits and codecvt and emitted.
2042 * src/c++11/Makefile.in: Likewise.
2043 * src/c++11/codecvt.cc: Define members of
2044 codecvt<char16_t, char8_t, mbstate_t>,
2045 codecvt<char32_t, char8_t, mbstate_t>,
2046 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2047 codecvt_byname<char32_t, char8_t, mbstate_t>.
2048 * src/c++11/limits.cc: Define members of
2049 numeric_limits<char8_t>.
2050 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2051 locale_init.cc and localename.cc.
2052 * src/c++98/Makefile.in: Likewise.
2053 * src/c++98/locale_init.cc: Add initialization for the
2054 codecvt<char16_t, char8_t, mbstate_t> and
2055 codecvt<char32_t, char8_t, mbstate_t> facets.
2056 * src/c++98/localename.cc: Likewise.
2057 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2059 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2061 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2062 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2063 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2065 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
2067 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2068 * doc/html/*: Regenerate.
2070 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2071 * doc/html/*: Regenerate.
2073 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2074 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2075 allocator type in is_constructible checks.
2076 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2077 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2078 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2079 problematic type from LWG 2586 discussion.
2080 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2081 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2083 * configure.ac: Check for C11 timespec_get function.
2084 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2086 * config.h.in: Regenerate.
2087 * configure: Regenerate.
2088 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2089 std for C++17 and up.
2091 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2092 * include/bits/stl_queue.h
2093 (priority_queue(const Compare&, const Container&, const Alloc&))
2094 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2096 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2098 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2099 * include/bits/stl_queue.h (queue, priority_queue): Add static
2100 assertions to enforce LWG 2566 requirement on value_type.
2101 * include/bits/stl_stack.h (stack): Likewise.
2104 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2106 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2107 * include/bits/std_abs.h: Add comment about LWG 2735.
2108 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2110 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
2113 * include/std/version [__cpp_impl_destroying_delete]
2114 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2115 * libsupc++/new [__cpp_impl_destroying_delete]
2116 (__cpp_lib_destroying_delete): Likewise.
2117 (destroying_delete_t, destroying_delete): Likewise, but define even
2118 when __cpp_impl_destroying_delete is not defined.
2119 * testsuite/18_support/destroying_delete.cc: New test.
2121 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
2124 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2125 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2126 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2127 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2129 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
2132 * include/bits/fs_path.h (path::has_root_name)
2133 (path::has_root_directory, path::has_root_path)
2134 (path::has_relative_path, path::has_parent_path)
2135 (path::has_filename, path::has_stem, path::has_extension)
2136 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2138 * src/c++17/fs_path.cc (path::has_root_name)
2139 (path::has_root_directory, path::has_root_path)
2140 (path::has_relative_path, path::has_parent_path)
2141 (path::has_filename, path::_M_find_extension): Add noexcept.
2143 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
2145 PR libstdc++/89102 (partial)
2146 * include/std/type_traits (common_type<>): Define.
2147 (common_type<T>): Derive from common_type<T, T>.
2148 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2149 Test zero-length template argument list.
2150 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2151 Test additional single argument cases.
2152 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2153 Adjust expected error.
2155 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
2158 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2160 * include/bits/stl_stack.h (stack): Likewise.
2161 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2162 * testsuite/23_containers/queue/deduction.cc: New test.
2163 * testsuite/23_containers/stack/deduction.cc: New test.
2166 * include/std/type_traits (__is_convertible_helper)
2167 (__is_convertible_helper<_From, _To, false>): Revert changes to
2168 support is_nothrow_convertible.
2169 (__is_nt_convertible_helper): New helper.
2170 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2172 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2173 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2176 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2177 __is_alloc_insertable_impl. Replace single type member with two
2178 members, one for each of copy and move insertable.
2179 (__is_move_insertable): New trait for internal use.
2180 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2181 (vector::_S_nothrow_relocate(true_type)): New functions to
2182 conditionally check if __relocate_a can throw.
2183 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2184 on __is_move_insertable.
2185 (vector::_S_do_relocate): New overloaded functions to conditionally
2187 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2188 based on _S_use_relocate.
2189 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2190 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2191 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2194 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2195 parameter unnamed. Add message to static assertion.
2196 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2197 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2200 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
2203 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2205 (__is_bitwise_relocatable): ... to this.
2206 (__relocate_a_1): Adapt.
2207 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2208 (__is_bitwise_relocatable): ... to this.
2210 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
2213 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2214 final component as well as from _M_pathname. Append the dot using
2215 operator+= instead of only to _M_pathname.
2216 (path::_M_find_extension): Reformat slightly.
2217 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2218 Add more test cases.
2220 2019-01-30 Ulrich Drepper <drepper@redhat.com>
2222 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2224 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
2226 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2227 constexpr specifiers from arg and proj.
2229 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2230 __shared_ptr instantiations used by gcc4-compatible ABI.
2232 * include/experimental/forward_list (experimental::erase): Qualify
2234 * include/experimental/list (experimental::erase): Likewise.
2235 * include/std/forward_list (std::erase): Likewise.
2236 * include/std/list (std::erase): Likewise.
2238 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2240 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2241 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2242 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2243 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2244 * testsuite/ext/array_allocator/26875.cc: Likewise.
2245 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2246 * testsuite/util/replacement_memory_operators.h: Likewise.
2247 * testsuite/util/testsuite_allocator.h: Likewise.
2249 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
2250 normal mode vector, even for debug mode.
2251 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
2252 Define alias template for normal mode vector.
2254 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
2257 * config/locale/generic/c_locale.h (__convert_from_v)
2258 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2259 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2260 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
2261 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2263 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
2266 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
2267 data member with static member function _S_use_relocate().
2268 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2269 (vector::_M_default_append): Use _S_use_relocate() instead of
2272 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
2275 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
2278 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
2279 write to stderr instead of using printf.
2281 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2284 * include/bits/char_traits.h (__constant_string_p,
2285 __constant_char_array_p): Use __builtin_is_constant_evaluated if
2288 2019-01-20 Ulrich Drepper <drepper@redhat.com>
2290 Implement C++20 P0600r1.
2291 * include/backward/hash_map: Add nodiscard attribute to empty.
2292 * include/backward/hash_set: Likewise.
2293 * backward/hashtable.h: Likewise.
2294 * include/bits/basic_string.h: Likewise.
2295 * include/bits/forward_list.h: Likewise.
2296 * include/bits/hashtable.h: Likewise.
2297 * include/bits/regex.h: Likewise.
2298 * include/bits/stl_deque.h: Likewise.
2299 * include/bits/stl_list.h: Likewise.
2300 * include/bits/stl_map.h: Likewise.
2301 * include/bits/stl_multimap.h: Likewise.
2302 * include/bits/stl_multiset.h: Likewise.
2303 * include/bits/stl_queue.h: Likewise.
2304 * include/bits/stl_set.h: Likewise.
2305 * include/bits/stl_stack.h: Likewise.
2306 * include/bits/stl_tree.h: Likewise.
2307 * include/bits/stl_vector.h: Likewise.
2308 * include/bits/unordered_map.h: Likewise.
2309 * include/bits/unordered_set.h: Likewise.
2310 * include/debug/array: Likewise.
2311 * include/experimental/any: Likewise.
2312 * include/experimental/bits/fs_path.h: Likewise.
2313 * include/experimental/internet: Likewise.
2314 * include/experimental/string_view: Likewise.
2315 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
2317 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
2319 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
2321 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
2323 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
2325 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
2327 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
2329 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
2331 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2332 info_fn_imps.hpp: Likewise.
2333 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2334 left_child_next_sibling_heap_.hpp: Likewise.
2335 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
2337 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
2339 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
2341 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
2343 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
2345 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
2347 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
2349 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
2350 * include/ext/pb_ds/trie_policy.hpp: Likewise.
2351 * include/ext/rope: Likewise.
2352 * include/ext/slist: Likewise.
2353 * include/ext/vstring.h: Likewise.
2354 * include/profile/array: Likewise.
2355 * include/std/array: Likewise.
2356 * include/tr1/array: Likewise.
2357 * include/tr1/hashtable.h: Likewise.
2358 * include/tr1/regex: Likewise.
2359 * include/tr2/dynamic_bitset: Likewise.
2360 * include/bits/alloc_traits.h: Add nodiscard attribute to
2362 * include/experimental/memory_resource: Likewise.
2363 * include/ext/alloc_traits.h: Likewise.
2364 * include/ext/array_allocator.h: Likewise.
2365 * include/ext/bitmap_allocator.h: Likewise.
2366 * include/ext/debug_allocator.h: Likewise.
2367 * include/ext/extptr_allocator.h: Likewise.
2368 * include/ext/mt_allocator.h: Likewise.
2369 * include/ext/new_allocator.h: Likewise.
2370 * include/ext/pool_allocator.h: Likewise.
2371 * include/ext/throw_allocator.h: Likewise.
2372 * include/std/scoped_allocator: Likewise.
2373 * libsupc++/eh_alloc.cc: Likewise.
2374 * include/std/future: Add nodiscard attribute to async.
2375 * libsupc++/new: Add nodiscard attribute to new.
2377 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
2382 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
2383 * include/bits/shared_ptr.h
2384 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
2385 (allocate_shared): Change to use new tag type.
2386 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
2387 Declare new member function.
2388 (_Sp_alloc_shared_tag): Define new type.
2389 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
2390 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
2391 _Sp_make_shared_tag::_S_eq to check type_info.
2392 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
2393 Constrain to prevent being called with _Sp_alloc_shared_tag.
2394 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
2395 Replace constructor with ...
2396 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
2397 reference parameter so address of the new object can be returned to
2398 the caller. Obtain the allocator from the tag type.
2399 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
2400 constructor with ...
2401 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
2402 to the __shared_count constructor.
2403 (__allocate_shared): Change to use new tag type.
2404 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
2406 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
2408 * src/c++17/fs_ops.cc
2409 (equivalent(const path&, const path&, error_code&))
2410 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
2411 compare files instead of relying on incomplete info returned by stat.
2414 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
2415 if the path is already absolute.
2416 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
2417 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
2420 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
2421 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
2422 of filesystem::exists.
2423 (create_directories(const path&, error_code&)): Add assertions.
2424 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2425 Add workaround for bug in _wstat for paths with trailing slash.
2426 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
2427 for expected behaviour on mingw.
2428 * testsuite/experimental/filesystem/operations/create_directories.cc:
2430 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
2431 "TMP" instead of "TMPDIR" and clean environment before each test. Do
2432 not test permissions on mingw targets.
2434 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
2436 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
2437 constructors and open members taking wide strings. Fix patterns for
2438 filesystem::path members to match wstring_view parameters. Add
2439 exports for shared_ptr members used by directory iterators.
2440 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
2441 error code parameter if the file doesn't exist.
2442 * src/filesystem/ops.cc (remove(const path&, error_code&)):
2444 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
2445 values for mingw targets, where "/" is not an absolute path. Do not
2446 test symlinks on mingw targets.
2447 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2448 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
2450 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2451 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
2452 that each component of the path is created.
2453 * testsuite/experimental/filesystem/operations/create_directories.cc:
2455 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
2456 permissions on mingw targets.
2457 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2458 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2459 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2460 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
2462 * testsuite/experimental/filesystem/operations/permissions.cc:
2464 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
2465 symlinks or permissions on mingw targets.
2466 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2467 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
2468 symlinks on mingw targets.
2469 * testsuite/experimental/filesystem/operations/remove_all.cc:
2471 * testsuite/27_io/filesystem/operations/status.cc: Do not test
2472 permissions on mingw targets.
2473 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
2474 test symlinks on mingw targets.
2475 * testsuite/experimental/filesystem/operations/space.cc: Fix test
2478 2019-02-14 Ulrich Drepper <drepper@redhat.com>
2481 Warn about unused comparisons of shared_ptr/unique_ptr
2482 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
2483 * include/bits/shared_ptr.h: Use it for operator ==, !=,
2484 <, <=, >, >= for shared_ptr.
2485 * include/bits/unique_ptr.h: Likewise for unique_ptr.
2487 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
2489 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
2490 as 201611L, because P0497R0 changes are supported.
2491 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
2493 * include/bits/erase_if.h [__cplusplus > 201703L]
2494 (__cpp_lib_erase_if): Only define for C++2a.
2495 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2496 (__cpp_lib_null_iterators): Define.
2497 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2498 (__cpp_lib_null_iterators): Define.
2499 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
2501 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
2503 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
2505 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
2506 changes are supported.
2507 * include/std/optional (__cpp_lib_optional): Likewise.
2508 * include/std/variant (__cpp_lib_variant): Likewise.
2509 * include/std/version [!__STRICT_ANSI__]
2510 (__cpp_lib_uncaught_exceptions): Define as long integer.
2511 [__cplusplus >= 201703L] (__cpp_lib_any)
2512 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
2513 (__cpp_lib_variant): Define for C++17.
2514 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
2516 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
2519 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
2521 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
2525 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
2527 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
2530 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2532 * doc/xml/manual/intro.xml: Include new section.
2533 * doc/xml/manual/status_cxx2017.xml: Document more
2534 implementation-defined properties of the library.
2535 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
2536 * doc/html/*: Regenerate.
2538 * include/bits/refwrap.h [__cplusplus > 201703L]
2539 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
2540 (_Reference_wrapper_base_memfun): Do not define for C++2a.
2541 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
2543 (reference_wrapper::operator()): Add static assertion.
2544 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
2546 * include/std/chrono (duration_values::zero(), duration_values::min())
2547 (duration_values::max()): Add noexcept.
2548 (duration::zero(), duration::min(), duration::max()): Likewise.
2549 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
2550 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
2551 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
2553 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
2555 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2557 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
2558 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
2560 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2563 * include/bits/functional_hash.h (hash<nullptr_t>): Define
2564 specialization for C++17 (P0513R0, LWG 2817).
2565 * testsuite/20_util/hash/nullptr.cc: New test.
2568 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
2569 pattern for std::basic_stringbuf::str().
2571 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
2572 basic_ostream::operator<< patterns.
2574 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2576 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
2577 test failures on targets with 32-bit time_t.
2579 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
2580 * include/std/deque: Likewise.
2581 * include/std/forward_list: Likewise.
2582 * include/std/list: Likewise.
2583 * include/std/string: Likewise.
2584 * include/std/vector: Likewise.
2585 * include/std/version: Likewise.
2586 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
2587 * testsuite/23_containers/deque/erasure.cc: Likewise.
2588 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2589 * testsuite/23_containers/list/erasure.cc: Likewise.
2590 * testsuite/23_containers/map/erasure.cc: Likewise.
2591 * testsuite/23_containers/set/erasure.cc: Likewise.
2592 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2593 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2594 * testsuite/23_containers/vector/erasure.cc: Likewise.
2596 * include/experimental/internet [AI_NUMERICSERV]
2597 (resolver_base::numeric_service): Define conditionally.
2598 * testsuite/experimental/net/internet/resolver/base.cc: Test it
2600 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2603 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2604 Jonathan Wakely <jwakely@redhat.com>
2607 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
2608 (GLIBCXX_3.4.26): Add new exports.
2609 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
2610 correct list of sources.
2611 * include/Makefile.in: Regenerate.
2612 * include/std/ostream (operator<<(nullptr_t)): New member function.
2613 * src/c++17/ostream-inst.cc: New file.
2614 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
2617 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2619 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
2620 of the source file containing the caller.
2621 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
2622 directories created by test.
2623 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2625 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2627 * testsuite/experimental/filesystem/iterators/
2628 recursive_directory_iterator.cc: Likewise.
2630 2019-01-10 Jakub Jelinek <jakub@redhat.com>
2632 PR tree-optimization/88775
2633 * include/bits/stl_function.h (greater<_Tp*>::operator(),
2634 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
2635 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
2636 instead of __builtin_constant_p if available. Don't bother with
2637 the pointer comparison in C++11 and earlier.
2639 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2643 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
2646 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
2648 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
2649 for filesystem::path. Give variables more distinctive names.
2651 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
2652 member function to perform non-trivial assignment.
2653 (_Optional_payload_base::_M_move_assign): Likewise.
2654 (_Optional_payload<T, true, false, true>::operator=)
2655 (_Optional_payload<T, true, true, false>::operator=)
2656 (_Optional_payload<T, true, false, false>::operator=): Call
2657 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
2660 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
2661 test std::complex<long double> if long double format is IBM128.
2662 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
2665 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2667 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
2668 for old std::unique_ptr layout.
2669 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
2670 to become valueless. Add filesystem::path tests.
2673 * include/std/optional (_Optional_payload_base): New class template
2674 for common code hoisted from _Optional_payload specializations. Use
2675 a template for the union, to allow a partial specialization for
2676 types with non-trivial destructors. Add constructors for in-place
2677 initialization to the union.
2678 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
2679 to perform non-trivial copy construction, instead of relying on
2680 non-standard copy elision in a delegating constructor.
2681 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
2682 non-trivial move construction.
2683 (_Optional_payload): Derive from _Optional_payload_base and use it
2684 for everything except the non-trivial assignment operators, which are
2686 (_Optional_payload<false, C, M>): Derive from the specialization
2687 _Optional_payload<true, false, false> and add a destructor.
2688 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
2689 Forward to corresponding members of _Optional_payload.
2690 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
2691 Hoist common members from _Optional_base.
2692 (_Optional_base): Make all members and base class public.
2693 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
2694 _Optional_base_impl.
2695 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
2696 support for new std::optional layout.
2697 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
2700 * include/bits/locale_conv.h: Use <> for includes not "".
2701 * include/ext/random: Likewise.
2702 * include/ext/vstring.h: Likewise.
2704 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2706 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
2707 (GLIBCXX_3.4.21): Likewise.
2709 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2712 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
2713 to match the one that controls whether utimbuf and utime are declared.
2715 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
2718 * include/bits/char_traits.h (char_traits::move): Do not pass null
2719 pointers to memmove.
2720 * include/bits/locale_facets.h
2721 (ctype<char>::widen(const char*, const char*, char*)): Do not
2722 pass null pointers to memcpy.
2723 (ctype<char>::narrow(const char*, const char*, char, char*)):
2725 (ctype<char>::do_widen(const char*, const char*, char*)):
2727 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
2730 * doc/xml/manual/spine.xml: Update copyright years.
2731 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
2732 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
2733 for C++17 filesystem library.
2734 * doc/html/*: Regenerate.
2736 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
2737 * config.h.in: Regenerate.
2738 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
2739 alphabetically and add missing entries for copy_symlink,
2740 hard_link_count, rename, and resize_file.
2741 * configure: Regenerate.
2742 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
2743 used unconditionally.
2744 * src/filesystem/ops-common.h (__gnu_posix::truncate)
2745 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
2746 supports truncating to zero length.
2747 * testsuite/27_io/filesystem/operations/all.cc: New test.
2748 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
2750 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
2753 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
2754 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
2755 * config.h.in: Regenerate.
2756 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
2757 remaining std::filesystem types and functions.
2758 * configure: Regenerate.
2759 * src/c++17/Makefile.am: Add C++17 filesystem sources.
2760 * src/c++17/Makefile.in: Regenerate.
2761 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
2762 here, and change name of included file.
2763 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
2764 here, and change name of included file.
2765 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
2766 path to dir-common.h.
2767 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
2768 path to ops-common.h. Disable -Wunused-parameter warnings.
2769 (internal_file_clock): Define unconditionally.
2770 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
2772 (do_copy_file, do_space): Move definitions to ops.common.h.
2773 (copy, file_size, hard_link_count, last_write_time, space): Only
2774 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
2776 (last_write_time, read_symlink): Remove unused attributes from
2778 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
2779 * src/filesystem/Makefile.in: Regenerate.
2780 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
2781 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
2782 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
2783 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
2784 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
2785 dummy types and functions instead of using #error.
2786 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
2787 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
2789 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
2790 (do_copy_file, do_space): Move definitions here from std-ops.cc.
2791 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
2792 to account for new namespace.
2793 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
2794 -lstdc++fs from dg-options.
2795 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
2796 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
2797 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
2798 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
2799 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
2801 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
2802 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2804 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
2805 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
2806 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
2807 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
2808 * testsuite/27_io/filesystem/operations/create_directories.cc:
2810 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
2811 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
2812 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
2813 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
2814 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
2815 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
2816 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2817 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
2818 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
2819 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
2820 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
2821 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
2822 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
2823 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
2824 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
2825 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2826 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2827 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
2829 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
2833 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
2834 typeinfo and vtables less greedy.
2835 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
2836 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
2837 * src/c++17/Makefile.in: Regenerate.
2838 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
2839 here, and change name of included file.
2840 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
2841 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
2843 * src/filesystem/Makefile.in: Regenerate.
2844 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
2845 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
2846 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
2847 from dg-options and remove dg-require-filesystem-ts.
2848 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
2849 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
2850 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
2851 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
2852 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
2853 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
2854 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
2855 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
2856 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
2857 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
2858 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
2859 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
2860 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
2861 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
2862 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
2863 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
2864 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
2865 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
2866 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
2867 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
2868 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
2870 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
2871 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
2872 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
2873 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
2874 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
2875 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
2876 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
2877 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
2878 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
2879 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
2880 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
2881 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
2883 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
2885 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2887 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
2889 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
2890 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2891 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
2892 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
2893 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2894 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2895 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2896 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2897 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
2898 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2900 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2901 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2902 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2903 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
2904 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2907 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
2908 Check is_trivially_copyable instead of is_scalar.
2909 (variant::emplace<N, Args>(Args&&...)): If construction of the new
2910 contained value can throw and its type is trivially copyable then
2911 construct into a temporary variant and move from it, to provide the
2912 strong exception safety guarantee.
2913 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
2915 * testsuite/20_util/variant/87431.cc: New test.
2916 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
2917 conversion causes valueless state.
2920 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
2921 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
2922 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
2923 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
2924 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
2926 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
2928 * include/bits/fs_fwd.h (__file_clock): Define new clock.
2929 (file_time_type): Redefine in terms of __file_clock.
2930 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
2932 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
2934 (internal_file_lock): New helper type for accessing __file_clock.
2935 (do_copy_file): Use internal_file_lock to convert system time to
2937 (last_write_time(const path&, error_code&)): Likewise.
2938 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
2940 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
2942 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
2943 for const member functions of std::basic_string.
2944 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
2946 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
2947 Make non-standard constructor private.
2948 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
2950 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
2951 explicit instantiations for C++17 as well as earlier dialects.
2952 * src/c++17/Makefile.am: Add new source files.
2953 * src/c++17/Makefile.in: Regenerate.
2954 * src/c++17/cow-string-inst.cc: New file defining explicit
2955 instantiations for basic_string member functions added in C++17.
2956 * src/c++17/string-inst.cc: Likewise.
2958 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
2959 copy/move constructors for old std::basic_string.
2960 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2961 (basic_string::reference, basic_string::const_reference): Define
2962 as plain references for C++11 and later.
2963 (basic_string::basic_string()): Put constructor body outside
2964 preprocessor conditional groups.
2965 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
2966 instead of copying it.
2967 (basic_string::basic_string(const basic_string&, const _Alloc&)):
2969 (basic_string::basic_string(basic_string&&, const _Alloc&)):
2971 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
2972 cases for old basic_string.
2973 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
2974 allocator-extended constructors unconditionally. Add extra members to
2975 allocator type when using old string ABI.
2976 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
2978 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
2980 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
2981 -fno-inline added to test flags.
2983 * testsuite/21_strings/basic_string/requirements/
2984 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
2986 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
2987 assertion failures with old std::string ABI.
2989 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
2991 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
2992 functions that will only erase elements at the end.
2993 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
2994 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
2995 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
2997 (path::_List::pop_back()): Define.
2998 (path::_List::_M_erase_from(const_iterator)): Define.
2999 (path::operator/=(const path&)): Use pop_back to remove last component
3000 and _M_erase_from to remove multiple components.
3001 (path::_M_append(basic_string_view<value_type>)): Likewise.
3002 (path::operator+=(const path&)): Likewise.
3003 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3004 (path::remove_filename()): Likewise.
3005 (path::lexically_normal()): Use _List::_Impl iterators instead of
3006 path::iterator. Use pop_back to remove components from the end. Clear
3007 trailing filename, instead of using erase(const_iterator) to remove
3008 a non-final component.
3009 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3011 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3013 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3014 incorrect treatment of empty filename after trailing slash.
3015 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3017 * testsuite/21_strings/basic_string/modifiers/assign/char/
3018 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3020 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3021 move_assign_optim.cc: Likewise.
3023 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3024 Jakub Jelinek <jakub@redhat.com>
3027 * include/experimental/memory: Replace UTF-8 quote characters.
3028 * include/std/future: Replace UTF-8 "em dash" characters.
3030 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3033 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3034 * include/debug/forward_list: Likewise.
3035 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3037 * include/experimental/chrono: Likewise.
3038 * include/experimental/functional: Likewise.
3039 * include/experimental/ratio: Likewise.
3040 * include/experimental/system_error: Likewise.
3041 * include/experimental/tuple: Likewise.
3042 * include/experimental/type_traits: Likewise.
3043 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3044 * include/parallel/multiseq_selection.h: Likewise.
3047 * config/abi/pre/gnu.ver: Add missing exports.
3048 * testsuite/22_locale/collate_byname/88681.cc: New test.
3049 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3050 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3052 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
3054 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3055 initializer_list<value_type> and from input iterator ranges.
3056 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3058 * testsuite/experimental/string_view/element_access/char/empty.cc:
3059 Fix year range in copyright header.
3061 2019-01-02 Joel Brobecker <brobecker@adacore.com>
3063 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3064 Fix year range in copyright header.
3066 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3068 Update copyright years.
3070 Copyright (C) 2019 Free Software Foundation, Inc.
3072 Copying and distribution of this file, with or without modification,
3073 are permitted in any medium without royalty provided the copyright
3074 notice and this notice are preserved.