1 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
3 * include/bits/stl_deque.h
4 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
5 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
6 (_Deque_base::_Deque_impl_data): New.
7 (_Deque_base::_Deque_impl): Inherit latter.
8 (_Deque_base::_Deque_impl::_M_swap_data): Move...
9 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
10 (_Deque_base::_Deque_impl()): Add noexcept qualification.
11 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
12 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
13 (deque<>::deque()): Default.
14 (deque<>::deque(deque&&)): Default.
15 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
16 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
17 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
18 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
20 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
21 (deque<>::resize(size_type, const value_type&)): Share a single
23 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
25 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
26 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
27 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
28 * testsuite/23_containers/deque/allocator/default_init.cc: New.
30 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
33 * include/std/variant (holds_alternative, get, get_if): Improve
34 static assertion messages.
35 (bad_variant_access::bad_variant_access()): Change default message.
36 (__throw_bad_variant_access(bool)): New overload.
37 (get): Use new overload.
38 (visit, visit<R>): Improve exception message.
40 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
41 targets. Add more cases from P0608R3.
42 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
44 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
45 * include/experimental/type_traits (is_detected_exact)
46 (is_detected_exact_v): Likewise.
47 * include/pstl/execution_defs.h (is_execution_policy)
48 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
49 * include/pstl/execution_impl.h (__policy_traits): Likewise.
50 * testsuite/17_intro/names.cc: Check for more non-reserved names.
51 * testsuite/experimental/names.cc: New test.
54 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
55 assertions from the destructor.
56 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
57 Move static_assert for hash function to here.
58 (_Hash_table_base::_M_equals): Move static_assert for equality
60 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
62 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
63 the value directly instead of calling _S_value.
64 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
65 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
66 _S_key(_Const_Link_type).
67 * testsuite/23_containers/set/85965.cc: Check construction,
68 destruction, assignment and size() do not trigger the assertions.
69 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
70 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
72 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
73 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
74 * testsuite/23_containers/set/48101_neg.cc: Likewise.
75 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
76 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
77 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
78 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
80 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
81 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
84 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
86 * doc/html/*: Regenerate.
87 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
90 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
92 Move from state of allocators (LWG2593)
93 * include/bits/stl_deque.h
94 (_Deque_base(_Deque_base&&, false_type)): Remove.
95 (_Deque_base(_Deque_base&&, true_type)): Remove.
96 (_Deque_base(_Deque_base&&)): Adapt.
97 (_Deque_base::_M_move_impl()): Remove.
98 * testsuite/util/testsuite_allocator.h
99 (propagating_allocator(propagating_allocator&&)): Preserve move from
101 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
103 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
105 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
106 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
107 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
109 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
111 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
112 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
114 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
116 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
118 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
120 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
122 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
124 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
126 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
129 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
131 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
132 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
134 * include/std/variant (__overload_set): Remove.
136 (_Build_FUN): New class template to define a single FUN overload,
137 with specializations to prevent unwanted conversions, as per P0608R3.
138 (_Build_FUNs): New class template to build an overload set of FUN.
139 (_FUN_type): New alias template to perform overload resolution.
140 (__accepted_type): Use integer_constant base for failure case. Use
141 _FUN_type for successful case.
142 (variant::__accepted_index): Use _Tp instead of _Tp&&.
143 (variant::variant(_Tp&&)): Likewise.
144 (variant::operator=(_Tp&&)): Likewise.
146 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
147 Replace raw visitation with a runtime check for the valueless state
148 and a non-raw visitor.
149 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
150 (variant::index()): Remove branch.
151 (variant::swap(variant&)): Use valueless_by_exception() instead of
152 comparing the index to variant_npos, and add likelihood attribute.
154 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
155 (_Hashtable_base::_Equal_hash_code): Define new class template.
156 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
159 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
160 Replace with _M_get non-static member function.
161 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
163 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
164 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
166 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
167 _S_get accessors for members in EBO helpers.
168 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
169 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
171 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
173 (_Hashtable_base::_M_eq()): Remove non-const overload.
175 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
177 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
179 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
181 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
184 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
186 * config/os/solaris/solaris2.10: Move to ...
187 * config/os/solaris: ... this.
188 * configure.host (os_include_dir): Adapt.
189 (abi_baseline_pair): Remove Solaris 10 handling.
190 * config/abi/post/i386-solaris2.10: Remove.
191 * config/abi/post/sparc-solaris2.10: Remove.
192 * config/abi/post/i386-solaris2.11: Rename to ...
193 * config/abi/post/i386-solaris: ... this.
194 * config/abi/post/sparc-solaris2.11: Rename to ...
195 * config/abi/post/sparc-solaris: ... this.
197 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
200 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
203 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
205 * include/std/variant (__visit_with_index): Remove typedef.
206 (__deduce_visit_result): New tag type.
207 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
208 visitation of possibly-valueless variants, forwarding to __do_visit
209 with the relevant tag type.
210 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
211 and make lambda return void.
212 (__variant_construct): Likewise.
213 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
214 __raw_idx_visit and make lambda return void.
215 (_Multi_array::__untag_result): Add metafunction to check the function
216 pointer type for a tag type that dictates the kind of visitation.
217 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
218 Use decltype(auto) instead of tagged function pointer type.
219 (__gen_vtable_impl): Remove bool non-type parameter and unused
220 _Variant_tuple parameter.
221 (__gen_vtable_impl::__visit_invoke_impl): Remove.
222 (__gen_vtable_impl::__do_visit_invoke): Remove.
223 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
224 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
225 for the visit<R> case, rather than dispatching to separate functions.
226 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
228 (variant::swap): Likewise.
229 (__do_visit): Replace two non-type template parameters with a single
230 type parameter, so that the caller must specify the visitor's return
231 type (or one of the tag types).
232 (visit): Deduce a return type from the visitor and use the
233 __deduce_visit_result tag to enforce that all overloads return the
235 (visit<R>): Call __do_visit<R> with explicit result type.
236 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
239 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
241 nonesuch is insufficiently useless (lwg2996)
242 * include/std/type_traits (struct __nonesuch): Added private base
243 class to make __nonesuch not an aggregate and removed deleted default
245 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
246 (operator=(const pair&)): Use __nonesuch instead of
247 __nonesuch_no_braces.
248 (operator=(pair&&)): Likewise
249 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
250 of __nonesuch_no_braces.
251 (operator=(tuple&&)): Likewise
252 * include/experimental/type_traits (struct nonesuch): Added private
253 base class to make nonesuch not an aggregate and removed deleted
255 * testsuite/20_util/nonesuch/nonesuch.cc: New.
256 * testsuite/experimental/type_traits/nonesuch.cc: New.
258 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
260 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
261 (_Function_handler): Remove partial specializations for void return
262 types and pointers to member.
263 (_Function_handler::_M_manager): Adapt to removal of
264 _Simple_type_wrapper.
265 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
266 * include/std/functional (_Bind_result::__enable_if_void)
267 (_Bind_result::__disable_if_void): Remove sfinae helpers.
268 (_Bind_result::__call): Use __invoke_r and remove overloads for void
270 * include/std/future (__future_base::_Task_state::_M_run)
271 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
272 change return type of lambda expressions.
274 * include/bits/invoke.h (__invoke_r): Define new function implementing
275 the INVOKE<R> pseudo-function.
276 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
277 * testsuite/20_util/function_objects/invoke/2.cc: New test.
279 * include/std/type_traits (__is_nt_convertible_helper): Define it
280 unconditionally, not only for C++20.
281 (__is_nothrow_convertible): Define internal trait for use in C++11.
282 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
283 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
284 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
285 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
286 that has nothrow explicit conversion but potentially-throwing implicit
288 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
289 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
290 function to only consider implicit conversions.
291 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
293 * include/std/iterator: Include <iosfwd> instead of <istream> and
296 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
297 Remove unused, non-standard function.
299 * include/bits/regex.h (match_results::max_size()): Adjust return
300 value to account for prefix/suffix/unmatched subs.
301 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
302 reset the contained sub matches.
303 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
304 function to set result state following a failed match.
305 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
306 sub_match states after _M_resize. Use _M_establish_failed_match.
309 * include/std/thread (thread::_State_impl, thread::_S_make_state):
310 Replace single _Callable parameter with variadic _Args pack, to
311 forward them directly to the tuple of decayed copies.
312 * testsuite/30_threads/thread/cons/69724.cc: New test.
314 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
316 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
317 * include/bits/basic_string.h: (operator=(const basic_string&):
318 Move allocator decision to assign.
319 (assign(const basic_string&)): Move allocator decision here.
320 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
322 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
325 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
327 * testsuite/util/testsuite_allocator.h (memory_resource)
328 (default_resource_mgr): Fix indentation.
330 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
331 Use operator-> to access raw pointer member.
332 * testsuite/23_containers/vector/59829.cc: Likewise.
333 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
334 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
335 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
337 (PointerBase, PointerBase_void): Derive from NullablePointer and use
338 its constructors and equality operators. Change converting
339 constructors to use operator-> to access private member of the other
341 (PointerBase_void::operator->()): Add, for access to private member.
342 (operator-(PointerBase, PointerBase)): Change to hidden friend.
343 (operator==(PointerBase, PointerBase)): Remove.
344 (operator!=(PointerBase, PointerBase)): Remove.
346 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
347 not assume field called _M_head_impl is the first tuple element.
348 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
349 implementation more accurate.
350 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
351 empty pointer type and non-empty deleter.
353 LWG 2899 - Make is_move_constructible correct for unique_ptr
354 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
355 move assignment operator.
356 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
357 (__uniq_ptr_data): New class template with conditionally deleted
359 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
360 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
361 constructor and move assignment operator as defaulted.
362 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
363 __uniq_ptr_impl::release().
364 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
365 to __uniq_ptr_impl::reset(pointer).
366 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
367 Check for new __uniq_ptr_data type.
368 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
370 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
372 PR libstdc++/90454.cc path construction from void*
373 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
374 pointers to void are rejected as well as void.
375 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
376 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
378 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
380 * doc/xml/manual/policy_data_structures.xml: Comment out stray
381 <remark> elements. Fix formatting of bibliography references.
383 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
385 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
387 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
389 Remove Profile Mode, deprecated since 7.1.0
390 * doc/Makefile.am: Remove XML file for profile mode docs.
391 * doc/Makefile.in: Regenerate.
392 * doc/xml/authors.xml: Remove authors of profile mode docs.
393 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
395 * doc/xml/manual/debug.xml: Likewise.
396 * doc/xml/manual/evolution.xml: Document removal of profile mode.
397 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
398 * doc/xml/manual/spine.xml: Remove profile mode author credit.
399 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
401 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
403 * doc/html/*: Regenerate.
404 * include/Makefile.am: Remove profile mode headers.
405 * include/Makefile.in: Regenerate.
406 * include/bits/c++config (std::__profile): Remove namespace.
407 [_GLIBCXX_PROFILE]: Remove checks for macro.
408 * include/profile/array: Remove.
409 * include/profile/base.h: Remove.
410 * include/profile/bitset: Remove.
411 * include/profile/deque: Remove.
412 * include/profile/forward_list: Remove.
413 * include/profile/impl/profiler.h: Remove.
414 * include/profile/impl/profiler_algos.h: Remove.
415 * include/profile/impl/profiler_container_size.h: Remove.
416 * include/profile/impl/profiler_hash_func.h: Remove.
417 * include/profile/impl/profiler_hashtable_size.h: Remove.
418 * include/profile/impl/profiler_list_to_slist.h: Remove.
419 * include/profile/impl/profiler_list_to_vector.h: Remove.
420 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
421 * include/profile/impl/profiler_node.h: Remove.
422 * include/profile/impl/profiler_state.h: Remove.
423 * include/profile/impl/profiler_trace.h: Remove.
424 * include/profile/impl/profiler_vector_size.h: Remove.
425 * include/profile/impl/profiler_vector_to_list.h: Remove.
426 * include/profile/iterator_tracker.h: Remove.
427 * include/profile/list: Remove.
428 * include/profile/map: Remove.
429 * include/profile/map.h: Remove.
430 * include/profile/multimap.h: Remove.
431 * include/profile/multiset.h: Remove.
432 * include/profile/ordered_base.h: Remove.
433 * include/profile/set: Remove.
434 * include/profile/set.h: Remove.
435 * include/profile/unordered_base.h: Remove.
436 * include/profile/unordered_map: Remove.
437 * include/profile/unordered_set: Remove.
438 * include/profile/vector: Remove.
439 * scripts/run_doxygen: Do not process profile mode headers.
440 * testsuite/23_containers/array/element_access/60497.cc: Don't use
442 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
443 Remove dg-skip-if for profile mode.
444 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
445 preprocessor check for profile mode.
446 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
447 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
449 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
451 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
452 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
453 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
454 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
455 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
457 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
459 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
461 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
463 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
464 preprocessor check for profile mode.
465 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
467 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
468 Remove dg-skip-if for profile mode.
469 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
470 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
471 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
472 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
473 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
474 * testsuite/Makefile.am: Remove profile_flags variable and
475 * testsuite/Makefile.am: Remove profile_flags variable and
476 check-profile target.
477 * testsuite/Makefile.in: Regenerate.
478 * testsuite/ext/profile/all.cc: Remove.
479 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
480 * testsuite/ext/profile/profiler_algos.cc: Remove.
481 * testsuite/ext/profile/replace_new.cc: Remove.
482 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
483 preprocessor check for profile mode.
484 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
485 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
486 (check_v3_target_normal_mode): Do not check for profile mode macro.
487 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
489 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
490 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
491 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
492 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
493 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
494 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
495 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
496 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
497 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
498 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
500 Remove array_allocator extension, deprecated since 4.9.0
501 * doc/xml/manual/allocator.xml: Remove documentation for
503 * doc/xml/manual/evolution.xml: Document array_allocator removal.
504 * doc/xml/manual/using.xml: Remove header from documentation.
505 * include/Makefile.am: Remove <ext/array_allocator.h> header.
506 * include/Makefile.in: Regenerate.
507 * include/ext/array_allocator.h: Remove.
508 * include/precompiled/extc++.h: Do not include removed header.
509 * testsuite/ext/array_allocator/1.cc: Remove.
510 * testsuite/ext/array_allocator/2.cc: Remove.
511 * testsuite/ext/array_allocator/26875.cc: Remove.
512 * testsuite/ext/array_allocator/3.cc: Remove.
513 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
514 * testsuite/ext/array_allocator/check_delete.cc: Remove.
515 * testsuite/ext/array_allocator/check_new.cc: Remove.
516 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
517 * testsuite/ext/headers.cc: Do not include removed header.
519 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
521 * include/bits/stl_bvector.h
522 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
524 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
526 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
528 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
530 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
532 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
534 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
536 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
538 (_Bit_iterator::operator-(difference_type)): Likewise.
539 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
540 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
542 (_Bit_const_iterator::operator-(difference_type)): Likewise.
543 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
545 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
548 * testsuite/util/thread/all.h: Do not use remove_pointer for
549 std::thread::native_handle_type.
552 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
553 (_Variant_storage<true, Types...>::_M_reset()))
554 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
555 (__get_storage): Likewise.
556 (variant): Add noexcept to friend declarations for __get and
560 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
561 Use _Require for constraints.
562 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
564 (__uniq_ptr_hash): New base class with conditionally-disabled call
566 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
567 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
568 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
570 * include/bits/shared_ptr.h: Improve docs.
571 * include/bits/shared_ptr_base.h: Likewise.
572 * include/bits/stl_uninitialized.h: Likewise.
573 * include/bits/unique_ptr.h: Likewise.
574 * libsupc++/new: Likewise.
576 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
578 * include/bits/stl_deque.h
579 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
581 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
583 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
585 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
587 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
589 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
591 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
593 (_Deque_iterator<>::operator-(difference_type)): Likewise.
595 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
598 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
599 (test01): Reserve for number of insertions to avoid rehash during test.
600 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
602 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
607 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
609 * include/experimental/bits/fs_path.h: Improve docs.
610 * include/experimental/bits/net.h: Fix wrong header name in comment.
611 Do not document implementation details.
612 * include/experimental/netfwd: Fix doxygen grouping.
614 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
616 * include/bits/stl_pair.h: Improve docs.
617 * include/std/tuple: Likewise.
619 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
621 * include/std/chrono: Improve docs.
622 * include/std/ratio: Do not document implementation details.
623 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
625 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
628 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
629 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
630 (__duration_common_type): New helper.
631 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
632 __duration_common_type.
633 (__timepoint_common_type_wrapper): Replace with ...
634 (__timepoint_common_type): New helper.
635 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
636 Use __time_point_common_type.
637 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
638 (__common_type_impl): If either argument is transformed by decay,
639 use the common_type of the decayed types.
640 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
641 decayed, use __do_common_type_impl to get the common_type.
642 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
643 (__do_member_type_wrapper, __member_type_wrapper)
644 (__expanded_common_type_wrapper): Remove.
645 (__common_type_pack, __common_type_fold): New helpers.
646 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
647 __member_type_wrapper and __expanded_common_type_wrapper.
648 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
649 Test zero-length template argument list.
650 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
651 Test single argument cases and argument types that should decay.
652 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
653 Adjust expected error.
654 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
656 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
657 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
658 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
660 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
662 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
664 Make allocator propagation more consistent for
665 operator+(basic_string) (P1165R1)
666 * include/bits/basic_string.h
667 (operator+(basic_string&&, basic_string&&): Changed resulting
668 allocator to always be the one from the first parameter.
669 * include/bits/basic_string.tcc
670 (operator+(const _CharT*, const basic_string&)): Changed
671 resulting allocator to be SOCCC on the second parameter's allocator.
672 (operator+(_CharT, const basic_string&)): Likewise.
673 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
675 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
678 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
680 * include/bits/regex.h: Improve docs.
681 * include/bits/regex.tcc: Do not document implementation details.
683 * testsuite/19_diagnostics/error_code/hash.cc: New test.
685 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
687 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
688 Add type printer for container types in std::__debug namespace.
689 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
690 (gdb-tests): Use distinct parameters for the type of test and use of
692 (gdb-test): Check for regex test even if 'whatis' test.
693 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
695 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
696 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
697 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
698 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
699 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
700 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
701 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
703 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
705 * include/std/system_error (error_category): Fix comment.
708 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
709 argument is an empty path.
710 (absolute(const path&, error_code&)): Use invalid_argument as error
711 code instead of no_such_file_or_directory.
712 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
713 of non-existent paths and empty paths with both overloads of absolute.
715 * include/std/system_error (error_category, error_code)
716 (error_condition): Improve docs.
717 * libsupc++/exception: Add missing @addtogroup Doxygen command.
718 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
719 to class documentation. Suppress documentation for implementation
721 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
722 Suppress documentation for implementation details.
724 * include/std/system_error (error_code): Remove friend declaration
725 for hash<error_code>.
726 (hash<error_code>::operator()): Use public member functions to access
728 (hash<error_condition>::operator()): Use address of category, not
729 its object representation.
730 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
731 Use public member functions to access value and category.
732 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
734 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
736 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
737 * include/bits/hashtable_policy.h
738 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
739 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
740 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
741 smaller than input value rather than always greater. Preserve
742 _M_next_resize if called with 0 input. Use __builtin_floorl.
743 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
744 elements + number of insertions is greater than _M_next_resize. Start
745 with 11 buckets if not told otherwise. Use __builtin_floorl.
746 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
747 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
748 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
749 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
750 told otherwise. Use __builtin_floorl.
751 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
752 to also validate _Power2_rehash_policy.
753 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
756 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
759 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
763 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
764 overflow warning with -Wpedantic -Wsystem-headers.
766 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
769 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
770 * include/bits/move.h (swap): Remove extra parentheses.
772 * include/experimental/bits/lfts_config.h: Improve doc markup.
773 * include/experimental/optional: Improve docs.
774 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
775 (__constexpr_addressof): Remove.
776 (optional::operator->()): Use std::__addressof().
777 * include/std/optional (optional::operator->()): Adjust whitespace.
778 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
779 that operator-> is still constexpr with overloaded operator&. Change
780 to compile-only test.
781 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
784 * include/bits/shared_ptr.h: Improve docs.
785 * include/bits/shared_ptr_atomic.h: Likewise.
786 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
788 * include/bits/basic_string.h: Fix iterator/index confusion in
790 * include/bits/range_access.h: Fix Doxygen warnings.
791 * include/bits/refwrap.h: Do not document implementation details.
792 (ref, cref): Group docs with reference_wrapper.
793 * include/std/fstream: Fix Doxygen markup.
794 * libsupc++/initializer_list (begin, end): Group docs with
797 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
799 * include/bits/unique_lock.h: Fix/improve doxygen markup.
800 * include/std/mutex: Likewise.
801 * include/std/shared_mutex: Likewise.
803 * include/bits/fs_dir.h: Fix/improve doxygen markup.
804 * include/bits/fs_fwd.h: Likewise.
805 * include/bits/fs_ops.h: Likewise.
806 * include/bits/fs_path.h: Likewise.
807 * include/std/filesystem: Likewise.
809 * include/experimental/bits/net.h: Fix/improve doxygen markup.
810 * include/experimental/buffer: Likewise.
811 * include/experimental/executor: Likewise.
812 * include/experimental/internet: Likewise.
813 * include/experimental/io_context: Likewise.
814 * include/experimental/net: Likewise.
815 * include/experimental/netfwd: Likewise.
816 * include/experimental/socket: Likewise.
817 * include/experimental/timer: Likewise.
819 * doc/doxygen/doxygroups.cc: Move description of experimental group
821 * include/experimental/algorithm: Add to libfund-ts doc group.
822 * include/experimental/any: Likewise. Do not document implementation
824 * include/experimental/array: Add to libfund-ts doc group.
825 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
826 for Library Fundamentals.
827 * include/experimental/chrono: Add to libfund-ts doc group.
828 * include/experimental/deque: Likewise.
829 * include/experimental/forward_list: Likewise.
830 * include/experimental/functional: Likewise.
831 * include/experimental/iterator: Likewise.
832 * include/experimental/list: Likewise.
833 * include/experimental/map: Likewise.
834 * include/experimental/memory: Likewise.
835 * include/experimental/memory_resource: Likewise. Improve docs.
837 * include/experimental/numeric: Add to libfund-ts doc group.
838 * include/experimental/optional: Likewise.
839 * include/experimental/propagate_const: Likewise.
840 * include/experimental/random: Likewise.
841 * include/experimental/ratio: Likewise.
842 * include/experimental/regex: Likewise.
843 * include/experimental/set: Likewise.
844 * include/experimental/source_location: Likewise.
845 * include/experimental/string: Likewise.
846 * include/experimental/string_view: Likewise.
847 * include/experimental/system_error: Likewise.
848 * include/experimental/tuple: Likewise.
849 * include/experimental/type_traits: Likewise.
850 * include/experimental/unordered_map: Likewise.
851 * include/experimental/unordered_set: Likewise.
852 * include/experimental/utility: Likewise.
853 * include/experimental/vector: Likewise.
854 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
855 * testsuite/experimental/array/neg.cc: Adjust dg-error.
856 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
858 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
859 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
860 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
861 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
862 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
864 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
865 * include/experimental/bits/fs_fwd.h: Improve docs.
866 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
867 * include/experimental/bits/fs_path.h: Likewise.
868 (path, filesystem_error, u8path): Improve docs.
869 * include/experimental/filesystem: Link to docs for TS.
871 * config/allocator/new_allocator_base.h (__allocator_base): Add
872 workaround for Doxygen bug #6945.
873 * include/std/memory: Improve docs. Define group for pointer safety.
874 * include/std/scoped_allocator: Improve docs. Use "undocumented"
875 conditional to suppress documentation for implementation details.
877 * include/bits/specfun.h: Improve docs.
878 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
881 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
882 (std::experimental): Add docs.
883 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
884 namespace to nothing when generating docs.
885 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
886 * include/std/chrono (std::chrono): Likewise.
887 * include/std/functional (std::placeholders): Likewise.
888 * include/std/thread (std::this_thread): Likewise.
890 * include/parallel/settings.h: Fix Doxygen markup.
892 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
893 anything unless PB_DS_CLASS_C_DEC is defined.
894 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
895 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
896 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
897 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
898 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
899 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
900 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
902 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
903 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
904 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
905 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
906 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
907 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
908 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
909 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
910 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
911 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
912 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
914 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
915 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
917 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
920 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
921 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
922 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
925 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
927 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
928 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
929 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
930 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
931 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
932 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
934 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
935 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
938 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
941 * include/std/complex (__complex_proj): Return parameter unchanged.
942 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
943 floating-point types to take std::complex arguments.
944 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
945 floating-point types.
946 * testsuite/26_numerics/complex/proj.cc: New test.
948 2019-04-30 Jakub Jelinek <jakub@redhat.com>
950 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
951 to _Lock_policyE[012].
952 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
954 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
956 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
957 macros accidentally left in.
958 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
959 unnecessary -lstdc++fs option. Fix test for mingw.
960 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
963 2019-04-30 Jakub Jelinek <jakub@redhat.com>
965 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
967 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
969 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
971 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
972 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
975 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
977 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
980 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
981 class template and partial specialization.
984 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
986 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
987 functions to convert a value to an integral type.
988 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
989 (fill_n): Convert _Size parameter to an integral type.
990 * testsuite/25_algorithms/fill_n/87982.cc: New test.
991 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
992 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
993 * testsuite/25_algorithms/generate_n/87982.cc: New test.
994 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
995 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
997 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
999 Adding noexcept-specification on tuple constructors (LWG 2899)
1000 * libstdc++-v3/include/std/tuple:
1001 (tuple()): Add noexcept-specification.
1002 (tuple(const _Elements&...)): Likewise
1003 (tuple(_UElements&&...)): Likewise
1004 (tuple(const tuple<_UElements...>&)): Likewise
1005 (tuple(tuple<_UElements...>&&)): Likewise
1006 (tuple(const _T1&, const _T2&)): Likewise
1007 (tuple(_U1&&, _U2&&)): Likewise
1008 (tuple(const tuple<_U1, _U2>&): Likewise
1009 (tuple(tuple<_U1, _U2>&&): Likewise
1010 (tuple(const pair<_U1, _U2>&): Likewise
1011 (tuple(pair<_U1, _U2>&&): Likewise
1012 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1014 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
1017 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1018 arguments with __restrict.
1020 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1022 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1024 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
1026 * include/experimental/bits/fs_path.h
1027 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1028 avoid redundant call to _S_convert_loc with non-const pointers.
1030 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1031 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1032 * testsuite/21_strings/basic_string/hash/hash.cc
1033 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1034 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1035 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1037 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1038 wstring::_M_replace_dispatch with more specific patterns.
1039 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1040 Create const std::string to avoid redundant call to _S_convert_loc
1041 with non-const pointers.
1042 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1043 avoid unnecessary basic_string::assign instantiations.
1045 * include/std/memory (__uses_alloc_args): Add string-literal to
1046 static_assert, to match the one in __uses_alloc.
1047 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1048 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1049 for recursive uses-allocator construction of nested pairs.
1050 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1053 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1055 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1056 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1057 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1058 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1060 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1061 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1062 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1063 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1064 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1065 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1066 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1068 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
1071 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1072 * include/std/scoped_allocator [__cplusplus > 201703L]
1073 (scoped_allocator_adaptor::construct): Define in terms of
1074 uses_allocator_construction_args, as per P0591R4.
1075 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1076 * testsuite/util/testsuite_allocator.h: Remove name of unused
1079 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
1081 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1082 * doc/html/*: Regenerate.
1084 * include/bits/fs_path.h (operator<, operator<=, operator>)
1085 (operator>=, operator==, operator!=): Make hidden friends, as per
1087 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1088 string type in test.
1089 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1091 * include/std/any (any::any(ValueType&&)): Use __and_v.
1092 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1095 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1097 * include/std/type_traits (__result_of_memfun): Use remove_reference
1098 instead of __remove_cvref_t and remove redundant is_same check.
1099 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1101 * include/experimental/string_view (basic_string_view::pointer)
1102 (basic_string_view::reference): Fix to refer to non-const value_type.
1103 * include/bits/basic_string.h (basic_string): Use __sv_check and
1104 __sv_limit instead of basic_string_view::_M_check and
1105 basic_string_view::_M_limit.
1106 * include/std/string_view (__sv_check, __sv_limit): New
1107 helper functions to replace basic_string_view::_M_check and
1108 basic_string_view::_M_limit.
1109 (basic_string_view): Add static assertions to enforce ill-formed
1110 requirement for traits_type::char_type from P1148R0, and to enforce
1111 required properties of char-like types.
1112 (basic_string_view::pointer, basic_string_view::reference): Fix to
1113 refer to non-const value_type.
1114 (basic_string_view::operator[], basic_string_view::at)
1115 (basic_string_view::front, basic_string_view::back)
1116 (basic_string_view::data): Use const_reference and const_pointer
1117 typedefs for return types.
1118 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1119 (hash<wstring_view>): Fix argument_type typedef.
1120 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1121 char/1.cc: Fix expected return type of basic_string_view::data().
1122 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1123 wchar_t/1.cc: Likewise.
1124 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1125 char/1.cc: Likewise.
1126 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1127 wchar_t/1.cc: Likewise.
1128 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1130 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1131 Check reference and pointer typedefs.
1132 * testsuite/experimental/string_view/requirements/typedefs.cc:
1134 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1135 Fix expected return type of basic_string_view::data().
1136 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1138 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1140 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
1144 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
1145 Avoid a runtime check for types that can never be stored in std::any.
1146 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1149 PR libstdc++/90220 (partial)
1150 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
1151 not attempt ill-formed static_cast to pointers to non-object types.
1152 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1155 * testsuite/20_util/variant/run.cc: Catch exception by reference to
1156 prevent -Wcatch-value warning.
1158 * include/std/variant (__variant_construct): Use template parameter
1159 type instead of equivalent decltype-specifier.
1160 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
1161 Replace forward with move.
1162 (_Move_ctor_base<false, Types...>::_M_destructive_move)
1163 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
1164 (_Move_ctor_base<true, Types...>::_M_destructive_move)
1165 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
1166 index after construction succeeds.
1167 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
1168 if-constexpr checks that are always true. Use __remove_cvref_t instead
1169 of remove_reference so that is_nothrow_move_constructible check
1170 doesn't use a const rvalue parameter. In the potentially-throwing case
1171 construct a temporary and move assign it, as per LWG 2904.
1172 (_Move_assign_base<false, Types...>::operator=): Remove redundant
1173 if-constexpr checks that are always true. Use emplace as per LWG 2904.
1174 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
1175 construct a temporary and move assign from it, as per LWG 2904.
1176 * testsuite/20_util/variant/exception_safety.cc: Check that
1177 assignment operators have strong exception safety guarantee.
1179 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
1181 Document PSTL linker flags
1183 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
1185 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1187 * include/std/variant (__detail::__variant::_Traits): Make
1188 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
1189 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
1191 (__detail::__variant::_Copy_assign_alias): Only depend on
1192 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
1193 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
1194 move assignment operators.
1197 * include/std/variant (variant::__not_self): New helper for the
1198 is_same_v<remove_cvref_t<T>, variant>==false constraints.
1199 (variant::__to_type_impl): Remove.
1200 (variant::__to_type): Add default argument to check pack size, instead
1201 of using __to_type_impl.
1202 (variant::__accepted_type): Add default argument using __not_self.
1203 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
1204 for variant(T&&) constructor constraint.
1205 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
1206 Extract __accepted_type into a named template parameter for reuse in
1207 other constraints and in the exception specification.
1208 (variant::variant(in_place_type_t<T>, Args&&...))
1209 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
1210 (variant::variant(in_place_index_t<T>, Args&&...))
1211 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
1212 (variant::operator=T&&)): Remove redundant && from trait arguments.
1213 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
1214 isn't used for in_place_type or in_place_index arguments.
1216 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
1217 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
1218 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
1220 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1221 Bernd Edlinger <bernd.edlinger@hotmail.de>
1222 Jakub Jelinek <jakub@redhat.com>
1225 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
1226 general-regs-only target attribute for ARM.
1228 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1231 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
1232 specialization also depend on is_nothrow_move_constructible.
1233 * include/std/variant (__detail::__variant::__never_valueless()):
1234 Only true if the variant would have a move assignment operator.
1235 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
1236 Check __never_valueless<T...>().
1237 (variant::emplace): Only perform non-throwing move assignments
1238 for never-valueless alternatives if the variant has a move assignment
1240 * testsuite/20_util/variant/compile.cc: Check that never-valueless
1241 types can be emplaced into non-assignable variants.
1242 * testsuite/20_util/variant/run.cc: Check that never-valueless types
1243 don't get copied when emplaced into non-assignable variants.
1245 * include/std/variant (__detail::__variant::__ref_cast): Remove
1247 (__detail::__variant::_Uninitialized::_M_get)
1248 (__detail::__variant::__get)
1249 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
1251 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
1253 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
1255 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1256 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1257 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1258 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1260 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1262 Delegate PSTL configuration to pstl/pstl_config.h
1264 * include/bits/c++config: Remove explicit PSTL configuration
1265 macros and use definitions from <pstl/pstl_config.h>.
1267 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1269 Cleanup algorithm implementations
1270 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
1272 (mismatch): Forward execution policy.
1273 (equal): Qualify call to std::equal().
1274 (partial_sort): Forward execution policy.
1275 (inplace_merge): Forward execution policy.
1277 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
1279 Improve implementation of parallel equal()
1280 * include/pstl/algorithm_impl.h
1281 (__internal::__brick_equal): use "4 iterator" version of
1283 (__internal::__brick_equal): use simd for random access
1284 iterators on unsequenced execution policies.
1285 (__internal::__pattern_equal): add "4 iterator" version
1286 (__internal::__pattern_equal): dispatch to simd __brick_equal
1287 for vector-only execution policies.
1288 (__internal::__pattern_equal): dispatch to __parallel_or for
1289 parallel execution policies.
1290 * include/pstl/glue_algorithm_impl.h
1291 (std::equal): dispatch to "4 iterator" version of
1292 __internal::__pattern_equal().
1294 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
1297 * include/bits/forward_list.h (operator==): Do not use operator!= to
1299 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1300 earlier in the list, so that sort is stable.
1301 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1302 * testsuite/23_containers/forward_list/comparable.cc: Test with
1303 types that meet the minimum EqualityComparable and LessThanComparable
1304 requirements. Remove irrelevant comment.
1306 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1307 Do not depend on whether all alternative types are move constructible.
1308 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1309 from the operand when deciding whether to perform the assignment.
1310 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1311 with deleted move constructor and deleted move assignment operator.
1312 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1313 behaviour of variants with DeletedMoves as an alternative.
1314 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1315 (move_ctor, move_assign): Check that moving a variant with a
1316 DeletedMoves alternative falls back to copying instead of moving.
1318 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1319 from static_assert declarations.
1321 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1322 actually match its name.
1323 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1324 (test_swap()): Fix result for MoveCtorOnly and check
1325 MoveCtorAndSwapOnly.
1327 * include/std/optional (optional::value_or(U&&) &&): Add missing
1328 constexpr specifier.
1329 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1330 for disengaged optionals and rvalue optionals.
1331 * testsuite/20_util/optional/observers/4.cc: Likewise.
1333 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
1335 * include/pstl/algorithm_impl.h: Uglify identfiers.
1336 * include/pstl/numeric_impl.h: Uglify identfiers.
1337 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1339 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
1341 * include/bits/c++config:
1342 Add definition for __PSTL_ASSERT.
1343 Add definition for __PSTL_ASSERT_MSG.
1344 * include/pstl/algorithm_impl.h: Replace use of assert().
1345 * include/pstl/numeric_impl.h: Replace use of assert().
1346 * include/pstl/parallel_backend_tbb.h:
1347 Replace use of assert().
1348 Replace use of __TBB_ASSERT().
1349 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1351 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
1354 * src/c++17/memory_resource.cc
1355 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1356 needed to allow placing a _Chunk at the end of the buffer.
1357 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1359 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
1361 * doc/xml/faq.xml: Add information about emergency EH pool.
1362 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1363 Move outdated information on mt_allocator to a separate section.
1364 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1365 doesn't affect the default allocator.
1367 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1371 * testsuite/20_util/variant/89851.cc: New test.
1373 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
1375 * include/std/variant: Adjust whitespace. Add comments.
1376 (_Multi_array): Leave primary template undefined.
1377 (_Multi_array<_Tp>): Define partial specialization for base case of
1379 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1380 which is always a reference.
1381 (__gen_vtable::_S_apply()): Remove function, inline body into
1382 default member initializer.
1383 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1385 * include/std/variant (__variant_idx_cookie): Add member type.
1386 (__visitor_result_type): Remove.
1387 (__do_visit): Use invoke_result instead of __visitor_result_type.
1388 * testsuite/20_util/variant/visit.cc: New test.
1391 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1393 * testsuite/20_util/variant/90008.cc: New test.
1395 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
1397 * include/pstl/algorithm_impl.h: Add namespace qualification.
1398 * include/pstl/execution_defs.h: Add namespace qualification.
1399 * include/pstl/execution_impl.h: Add namespace qualification.
1400 * include/pstl/numeric_impl.h: Add namespace qualification.
1401 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1402 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1403 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1405 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1407 Fix visit<R> for variant.
1408 * include/std/variant (__do_visit): Add a template parameter
1409 for enforcing same return types for visit.
1410 (__gen_vtable_impl): Likewise.
1411 (_S_apply_single_alt): Adjust.
1412 (__visit_invoke_impl): New. Handle casting to void.
1413 (__do_visit_invoke): New. Enforces same return types.
1414 (__do_visit_invoke_r): New. Converts return types.
1415 (__visit_invoke): Adjust.
1416 (__gen_vtable): Add a template parameter for enforcing
1417 same return types for visit.
1418 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1419 different return types.
1420 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1421 visitors with different return types don't accidentally
1422 compile with regular visitation.
1424 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1426 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1427 dg-require-filesystem-ts.
1429 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
1431 * doc/xml/manual/status_cxx2020.xml: Update status.
1432 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1433 * testsuite/20_util/variant/visit_r.cc: New test.
1435 * include/bits/fs_dir.h (directory_iterator::operator*)
1436 (directory_iterator::operator->): Add noexcept.
1437 (operator==, operator!=): Replace namespace-scope equality operators
1438 for directory iterators with hidden friends.
1441 * config/abi/pre/gnu.ver: Add missing exports.
1442 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1445 * config/abi/pre/gnu.ver: Export new symbols.
1446 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1447 (recursive_directory_iterator::recursion_pending())
1448 (recursive_directory_iterator::disable_recursion_pending()): Remove
1449 inline definitions. Make noexcept.
1450 (recursive_directory_iterator::depth())
1451 (recursive_directory_iterator::operator*())
1452 (recursive_directory_iterator::operator->()): Make noexcept.
1453 (recursive_directory_iterator::_M_options)
1454 (recursive_directory_iterator::_M_pending): Remove data members.
1455 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1456 (recursive_directory_iterator::recursive_directory_iterator): Remove
1457 ctor-initializer. Use new constructor for _Dir_stack.
1458 (recursive_directory_iterator::options())
1459 (recursive_directory_iterator::recursion_pending())
1460 (recursive_directory_iterator::disable_recursion_pending()): Add
1461 non-inline definitions.
1462 (recursive_directory_iterator::depth()): Make noexcept.
1463 (recursive_directory_iterator::increment(error_code&))
1464 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1465 location of options and recursion_pending members.
1466 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1467 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1468 user-declared move constructor and assignment operator, to make the
1471 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1472 d_type == DT_UNKNOWN immediately.
1473 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1475 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1477 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1479 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1480 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1483 PR libstdc++/87431 (again)
1484 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1485 Define partial specialization for basic_string.
1486 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1487 shared_ptr and weak_ptr.
1488 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1490 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1492 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1494 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1496 * include/std/any (_Never_valueless_alt): Define explicit
1497 specialization for any.
1498 * include/std/variant (_Never_valueless_alt): Define primary template.
1499 (__never_valueless): Use _Never_valueless_alt instead of
1500 is_trivially_copyable.
1501 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1502 initializations to avoid try-catch overhead. Add special case for
1503 scalars produced by potentially-throwing conversions. Use
1504 _Never_valueless_alt instead of is_trivially_copyable for the
1505 remaining strong exception-safety cases.
1506 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1507 * testsuite/20_util/variant/87431.cc: Run both test functions.
1508 * testsuite/20_util/variant/exception_safety.cc: New test.
1509 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1510 so the variant becomes valueless.
1512 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
1515 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1517 (variant::emplace<_Tp>): Return result of emplace<N> directly.
1519 * include/std/string (__hash_string_base): New class template defining
1520 operator() for hashing strings.
1521 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1522 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1523 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1524 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1526 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1528 Use single-visitation in variant assignment and swap and relops.
1529 Also use indices instead of types when checking whether
1530 variants hold the same thing.
1531 * include/std/variant (__do_visit): Add a template parameter
1532 for index visitation, invoke with indices if index visitation
1534 (__variant_idx_cookie): New.
1535 (__visit_with_index): Likewise.
1536 (_Copy_assign_base::operator=): Do single-visitation with
1538 (_Move_assign_base::operator=): Likewise.
1539 (_Extra_visit_slot_needed): Adjust.
1540 (__visit_invoke): Call with indices if it's an index visitor.
1541 (relops): Do single-visitation with an index visitor.
1543 (__visitor_result_type): New.
1545 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1547 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1549 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1551 Don't revisit a variant we are already visiting.
1552 * include/std/variant (__variant_construct_single): New.
1553 (__variant_construct): Use it.
1554 (_M_destructive_move): Likewise.
1555 (_M_destructive_copy): Likewise.
1556 (_Copy_assign_base::operator=): Adjust.
1557 (_Move_assign_base::operator=): Likewise.
1560 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
1563 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1564 destructor so they are not evaluated until the _Key type is complete.
1565 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1566 * testsuite/23_containers/set/85965.cc: New test.
1567 * testsuite/23_containers/unordered_set/85965.cc: New test.
1568 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1569 with regexp matching the corresponding _Rb_tree specialization.
1570 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1571 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1572 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1573 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1574 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1575 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1576 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1578 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1581 Fix based on a suggestion by Antony Polukhin.
1582 * include/std/variant (__never_valueless): New.
1584 (_Extra_visit_slot_needed): New.
1585 (_Multi_array): Use it.
1586 (_S_apply_all_alts): Likewise.
1588 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1591 Fix based on a suggestion by Antony Polukhin.
1592 * include/std/variant (__gen_vtable): Don't reserve an
1593 additional table slot, _Multi_array already does that.
1595 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1598 Fix based on a suggestion by Antony Polukhin.
1599 * include/std/variant (__variant_construct): Capture a pointer
1600 to the storage and visit just one variant.
1602 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
1604 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1605 Doxygen-generated pages with unstable URL.
1606 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1607 * doc/xml/manual/extensions.xml: Likewise.
1608 * doc/xml/manual/parallel_mode.xml: Likewise.
1609 * doc/xml/manual/support.xml: Likewise.
1611 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1612 avoid -Wconversion warnings.
1614 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
1616 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1617 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
1618 (allstamped): Add stamp-pstl.
1619 (install-headers): Add ptsl_builddir.
1620 * include/Makefile.in: Regenerate.
1621 * include/bits/c++config: Add pstl configuration.
1622 * include/pstl/LICENSE.txt: New file.
1623 * include/pstl/algorithm_fwd.h: New file.
1624 * include/pstl/algorithm_impl.h: New file.
1625 * include/pstl/execution_defs.h: New file.
1626 * include/pstl/execution_impl.h: New file.
1627 * include/pstl/glue_algorithm_defs.h: New file.
1628 * include/pstl/glue_algorithm_impl.h: New file.
1629 * include/pstl/glue_execution_defs.h: New file.
1630 * include/pstl/glue_memory_defs.h: New file.
1631 * include/pstl/glue_memory_impl.h: New file.
1632 * include/pstl/glue_numeric_defs.h: New file.
1633 * include/pstl/glue_numeric_impl.h: New file.
1634 * include/pstl/memory_impl.h: New file.
1635 * include/pstl/numeric_fwd.h: New file.
1636 * include/pstl/numeric_impl.h: New file.
1637 * include/pstl/parallel_backend.h: New file.
1638 * include/pstl/parallel_backend_tbb.h: New file.
1639 * include/pstl/parallel_backend_utils.h: New file.
1640 * include/pstl/parallel_impl.h: New file.
1641 * include/pstl/pstl_config.h: New file.
1642 * include/pstl/unseq_backend_simd.h: New file.
1643 * include/pstl/utils.h: New file.
1644 * include/std/algorithm: Include parallel algorithm implementations.
1645 * include/std/execution: New file.
1646 * include/std/memory: Include parallel algorithm implementations.
1647 * include/std/numeric: Include parallel algorithm implementations.
1648 * include/std/version: Add parallel algorithms feature test macro.
1649 * testsuite/util/pstl/pstl_test_config.h: New file.
1650 * testsuite/util/pstl/test_utils.h: New file.
1651 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1652 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1653 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1654 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1655 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1656 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1657 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1658 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1659 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1660 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1661 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1662 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1663 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1664 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1665 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1666 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1667 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1668 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1669 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1670 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1671 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1672 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1673 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1674 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1675 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1676 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1677 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1678 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1679 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1680 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1681 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1682 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1683 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1684 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1685 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1686 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1687 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1688 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1689 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1690 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1691 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1692 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1693 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1694 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1695 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1696 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1697 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1698 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1699 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1700 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1701 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1702 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1703 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1704 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1705 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1706 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1707 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1708 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1709 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1710 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1711 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1712 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1713 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1714 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1715 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1716 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1717 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1718 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1719 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1720 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1721 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1722 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1723 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1724 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1725 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1726 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1727 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1728 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1729 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1730 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1731 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1732 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1733 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1734 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1735 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1736 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1737 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1738 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1739 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1740 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1741 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1742 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1743 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1744 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1745 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1746 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1747 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1748 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1749 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1750 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1751 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1752 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1753 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1754 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1755 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1756 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1758 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
1760 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
1761 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
1762 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
1763 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
1764 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
1765 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
1766 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
1767 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
1768 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
1769 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
1770 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
1771 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
1772 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
1773 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
1774 when the special functions IS is enabled, not for C++17.
1775 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
1777 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
1778 without checks for special functions in C++17.
1779 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
1783 * include/backward/hash_map: Use <> for includes not "".
1784 * include/backward/hash_set: Likewise.
1785 * include/backward/strstream: Likewise.
1786 * include/tr1/bessel_function.tcc: Likewise.
1787 * include/tr1/exp_integral.tcc: Likewise.
1788 * include/tr1/legendre_function.tcc: Likewise.
1789 * include/tr1/modified_bessel_func.tcc: Likewise.
1790 * include/tr1/riemann_zeta.tcc: Likewise.
1792 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
1794 * doc/xml/manual/allocator.xml: Link to table documenting evolution
1795 of extension allocators.
1796 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
1797 Document new headers in 7.2, 8.1 and 9.1 releases.
1798 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
1799 * doc/html/*: Regenerate.
1801 2019-03-12 John David Anglin <dave.anglin@bell.net>
1804 * testsuite/lib/libstdc++.exp: Locate libatomic.
1805 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
1806 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
1808 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1809 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
1810 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
1811 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1813 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
1816 * configure.ac: Check for sockatmark.
1817 * crossconfig.m4: Check for sockatmark.
1818 * config.h.in: Regenerate.
1819 * configure: Regenerate.
1820 * include/experimental/internet (address_v4::_S_hton): Rename
1821 overloaded functions to _S_hton_16 and _S_ntoh_16.
1822 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
1823 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
1824 * include/experimental/socket (basic_socket::at_mark): Check
1825 _GLIBCXX_HAVE_SOCKATMARK.
1827 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
1828 const variables instead of macros.
1831 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
1832 Use correct type for len_aligned.
1833 * testsuite/20_util/hash/89629.cc: New test.
1835 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1838 * include/std/atomic (atomic<T>::store, atomic<T>::load,
1839 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
1840 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
1841 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
1842 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
1843 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
1844 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
1845 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
1846 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
1847 memory_order_seq_cst to int.
1849 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
1851 * doc/xml/manual/using.xml: Use link element instead of xref.
1852 * doc/html/*: Regenerate.
1854 * include/bits/fs_path.h (path::format): Add fixed underlying type.
1856 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
1859 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
1860 parameters in deduction guides.
1861 * include/debug/multimap.h (multimap): Likewise.
1862 * include/debug/set.h (multimap): Likewise.
1863 * include/debug/multiset.h (multimap): Likewise.
1864 * include/debug/unordered_map (unordered_map): Likewise.
1865 (unordered_multimap): Likewise.
1866 * include/debug/unordered_set (unordered_set): Likewise.
1867 (unordered_multiset): Likewise.
1870 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
1871 Invalidate all iterators in case of rehash.
1872 (unordered_multimap<>::_M_check_rehashed): Likewise.
1873 * include/debug/unordered_set
1874 (unordered_set<>::_M_check_rehashed): Likewise.
1875 (unordered_multiset<>::_M_check_rehashed): Likewise.
1876 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
1878 2019-03-07 Andreas Schwab <schwab@suse.de>
1880 * config/abi/post/riscv64-linux-gnu: New directory.
1881 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
1883 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
1885 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
1886 compile test to run. Fix typo.
1888 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1889 * doc/html/*: Regenerate.
1891 P0356R5 Simplified partial function application
1892 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
1893 helpers for bind_front.
1894 (bind_front, __cpp_lib_bind_front): Define.
1895 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
1897 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1899 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
1900 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
1901 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
1902 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1904 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1906 PR libstdc++/86655 - std::assoc_legendre should not constrain
1907 the value of m (or x).
1908 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
1909 __sph_legendre): If degree > order Don't throw, return 0.
1910 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
1911 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
1912 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
1913 * testsuite/tr1/5_numerical_facilities/special_functions/
1914 02_assoc_legendre/pr86655.cc: New test.
1915 * testsuite/tr1/5_numerical_facilities/special_functions/
1916 22_sph_legendre/pr86655.cc: New test.
1918 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1921 Also PR libstdc++/85517
1922 * include/std/variant (__do_visit): New.
1923 (__variant_cast): Likewise.
1924 (__variant_cookie): Likewise.
1925 (__erased_*): Remove.
1926 (_Variant_storage::_S_vtable): Likewise.
1927 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
1928 (_Variant_storage::__M_reset): Adjust.
1929 (__variant_construct): New.
1930 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
1931 __variant_construct.
1932 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1933 (_Move_ctor_base::__M_destructive_copy): New.
1934 (_Move_ctor_base::__M_destructive_move): Adjust to use
1935 __variant_construct.
1936 (_Copy_assign_base::operator=): Adjust to use __do_visit.
1937 (_Copy_assign_alias): Adjust to check both copy assignment
1938 and copy construction for triviality.
1939 (_Move_assign_base::operator=): Adjust to use __do_visit.
1940 (_Multi_array): Add support for visitors that accept and return
1942 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
1943 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
1944 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
1945 a __variant_cookie temporary for a variant that is valueless and..
1946 (__gen_vtable_impl::__visit_invoke): ..adjust here.
1947 (__gen_vtable::_Array_type): Conditionally make space for
1948 the __variant_cookie visitor case.
1949 (__variant_construct_by_index): New.
1950 (get_if): Adjust to use std::addressof.
1951 (relops): Adjust to use __do_visit.
1952 (variant): Add __variant_cast and __variant_construct_by_index
1954 (variant::emplace): Use _M_reset() and __variant_construct_by_index
1955 instead of self-destruction.
1956 (variant::swap): Adjust to use __do_visit.
1957 (visit): Reimplement in terms of __do_visit.
1958 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
1959 * testsuite/20_util/variant/compile.cc: Adjust.
1960 * testsuite/20_util/variant/run.cc: Likewise.
1962 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1964 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
1966 * testsuite/experimental/feat-char8_t.cc: Likewise.
1968 * include/std/type_traits [C++20] (is_bounded_array)
1969 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
1971 * testsuite/20_util/is_bounded_array/requirements/
1972 explicit_instantiation.cc: New test.
1973 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
1975 * testsuite/20_util/is_bounded_array/value.cc: New test.
1976 * testsuite/20_util/is_unbounded_array/requirements/
1977 explicit_instantiation.cc: New test.
1978 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
1980 * testsuite/20_util/is_unbounded_array/value.cc: New test.
1982 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
1984 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
1986 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
1988 * include/c_compatibility/math.h [C++20] (lerp): Add using
1990 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
1991 (__lerp): Define function template to implement lerp.
1992 (lerp(float, float, float), lerp(double, double, double))
1993 (lerp(long double, long double, long double)): Define for C++20.
1994 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
1995 (midpoint(T, T), midpoint(T*, T*)): Define.
1996 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
1997 * testsuite/26_numerics/lerp.cc: New test.
1998 * testsuite/26_numerics/midpoint/floating.cc: New test.
1999 * testsuite/26_numerics/midpoint/integral.cc: New test.
2000 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2002 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2004 PR libstdc++/88996 Implement P0439R0
2005 Make std::memory_order a scoped enumeration.
2006 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2007 add variables for the old enumerators. Adjust calls.
2008 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2009 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2011 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
2013 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2016 * include/std/memory_resource (polymorphic_allocator): Add default
2017 template argument for C++20.
2018 (polymorphic_allocator::allocate_bytes)
2019 (polymorphic_allocator::deallocate_bytes)
2020 (polymorphic_allocator::allocate_object)
2021 (polymorphic_allocator::deallocate_object)
2022 (polymorphic_allocator::new_object)
2023 (polymorphic_allocator::delete_object): New member functions for
2025 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2028 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2031 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2034 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2036 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2037 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2039 * include/std/memory (uses_allocator_construction_args): New set of
2040 overloaded functions.
2041 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2043 * include/std/memory_resource (polymorphic_allocator::construct)
2044 [__cplusplus > 201703l]: Replace all overloads with a single function
2045 using uses_allocator_construction_args.
2046 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2048 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2050 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
2053 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2054 stylesheet directories before check for xsltproc. Try to use
2055 xmlcatalog to find local stylesheet directory before trying hardcoded
2056 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2057 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2058 use xsltproc if xmlcatalog fails to find a local stylesheet.
2059 * configure.ac: Check for xmlcatalog.
2060 * Makefile.in: Regenerate.
2061 * configure: Likewise.
2062 * doc/Makefile.in: Likewise.
2063 * include/Makefile.in: Likewise.
2064 * libsupc++/Makefile.in: Likewise.
2065 * po/Makefile.in: Likewise.
2066 * python/Makefile.in: Likewise.
2067 * src/Makefile.in: Likewise.
2068 * src/c++11/Makefile.in: Likewise.
2069 * src/c++17/Makefile.in: Likewise.
2070 * src/c++98/Makefile.in: Likewise.
2071 * src/filesystem/Makefile.in: Likewise.
2072 * testsuite/Makefile.in: Likewise.
2074 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
2077 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2078 container deduction guides.
2079 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2080 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2081 parameters in deduction guides.
2082 * include/bits/stl_multimap.h (multimap): Likewise.
2083 * include/bits/stl_multiset.h (multiset): Likewise.
2084 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2085 * include/bits/stl_set.h (set): Likewise.
2086 * include/bits/stl_stack.h (stack): Likewise.
2087 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2088 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2089 constrain parameters in deduction guides.
2090 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2092 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2094 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2095 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2096 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2097 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2099 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2101 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2104 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2105 to class template and partial specialization using void_t.
2106 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2108 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
2111 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2112 copy and move members public.
2114 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
2116 * include/std/type_traits (__underlying_type_impl): New helper to
2117 make underlying_type SFINAE-friendly.
2118 (underlying_type): Derive from __underlying_type_impl.
2119 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2123 * include/bits/char_traits.h (__constant_char_array): Check index is
2124 in range before dereferencing.
2125 (char_traits<char>::compare, char_traits<char>::find)
2126 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2127 immediately if n is zero.
2128 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2129 Remove workarounds for PR 67026.
2130 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2132 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2135 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2137 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2138 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2140 2019-02-22 Jakub Jelinek <jakub@redhat.com>
2143 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
2144 type to std::size_t and argument to type to long double.
2146 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2148 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
2149 * config/abi/post/sparc64-linux-gnu: New directory.
2150 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
2151 * config/abi/post/sparc64-linux-gnu/32: New directory.
2152 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
2154 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2156 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
2157 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
2160 2019-02-22 Tom Honermann <tom@honermann.net>
2162 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
2163 printers for u8string and u8string_view.
2165 2019-02-22 Tom Honermann <tom@honermann.net>
2167 * testsuite/18_support/byte/ops.cc: Validate
2168 std::to_integer<char8_t>, std::to_integer<char16_t>, and
2169 std::to_integer<char32_t>.
2170 * testsuite/18_support/numeric_limits/dr559.cc: Validate
2171 std::numeric_limits<char8_t>.
2172 * testsuite/18_support/numeric_limits/lowest.cc: Validate
2173 std::numeric_limits<char8_t>::lowest().
2174 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
2175 std::numeric_limits<char8_t>::max_digits10.
2176 * testsuite/18_support/type_info/fundamental.cc: Validate
2177 typeinfo for char8_t.
2178 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
2179 std::from_chars with char8_t.
2180 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
2181 Validate explicit instantiation of std::hash<char8_t>.
2182 * testsuite/20_util/is_integral/value.cc: Validate
2183 std::is_integral<char8_t>.
2184 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
2185 Validate std::make_signed<char8_t>.
2186 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2187 Validate u8string construction from char8_t sources.
2188 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
2190 * testsuite/21_strings/basic_string_view/operations/compare/
2191 char/70483.cc: Validate substr operations on u8string_view.
2192 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
2193 the u8string_view typedef is defined.
2194 * testsuite/21_strings/char_traits/requirements/
2195 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
2197 * testsuite/21_strings/char_traits/requirements/
2198 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
2199 constexpr member functions.
2200 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
2201 that the u8string typedef is defined.
2202 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
2203 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
2204 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
2205 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
2207 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2208 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
2210 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2211 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2212 Validate std::atomic<char8_t>::is_always_lock_free
2213 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
2214 Update line numbers.
2215 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
2217 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
2219 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2220 Validate std::experimental::pmr::u8string.
2221 * testsuite/experimental/string_view/typedefs.cc: Validate that the
2222 u8string_view typedef is defined.
2223 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
2224 char32_t to the typelists.
2226 2019-02-22 Tom Honermann <tom@honermann.net>
2228 * include/ext/typelist.h: Constrain a partial specialization of
2229 typelist::detail::append_ to only match chain<T1,T2>.
2231 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2234 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
2235 class template with class. Replace move and copy member types with
2236 member alias templates, so they are only instantiated when needed.
2237 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2238 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
2239 test for C++11/14/17 as well.
2240 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
2243 2019-02-20 Jakub Jelinek <jakub@redhat.com>
2246 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
2247 _GLIBCXX_PURE to the alias declaration.
2249 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
2251 * testsuite/21_strings/basic_string/literals/types.cc
2252 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
2253 * testsuite/21_strings/basic_string/literals/values.cc
2254 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2255 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
2256 potentially having different type.
2257 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2258 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
2260 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
2261 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2262 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
2263 string literals only using basic character set.
2264 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
2265 u8 literals to char.
2266 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
2267 Test ATOMIC_CHAR8_T_LOCK_FREE.
2268 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
2269 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
2270 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
2271 * testsuite/experimental/string_view/literals/types.cc
2272 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
2274 * testsuite/experimental/string_view/literals/values.cc
2275 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2277 2019-02-19 Tom Honermann <tom@honermann.net>
2279 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
2280 from char16_32_t.cc; validates numeric_limits<char8_t>.
2281 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
2282 test cloned from types.cc; validates operator""s for char8_t
2284 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
2285 test cloned from values.cc; validates construction and comparison
2287 * testsuite/21_strings/basic_string/requirements/
2288 /explicit_instantiation/char8_t/1.cc: New test cloned from
2289 char16_t/1.cc; validates explicit instantiation of
2290 basic_string<char8_t>.
2291 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2292 New test cloned from types.cc; validates operator""sv for char8_t
2293 returns u8string_view.
2294 * testsuite/21_strings/basic_string_view/literals/
2295 values-char8_t.cc: New test cloned from values.cc; validates
2296 construction and comparison of u8string_view values.
2297 * testsuite/21_strings/basic_string_view/requirements/
2298 explicit_instantiation/char8_t/1.cc: New test cloned from
2299 char16_t/1.cc; validates explicit instantiation of
2300 basic_string_view<char8_t>.
2301 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2302 New test cloned from char16_t/65049.cc; validates that
2303 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2304 * testsuite/21_strings/char_traits/requirements/char8_t/
2305 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2306 that char_traits<char8_t> member typedefs are present and correct.
2307 * testsuite/21_strings/char_traits/requirements/
2308 explicit_instantiation/char8_t/1.cc: New test cloned from
2309 char16_t/1.cc; validates explicit instantiation of
2310 char_traits<char8_t>.
2311 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2312 from char16_t.cc: validates
2313 codecvt<char16_t, char8_t, mbstate_t>.
2314 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2315 from char32_t.cc: validates
2316 codecvt<char32_t, char8_t, mbstate_t>.
2317 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2318 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2319 codecvt<char32_t, char8_t, std::mbstate_t>.
2320 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2321 test cloned from string.cc; validates filesystem::path construction
2323 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2324 the __cpp_lib_char8_t feature test macro is defined with the
2326 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2327 New test cloned from string.cc; validates filesystem::path
2328 construction from char8_t input.
2329 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2330 test cloned from types.cc; validates operator""sv for char8_t
2331 returns u8string_view.
2332 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2333 New test cloned from values.cc; validates construction and
2334 comparison of u8string_view values.
2335 * testsuite/experimental/string_view/requirements/
2336 explicit_instantiation/char8_t/1.cc: New test cloned from
2337 char16_t/1.cc; validates explicit instantiation of
2338 basic_string_view<char8_t>.
2339 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2340 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2343 2019-02-19 Tom Honermann <tom@honermann.net>
2345 P0482R5 char8_t: Standard library support
2346 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2347 typeinfo symbols for char8_t.
2348 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2349 (GLIBCXX_3.4.26): Add symbols for specializations of
2350 numeric_limits and codecvt that involve char8_t.
2351 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2352 * include/bits/atomic_base.h: Add atomic_char8_t.
2353 * include/bits/basic_string.h: Add std::hash<u8string> and
2354 operator""s(const char8_t*, size_t).
2355 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2357 * include/bits/char_traits.h: Add char_traits<char8_t>.
2358 * include/bits/codecvt.h: Add
2359 codecvt<char16_t, char8_t, mbstate_t>,
2360 codecvt<char32_t, char8_t, mbstate_t>,
2361 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2362 codecvt_byname<char32_t, char8_t, mbstate_t>.
2363 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2364 recognize char8_t as an integral type.
2365 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2367 (path::u8string): Return std::u8string when char8_t support is
2369 (path::generic_u8string): Likewise.
2370 (path::_S_convert): Handle conversion from char8_t input.
2371 (path::_S_str_convert): Likewise.
2372 * include/bits/functional_hash.h: Add hash<char8_t>.
2373 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2375 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2376 for new char8_t specializations.
2377 * include/bits/localefwd.h: Add missing declarations of
2378 codecvt<char16_t, char, mbstate_t> and
2379 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2380 codecvt<char16_t, char8_t, mbstate_t> and
2381 codecvt<char32_t, char8_t, mbstate_t>.
2382 * include/bits/postypes.h: Add u8streampos
2383 * include/bits/stringfwd.h: Add declarations of
2384 char_traits<char8_t> and u8string.
2385 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2386 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2388 (path::u8string): Return std::u8string when char8_t support is
2390 (path::generic_u8string): Likewise.
2391 (path::_S_convert): Handle conversion from char8_t input.
2392 (path::_S_str_convert): Likewise.
2393 * include/experimental/string: Add u8string.
2394 * include/experimental/string_view: Add u8string_view,
2395 hash<experimental::u8string_view>, and
2396 operator""sv(const char8_t*, size_t).
2397 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2398 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2399 as a character type.
2400 * include/std/limits: Add numeric_limits<char8_t>.
2401 * include/std/string_view: Add u8string_view,
2402 hash<experimental::u8string_view>, and
2403 operator""sv(const char8_t*, size_t).
2404 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2405 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2406 * libsupc++/atomic_lockfree_defines.h: Define
2407 ATOMIC_CHAR8_T_LOCK_FREE.
2408 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2409 codecvt.cc and limits.cc so that char8_t specializations of
2410 numeric_limits and codecvt and emitted.
2411 * src/c++11/Makefile.in: Likewise.
2412 * src/c++11/codecvt.cc: Define members of
2413 codecvt<char16_t, char8_t, mbstate_t>,
2414 codecvt<char32_t, char8_t, mbstate_t>,
2415 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2416 codecvt_byname<char32_t, char8_t, mbstate_t>.
2417 * src/c++11/limits.cc: Define members of
2418 numeric_limits<char8_t>.
2419 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2420 locale_init.cc and localename.cc.
2421 * src/c++98/Makefile.in: Likewise.
2422 * src/c++98/locale_init.cc: Add initialization for the
2423 codecvt<char16_t, char8_t, mbstate_t> and
2424 codecvt<char32_t, char8_t, mbstate_t> facets.
2425 * src/c++98/localename.cc: Likewise.
2426 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2428 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2430 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2431 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2432 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2434 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
2436 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2437 * doc/html/*: Regenerate.
2439 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2440 * doc/html/*: Regenerate.
2442 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2443 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2444 allocator type in is_constructible checks.
2445 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2446 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2447 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2448 problematic type from LWG 2586 discussion.
2449 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2450 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2452 * configure.ac: Check for C11 timespec_get function.
2453 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2455 * config.h.in: Regenerate.
2456 * configure: Regenerate.
2457 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2458 std for C++17 and up.
2460 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2461 * include/bits/stl_queue.h
2462 (priority_queue(const Compare&, const Container&, const Alloc&))
2463 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2465 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2467 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2468 * include/bits/stl_queue.h (queue, priority_queue): Add static
2469 assertions to enforce LWG 2566 requirement on value_type.
2470 * include/bits/stl_stack.h (stack): Likewise.
2473 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2475 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2476 * include/bits/std_abs.h: Add comment about LWG 2735.
2477 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2479 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
2482 * include/std/version [__cpp_impl_destroying_delete]
2483 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2484 * libsupc++/new [__cpp_impl_destroying_delete]
2485 (__cpp_lib_destroying_delete): Likewise.
2486 (destroying_delete_t, destroying_delete): Likewise, but define even
2487 when __cpp_impl_destroying_delete is not defined.
2488 * testsuite/18_support/destroying_delete.cc: New test.
2490 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
2493 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2494 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2495 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2496 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2498 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
2501 * include/bits/fs_path.h (path::has_root_name)
2502 (path::has_root_directory, path::has_root_path)
2503 (path::has_relative_path, path::has_parent_path)
2504 (path::has_filename, path::has_stem, path::has_extension)
2505 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2507 * src/c++17/fs_path.cc (path::has_root_name)
2508 (path::has_root_directory, path::has_root_path)
2509 (path::has_relative_path, path::has_parent_path)
2510 (path::has_filename, path::_M_find_extension): Add noexcept.
2512 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
2514 PR libstdc++/89102 (partial)
2515 * include/std/type_traits (common_type<>): Define.
2516 (common_type<T>): Derive from common_type<T, T>.
2517 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2518 Test zero-length template argument list.
2519 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2520 Test additional single argument cases.
2521 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2522 Adjust expected error.
2524 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
2527 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2529 * include/bits/stl_stack.h (stack): Likewise.
2530 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2531 * testsuite/23_containers/queue/deduction.cc: New test.
2532 * testsuite/23_containers/stack/deduction.cc: New test.
2535 * include/std/type_traits (__is_convertible_helper)
2536 (__is_convertible_helper<_From, _To, false>): Revert changes to
2537 support is_nothrow_convertible.
2538 (__is_nt_convertible_helper): New helper.
2539 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2541 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2542 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2545 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2546 __is_alloc_insertable_impl. Replace single type member with two
2547 members, one for each of copy and move insertable.
2548 (__is_move_insertable): New trait for internal use.
2549 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2550 (vector::_S_nothrow_relocate(true_type)): New functions to
2551 conditionally check if __relocate_a can throw.
2552 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2553 on __is_move_insertable.
2554 (vector::_S_do_relocate): New overloaded functions to conditionally
2556 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2557 based on _S_use_relocate.
2558 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2559 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2560 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2563 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2564 parameter unnamed. Add message to static assertion.
2565 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2566 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2569 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
2572 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2574 (__is_bitwise_relocatable): ... to this.
2575 (__relocate_a_1): Adapt.
2576 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2577 (__is_bitwise_relocatable): ... to this.
2579 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
2582 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2583 final component as well as from _M_pathname. Append the dot using
2584 operator+= instead of only to _M_pathname.
2585 (path::_M_find_extension): Reformat slightly.
2586 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2587 Add more test cases.
2589 2019-01-30 Ulrich Drepper <drepper@redhat.com>
2591 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2593 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
2595 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2596 constexpr specifiers from arg and proj.
2598 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2599 __shared_ptr instantiations used by gcc4-compatible ABI.
2601 * include/experimental/forward_list (experimental::erase): Qualify
2603 * include/experimental/list (experimental::erase): Likewise.
2604 * include/std/forward_list (std::erase): Likewise.
2605 * include/std/list (std::erase): Likewise.
2607 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2609 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2610 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2611 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2612 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2613 * testsuite/ext/array_allocator/26875.cc: Likewise.
2614 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2615 * testsuite/util/replacement_memory_operators.h: Likewise.
2616 * testsuite/util/testsuite_allocator.h: Likewise.
2618 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
2619 normal mode vector, even for debug mode.
2620 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
2621 Define alias template for normal mode vector.
2623 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
2626 * config/locale/generic/c_locale.h (__convert_from_v)
2627 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2628 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2629 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
2630 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2632 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
2635 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
2636 data member with static member function _S_use_relocate().
2637 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2638 (vector::_M_default_append): Use _S_use_relocate() instead of
2641 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
2644 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
2647 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
2648 write to stderr instead of using printf.
2650 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2653 * include/bits/char_traits.h (__constant_string_p,
2654 __constant_char_array_p): Use __builtin_is_constant_evaluated if
2657 2019-01-20 Ulrich Drepper <drepper@redhat.com>
2659 Implement C++20 P0600r1.
2660 * include/backward/hash_map: Add nodiscard attribute to empty.
2661 * include/backward/hash_set: Likewise.
2662 * backward/hashtable.h: Likewise.
2663 * include/bits/basic_string.h: Likewise.
2664 * include/bits/forward_list.h: Likewise.
2665 * include/bits/hashtable.h: Likewise.
2666 * include/bits/regex.h: Likewise.
2667 * include/bits/stl_deque.h: Likewise.
2668 * include/bits/stl_list.h: Likewise.
2669 * include/bits/stl_map.h: Likewise.
2670 * include/bits/stl_multimap.h: Likewise.
2671 * include/bits/stl_multiset.h: Likewise.
2672 * include/bits/stl_queue.h: Likewise.
2673 * include/bits/stl_set.h: Likewise.
2674 * include/bits/stl_stack.h: Likewise.
2675 * include/bits/stl_tree.h: Likewise.
2676 * include/bits/stl_vector.h: Likewise.
2677 * include/bits/unordered_map.h: Likewise.
2678 * include/bits/unordered_set.h: Likewise.
2679 * include/debug/array: Likewise.
2680 * include/experimental/any: Likewise.
2681 * include/experimental/bits/fs_path.h: Likewise.
2682 * include/experimental/internet: Likewise.
2683 * include/experimental/string_view: Likewise.
2684 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
2686 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
2688 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
2690 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
2692 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
2694 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
2696 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
2698 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
2700 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2701 info_fn_imps.hpp: Likewise.
2702 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2703 left_child_next_sibling_heap_.hpp: Likewise.
2704 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
2706 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
2708 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
2710 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
2712 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
2714 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
2716 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
2718 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
2719 * include/ext/pb_ds/trie_policy.hpp: Likewise.
2720 * include/ext/rope: Likewise.
2721 * include/ext/slist: Likewise.
2722 * include/ext/vstring.h: Likewise.
2723 * include/profile/array: Likewise.
2724 * include/std/array: Likewise.
2725 * include/tr1/array: Likewise.
2726 * include/tr1/hashtable.h: Likewise.
2727 * include/tr1/regex: Likewise.
2728 * include/tr2/dynamic_bitset: Likewise.
2729 * include/bits/alloc_traits.h: Add nodiscard attribute to
2731 * include/experimental/memory_resource: Likewise.
2732 * include/ext/alloc_traits.h: Likewise.
2733 * include/ext/array_allocator.h: Likewise.
2734 * include/ext/bitmap_allocator.h: Likewise.
2735 * include/ext/debug_allocator.h: Likewise.
2736 * include/ext/extptr_allocator.h: Likewise.
2737 * include/ext/mt_allocator.h: Likewise.
2738 * include/ext/new_allocator.h: Likewise.
2739 * include/ext/pool_allocator.h: Likewise.
2740 * include/ext/throw_allocator.h: Likewise.
2741 * include/std/scoped_allocator: Likewise.
2742 * libsupc++/eh_alloc.cc: Likewise.
2743 * include/std/future: Add nodiscard attribute to async.
2744 * libsupc++/new: Add nodiscard attribute to new.
2746 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
2751 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
2752 * include/bits/shared_ptr.h
2753 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
2754 (allocate_shared): Change to use new tag type.
2755 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
2756 Declare new member function.
2757 (_Sp_alloc_shared_tag): Define new type.
2758 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
2759 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
2760 _Sp_make_shared_tag::_S_eq to check type_info.
2761 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
2762 Constrain to prevent being called with _Sp_alloc_shared_tag.
2763 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
2764 Replace constructor with ...
2765 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
2766 reference parameter so address of the new object can be returned to
2767 the caller. Obtain the allocator from the tag type.
2768 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
2769 constructor with ...
2770 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
2771 to the __shared_count constructor.
2772 (__allocate_shared): Change to use new tag type.
2773 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
2775 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
2777 * src/c++17/fs_ops.cc
2778 (equivalent(const path&, const path&, error_code&))
2779 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
2780 compare files instead of relying on incomplete info returned by stat.
2783 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
2784 if the path is already absolute.
2785 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
2786 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
2789 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
2790 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
2791 of filesystem::exists.
2792 (create_directories(const path&, error_code&)): Add assertions.
2793 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2794 Add workaround for bug in _wstat for paths with trailing slash.
2795 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
2796 for expected behaviour on mingw.
2797 * testsuite/experimental/filesystem/operations/create_directories.cc:
2799 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
2800 "TMP" instead of "TMPDIR" and clean environment before each test. Do
2801 not test permissions on mingw targets.
2803 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
2805 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
2806 constructors and open members taking wide strings. Fix patterns for
2807 filesystem::path members to match wstring_view parameters. Add
2808 exports for shared_ptr members used by directory iterators.
2809 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
2810 error code parameter if the file doesn't exist.
2811 * src/filesystem/ops.cc (remove(const path&, error_code&)):
2813 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
2814 values for mingw targets, where "/" is not an absolute path. Do not
2815 test symlinks on mingw targets.
2816 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2817 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
2819 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2820 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
2821 that each component of the path is created.
2822 * testsuite/experimental/filesystem/operations/create_directories.cc:
2824 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
2825 permissions on mingw targets.
2826 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2827 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2828 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2829 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
2831 * testsuite/experimental/filesystem/operations/permissions.cc:
2833 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
2834 symlinks or permissions on mingw targets.
2835 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2836 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
2837 symlinks on mingw targets.
2838 * testsuite/experimental/filesystem/operations/remove_all.cc:
2840 * testsuite/27_io/filesystem/operations/status.cc: Do not test
2841 permissions on mingw targets.
2842 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
2843 test symlinks on mingw targets.
2844 * testsuite/experimental/filesystem/operations/space.cc: Fix test
2847 2019-02-14 Ulrich Drepper <drepper@redhat.com>
2850 Warn about unused comparisons of shared_ptr/unique_ptr
2851 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
2852 * include/bits/shared_ptr.h: Use it for operator ==, !=,
2853 <, <=, >, >= for shared_ptr.
2854 * include/bits/unique_ptr.h: Likewise for unique_ptr.
2856 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
2858 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
2859 as 201611L, because P0497R0 changes are supported.
2860 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
2862 * include/bits/erase_if.h [__cplusplus > 201703L]
2863 (__cpp_lib_erase_if): Only define for C++2a.
2864 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2865 (__cpp_lib_null_iterators): Define.
2866 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2867 (__cpp_lib_null_iterators): Define.
2868 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
2870 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
2872 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
2874 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
2875 changes are supported.
2876 * include/std/optional (__cpp_lib_optional): Likewise.
2877 * include/std/variant (__cpp_lib_variant): Likewise.
2878 * include/std/version [!__STRICT_ANSI__]
2879 (__cpp_lib_uncaught_exceptions): Define as long integer.
2880 [__cplusplus >= 201703L] (__cpp_lib_any)
2881 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
2882 (__cpp_lib_variant): Define for C++17.
2883 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
2885 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
2888 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
2890 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
2894 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
2896 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
2899 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2901 * doc/xml/manual/intro.xml: Include new section.
2902 * doc/xml/manual/status_cxx2017.xml: Document more
2903 implementation-defined properties of the library.
2904 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
2905 * doc/html/*: Regenerate.
2907 * include/bits/refwrap.h [__cplusplus > 201703L]
2908 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
2909 (_Reference_wrapper_base_memfun): Do not define for C++2a.
2910 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
2912 (reference_wrapper::operator()): Add static assertion.
2913 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
2915 * include/std/chrono (duration_values::zero(), duration_values::min())
2916 (duration_values::max()): Add noexcept.
2917 (duration::zero(), duration::min(), duration::max()): Likewise.
2918 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
2919 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
2920 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
2922 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
2924 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2926 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
2927 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
2929 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2932 * include/bits/functional_hash.h (hash<nullptr_t>): Define
2933 specialization for C++17 (P0513R0, LWG 2817).
2934 * testsuite/20_util/hash/nullptr.cc: New test.
2937 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
2938 pattern for std::basic_stringbuf::str().
2940 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
2941 basic_ostream::operator<< patterns.
2943 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2945 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
2946 test failures on targets with 32-bit time_t.
2948 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
2949 * include/std/deque: Likewise.
2950 * include/std/forward_list: Likewise.
2951 * include/std/list: Likewise.
2952 * include/std/string: Likewise.
2953 * include/std/vector: Likewise.
2954 * include/std/version: Likewise.
2955 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
2956 * testsuite/23_containers/deque/erasure.cc: Likewise.
2957 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2958 * testsuite/23_containers/list/erasure.cc: Likewise.
2959 * testsuite/23_containers/map/erasure.cc: Likewise.
2960 * testsuite/23_containers/set/erasure.cc: Likewise.
2961 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2962 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2963 * testsuite/23_containers/vector/erasure.cc: Likewise.
2965 * include/experimental/internet [AI_NUMERICSERV]
2966 (resolver_base::numeric_service): Define conditionally.
2967 * testsuite/experimental/net/internet/resolver/base.cc: Test it
2969 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2972 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2973 Jonathan Wakely <jwakely@redhat.com>
2976 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
2977 (GLIBCXX_3.4.26): Add new exports.
2978 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
2979 correct list of sources.
2980 * include/Makefile.in: Regenerate.
2981 * include/std/ostream (operator<<(nullptr_t)): New member function.
2982 * src/c++17/ostream-inst.cc: New file.
2983 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
2986 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2988 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
2989 of the source file containing the caller.
2990 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
2991 directories created by test.
2992 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2994 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2996 * testsuite/experimental/filesystem/iterators/
2997 recursive_directory_iterator.cc: Likewise.
2999 2019-01-10 Jakub Jelinek <jakub@redhat.com>
3001 PR tree-optimization/88775
3002 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3003 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3004 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3005 instead of __builtin_constant_p if available. Don't bother with
3006 the pointer comparison in C++11 and earlier.
3008 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3012 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3015 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
3017 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3018 for filesystem::path. Give variables more distinctive names.
3020 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3021 member function to perform non-trivial assignment.
3022 (_Optional_payload_base::_M_move_assign): Likewise.
3023 (_Optional_payload<T, true, false, true>::operator=)
3024 (_Optional_payload<T, true, true, false>::operator=)
3025 (_Optional_payload<T, true, false, false>::operator=): Call
3026 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3029 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3030 test std::complex<long double> if long double format is IBM128.
3031 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3034 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3036 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3037 for old std::unique_ptr layout.
3038 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3039 to become valueless. Add filesystem::path tests.
3042 * include/std/optional (_Optional_payload_base): New class template
3043 for common code hoisted from _Optional_payload specializations. Use
3044 a template for the union, to allow a partial specialization for
3045 types with non-trivial destructors. Add constructors for in-place
3046 initialization to the union.
3047 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3048 to perform non-trivial copy construction, instead of relying on
3049 non-standard copy elision in a delegating constructor.
3050 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3051 non-trivial move construction.
3052 (_Optional_payload): Derive from _Optional_payload_base and use it
3053 for everything except the non-trivial assignment operators, which are
3055 (_Optional_payload<false, C, M>): Derive from the specialization
3056 _Optional_payload<true, false, false> and add a destructor.
3057 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3058 Forward to corresponding members of _Optional_payload.
3059 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3060 Hoist common members from _Optional_base.
3061 (_Optional_base): Make all members and base class public.
3062 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3063 _Optional_base_impl.
3064 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3065 support for new std::optional layout.
3066 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3069 * include/bits/locale_conv.h: Use <> for includes not "".
3070 * include/ext/random: Likewise.
3071 * include/ext/vstring.h: Likewise.
3073 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3075 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3076 (GLIBCXX_3.4.21): Likewise.
3078 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3081 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3082 to match the one that controls whether utimbuf and utime are declared.
3084 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
3087 * include/bits/char_traits.h (char_traits::move): Do not pass null
3088 pointers to memmove.
3089 * include/bits/locale_facets.h
3090 (ctype<char>::widen(const char*, const char*, char*)): Do not
3091 pass null pointers to memcpy.
3092 (ctype<char>::narrow(const char*, const char*, char, char*)):
3094 (ctype<char>::do_widen(const char*, const char*, char*)):
3096 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3099 * doc/xml/manual/spine.xml: Update copyright years.
3100 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3101 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3102 for C++17 filesystem library.
3103 * doc/html/*: Regenerate.
3105 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3106 * config.h.in: Regenerate.
3107 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3108 alphabetically and add missing entries for copy_symlink,
3109 hard_link_count, rename, and resize_file.
3110 * configure: Regenerate.
3111 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3112 used unconditionally.
3113 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3114 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3115 supports truncating to zero length.
3116 * testsuite/27_io/filesystem/operations/all.cc: New test.
3117 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3119 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
3122 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3123 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3124 * config.h.in: Regenerate.
3125 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3126 remaining std::filesystem types and functions.
3127 * configure: Regenerate.
3128 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3129 * src/c++17/Makefile.in: Regenerate.
3130 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3131 here, and change name of included file.
3132 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3133 here, and change name of included file.
3134 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3135 path to dir-common.h.
3136 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3137 path to ops-common.h. Disable -Wunused-parameter warnings.
3138 (internal_file_clock): Define unconditionally.
3139 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3141 (do_copy_file, do_space): Move definitions to ops.common.h.
3142 (copy, file_size, hard_link_count, last_write_time, space): Only
3143 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
3145 (last_write_time, read_symlink): Remove unused attributes from
3147 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
3148 * src/filesystem/Makefile.in: Regenerate.
3149 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
3150 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
3151 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
3152 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
3153 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
3154 dummy types and functions instead of using #error.
3155 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
3156 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
3158 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
3159 (do_copy_file, do_space): Move definitions here from std-ops.cc.
3160 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
3161 to account for new namespace.
3162 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
3163 -lstdc++fs from dg-options.
3164 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
3165 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
3166 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
3167 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
3168 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3170 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
3171 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3173 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
3174 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3175 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
3176 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3177 * testsuite/27_io/filesystem/operations/create_directories.cc:
3179 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
3180 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
3181 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
3182 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
3183 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3184 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
3185 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3186 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
3187 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
3188 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
3189 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
3190 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
3191 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3192 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3193 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
3194 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3195 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3196 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3198 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
3202 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
3203 typeinfo and vtables less greedy.
3204 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
3205 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
3206 * src/c++17/Makefile.in: Regenerate.
3207 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
3208 here, and change name of included file.
3209 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
3210 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
3212 * src/filesystem/Makefile.in: Regenerate.
3213 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
3214 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
3215 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
3216 from dg-options and remove dg-require-filesystem-ts.
3217 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
3218 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
3219 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
3220 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
3221 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3222 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3223 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3224 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
3225 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
3226 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
3227 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
3228 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
3229 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
3230 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
3231 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
3232 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
3233 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
3234 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
3235 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
3236 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
3237 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
3239 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
3240 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
3241 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
3242 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
3243 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
3244 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
3245 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
3246 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
3247 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
3248 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
3249 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
3250 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
3252 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
3254 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3256 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
3258 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
3259 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3260 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
3261 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
3262 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3263 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3264 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3265 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3266 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
3267 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3269 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3270 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3271 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3272 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
3273 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3276 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
3277 Check is_trivially_copyable instead of is_scalar.
3278 (variant::emplace<N, Args>(Args&&...)): If construction of the new
3279 contained value can throw and its type is trivially copyable then
3280 construct into a temporary variant and move from it, to provide the
3281 strong exception safety guarantee.
3282 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
3284 * testsuite/20_util/variant/87431.cc: New test.
3285 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
3286 conversion causes valueless state.
3289 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
3290 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
3291 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
3292 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
3293 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
3295 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
3297 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3298 (file_time_type): Redefine in terms of __file_clock.
3299 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3301 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3303 (internal_file_lock): New helper type for accessing __file_clock.
3304 (do_copy_file): Use internal_file_lock to convert system time to
3306 (last_write_time(const path&, error_code&)): Likewise.
3307 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3309 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
3311 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3312 for const member functions of std::basic_string.
3313 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3315 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3316 Make non-standard constructor private.
3317 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3319 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3320 explicit instantiations for C++17 as well as earlier dialects.
3321 * src/c++17/Makefile.am: Add new source files.
3322 * src/c++17/Makefile.in: Regenerate.
3323 * src/c++17/cow-string-inst.cc: New file defining explicit
3324 instantiations for basic_string member functions added in C++17.
3325 * src/c++17/string-inst.cc: Likewise.
3327 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3328 copy/move constructors for old std::basic_string.
3329 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3330 (basic_string::reference, basic_string::const_reference): Define
3331 as plain references for C++11 and later.
3332 (basic_string::basic_string()): Put constructor body outside
3333 preprocessor conditional groups.
3334 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3335 instead of copying it.
3336 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3338 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3340 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3341 cases for old basic_string.
3342 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3343 allocator-extended constructors unconditionally. Add extra members to
3344 allocator type when using old string ABI.
3345 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3347 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3349 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3350 -fno-inline added to test flags.
3352 * testsuite/21_strings/basic_string/requirements/
3353 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3355 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3356 assertion failures with old std::string ABI.
3358 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3360 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3361 functions that will only erase elements at the end.
3362 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3363 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3364 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3366 (path::_List::pop_back()): Define.
3367 (path::_List::_M_erase_from(const_iterator)): Define.
3368 (path::operator/=(const path&)): Use pop_back to remove last component
3369 and _M_erase_from to remove multiple components.
3370 (path::_M_append(basic_string_view<value_type>)): Likewise.
3371 (path::operator+=(const path&)): Likewise.
3372 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3373 (path::remove_filename()): Likewise.
3374 (path::lexically_normal()): Use _List::_Impl iterators instead of
3375 path::iterator. Use pop_back to remove components from the end. Clear
3376 trailing filename, instead of using erase(const_iterator) to remove
3377 a non-final component.
3378 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3380 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3382 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3383 incorrect treatment of empty filename after trailing slash.
3384 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3386 * testsuite/21_strings/basic_string/modifiers/assign/char/
3387 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3389 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3390 move_assign_optim.cc: Likewise.
3392 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3393 Jakub Jelinek <jakub@redhat.com>
3396 * include/experimental/memory: Replace UTF-8 quote characters.
3397 * include/std/future: Replace UTF-8 "em dash" characters.
3399 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3402 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3403 * include/debug/forward_list: Likewise.
3404 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3406 * include/experimental/chrono: Likewise.
3407 * include/experimental/functional: Likewise.
3408 * include/experimental/ratio: Likewise.
3409 * include/experimental/system_error: Likewise.
3410 * include/experimental/tuple: Likewise.
3411 * include/experimental/type_traits: Likewise.
3412 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3413 * include/parallel/multiseq_selection.h: Likewise.
3416 * config/abi/pre/gnu.ver: Add missing exports.
3417 * testsuite/22_locale/collate_byname/88681.cc: New test.
3418 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3419 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3421 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
3423 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3424 initializer_list<value_type> and from input iterator ranges.
3425 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3427 * testsuite/experimental/string_view/element_access/char/empty.cc:
3428 Fix year range in copyright header.
3430 2019-01-02 Joel Brobecker <brobecker@adacore.com>
3432 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3433 Fix year range in copyright header.
3435 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3437 Update copyright years.
3439 Copyright (C) 2019 Free Software Foundation, Inc.
3441 Copying and distribution of this file, with or without modification,
3442 are permitted in any medium without royalty provided the copyright
3443 notice and this notice are preserved.