1 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
3 PR c++/90532 Ensure __is_constructible(T[]) is false
4 * include/std/type_traits (__do_is_default_constructible_impl)
5 (__is_default_constructible_atom, __is_default_constructible_safe):
7 (is_default_constructible): Use is_constructible.
8 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
9 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
10 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
11 * testsuite/20_util/is_trivially_default_constructible/value.cc:
14 2019-05-20 Pádraig Brady <pbrady@fb.com>
16 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
17 to the deallocator with -fsized-deallocation.
19 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
21 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
22 test by passing correct alignment to deallocate function.
24 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
27 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
28 Raise exception if unique_ptr tuple member has unknown structure.
29 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
30 Adjust worker to support new __uniq_ptr_data base class. Do not
31 assume field called _M_head_impl is the first tuple element.
33 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
35 * include/bits/stl_deque.h
36 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
37 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
38 (_Deque_base::_Deque_impl_data): New.
39 (_Deque_base::_Deque_impl): Inherit latter.
40 (_Deque_base::_Deque_impl::_M_swap_data): Move...
41 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
42 (_Deque_base::_Deque_impl()): Add noexcept qualification.
43 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
44 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
45 (deque<>::deque()): Default.
46 (deque<>::deque(deque&&)): Default.
47 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
48 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
49 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
50 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
52 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
53 (deque<>::resize(size_type, const value_type&)): Share a single
55 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
57 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
58 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
59 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
60 * testsuite/23_containers/deque/allocator/default_init.cc: New.
62 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
65 * include/std/variant (holds_alternative, get, get_if): Improve
66 static assertion messages.
67 (bad_variant_access::bad_variant_access()): Change default message.
68 (__throw_bad_variant_access(bool)): New overload.
69 (get): Use new overload.
70 (visit, visit<R>): Improve exception message.
72 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
73 targets. Add more cases from P0608R3.
74 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
76 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
77 * include/experimental/type_traits (is_detected_exact)
78 (is_detected_exact_v): Likewise.
79 * include/pstl/execution_defs.h (is_execution_policy)
80 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
81 * include/pstl/execution_impl.h (__policy_traits): Likewise.
82 * testsuite/17_intro/names.cc: Check for more non-reserved names.
83 * testsuite/experimental/names.cc: New test.
86 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
87 assertions from the destructor.
88 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
89 Move static_assert for hash function to here.
90 (_Hash_table_base::_M_equals): Move static_assert for equality
92 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
94 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
95 the value directly instead of calling _S_value.
96 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
97 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
98 _S_key(_Const_Link_type).
99 * testsuite/23_containers/set/85965.cc: Check construction,
100 destruction, assignment and size() do not trigger the assertions.
101 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
102 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
104 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
105 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
106 * testsuite/23_containers/set/48101_neg.cc: Likewise.
107 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
108 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
109 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
110 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
112 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
113 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
116 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
118 * doc/html/*: Regenerate.
119 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
120 of decay_t (P0777R1).
122 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
124 Move from state of allocators (LWG2593)
125 * include/bits/stl_deque.h
126 (_Deque_base(_Deque_base&&, false_type)): Remove.
127 (_Deque_base(_Deque_base&&, true_type)): Remove.
128 (_Deque_base(_Deque_base&&)): Adapt.
129 (_Deque_base::_M_move_impl()): Remove.
130 * testsuite/util/testsuite_allocator.h
131 (propagating_allocator(propagating_allocator&&)): Preserve move from
133 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
135 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
137 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
138 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
139 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
141 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
143 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
144 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
146 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
148 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
150 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
152 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
154 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
156 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
158 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
161 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
163 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
164 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
166 * include/std/variant (__overload_set): Remove.
168 (_Build_FUN): New class template to define a single FUN overload,
169 with specializations to prevent unwanted conversions, as per P0608R3.
170 (_Build_FUNs): New class template to build an overload set of FUN.
171 (_FUN_type): New alias template to perform overload resolution.
172 (__accepted_type): Use integer_constant base for failure case. Use
173 _FUN_type for successful case.
174 (variant::__accepted_index): Use _Tp instead of _Tp&&.
175 (variant::variant(_Tp&&)): Likewise.
176 (variant::operator=(_Tp&&)): Likewise.
178 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
179 Replace raw visitation with a runtime check for the valueless state
180 and a non-raw visitor.
181 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
182 (variant::index()): Remove branch.
183 (variant::swap(variant&)): Use valueless_by_exception() instead of
184 comparing the index to variant_npos, and add likelihood attribute.
186 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
187 (_Hashtable_base::_Equal_hash_code): Define new class template.
188 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
191 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
192 Replace with _M_get non-static member function.
193 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
195 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
196 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
198 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
199 _S_get accessors for members in EBO helpers.
200 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
201 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
203 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
205 (_Hashtable_base::_M_eq()): Remove non-const overload.
207 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
209 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
211 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
213 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
216 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
218 * config/os/solaris/solaris2.10: Move to ...
219 * config/os/solaris: ... this.
220 * configure.host (os_include_dir): Adapt.
221 (abi_baseline_pair): Remove Solaris 10 handling.
222 * config/abi/post/i386-solaris2.10: Remove.
223 * config/abi/post/sparc-solaris2.10: Remove.
224 * config/abi/post/i386-solaris2.11: Rename to ...
225 * config/abi/post/i386-solaris: ... this.
226 * config/abi/post/sparc-solaris2.11: Rename to ...
227 * config/abi/post/sparc-solaris: ... this.
229 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
232 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
235 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
237 * include/std/variant (__visit_with_index): Remove typedef.
238 (__deduce_visit_result): New tag type.
239 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
240 visitation of possibly-valueless variants, forwarding to __do_visit
241 with the relevant tag type.
242 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
243 and make lambda return void.
244 (__variant_construct): Likewise.
245 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
246 __raw_idx_visit and make lambda return void.
247 (_Multi_array::__untag_result): Add metafunction to check the function
248 pointer type for a tag type that dictates the kind of visitation.
249 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
250 Use decltype(auto) instead of tagged function pointer type.
251 (__gen_vtable_impl): Remove bool non-type parameter and unused
252 _Variant_tuple parameter.
253 (__gen_vtable_impl::__visit_invoke_impl): Remove.
254 (__gen_vtable_impl::__do_visit_invoke): Remove.
255 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
256 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
257 for the visit<R> case, rather than dispatching to separate functions.
258 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
260 (variant::swap): Likewise.
261 (__do_visit): Replace two non-type template parameters with a single
262 type parameter, so that the caller must specify the visitor's return
263 type (or one of the tag types).
264 (visit): Deduce a return type from the visitor and use the
265 __deduce_visit_result tag to enforce that all overloads return the
267 (visit<R>): Call __do_visit<R> with explicit result type.
268 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
271 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
273 nonesuch is insufficiently useless (lwg2996)
274 * include/std/type_traits (struct __nonesuch): Added private base
275 class to make __nonesuch not an aggregate and removed deleted default
277 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
278 (operator=(const pair&)): Use __nonesuch instead of
279 __nonesuch_no_braces.
280 (operator=(pair&&)): Likewise
281 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
282 of __nonesuch_no_braces.
283 (operator=(tuple&&)): Likewise
284 * include/experimental/type_traits (struct nonesuch): Added private
285 base class to make nonesuch not an aggregate and removed deleted
287 * testsuite/20_util/nonesuch/nonesuch.cc: New.
288 * testsuite/experimental/type_traits/nonesuch.cc: New.
290 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
292 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
293 (_Function_handler): Remove partial specializations for void return
294 types and pointers to member.
295 (_Function_handler::_M_manager): Adapt to removal of
296 _Simple_type_wrapper.
297 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
298 * include/std/functional (_Bind_result::__enable_if_void)
299 (_Bind_result::__disable_if_void): Remove sfinae helpers.
300 (_Bind_result::__call): Use __invoke_r and remove overloads for void
302 * include/std/future (__future_base::_Task_state::_M_run)
303 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
304 change return type of lambda expressions.
306 * include/bits/invoke.h (__invoke_r): Define new function implementing
307 the INVOKE<R> pseudo-function.
308 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
309 * testsuite/20_util/function_objects/invoke/2.cc: New test.
311 * include/std/type_traits (__is_nt_convertible_helper): Define it
312 unconditionally, not only for C++20.
313 (__is_nothrow_convertible): Define internal trait for use in C++11.
314 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
315 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
316 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
317 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
318 that has nothrow explicit conversion but potentially-throwing implicit
320 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
321 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
322 function to only consider implicit conversions.
323 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
325 * include/std/iterator: Include <iosfwd> instead of <istream> and
328 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
329 Remove unused, non-standard function.
331 * include/bits/regex.h (match_results::max_size()): Adjust return
332 value to account for prefix/suffix/unmatched subs.
333 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
334 reset the contained sub matches.
335 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
336 function to set result state following a failed match.
337 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
338 sub_match states after _M_resize. Use _M_establish_failed_match.
341 * include/std/thread (thread::_State_impl, thread::_S_make_state):
342 Replace single _Callable parameter with variadic _Args pack, to
343 forward them directly to the tuple of decayed copies.
344 * testsuite/30_threads/thread/cons/69724.cc: New test.
346 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
348 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
349 * include/bits/basic_string.h: (operator=(const basic_string&):
350 Move allocator decision to assign.
351 (assign(const basic_string&)): Move allocator decision here.
352 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
354 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
357 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
359 * testsuite/util/testsuite_allocator.h (memory_resource)
360 (default_resource_mgr): Fix indentation.
362 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
363 Use operator-> to access raw pointer member.
364 * testsuite/23_containers/vector/59829.cc: Likewise.
365 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
366 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
367 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
369 (PointerBase, PointerBase_void): Derive from NullablePointer and use
370 its constructors and equality operators. Change converting
371 constructors to use operator-> to access private member of the other
373 (PointerBase_void::operator->()): Add, for access to private member.
374 (operator-(PointerBase, PointerBase)): Change to hidden friend.
375 (operator==(PointerBase, PointerBase)): Remove.
376 (operator!=(PointerBase, PointerBase)): Remove.
378 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
379 not assume field called _M_head_impl is the first tuple element.
380 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
381 implementation more accurate.
382 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
383 empty pointer type and non-empty deleter.
385 LWG 2899 - Make is_move_constructible correct for unique_ptr
386 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
387 move assignment operator.
388 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
389 (__uniq_ptr_data): New class template with conditionally deleted
391 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
392 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
393 constructor and move assignment operator as defaulted.
394 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
395 __uniq_ptr_impl::release().
396 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
397 to __uniq_ptr_impl::reset(pointer).
398 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
399 Check for new __uniq_ptr_data type.
400 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
402 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
404 PR libstdc++/90454.cc path construction from void*
405 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
406 pointers to void are rejected as well as void.
407 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
408 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
410 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
412 * doc/xml/manual/policy_data_structures.xml: Comment out stray
413 <remark> elements. Fix formatting of bibliography references.
415 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
417 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
419 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
421 Remove Profile Mode, deprecated since 7.1.0
422 * doc/Makefile.am: Remove XML file for profile mode docs.
423 * doc/Makefile.in: Regenerate.
424 * doc/xml/authors.xml: Remove authors of profile mode docs.
425 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
427 * doc/xml/manual/debug.xml: Likewise.
428 * doc/xml/manual/evolution.xml: Document removal of profile mode.
429 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
430 * doc/xml/manual/spine.xml: Remove profile mode author credit.
431 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
433 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
435 * doc/html/*: Regenerate.
436 * include/Makefile.am: Remove profile mode headers.
437 * include/Makefile.in: Regenerate.
438 * include/bits/c++config (std::__profile): Remove namespace.
439 [_GLIBCXX_PROFILE]: Remove checks for macro.
440 * include/profile/array: Remove.
441 * include/profile/base.h: Remove.
442 * include/profile/bitset: Remove.
443 * include/profile/deque: Remove.
444 * include/profile/forward_list: Remove.
445 * include/profile/impl/profiler.h: Remove.
446 * include/profile/impl/profiler_algos.h: Remove.
447 * include/profile/impl/profiler_container_size.h: Remove.
448 * include/profile/impl/profiler_hash_func.h: Remove.
449 * include/profile/impl/profiler_hashtable_size.h: Remove.
450 * include/profile/impl/profiler_list_to_slist.h: Remove.
451 * include/profile/impl/profiler_list_to_vector.h: Remove.
452 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
453 * include/profile/impl/profiler_node.h: Remove.
454 * include/profile/impl/profiler_state.h: Remove.
455 * include/profile/impl/profiler_trace.h: Remove.
456 * include/profile/impl/profiler_vector_size.h: Remove.
457 * include/profile/impl/profiler_vector_to_list.h: Remove.
458 * include/profile/iterator_tracker.h: Remove.
459 * include/profile/list: Remove.
460 * include/profile/map: Remove.
461 * include/profile/map.h: Remove.
462 * include/profile/multimap.h: Remove.
463 * include/profile/multiset.h: Remove.
464 * include/profile/ordered_base.h: Remove.
465 * include/profile/set: Remove.
466 * include/profile/set.h: Remove.
467 * include/profile/unordered_base.h: Remove.
468 * include/profile/unordered_map: Remove.
469 * include/profile/unordered_set: Remove.
470 * include/profile/vector: Remove.
471 * scripts/run_doxygen: Do not process profile mode headers.
472 * testsuite/23_containers/array/element_access/60497.cc: Don't use
474 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
475 Remove dg-skip-if for profile mode.
476 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
477 preprocessor check for profile mode.
478 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
479 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
481 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
483 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
484 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
485 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
486 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
487 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
489 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
491 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
493 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
495 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
496 preprocessor check for profile mode.
497 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
499 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
500 Remove dg-skip-if for profile mode.
501 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
502 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
503 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
504 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
505 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
506 * testsuite/Makefile.am: Remove profile_flags variable and
507 * testsuite/Makefile.am: Remove profile_flags variable and
508 check-profile target.
509 * testsuite/Makefile.in: Regenerate.
510 * testsuite/ext/profile/all.cc: Remove.
511 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
512 * testsuite/ext/profile/profiler_algos.cc: Remove.
513 * testsuite/ext/profile/replace_new.cc: Remove.
514 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
515 preprocessor check for profile mode.
516 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
517 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
518 (check_v3_target_normal_mode): Do not check for profile mode macro.
519 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
521 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
522 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
523 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
524 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
525 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
526 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
527 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
528 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
529 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
530 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
532 Remove array_allocator extension, deprecated since 4.9.0
533 * doc/xml/manual/allocator.xml: Remove documentation for
535 * doc/xml/manual/evolution.xml: Document array_allocator removal.
536 * doc/xml/manual/using.xml: Remove header from documentation.
537 * include/Makefile.am: Remove <ext/array_allocator.h> header.
538 * include/Makefile.in: Regenerate.
539 * include/ext/array_allocator.h: Remove.
540 * include/precompiled/extc++.h: Do not include removed header.
541 * testsuite/ext/array_allocator/1.cc: Remove.
542 * testsuite/ext/array_allocator/2.cc: Remove.
543 * testsuite/ext/array_allocator/26875.cc: Remove.
544 * testsuite/ext/array_allocator/3.cc: Remove.
545 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
546 * testsuite/ext/array_allocator/check_delete.cc: Remove.
547 * testsuite/ext/array_allocator/check_new.cc: Remove.
548 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
549 * testsuite/ext/headers.cc: Do not include removed header.
551 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
553 * include/bits/stl_bvector.h
554 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
556 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
558 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
560 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
562 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
564 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
566 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
568 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
570 (_Bit_iterator::operator-(difference_type)): Likewise.
571 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
572 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
574 (_Bit_const_iterator::operator-(difference_type)): Likewise.
575 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
577 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
580 * testsuite/util/thread/all.h: Do not use remove_pointer for
581 std::thread::native_handle_type.
584 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
585 (_Variant_storage<true, Types...>::_M_reset()))
586 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
587 (__get_storage): Likewise.
588 (variant): Add noexcept to friend declarations for __get and
592 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
593 Use _Require for constraints.
594 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
596 (__uniq_ptr_hash): New base class with conditionally-disabled call
598 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
599 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
600 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
602 * include/bits/shared_ptr.h: Improve docs.
603 * include/bits/shared_ptr_base.h: Likewise.
604 * include/bits/stl_uninitialized.h: Likewise.
605 * include/bits/unique_ptr.h: Likewise.
606 * libsupc++/new: Likewise.
608 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
610 * include/bits/stl_deque.h
611 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
613 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
615 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
617 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
619 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
621 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
623 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
625 (_Deque_iterator<>::operator-(difference_type)): Likewise.
627 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
630 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
631 (test01): Reserve for number of insertions to avoid rehash during test.
632 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
634 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
639 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
641 * include/experimental/bits/fs_path.h: Improve docs.
642 * include/experimental/bits/net.h: Fix wrong header name in comment.
643 Do not document implementation details.
644 * include/experimental/netfwd: Fix doxygen grouping.
646 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
648 * include/bits/stl_pair.h: Improve docs.
649 * include/std/tuple: Likewise.
651 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
653 * include/std/chrono: Improve docs.
654 * include/std/ratio: Do not document implementation details.
655 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
657 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
660 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
661 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
662 (__duration_common_type): New helper.
663 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
664 __duration_common_type.
665 (__timepoint_common_type_wrapper): Replace with ...
666 (__timepoint_common_type): New helper.
667 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
668 Use __time_point_common_type.
669 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
670 (__common_type_impl): If either argument is transformed by decay,
671 use the common_type of the decayed types.
672 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
673 decayed, use __do_common_type_impl to get the common_type.
674 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
675 (__do_member_type_wrapper, __member_type_wrapper)
676 (__expanded_common_type_wrapper): Remove.
677 (__common_type_pack, __common_type_fold): New helpers.
678 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
679 __member_type_wrapper and __expanded_common_type_wrapper.
680 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
681 Test zero-length template argument list.
682 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
683 Test single argument cases and argument types that should decay.
684 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
685 Adjust expected error.
686 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
688 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
689 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
690 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
692 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
694 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
696 Make allocator propagation more consistent for
697 operator+(basic_string) (P1165R1)
698 * include/bits/basic_string.h
699 (operator+(basic_string&&, basic_string&&): Changed resulting
700 allocator to always be the one from the first parameter.
701 * include/bits/basic_string.tcc
702 (operator+(const _CharT*, const basic_string&)): Changed
703 resulting allocator to be SOCCC on the second parameter's allocator.
704 (operator+(_CharT, const basic_string&)): Likewise.
705 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
707 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
710 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
712 * include/bits/regex.h: Improve docs.
713 * include/bits/regex.tcc: Do not document implementation details.
715 * testsuite/19_diagnostics/error_code/hash.cc: New test.
717 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
719 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
720 Add type printer for container types in std::__debug namespace.
721 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
722 (gdb-tests): Use distinct parameters for the type of test and use of
724 (gdb-test): Check for regex test even if 'whatis' test.
725 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
727 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
728 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
729 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
730 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
731 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
732 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
733 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
735 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
737 * include/std/system_error (error_category): Fix comment.
740 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
741 argument is an empty path.
742 (absolute(const path&, error_code&)): Use invalid_argument as error
743 code instead of no_such_file_or_directory.
744 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
745 of non-existent paths and empty paths with both overloads of absolute.
747 * include/std/system_error (error_category, error_code)
748 (error_condition): Improve docs.
749 * libsupc++/exception: Add missing @addtogroup Doxygen command.
750 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
751 to class documentation. Suppress documentation for implementation
753 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
754 Suppress documentation for implementation details.
756 * include/std/system_error (error_code): Remove friend declaration
757 for hash<error_code>.
758 (hash<error_code>::operator()): Use public member functions to access
760 (hash<error_condition>::operator()): Use address of category, not
761 its object representation.
762 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
763 Use public member functions to access value and category.
764 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
766 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
768 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
769 * include/bits/hashtable_policy.h
770 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
771 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
772 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
773 smaller than input value rather than always greater. Preserve
774 _M_next_resize if called with 0 input. Use __builtin_floorl.
775 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
776 elements + number of insertions is greater than _M_next_resize. Start
777 with 11 buckets if not told otherwise. Use __builtin_floorl.
778 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
779 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
780 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
781 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
782 told otherwise. Use __builtin_floorl.
783 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
784 to also validate _Power2_rehash_policy.
785 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
788 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
791 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
795 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
796 overflow warning with -Wpedantic -Wsystem-headers.
798 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
801 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
802 * include/bits/move.h (swap): Remove extra parentheses.
804 * include/experimental/bits/lfts_config.h: Improve doc markup.
805 * include/experimental/optional: Improve docs.
806 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
807 (__constexpr_addressof): Remove.
808 (optional::operator->()): Use std::__addressof().
809 * include/std/optional (optional::operator->()): Adjust whitespace.
810 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
811 that operator-> is still constexpr with overloaded operator&. Change
812 to compile-only test.
813 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
816 * include/bits/shared_ptr.h: Improve docs.
817 * include/bits/shared_ptr_atomic.h: Likewise.
818 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
820 * include/bits/basic_string.h: Fix iterator/index confusion in
822 * include/bits/range_access.h: Fix Doxygen warnings.
823 * include/bits/refwrap.h: Do not document implementation details.
824 (ref, cref): Group docs with reference_wrapper.
825 * include/std/fstream: Fix Doxygen markup.
826 * libsupc++/initializer_list (begin, end): Group docs with
829 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
831 * include/bits/unique_lock.h: Fix/improve doxygen markup.
832 * include/std/mutex: Likewise.
833 * include/std/shared_mutex: Likewise.
835 * include/bits/fs_dir.h: Fix/improve doxygen markup.
836 * include/bits/fs_fwd.h: Likewise.
837 * include/bits/fs_ops.h: Likewise.
838 * include/bits/fs_path.h: Likewise.
839 * include/std/filesystem: Likewise.
841 * include/experimental/bits/net.h: Fix/improve doxygen markup.
842 * include/experimental/buffer: Likewise.
843 * include/experimental/executor: Likewise.
844 * include/experimental/internet: Likewise.
845 * include/experimental/io_context: Likewise.
846 * include/experimental/net: Likewise.
847 * include/experimental/netfwd: Likewise.
848 * include/experimental/socket: Likewise.
849 * include/experimental/timer: Likewise.
851 * doc/doxygen/doxygroups.cc: Move description of experimental group
853 * include/experimental/algorithm: Add to libfund-ts doc group.
854 * include/experimental/any: Likewise. Do not document implementation
856 * include/experimental/array: Add to libfund-ts doc group.
857 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
858 for Library Fundamentals.
859 * include/experimental/chrono: Add to libfund-ts doc group.
860 * include/experimental/deque: Likewise.
861 * include/experimental/forward_list: Likewise.
862 * include/experimental/functional: Likewise.
863 * include/experimental/iterator: Likewise.
864 * include/experimental/list: Likewise.
865 * include/experimental/map: Likewise.
866 * include/experimental/memory: Likewise.
867 * include/experimental/memory_resource: Likewise. Improve docs.
869 * include/experimental/numeric: Add to libfund-ts doc group.
870 * include/experimental/optional: Likewise.
871 * include/experimental/propagate_const: Likewise.
872 * include/experimental/random: Likewise.
873 * include/experimental/ratio: Likewise.
874 * include/experimental/regex: Likewise.
875 * include/experimental/set: Likewise.
876 * include/experimental/source_location: Likewise.
877 * include/experimental/string: Likewise.
878 * include/experimental/string_view: Likewise.
879 * include/experimental/system_error: Likewise.
880 * include/experimental/tuple: Likewise.
881 * include/experimental/type_traits: Likewise.
882 * include/experimental/unordered_map: Likewise.
883 * include/experimental/unordered_set: Likewise.
884 * include/experimental/utility: Likewise.
885 * include/experimental/vector: Likewise.
886 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
887 * testsuite/experimental/array/neg.cc: Adjust dg-error.
888 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
890 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
891 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
892 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
893 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
894 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
896 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
897 * include/experimental/bits/fs_fwd.h: Improve docs.
898 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
899 * include/experimental/bits/fs_path.h: Likewise.
900 (path, filesystem_error, u8path): Improve docs.
901 * include/experimental/filesystem: Link to docs for TS.
903 * config/allocator/new_allocator_base.h (__allocator_base): Add
904 workaround for Doxygen bug #6945.
905 * include/std/memory: Improve docs. Define group for pointer safety.
906 * include/std/scoped_allocator: Improve docs. Use "undocumented"
907 conditional to suppress documentation for implementation details.
909 * include/bits/specfun.h: Improve docs.
910 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
913 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
914 (std::experimental): Add docs.
915 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
916 namespace to nothing when generating docs.
917 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
918 * include/std/chrono (std::chrono): Likewise.
919 * include/std/functional (std::placeholders): Likewise.
920 * include/std/thread (std::this_thread): Likewise.
922 * include/parallel/settings.h: Fix Doxygen markup.
924 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
925 anything unless PB_DS_CLASS_C_DEC is defined.
926 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
927 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
928 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
929 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
930 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
931 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
932 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
934 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
935 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
936 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
937 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
938 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
939 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
940 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
941 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
942 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
943 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
944 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
946 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
947 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
949 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
952 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
953 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
954 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
957 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
959 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
960 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
961 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
962 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
963 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
964 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
966 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
967 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
970 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
973 * include/std/complex (__complex_proj): Return parameter unchanged.
974 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
975 floating-point types to take std::complex arguments.
976 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
977 floating-point types.
978 * testsuite/26_numerics/complex/proj.cc: New test.
980 2019-04-30 Jakub Jelinek <jakub@redhat.com>
982 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
983 to _Lock_policyE[012].
984 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
986 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
988 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
989 macros accidentally left in.
990 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
991 unnecessary -lstdc++fs option. Fix test for mingw.
992 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
995 2019-04-30 Jakub Jelinek <jakub@redhat.com>
997 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
999 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
1001 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1003 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1004 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1007 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1009 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1012 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1013 class template and partial specialization.
1016 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1018 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1019 functions to convert a value to an integral type.
1020 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1021 (fill_n): Convert _Size parameter to an integral type.
1022 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1023 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1024 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1025 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1026 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1027 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1029 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
1031 Adding noexcept-specification on tuple constructors (LWG 2899)
1032 * libstdc++-v3/include/std/tuple:
1033 (tuple()): Add noexcept-specification.
1034 (tuple(const _Elements&...)): Likewise
1035 (tuple(_UElements&&...)): Likewise
1036 (tuple(const tuple<_UElements...>&)): Likewise
1037 (tuple(tuple<_UElements...>&&)): Likewise
1038 (tuple(const _T1&, const _T2&)): Likewise
1039 (tuple(_U1&&, _U2&&)): Likewise
1040 (tuple(const tuple<_U1, _U2>&): Likewise
1041 (tuple(tuple<_U1, _U2>&&): Likewise
1042 (tuple(const pair<_U1, _U2>&): Likewise
1043 (tuple(pair<_U1, _U2>&&): Likewise
1044 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1046 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
1049 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1050 arguments with __restrict.
1052 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1054 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1056 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
1058 * include/experimental/bits/fs_path.h
1059 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1060 avoid redundant call to _S_convert_loc with non-const pointers.
1062 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1063 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1064 * testsuite/21_strings/basic_string/hash/hash.cc
1065 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1066 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1067 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1069 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1070 wstring::_M_replace_dispatch with more specific patterns.
1071 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1072 Create const std::string to avoid redundant call to _S_convert_loc
1073 with non-const pointers.
1074 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1075 avoid unnecessary basic_string::assign instantiations.
1077 * include/std/memory (__uses_alloc_args): Add string-literal to
1078 static_assert, to match the one in __uses_alloc.
1079 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1080 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1081 for recursive uses-allocator construction of nested pairs.
1082 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1085 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1087 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1088 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1089 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1090 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1092 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1093 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1094 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1095 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1096 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1097 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1098 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1100 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
1103 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1104 * include/std/scoped_allocator [__cplusplus > 201703L]
1105 (scoped_allocator_adaptor::construct): Define in terms of
1106 uses_allocator_construction_args, as per P0591R4.
1107 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1108 * testsuite/util/testsuite_allocator.h: Remove name of unused
1111 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
1113 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1114 * doc/html/*: Regenerate.
1116 * include/bits/fs_path.h (operator<, operator<=, operator>)
1117 (operator>=, operator==, operator!=): Make hidden friends, as per
1119 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1120 string type in test.
1121 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1123 * include/std/any (any::any(ValueType&&)): Use __and_v.
1124 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1127 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1129 * include/std/type_traits (__result_of_memfun): Use remove_reference
1130 instead of __remove_cvref_t and remove redundant is_same check.
1131 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1133 * include/experimental/string_view (basic_string_view::pointer)
1134 (basic_string_view::reference): Fix to refer to non-const value_type.
1135 * include/bits/basic_string.h (basic_string): Use __sv_check and
1136 __sv_limit instead of basic_string_view::_M_check and
1137 basic_string_view::_M_limit.
1138 * include/std/string_view (__sv_check, __sv_limit): New
1139 helper functions to replace basic_string_view::_M_check and
1140 basic_string_view::_M_limit.
1141 (basic_string_view): Add static assertions to enforce ill-formed
1142 requirement for traits_type::char_type from P1148R0, and to enforce
1143 required properties of char-like types.
1144 (basic_string_view::pointer, basic_string_view::reference): Fix to
1145 refer to non-const value_type.
1146 (basic_string_view::operator[], basic_string_view::at)
1147 (basic_string_view::front, basic_string_view::back)
1148 (basic_string_view::data): Use const_reference and const_pointer
1149 typedefs for return types.
1150 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1151 (hash<wstring_view>): Fix argument_type typedef.
1152 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1153 char/1.cc: Fix expected return type of basic_string_view::data().
1154 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1155 wchar_t/1.cc: Likewise.
1156 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1157 char/1.cc: Likewise.
1158 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1159 wchar_t/1.cc: Likewise.
1160 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1162 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1163 Check reference and pointer typedefs.
1164 * testsuite/experimental/string_view/requirements/typedefs.cc:
1166 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1167 Fix expected return type of basic_string_view::data().
1168 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1170 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1172 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
1176 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
1177 Avoid a runtime check for types that can never be stored in std::any.
1178 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1181 PR libstdc++/90220 (partial)
1182 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
1183 not attempt ill-formed static_cast to pointers to non-object types.
1184 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1187 * testsuite/20_util/variant/run.cc: Catch exception by reference to
1188 prevent -Wcatch-value warning.
1190 * include/std/variant (__variant_construct): Use template parameter
1191 type instead of equivalent decltype-specifier.
1192 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
1193 Replace forward with move.
1194 (_Move_ctor_base<false, Types...>::_M_destructive_move)
1195 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
1196 (_Move_ctor_base<true, Types...>::_M_destructive_move)
1197 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
1198 index after construction succeeds.
1199 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
1200 if-constexpr checks that are always true. Use __remove_cvref_t instead
1201 of remove_reference so that is_nothrow_move_constructible check
1202 doesn't use a const rvalue parameter. In the potentially-throwing case
1203 construct a temporary and move assign it, as per LWG 2904.
1204 (_Move_assign_base<false, Types...>::operator=): Remove redundant
1205 if-constexpr checks that are always true. Use emplace as per LWG 2904.
1206 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
1207 construct a temporary and move assign from it, as per LWG 2904.
1208 * testsuite/20_util/variant/exception_safety.cc: Check that
1209 assignment operators have strong exception safety guarantee.
1211 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
1213 Document PSTL linker flags
1215 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
1217 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1219 * include/std/variant (__detail::__variant::_Traits): Make
1220 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
1221 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
1223 (__detail::__variant::_Copy_assign_alias): Only depend on
1224 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
1225 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
1226 move assignment operators.
1229 * include/std/variant (variant::__not_self): New helper for the
1230 is_same_v<remove_cvref_t<T>, variant>==false constraints.
1231 (variant::__to_type_impl): Remove.
1232 (variant::__to_type): Add default argument to check pack size, instead
1233 of using __to_type_impl.
1234 (variant::__accepted_type): Add default argument using __not_self.
1235 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
1236 for variant(T&&) constructor constraint.
1237 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
1238 Extract __accepted_type into a named template parameter for reuse in
1239 other constraints and in the exception specification.
1240 (variant::variant(in_place_type_t<T>, Args&&...))
1241 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
1242 (variant::variant(in_place_index_t<T>, Args&&...))
1243 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
1244 (variant::operator=T&&)): Remove redundant && from trait arguments.
1245 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
1246 isn't used for in_place_type or in_place_index arguments.
1248 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
1249 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
1250 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
1252 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1253 Bernd Edlinger <bernd.edlinger@hotmail.de>
1254 Jakub Jelinek <jakub@redhat.com>
1257 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
1258 general-regs-only target attribute for ARM.
1260 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1263 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
1264 specialization also depend on is_nothrow_move_constructible.
1265 * include/std/variant (__detail::__variant::__never_valueless()):
1266 Only true if the variant would have a move assignment operator.
1267 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
1268 Check __never_valueless<T...>().
1269 (variant::emplace): Only perform non-throwing move assignments
1270 for never-valueless alternatives if the variant has a move assignment
1272 * testsuite/20_util/variant/compile.cc: Check that never-valueless
1273 types can be emplaced into non-assignable variants.
1274 * testsuite/20_util/variant/run.cc: Check that never-valueless types
1275 don't get copied when emplaced into non-assignable variants.
1277 * include/std/variant (__detail::__variant::__ref_cast): Remove
1279 (__detail::__variant::_Uninitialized::_M_get)
1280 (__detail::__variant::__get)
1281 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
1283 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
1285 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
1287 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1288 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1289 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1290 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1292 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1294 Delegate PSTL configuration to pstl/pstl_config.h
1296 * include/bits/c++config: Remove explicit PSTL configuration
1297 macros and use definitions from <pstl/pstl_config.h>.
1299 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1301 Cleanup algorithm implementations
1302 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
1304 (mismatch): Forward execution policy.
1305 (equal): Qualify call to std::equal().
1306 (partial_sort): Forward execution policy.
1307 (inplace_merge): Forward execution policy.
1309 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
1311 Improve implementation of parallel equal()
1312 * include/pstl/algorithm_impl.h
1313 (__internal::__brick_equal): use "4 iterator" version of
1315 (__internal::__brick_equal): use simd for random access
1316 iterators on unsequenced execution policies.
1317 (__internal::__pattern_equal): add "4 iterator" version
1318 (__internal::__pattern_equal): dispatch to simd __brick_equal
1319 for vector-only execution policies.
1320 (__internal::__pattern_equal): dispatch to __parallel_or for
1321 parallel execution policies.
1322 * include/pstl/glue_algorithm_impl.h
1323 (std::equal): dispatch to "4 iterator" version of
1324 __internal::__pattern_equal().
1326 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
1329 * include/bits/forward_list.h (operator==): Do not use operator!= to
1331 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1332 earlier in the list, so that sort is stable.
1333 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1334 * testsuite/23_containers/forward_list/comparable.cc: Test with
1335 types that meet the minimum EqualityComparable and LessThanComparable
1336 requirements. Remove irrelevant comment.
1338 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1339 Do not depend on whether all alternative types are move constructible.
1340 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1341 from the operand when deciding whether to perform the assignment.
1342 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1343 with deleted move constructor and deleted move assignment operator.
1344 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1345 behaviour of variants with DeletedMoves as an alternative.
1346 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1347 (move_ctor, move_assign): Check that moving a variant with a
1348 DeletedMoves alternative falls back to copying instead of moving.
1350 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1351 from static_assert declarations.
1353 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1354 actually match its name.
1355 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1356 (test_swap()): Fix result for MoveCtorOnly and check
1357 MoveCtorAndSwapOnly.
1359 * include/std/optional (optional::value_or(U&&) &&): Add missing
1360 constexpr specifier.
1361 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1362 for disengaged optionals and rvalue optionals.
1363 * testsuite/20_util/optional/observers/4.cc: Likewise.
1365 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
1367 * include/pstl/algorithm_impl.h: Uglify identfiers.
1368 * include/pstl/numeric_impl.h: Uglify identfiers.
1369 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1371 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
1373 * include/bits/c++config:
1374 Add definition for __PSTL_ASSERT.
1375 Add definition for __PSTL_ASSERT_MSG.
1376 * include/pstl/algorithm_impl.h: Replace use of assert().
1377 * include/pstl/numeric_impl.h: Replace use of assert().
1378 * include/pstl/parallel_backend_tbb.h:
1379 Replace use of assert().
1380 Replace use of __TBB_ASSERT().
1381 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1383 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
1386 * src/c++17/memory_resource.cc
1387 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1388 needed to allow placing a _Chunk at the end of the buffer.
1389 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1391 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
1393 * doc/xml/faq.xml: Add information about emergency EH pool.
1394 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1395 Move outdated information on mt_allocator to a separate section.
1396 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1397 doesn't affect the default allocator.
1399 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1403 * testsuite/20_util/variant/89851.cc: New test.
1405 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
1407 * include/std/variant: Adjust whitespace. Add comments.
1408 (_Multi_array): Leave primary template undefined.
1409 (_Multi_array<_Tp>): Define partial specialization for base case of
1411 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1412 which is always a reference.
1413 (__gen_vtable::_S_apply()): Remove function, inline body into
1414 default member initializer.
1415 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1417 * include/std/variant (__variant_idx_cookie): Add member type.
1418 (__visitor_result_type): Remove.
1419 (__do_visit): Use invoke_result instead of __visitor_result_type.
1420 * testsuite/20_util/variant/visit.cc: New test.
1423 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1425 * testsuite/20_util/variant/90008.cc: New test.
1427 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
1429 * include/pstl/algorithm_impl.h: Add namespace qualification.
1430 * include/pstl/execution_defs.h: Add namespace qualification.
1431 * include/pstl/execution_impl.h: Add namespace qualification.
1432 * include/pstl/numeric_impl.h: Add namespace qualification.
1433 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1434 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1435 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1437 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1439 Fix visit<R> for variant.
1440 * include/std/variant (__do_visit): Add a template parameter
1441 for enforcing same return types for visit.
1442 (__gen_vtable_impl): Likewise.
1443 (_S_apply_single_alt): Adjust.
1444 (__visit_invoke_impl): New. Handle casting to void.
1445 (__do_visit_invoke): New. Enforces same return types.
1446 (__do_visit_invoke_r): New. Converts return types.
1447 (__visit_invoke): Adjust.
1448 (__gen_vtable): Add a template parameter for enforcing
1449 same return types for visit.
1450 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1451 different return types.
1452 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1453 visitors with different return types don't accidentally
1454 compile with regular visitation.
1456 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1458 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1459 dg-require-filesystem-ts.
1461 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
1463 * doc/xml/manual/status_cxx2020.xml: Update status.
1464 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1465 * testsuite/20_util/variant/visit_r.cc: New test.
1467 * include/bits/fs_dir.h (directory_iterator::operator*)
1468 (directory_iterator::operator->): Add noexcept.
1469 (operator==, operator!=): Replace namespace-scope equality operators
1470 for directory iterators with hidden friends.
1473 * config/abi/pre/gnu.ver: Add missing exports.
1474 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1477 * config/abi/pre/gnu.ver: Export new symbols.
1478 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1479 (recursive_directory_iterator::recursion_pending())
1480 (recursive_directory_iterator::disable_recursion_pending()): Remove
1481 inline definitions. Make noexcept.
1482 (recursive_directory_iterator::depth())
1483 (recursive_directory_iterator::operator*())
1484 (recursive_directory_iterator::operator->()): Make noexcept.
1485 (recursive_directory_iterator::_M_options)
1486 (recursive_directory_iterator::_M_pending): Remove data members.
1487 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1488 (recursive_directory_iterator::recursive_directory_iterator): Remove
1489 ctor-initializer. Use new constructor for _Dir_stack.
1490 (recursive_directory_iterator::options())
1491 (recursive_directory_iterator::recursion_pending())
1492 (recursive_directory_iterator::disable_recursion_pending()): Add
1493 non-inline definitions.
1494 (recursive_directory_iterator::depth()): Make noexcept.
1495 (recursive_directory_iterator::increment(error_code&))
1496 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1497 location of options and recursion_pending members.
1498 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1499 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1500 user-declared move constructor and assignment operator, to make the
1503 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1504 d_type == DT_UNKNOWN immediately.
1505 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1507 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1509 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1511 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1512 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1515 PR libstdc++/87431 (again)
1516 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1517 Define partial specialization for basic_string.
1518 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1519 shared_ptr and weak_ptr.
1520 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1522 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1524 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1526 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1528 * include/std/any (_Never_valueless_alt): Define explicit
1529 specialization for any.
1530 * include/std/variant (_Never_valueless_alt): Define primary template.
1531 (__never_valueless): Use _Never_valueless_alt instead of
1532 is_trivially_copyable.
1533 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1534 initializations to avoid try-catch overhead. Add special case for
1535 scalars produced by potentially-throwing conversions. Use
1536 _Never_valueless_alt instead of is_trivially_copyable for the
1537 remaining strong exception-safety cases.
1538 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1539 * testsuite/20_util/variant/87431.cc: Run both test functions.
1540 * testsuite/20_util/variant/exception_safety.cc: New test.
1541 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1542 so the variant becomes valueless.
1544 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
1547 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1549 (variant::emplace<_Tp>): Return result of emplace<N> directly.
1551 * include/std/string (__hash_string_base): New class template defining
1552 operator() for hashing strings.
1553 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1554 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1555 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1556 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1558 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1560 Use single-visitation in variant assignment and swap and relops.
1561 Also use indices instead of types when checking whether
1562 variants hold the same thing.
1563 * include/std/variant (__do_visit): Add a template parameter
1564 for index visitation, invoke with indices if index visitation
1566 (__variant_idx_cookie): New.
1567 (__visit_with_index): Likewise.
1568 (_Copy_assign_base::operator=): Do single-visitation with
1570 (_Move_assign_base::operator=): Likewise.
1571 (_Extra_visit_slot_needed): Adjust.
1572 (__visit_invoke): Call with indices if it's an index visitor.
1573 (relops): Do single-visitation with an index visitor.
1575 (__visitor_result_type): New.
1577 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1579 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1581 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1583 Don't revisit a variant we are already visiting.
1584 * include/std/variant (__variant_construct_single): New.
1585 (__variant_construct): Use it.
1586 (_M_destructive_move): Likewise.
1587 (_M_destructive_copy): Likewise.
1588 (_Copy_assign_base::operator=): Adjust.
1589 (_Move_assign_base::operator=): Likewise.
1592 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
1595 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1596 destructor so they are not evaluated until the _Key type is complete.
1597 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1598 * testsuite/23_containers/set/85965.cc: New test.
1599 * testsuite/23_containers/unordered_set/85965.cc: New test.
1600 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1601 with regexp matching the corresponding _Rb_tree specialization.
1602 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1603 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1604 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1605 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1606 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1607 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1608 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1610 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1613 Fix based on a suggestion by Antony Polukhin.
1614 * include/std/variant (__never_valueless): New.
1616 (_Extra_visit_slot_needed): New.
1617 (_Multi_array): Use it.
1618 (_S_apply_all_alts): Likewise.
1620 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1623 Fix based on a suggestion by Antony Polukhin.
1624 * include/std/variant (__gen_vtable): Don't reserve an
1625 additional table slot, _Multi_array already does that.
1627 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1630 Fix based on a suggestion by Antony Polukhin.
1631 * include/std/variant (__variant_construct): Capture a pointer
1632 to the storage and visit just one variant.
1634 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
1636 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1637 Doxygen-generated pages with unstable URL.
1638 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1639 * doc/xml/manual/extensions.xml: Likewise.
1640 * doc/xml/manual/parallel_mode.xml: Likewise.
1641 * doc/xml/manual/support.xml: Likewise.
1643 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1644 avoid -Wconversion warnings.
1646 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
1648 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1649 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
1650 (allstamped): Add stamp-pstl.
1651 (install-headers): Add ptsl_builddir.
1652 * include/Makefile.in: Regenerate.
1653 * include/bits/c++config: Add pstl configuration.
1654 * include/pstl/LICENSE.txt: New file.
1655 * include/pstl/algorithm_fwd.h: New file.
1656 * include/pstl/algorithm_impl.h: New file.
1657 * include/pstl/execution_defs.h: New file.
1658 * include/pstl/execution_impl.h: New file.
1659 * include/pstl/glue_algorithm_defs.h: New file.
1660 * include/pstl/glue_algorithm_impl.h: New file.
1661 * include/pstl/glue_execution_defs.h: New file.
1662 * include/pstl/glue_memory_defs.h: New file.
1663 * include/pstl/glue_memory_impl.h: New file.
1664 * include/pstl/glue_numeric_defs.h: New file.
1665 * include/pstl/glue_numeric_impl.h: New file.
1666 * include/pstl/memory_impl.h: New file.
1667 * include/pstl/numeric_fwd.h: New file.
1668 * include/pstl/numeric_impl.h: New file.
1669 * include/pstl/parallel_backend.h: New file.
1670 * include/pstl/parallel_backend_tbb.h: New file.
1671 * include/pstl/parallel_backend_utils.h: New file.
1672 * include/pstl/parallel_impl.h: New file.
1673 * include/pstl/pstl_config.h: New file.
1674 * include/pstl/unseq_backend_simd.h: New file.
1675 * include/pstl/utils.h: New file.
1676 * include/std/algorithm: Include parallel algorithm implementations.
1677 * include/std/execution: New file.
1678 * include/std/memory: Include parallel algorithm implementations.
1679 * include/std/numeric: Include parallel algorithm implementations.
1680 * include/std/version: Add parallel algorithms feature test macro.
1681 * testsuite/util/pstl/pstl_test_config.h: New file.
1682 * testsuite/util/pstl/test_utils.h: New file.
1683 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1684 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1685 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1686 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1687 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1688 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1689 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1690 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1691 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1692 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1693 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1694 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1695 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1696 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1697 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1698 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1699 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1700 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1701 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1702 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1703 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1704 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1705 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1706 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1707 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1708 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1709 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1710 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1711 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1712 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1713 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1714 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1715 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1716 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1717 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1718 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1719 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1720 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1721 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1722 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1723 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1724 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1725 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1726 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1727 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1728 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1729 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1730 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1731 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1732 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1733 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1734 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1735 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1736 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1737 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1738 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1739 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1740 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1741 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1742 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1743 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1744 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1745 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1746 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1747 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1748 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1749 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1750 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1751 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1752 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1753 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1754 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1755 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1756 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1757 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1758 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1759 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1760 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1761 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1762 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1763 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1764 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1765 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1766 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1767 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1768 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1769 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1770 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1771 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1772 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1773 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1774 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1775 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1776 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1777 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1778 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1779 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1780 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1781 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1782 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1783 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1784 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1785 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1786 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1787 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1788 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1790 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
1792 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
1793 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
1794 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
1795 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
1796 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
1797 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
1798 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
1799 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
1800 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
1801 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
1802 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
1803 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
1804 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
1805 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
1806 when the special functions IS is enabled, not for C++17.
1807 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
1809 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
1810 without checks for special functions in C++17.
1811 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
1815 * include/backward/hash_map: Use <> for includes not "".
1816 * include/backward/hash_set: Likewise.
1817 * include/backward/strstream: Likewise.
1818 * include/tr1/bessel_function.tcc: Likewise.
1819 * include/tr1/exp_integral.tcc: Likewise.
1820 * include/tr1/legendre_function.tcc: Likewise.
1821 * include/tr1/modified_bessel_func.tcc: Likewise.
1822 * include/tr1/riemann_zeta.tcc: Likewise.
1824 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
1826 * doc/xml/manual/allocator.xml: Link to table documenting evolution
1827 of extension allocators.
1828 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
1829 Document new headers in 7.2, 8.1 and 9.1 releases.
1830 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
1831 * doc/html/*: Regenerate.
1833 2019-03-12 John David Anglin <dave.anglin@bell.net>
1836 * testsuite/lib/libstdc++.exp: Locate libatomic.
1837 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
1838 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
1840 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1841 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
1842 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
1843 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1845 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
1848 * configure.ac: Check for sockatmark.
1849 * crossconfig.m4: Check for sockatmark.
1850 * config.h.in: Regenerate.
1851 * configure: Regenerate.
1852 * include/experimental/internet (address_v4::_S_hton): Rename
1853 overloaded functions to _S_hton_16 and _S_ntoh_16.
1854 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
1855 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
1856 * include/experimental/socket (basic_socket::at_mark): Check
1857 _GLIBCXX_HAVE_SOCKATMARK.
1859 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
1860 const variables instead of macros.
1863 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
1864 Use correct type for len_aligned.
1865 * testsuite/20_util/hash/89629.cc: New test.
1867 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1870 * include/std/atomic (atomic<T>::store, atomic<T>::load,
1871 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
1872 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
1873 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
1874 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
1875 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
1876 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
1877 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
1878 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
1879 memory_order_seq_cst to int.
1881 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
1883 * doc/xml/manual/using.xml: Use link element instead of xref.
1884 * doc/html/*: Regenerate.
1886 * include/bits/fs_path.h (path::format): Add fixed underlying type.
1888 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
1891 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
1892 parameters in deduction guides.
1893 * include/debug/multimap.h (multimap): Likewise.
1894 * include/debug/set.h (multimap): Likewise.
1895 * include/debug/multiset.h (multimap): Likewise.
1896 * include/debug/unordered_map (unordered_map): Likewise.
1897 (unordered_multimap): Likewise.
1898 * include/debug/unordered_set (unordered_set): Likewise.
1899 (unordered_multiset): Likewise.
1902 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
1903 Invalidate all iterators in case of rehash.
1904 (unordered_multimap<>::_M_check_rehashed): Likewise.
1905 * include/debug/unordered_set
1906 (unordered_set<>::_M_check_rehashed): Likewise.
1907 (unordered_multiset<>::_M_check_rehashed): Likewise.
1908 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
1910 2019-03-07 Andreas Schwab <schwab@suse.de>
1912 * config/abi/post/riscv64-linux-gnu: New directory.
1913 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
1915 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
1917 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
1918 compile test to run. Fix typo.
1920 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1921 * doc/html/*: Regenerate.
1923 P0356R5 Simplified partial function application
1924 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
1925 helpers for bind_front.
1926 (bind_front, __cpp_lib_bind_front): Define.
1927 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
1929 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1931 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
1932 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
1933 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
1934 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1936 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1938 PR libstdc++/86655 - std::assoc_legendre should not constrain
1939 the value of m (or x).
1940 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
1941 __sph_legendre): If degree > order Don't throw, return 0.
1942 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
1943 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
1944 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
1945 * testsuite/tr1/5_numerical_facilities/special_functions/
1946 02_assoc_legendre/pr86655.cc: New test.
1947 * testsuite/tr1/5_numerical_facilities/special_functions/
1948 22_sph_legendre/pr86655.cc: New test.
1950 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1953 Also PR libstdc++/85517
1954 * include/std/variant (__do_visit): New.
1955 (__variant_cast): Likewise.
1956 (__variant_cookie): Likewise.
1957 (__erased_*): Remove.
1958 (_Variant_storage::_S_vtable): Likewise.
1959 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
1960 (_Variant_storage::__M_reset): Adjust.
1961 (__variant_construct): New.
1962 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
1963 __variant_construct.
1964 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1965 (_Move_ctor_base::__M_destructive_copy): New.
1966 (_Move_ctor_base::__M_destructive_move): Adjust to use
1967 __variant_construct.
1968 (_Copy_assign_base::operator=): Adjust to use __do_visit.
1969 (_Copy_assign_alias): Adjust to check both copy assignment
1970 and copy construction for triviality.
1971 (_Move_assign_base::operator=): Adjust to use __do_visit.
1972 (_Multi_array): Add support for visitors that accept and return
1974 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
1975 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
1976 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
1977 a __variant_cookie temporary for a variant that is valueless and..
1978 (__gen_vtable_impl::__visit_invoke): ..adjust here.
1979 (__gen_vtable::_Array_type): Conditionally make space for
1980 the __variant_cookie visitor case.
1981 (__variant_construct_by_index): New.
1982 (get_if): Adjust to use std::addressof.
1983 (relops): Adjust to use __do_visit.
1984 (variant): Add __variant_cast and __variant_construct_by_index
1986 (variant::emplace): Use _M_reset() and __variant_construct_by_index
1987 instead of self-destruction.
1988 (variant::swap): Adjust to use __do_visit.
1989 (visit): Reimplement in terms of __do_visit.
1990 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
1991 * testsuite/20_util/variant/compile.cc: Adjust.
1992 * testsuite/20_util/variant/run.cc: Likewise.
1994 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1996 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
1998 * testsuite/experimental/feat-char8_t.cc: Likewise.
2000 * include/std/type_traits [C++20] (is_bounded_array)
2001 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2003 * testsuite/20_util/is_bounded_array/requirements/
2004 explicit_instantiation.cc: New test.
2005 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2007 * testsuite/20_util/is_bounded_array/value.cc: New test.
2008 * testsuite/20_util/is_unbounded_array/requirements/
2009 explicit_instantiation.cc: New test.
2010 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2012 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2014 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2016 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2018 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
2020 * include/c_compatibility/math.h [C++20] (lerp): Add using
2022 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2023 (__lerp): Define function template to implement lerp.
2024 (lerp(float, float, float), lerp(double, double, double))
2025 (lerp(long double, long double, long double)): Define for C++20.
2026 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2027 (midpoint(T, T), midpoint(T*, T*)): Define.
2028 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2029 * testsuite/26_numerics/lerp.cc: New test.
2030 * testsuite/26_numerics/midpoint/floating.cc: New test.
2031 * testsuite/26_numerics/midpoint/integral.cc: New test.
2032 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2034 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2036 PR libstdc++/88996 Implement P0439R0
2037 Make std::memory_order a scoped enumeration.
2038 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2039 add variables for the old enumerators. Adjust calls.
2040 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2041 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2043 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
2045 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2048 * include/std/memory_resource (polymorphic_allocator): Add default
2049 template argument for C++20.
2050 (polymorphic_allocator::allocate_bytes)
2051 (polymorphic_allocator::deallocate_bytes)
2052 (polymorphic_allocator::allocate_object)
2053 (polymorphic_allocator::deallocate_object)
2054 (polymorphic_allocator::new_object)
2055 (polymorphic_allocator::delete_object): New member functions for
2057 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2060 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2063 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2066 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2068 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2069 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2071 * include/std/memory (uses_allocator_construction_args): New set of
2072 overloaded functions.
2073 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2075 * include/std/memory_resource (polymorphic_allocator::construct)
2076 [__cplusplus > 201703l]: Replace all overloads with a single function
2077 using uses_allocator_construction_args.
2078 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2080 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2082 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
2085 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2086 stylesheet directories before check for xsltproc. Try to use
2087 xmlcatalog to find local stylesheet directory before trying hardcoded
2088 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2089 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2090 use xsltproc if xmlcatalog fails to find a local stylesheet.
2091 * configure.ac: Check for xmlcatalog.
2092 * Makefile.in: Regenerate.
2093 * configure: Likewise.
2094 * doc/Makefile.in: Likewise.
2095 * include/Makefile.in: Likewise.
2096 * libsupc++/Makefile.in: Likewise.
2097 * po/Makefile.in: Likewise.
2098 * python/Makefile.in: Likewise.
2099 * src/Makefile.in: Likewise.
2100 * src/c++11/Makefile.in: Likewise.
2101 * src/c++17/Makefile.in: Likewise.
2102 * src/c++98/Makefile.in: Likewise.
2103 * src/filesystem/Makefile.in: Likewise.
2104 * testsuite/Makefile.in: Likewise.
2106 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
2109 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2110 container deduction guides.
2111 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2112 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2113 parameters in deduction guides.
2114 * include/bits/stl_multimap.h (multimap): Likewise.
2115 * include/bits/stl_multiset.h (multiset): Likewise.
2116 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2117 * include/bits/stl_set.h (set): Likewise.
2118 * include/bits/stl_stack.h (stack): Likewise.
2119 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2120 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2121 constrain parameters in deduction guides.
2122 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2124 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2126 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2127 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2128 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2129 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2131 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2133 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2136 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2137 to class template and partial specialization using void_t.
2138 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2140 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
2143 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2144 copy and move members public.
2146 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
2148 * include/std/type_traits (__underlying_type_impl): New helper to
2149 make underlying_type SFINAE-friendly.
2150 (underlying_type): Derive from __underlying_type_impl.
2151 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2155 * include/bits/char_traits.h (__constant_char_array): Check index is
2156 in range before dereferencing.
2157 (char_traits<char>::compare, char_traits<char>::find)
2158 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2159 immediately if n is zero.
2160 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2161 Remove workarounds for PR 67026.
2162 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2164 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2167 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2169 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2170 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2172 2019-02-22 Jakub Jelinek <jakub@redhat.com>
2175 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
2176 type to std::size_t and argument to type to long double.
2178 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2180 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
2181 * config/abi/post/sparc64-linux-gnu: New directory.
2182 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
2183 * config/abi/post/sparc64-linux-gnu/32: New directory.
2184 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
2186 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2188 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
2189 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
2192 2019-02-22 Tom Honermann <tom@honermann.net>
2194 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
2195 printers for u8string and u8string_view.
2197 2019-02-22 Tom Honermann <tom@honermann.net>
2199 * testsuite/18_support/byte/ops.cc: Validate
2200 std::to_integer<char8_t>, std::to_integer<char16_t>, and
2201 std::to_integer<char32_t>.
2202 * testsuite/18_support/numeric_limits/dr559.cc: Validate
2203 std::numeric_limits<char8_t>.
2204 * testsuite/18_support/numeric_limits/lowest.cc: Validate
2205 std::numeric_limits<char8_t>::lowest().
2206 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
2207 std::numeric_limits<char8_t>::max_digits10.
2208 * testsuite/18_support/type_info/fundamental.cc: Validate
2209 typeinfo for char8_t.
2210 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
2211 std::from_chars with char8_t.
2212 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
2213 Validate explicit instantiation of std::hash<char8_t>.
2214 * testsuite/20_util/is_integral/value.cc: Validate
2215 std::is_integral<char8_t>.
2216 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
2217 Validate std::make_signed<char8_t>.
2218 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2219 Validate u8string construction from char8_t sources.
2220 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
2222 * testsuite/21_strings/basic_string_view/operations/compare/
2223 char/70483.cc: Validate substr operations on u8string_view.
2224 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
2225 the u8string_view typedef is defined.
2226 * testsuite/21_strings/char_traits/requirements/
2227 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
2229 * testsuite/21_strings/char_traits/requirements/
2230 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
2231 constexpr member functions.
2232 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
2233 that the u8string typedef is defined.
2234 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
2235 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
2236 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
2237 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
2239 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2240 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
2242 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2243 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2244 Validate std::atomic<char8_t>::is_always_lock_free
2245 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
2246 Update line numbers.
2247 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
2249 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
2251 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2252 Validate std::experimental::pmr::u8string.
2253 * testsuite/experimental/string_view/typedefs.cc: Validate that the
2254 u8string_view typedef is defined.
2255 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
2256 char32_t to the typelists.
2258 2019-02-22 Tom Honermann <tom@honermann.net>
2260 * include/ext/typelist.h: Constrain a partial specialization of
2261 typelist::detail::append_ to only match chain<T1,T2>.
2263 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2266 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
2267 class template with class. Replace move and copy member types with
2268 member alias templates, so they are only instantiated when needed.
2269 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2270 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
2271 test for C++11/14/17 as well.
2272 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
2275 2019-02-20 Jakub Jelinek <jakub@redhat.com>
2278 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
2279 _GLIBCXX_PURE to the alias declaration.
2281 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
2283 * testsuite/21_strings/basic_string/literals/types.cc
2284 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
2285 * testsuite/21_strings/basic_string/literals/values.cc
2286 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2287 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
2288 potentially having different type.
2289 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2290 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
2292 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
2293 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2294 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
2295 string literals only using basic character set.
2296 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
2297 u8 literals to char.
2298 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
2299 Test ATOMIC_CHAR8_T_LOCK_FREE.
2300 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
2301 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
2302 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
2303 * testsuite/experimental/string_view/literals/types.cc
2304 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
2306 * testsuite/experimental/string_view/literals/values.cc
2307 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2309 2019-02-19 Tom Honermann <tom@honermann.net>
2311 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
2312 from char16_32_t.cc; validates numeric_limits<char8_t>.
2313 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
2314 test cloned from types.cc; validates operator""s for char8_t
2316 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
2317 test cloned from values.cc; validates construction and comparison
2319 * testsuite/21_strings/basic_string/requirements/
2320 /explicit_instantiation/char8_t/1.cc: New test cloned from
2321 char16_t/1.cc; validates explicit instantiation of
2322 basic_string<char8_t>.
2323 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2324 New test cloned from types.cc; validates operator""sv for char8_t
2325 returns u8string_view.
2326 * testsuite/21_strings/basic_string_view/literals/
2327 values-char8_t.cc: New test cloned from values.cc; validates
2328 construction and comparison of u8string_view values.
2329 * testsuite/21_strings/basic_string_view/requirements/
2330 explicit_instantiation/char8_t/1.cc: New test cloned from
2331 char16_t/1.cc; validates explicit instantiation of
2332 basic_string_view<char8_t>.
2333 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2334 New test cloned from char16_t/65049.cc; validates that
2335 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2336 * testsuite/21_strings/char_traits/requirements/char8_t/
2337 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2338 that char_traits<char8_t> member typedefs are present and correct.
2339 * testsuite/21_strings/char_traits/requirements/
2340 explicit_instantiation/char8_t/1.cc: New test cloned from
2341 char16_t/1.cc; validates explicit instantiation of
2342 char_traits<char8_t>.
2343 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2344 from char16_t.cc: validates
2345 codecvt<char16_t, char8_t, mbstate_t>.
2346 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2347 from char32_t.cc: validates
2348 codecvt<char32_t, char8_t, mbstate_t>.
2349 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2350 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2351 codecvt<char32_t, char8_t, std::mbstate_t>.
2352 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2353 test cloned from string.cc; validates filesystem::path construction
2355 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2356 the __cpp_lib_char8_t feature test macro is defined with the
2358 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2359 New test cloned from string.cc; validates filesystem::path
2360 construction from char8_t input.
2361 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2362 test cloned from types.cc; validates operator""sv for char8_t
2363 returns u8string_view.
2364 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2365 New test cloned from values.cc; validates construction and
2366 comparison of u8string_view values.
2367 * testsuite/experimental/string_view/requirements/
2368 explicit_instantiation/char8_t/1.cc: New test cloned from
2369 char16_t/1.cc; validates explicit instantiation of
2370 basic_string_view<char8_t>.
2371 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2372 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2375 2019-02-19 Tom Honermann <tom@honermann.net>
2377 P0482R5 char8_t: Standard library support
2378 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2379 typeinfo symbols for char8_t.
2380 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2381 (GLIBCXX_3.4.26): Add symbols for specializations of
2382 numeric_limits and codecvt that involve char8_t.
2383 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2384 * include/bits/atomic_base.h: Add atomic_char8_t.
2385 * include/bits/basic_string.h: Add std::hash<u8string> and
2386 operator""s(const char8_t*, size_t).
2387 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2389 * include/bits/char_traits.h: Add char_traits<char8_t>.
2390 * include/bits/codecvt.h: Add
2391 codecvt<char16_t, char8_t, mbstate_t>,
2392 codecvt<char32_t, char8_t, mbstate_t>,
2393 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2394 codecvt_byname<char32_t, char8_t, mbstate_t>.
2395 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2396 recognize char8_t as an integral type.
2397 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2399 (path::u8string): Return std::u8string when char8_t support is
2401 (path::generic_u8string): Likewise.
2402 (path::_S_convert): Handle conversion from char8_t input.
2403 (path::_S_str_convert): Likewise.
2404 * include/bits/functional_hash.h: Add hash<char8_t>.
2405 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2407 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2408 for new char8_t specializations.
2409 * include/bits/localefwd.h: Add missing declarations of
2410 codecvt<char16_t, char, mbstate_t> and
2411 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2412 codecvt<char16_t, char8_t, mbstate_t> and
2413 codecvt<char32_t, char8_t, mbstate_t>.
2414 * include/bits/postypes.h: Add u8streampos
2415 * include/bits/stringfwd.h: Add declarations of
2416 char_traits<char8_t> and u8string.
2417 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2418 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2420 (path::u8string): Return std::u8string when char8_t support is
2422 (path::generic_u8string): Likewise.
2423 (path::_S_convert): Handle conversion from char8_t input.
2424 (path::_S_str_convert): Likewise.
2425 * include/experimental/string: Add u8string.
2426 * include/experimental/string_view: Add u8string_view,
2427 hash<experimental::u8string_view>, and
2428 operator""sv(const char8_t*, size_t).
2429 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2430 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2431 as a character type.
2432 * include/std/limits: Add numeric_limits<char8_t>.
2433 * include/std/string_view: Add u8string_view,
2434 hash<experimental::u8string_view>, and
2435 operator""sv(const char8_t*, size_t).
2436 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2437 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2438 * libsupc++/atomic_lockfree_defines.h: Define
2439 ATOMIC_CHAR8_T_LOCK_FREE.
2440 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2441 codecvt.cc and limits.cc so that char8_t specializations of
2442 numeric_limits and codecvt and emitted.
2443 * src/c++11/Makefile.in: Likewise.
2444 * src/c++11/codecvt.cc: Define members of
2445 codecvt<char16_t, char8_t, mbstate_t>,
2446 codecvt<char32_t, char8_t, mbstate_t>,
2447 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2448 codecvt_byname<char32_t, char8_t, mbstate_t>.
2449 * src/c++11/limits.cc: Define members of
2450 numeric_limits<char8_t>.
2451 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2452 locale_init.cc and localename.cc.
2453 * src/c++98/Makefile.in: Likewise.
2454 * src/c++98/locale_init.cc: Add initialization for the
2455 codecvt<char16_t, char8_t, mbstate_t> and
2456 codecvt<char32_t, char8_t, mbstate_t> facets.
2457 * src/c++98/localename.cc: Likewise.
2458 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2460 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2462 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2463 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2464 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2466 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
2468 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2469 * doc/html/*: Regenerate.
2471 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2472 * doc/html/*: Regenerate.
2474 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2475 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2476 allocator type in is_constructible checks.
2477 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2478 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2479 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2480 problematic type from LWG 2586 discussion.
2481 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2482 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2484 * configure.ac: Check for C11 timespec_get function.
2485 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2487 * config.h.in: Regenerate.
2488 * configure: Regenerate.
2489 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2490 std for C++17 and up.
2492 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2493 * include/bits/stl_queue.h
2494 (priority_queue(const Compare&, const Container&, const Alloc&))
2495 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2497 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2499 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2500 * include/bits/stl_queue.h (queue, priority_queue): Add static
2501 assertions to enforce LWG 2566 requirement on value_type.
2502 * include/bits/stl_stack.h (stack): Likewise.
2505 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2507 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2508 * include/bits/std_abs.h: Add comment about LWG 2735.
2509 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2511 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
2514 * include/std/version [__cpp_impl_destroying_delete]
2515 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2516 * libsupc++/new [__cpp_impl_destroying_delete]
2517 (__cpp_lib_destroying_delete): Likewise.
2518 (destroying_delete_t, destroying_delete): Likewise, but define even
2519 when __cpp_impl_destroying_delete is not defined.
2520 * testsuite/18_support/destroying_delete.cc: New test.
2522 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
2525 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2526 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2527 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2528 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2530 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
2533 * include/bits/fs_path.h (path::has_root_name)
2534 (path::has_root_directory, path::has_root_path)
2535 (path::has_relative_path, path::has_parent_path)
2536 (path::has_filename, path::has_stem, path::has_extension)
2537 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2539 * src/c++17/fs_path.cc (path::has_root_name)
2540 (path::has_root_directory, path::has_root_path)
2541 (path::has_relative_path, path::has_parent_path)
2542 (path::has_filename, path::_M_find_extension): Add noexcept.
2544 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
2546 PR libstdc++/89102 (partial)
2547 * include/std/type_traits (common_type<>): Define.
2548 (common_type<T>): Derive from common_type<T, T>.
2549 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2550 Test zero-length template argument list.
2551 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2552 Test additional single argument cases.
2553 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2554 Adjust expected error.
2556 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
2559 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2561 * include/bits/stl_stack.h (stack): Likewise.
2562 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2563 * testsuite/23_containers/queue/deduction.cc: New test.
2564 * testsuite/23_containers/stack/deduction.cc: New test.
2567 * include/std/type_traits (__is_convertible_helper)
2568 (__is_convertible_helper<_From, _To, false>): Revert changes to
2569 support is_nothrow_convertible.
2570 (__is_nt_convertible_helper): New helper.
2571 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2573 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2574 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2577 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2578 __is_alloc_insertable_impl. Replace single type member with two
2579 members, one for each of copy and move insertable.
2580 (__is_move_insertable): New trait for internal use.
2581 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2582 (vector::_S_nothrow_relocate(true_type)): New functions to
2583 conditionally check if __relocate_a can throw.
2584 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2585 on __is_move_insertable.
2586 (vector::_S_do_relocate): New overloaded functions to conditionally
2588 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2589 based on _S_use_relocate.
2590 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2591 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2592 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2595 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2596 parameter unnamed. Add message to static assertion.
2597 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2598 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2601 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
2604 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2606 (__is_bitwise_relocatable): ... to this.
2607 (__relocate_a_1): Adapt.
2608 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2609 (__is_bitwise_relocatable): ... to this.
2611 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
2614 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2615 final component as well as from _M_pathname. Append the dot using
2616 operator+= instead of only to _M_pathname.
2617 (path::_M_find_extension): Reformat slightly.
2618 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2619 Add more test cases.
2621 2019-01-30 Ulrich Drepper <drepper@redhat.com>
2623 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2625 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
2627 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2628 constexpr specifiers from arg and proj.
2630 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2631 __shared_ptr instantiations used by gcc4-compatible ABI.
2633 * include/experimental/forward_list (experimental::erase): Qualify
2635 * include/experimental/list (experimental::erase): Likewise.
2636 * include/std/forward_list (std::erase): Likewise.
2637 * include/std/list (std::erase): Likewise.
2639 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2641 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2642 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2643 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2644 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2645 * testsuite/ext/array_allocator/26875.cc: Likewise.
2646 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2647 * testsuite/util/replacement_memory_operators.h: Likewise.
2648 * testsuite/util/testsuite_allocator.h: Likewise.
2650 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
2651 normal mode vector, even for debug mode.
2652 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
2653 Define alias template for normal mode vector.
2655 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
2658 * config/locale/generic/c_locale.h (__convert_from_v)
2659 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2660 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2661 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
2662 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2664 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
2667 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
2668 data member with static member function _S_use_relocate().
2669 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2670 (vector::_M_default_append): Use _S_use_relocate() instead of
2673 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
2676 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
2679 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
2680 write to stderr instead of using printf.
2682 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2685 * include/bits/char_traits.h (__constant_string_p,
2686 __constant_char_array_p): Use __builtin_is_constant_evaluated if
2689 2019-01-20 Ulrich Drepper <drepper@redhat.com>
2691 Implement C++20 P0600r1.
2692 * include/backward/hash_map: Add nodiscard attribute to empty.
2693 * include/backward/hash_set: Likewise.
2694 * backward/hashtable.h: Likewise.
2695 * include/bits/basic_string.h: Likewise.
2696 * include/bits/forward_list.h: Likewise.
2697 * include/bits/hashtable.h: Likewise.
2698 * include/bits/regex.h: Likewise.
2699 * include/bits/stl_deque.h: Likewise.
2700 * include/bits/stl_list.h: Likewise.
2701 * include/bits/stl_map.h: Likewise.
2702 * include/bits/stl_multimap.h: Likewise.
2703 * include/bits/stl_multiset.h: Likewise.
2704 * include/bits/stl_queue.h: Likewise.
2705 * include/bits/stl_set.h: Likewise.
2706 * include/bits/stl_stack.h: Likewise.
2707 * include/bits/stl_tree.h: Likewise.
2708 * include/bits/stl_vector.h: Likewise.
2709 * include/bits/unordered_map.h: Likewise.
2710 * include/bits/unordered_set.h: Likewise.
2711 * include/debug/array: Likewise.
2712 * include/experimental/any: Likewise.
2713 * include/experimental/bits/fs_path.h: Likewise.
2714 * include/experimental/internet: Likewise.
2715 * include/experimental/string_view: Likewise.
2716 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
2718 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
2720 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
2722 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
2724 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
2726 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
2728 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
2730 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
2732 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2733 info_fn_imps.hpp: Likewise.
2734 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2735 left_child_next_sibling_heap_.hpp: Likewise.
2736 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
2738 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
2740 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
2742 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
2744 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
2746 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
2748 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
2750 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
2751 * include/ext/pb_ds/trie_policy.hpp: Likewise.
2752 * include/ext/rope: Likewise.
2753 * include/ext/slist: Likewise.
2754 * include/ext/vstring.h: Likewise.
2755 * include/profile/array: Likewise.
2756 * include/std/array: Likewise.
2757 * include/tr1/array: Likewise.
2758 * include/tr1/hashtable.h: Likewise.
2759 * include/tr1/regex: Likewise.
2760 * include/tr2/dynamic_bitset: Likewise.
2761 * include/bits/alloc_traits.h: Add nodiscard attribute to
2763 * include/experimental/memory_resource: Likewise.
2764 * include/ext/alloc_traits.h: Likewise.
2765 * include/ext/array_allocator.h: Likewise.
2766 * include/ext/bitmap_allocator.h: Likewise.
2767 * include/ext/debug_allocator.h: Likewise.
2768 * include/ext/extptr_allocator.h: Likewise.
2769 * include/ext/mt_allocator.h: Likewise.
2770 * include/ext/new_allocator.h: Likewise.
2771 * include/ext/pool_allocator.h: Likewise.
2772 * include/ext/throw_allocator.h: Likewise.
2773 * include/std/scoped_allocator: Likewise.
2774 * libsupc++/eh_alloc.cc: Likewise.
2775 * include/std/future: Add nodiscard attribute to async.
2776 * libsupc++/new: Add nodiscard attribute to new.
2778 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
2783 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
2784 * include/bits/shared_ptr.h
2785 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
2786 (allocate_shared): Change to use new tag type.
2787 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
2788 Declare new member function.
2789 (_Sp_alloc_shared_tag): Define new type.
2790 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
2791 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
2792 _Sp_make_shared_tag::_S_eq to check type_info.
2793 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
2794 Constrain to prevent being called with _Sp_alloc_shared_tag.
2795 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
2796 Replace constructor with ...
2797 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
2798 reference parameter so address of the new object can be returned to
2799 the caller. Obtain the allocator from the tag type.
2800 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
2801 constructor with ...
2802 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
2803 to the __shared_count constructor.
2804 (__allocate_shared): Change to use new tag type.
2805 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
2807 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
2809 * src/c++17/fs_ops.cc
2810 (equivalent(const path&, const path&, error_code&))
2811 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
2812 compare files instead of relying on incomplete info returned by stat.
2815 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
2816 if the path is already absolute.
2817 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
2818 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
2821 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
2822 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
2823 of filesystem::exists.
2824 (create_directories(const path&, error_code&)): Add assertions.
2825 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2826 Add workaround for bug in _wstat for paths with trailing slash.
2827 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
2828 for expected behaviour on mingw.
2829 * testsuite/experimental/filesystem/operations/create_directories.cc:
2831 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
2832 "TMP" instead of "TMPDIR" and clean environment before each test. Do
2833 not test permissions on mingw targets.
2835 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
2837 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
2838 constructors and open members taking wide strings. Fix patterns for
2839 filesystem::path members to match wstring_view parameters. Add
2840 exports for shared_ptr members used by directory iterators.
2841 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
2842 error code parameter if the file doesn't exist.
2843 * src/filesystem/ops.cc (remove(const path&, error_code&)):
2845 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
2846 values for mingw targets, where "/" is not an absolute path. Do not
2847 test symlinks on mingw targets.
2848 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2849 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
2851 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2852 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
2853 that each component of the path is created.
2854 * testsuite/experimental/filesystem/operations/create_directories.cc:
2856 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
2857 permissions on mingw targets.
2858 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2859 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2860 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2861 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
2863 * testsuite/experimental/filesystem/operations/permissions.cc:
2865 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
2866 symlinks or permissions on mingw targets.
2867 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2868 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
2869 symlinks on mingw targets.
2870 * testsuite/experimental/filesystem/operations/remove_all.cc:
2872 * testsuite/27_io/filesystem/operations/status.cc: Do not test
2873 permissions on mingw targets.
2874 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
2875 test symlinks on mingw targets.
2876 * testsuite/experimental/filesystem/operations/space.cc: Fix test
2879 2019-02-14 Ulrich Drepper <drepper@redhat.com>
2882 Warn about unused comparisons of shared_ptr/unique_ptr
2883 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
2884 * include/bits/shared_ptr.h: Use it for operator ==, !=,
2885 <, <=, >, >= for shared_ptr.
2886 * include/bits/unique_ptr.h: Likewise for unique_ptr.
2888 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
2890 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
2891 as 201611L, because P0497R0 changes are supported.
2892 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
2894 * include/bits/erase_if.h [__cplusplus > 201703L]
2895 (__cpp_lib_erase_if): Only define for C++2a.
2896 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2897 (__cpp_lib_null_iterators): Define.
2898 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2899 (__cpp_lib_null_iterators): Define.
2900 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
2902 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
2904 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
2906 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
2907 changes are supported.
2908 * include/std/optional (__cpp_lib_optional): Likewise.
2909 * include/std/variant (__cpp_lib_variant): Likewise.
2910 * include/std/version [!__STRICT_ANSI__]
2911 (__cpp_lib_uncaught_exceptions): Define as long integer.
2912 [__cplusplus >= 201703L] (__cpp_lib_any)
2913 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
2914 (__cpp_lib_variant): Define for C++17.
2915 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
2917 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
2920 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
2922 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
2926 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
2928 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
2931 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2933 * doc/xml/manual/intro.xml: Include new section.
2934 * doc/xml/manual/status_cxx2017.xml: Document more
2935 implementation-defined properties of the library.
2936 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
2937 * doc/html/*: Regenerate.
2939 * include/bits/refwrap.h [__cplusplus > 201703L]
2940 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
2941 (_Reference_wrapper_base_memfun): Do not define for C++2a.
2942 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
2944 (reference_wrapper::operator()): Add static assertion.
2945 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
2947 * include/std/chrono (duration_values::zero(), duration_values::min())
2948 (duration_values::max()): Add noexcept.
2949 (duration::zero(), duration::min(), duration::max()): Likewise.
2950 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
2951 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
2952 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
2954 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
2956 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2958 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
2959 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
2961 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2964 * include/bits/functional_hash.h (hash<nullptr_t>): Define
2965 specialization for C++17 (P0513R0, LWG 2817).
2966 * testsuite/20_util/hash/nullptr.cc: New test.
2969 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
2970 pattern for std::basic_stringbuf::str().
2972 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
2973 basic_ostream::operator<< patterns.
2975 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2977 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
2978 test failures on targets with 32-bit time_t.
2980 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
2981 * include/std/deque: Likewise.
2982 * include/std/forward_list: Likewise.
2983 * include/std/list: Likewise.
2984 * include/std/string: Likewise.
2985 * include/std/vector: Likewise.
2986 * include/std/version: Likewise.
2987 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
2988 * testsuite/23_containers/deque/erasure.cc: Likewise.
2989 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2990 * testsuite/23_containers/list/erasure.cc: Likewise.
2991 * testsuite/23_containers/map/erasure.cc: Likewise.
2992 * testsuite/23_containers/set/erasure.cc: Likewise.
2993 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2994 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2995 * testsuite/23_containers/vector/erasure.cc: Likewise.
2997 * include/experimental/internet [AI_NUMERICSERV]
2998 (resolver_base::numeric_service): Define conditionally.
2999 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3001 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3004 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3005 Jonathan Wakely <jwakely@redhat.com>
3008 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3009 (GLIBCXX_3.4.26): Add new exports.
3010 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3011 correct list of sources.
3012 * include/Makefile.in: Regenerate.
3013 * include/std/ostream (operator<<(nullptr_t)): New member function.
3014 * src/c++17/ostream-inst.cc: New file.
3015 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3018 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3020 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3021 of the source file containing the caller.
3022 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3023 directories created by test.
3024 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3026 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3028 * testsuite/experimental/filesystem/iterators/
3029 recursive_directory_iterator.cc: Likewise.
3031 2019-01-10 Jakub Jelinek <jakub@redhat.com>
3033 PR tree-optimization/88775
3034 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3035 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3036 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3037 instead of __builtin_constant_p if available. Don't bother with
3038 the pointer comparison in C++11 and earlier.
3040 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3044 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3047 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
3049 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3050 for filesystem::path. Give variables more distinctive names.
3052 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3053 member function to perform non-trivial assignment.
3054 (_Optional_payload_base::_M_move_assign): Likewise.
3055 (_Optional_payload<T, true, false, true>::operator=)
3056 (_Optional_payload<T, true, true, false>::operator=)
3057 (_Optional_payload<T, true, false, false>::operator=): Call
3058 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3061 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3062 test std::complex<long double> if long double format is IBM128.
3063 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3066 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3068 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3069 for old std::unique_ptr layout.
3070 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3071 to become valueless. Add filesystem::path tests.
3074 * include/std/optional (_Optional_payload_base): New class template
3075 for common code hoisted from _Optional_payload specializations. Use
3076 a template for the union, to allow a partial specialization for
3077 types with non-trivial destructors. Add constructors for in-place
3078 initialization to the union.
3079 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3080 to perform non-trivial copy construction, instead of relying on
3081 non-standard copy elision in a delegating constructor.
3082 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3083 non-trivial move construction.
3084 (_Optional_payload): Derive from _Optional_payload_base and use it
3085 for everything except the non-trivial assignment operators, which are
3087 (_Optional_payload<false, C, M>): Derive from the specialization
3088 _Optional_payload<true, false, false> and add a destructor.
3089 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3090 Forward to corresponding members of _Optional_payload.
3091 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3092 Hoist common members from _Optional_base.
3093 (_Optional_base): Make all members and base class public.
3094 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3095 _Optional_base_impl.
3096 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3097 support for new std::optional layout.
3098 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3101 * include/bits/locale_conv.h: Use <> for includes not "".
3102 * include/ext/random: Likewise.
3103 * include/ext/vstring.h: Likewise.
3105 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3107 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3108 (GLIBCXX_3.4.21): Likewise.
3110 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3113 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3114 to match the one that controls whether utimbuf and utime are declared.
3116 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
3119 * include/bits/char_traits.h (char_traits::move): Do not pass null
3120 pointers to memmove.
3121 * include/bits/locale_facets.h
3122 (ctype<char>::widen(const char*, const char*, char*)): Do not
3123 pass null pointers to memcpy.
3124 (ctype<char>::narrow(const char*, const char*, char, char*)):
3126 (ctype<char>::do_widen(const char*, const char*, char*)):
3128 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3131 * doc/xml/manual/spine.xml: Update copyright years.
3132 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3133 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3134 for C++17 filesystem library.
3135 * doc/html/*: Regenerate.
3137 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3138 * config.h.in: Regenerate.
3139 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3140 alphabetically and add missing entries for copy_symlink,
3141 hard_link_count, rename, and resize_file.
3142 * configure: Regenerate.
3143 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3144 used unconditionally.
3145 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3146 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3147 supports truncating to zero length.
3148 * testsuite/27_io/filesystem/operations/all.cc: New test.
3149 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3151 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
3154 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3155 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3156 * config.h.in: Regenerate.
3157 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3158 remaining std::filesystem types and functions.
3159 * configure: Regenerate.
3160 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3161 * src/c++17/Makefile.in: Regenerate.
3162 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3163 here, and change name of included file.
3164 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3165 here, and change name of included file.
3166 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3167 path to dir-common.h.
3168 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3169 path to ops-common.h. Disable -Wunused-parameter warnings.
3170 (internal_file_clock): Define unconditionally.
3171 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3173 (do_copy_file, do_space): Move definitions to ops.common.h.
3174 (copy, file_size, hard_link_count, last_write_time, space): Only
3175 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
3177 (last_write_time, read_symlink): Remove unused attributes from
3179 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
3180 * src/filesystem/Makefile.in: Regenerate.
3181 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
3182 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
3183 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
3184 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
3185 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
3186 dummy types and functions instead of using #error.
3187 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
3188 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
3190 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
3191 (do_copy_file, do_space): Move definitions here from std-ops.cc.
3192 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
3193 to account for new namespace.
3194 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
3195 -lstdc++fs from dg-options.
3196 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
3197 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
3198 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
3199 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
3200 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3202 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
3203 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3205 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
3206 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3207 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
3208 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3209 * testsuite/27_io/filesystem/operations/create_directories.cc:
3211 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
3212 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
3213 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
3214 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
3215 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3216 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
3217 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3218 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
3219 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
3220 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
3221 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
3222 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
3223 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3224 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3225 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
3226 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3227 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3228 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3230 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
3234 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
3235 typeinfo and vtables less greedy.
3236 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
3237 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
3238 * src/c++17/Makefile.in: Regenerate.
3239 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
3240 here, and change name of included file.
3241 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
3242 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
3244 * src/filesystem/Makefile.in: Regenerate.
3245 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
3246 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
3247 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
3248 from dg-options and remove dg-require-filesystem-ts.
3249 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
3250 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
3251 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
3252 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
3253 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3254 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3255 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3256 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
3257 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
3258 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
3259 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
3260 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
3261 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
3262 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
3263 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
3264 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
3265 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
3266 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
3267 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
3268 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
3269 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
3271 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
3272 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
3273 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
3274 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
3275 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
3276 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
3277 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
3278 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
3279 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
3280 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
3281 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
3282 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
3284 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
3286 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3288 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
3290 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
3291 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3292 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
3293 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
3294 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3295 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3296 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3297 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3298 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
3299 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3301 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3302 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3303 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3304 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
3305 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3308 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
3309 Check is_trivially_copyable instead of is_scalar.
3310 (variant::emplace<N, Args>(Args&&...)): If construction of the new
3311 contained value can throw and its type is trivially copyable then
3312 construct into a temporary variant and move from it, to provide the
3313 strong exception safety guarantee.
3314 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
3316 * testsuite/20_util/variant/87431.cc: New test.
3317 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
3318 conversion causes valueless state.
3321 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
3322 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
3323 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
3324 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
3325 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
3327 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
3329 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3330 (file_time_type): Redefine in terms of __file_clock.
3331 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3333 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3335 (internal_file_lock): New helper type for accessing __file_clock.
3336 (do_copy_file): Use internal_file_lock to convert system time to
3338 (last_write_time(const path&, error_code&)): Likewise.
3339 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3341 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
3343 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3344 for const member functions of std::basic_string.
3345 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3347 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3348 Make non-standard constructor private.
3349 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3351 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3352 explicit instantiations for C++17 as well as earlier dialects.
3353 * src/c++17/Makefile.am: Add new source files.
3354 * src/c++17/Makefile.in: Regenerate.
3355 * src/c++17/cow-string-inst.cc: New file defining explicit
3356 instantiations for basic_string member functions added in C++17.
3357 * src/c++17/string-inst.cc: Likewise.
3359 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3360 copy/move constructors for old std::basic_string.
3361 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3362 (basic_string::reference, basic_string::const_reference): Define
3363 as plain references for C++11 and later.
3364 (basic_string::basic_string()): Put constructor body outside
3365 preprocessor conditional groups.
3366 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3367 instead of copying it.
3368 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3370 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3372 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3373 cases for old basic_string.
3374 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3375 allocator-extended constructors unconditionally. Add extra members to
3376 allocator type when using old string ABI.
3377 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3379 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3381 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3382 -fno-inline added to test flags.
3384 * testsuite/21_strings/basic_string/requirements/
3385 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3387 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3388 assertion failures with old std::string ABI.
3390 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3392 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3393 functions that will only erase elements at the end.
3394 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3395 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3396 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3398 (path::_List::pop_back()): Define.
3399 (path::_List::_M_erase_from(const_iterator)): Define.
3400 (path::operator/=(const path&)): Use pop_back to remove last component
3401 and _M_erase_from to remove multiple components.
3402 (path::_M_append(basic_string_view<value_type>)): Likewise.
3403 (path::operator+=(const path&)): Likewise.
3404 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3405 (path::remove_filename()): Likewise.
3406 (path::lexically_normal()): Use _List::_Impl iterators instead of
3407 path::iterator. Use pop_back to remove components from the end. Clear
3408 trailing filename, instead of using erase(const_iterator) to remove
3409 a non-final component.
3410 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3412 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3414 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3415 incorrect treatment of empty filename after trailing slash.
3416 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3418 * testsuite/21_strings/basic_string/modifiers/assign/char/
3419 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3421 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3422 move_assign_optim.cc: Likewise.
3424 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3425 Jakub Jelinek <jakub@redhat.com>
3428 * include/experimental/memory: Replace UTF-8 quote characters.
3429 * include/std/future: Replace UTF-8 "em dash" characters.
3431 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3434 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3435 * include/debug/forward_list: Likewise.
3436 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3438 * include/experimental/chrono: Likewise.
3439 * include/experimental/functional: Likewise.
3440 * include/experimental/ratio: Likewise.
3441 * include/experimental/system_error: Likewise.
3442 * include/experimental/tuple: Likewise.
3443 * include/experimental/type_traits: Likewise.
3444 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3445 * include/parallel/multiseq_selection.h: Likewise.
3448 * config/abi/pre/gnu.ver: Add missing exports.
3449 * testsuite/22_locale/collate_byname/88681.cc: New test.
3450 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3451 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3453 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
3455 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3456 initializer_list<value_type> and from input iterator ranges.
3457 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3459 * testsuite/experimental/string_view/element_access/char/empty.cc:
3460 Fix year range in copyright header.
3462 2019-01-02 Joel Brobecker <brobecker@adacore.com>
3464 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3465 Fix year range in copyright header.
3467 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3469 Update copyright years.
3471 Copyright (C) 2019 Free Software Foundation, Inc.
3473 Copying and distribution of this file, with or without modification,
3474 are permitted in any medium without royalty provided the copyright
3475 notice and this notice are preserved.