1 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
4 * include/std/variant (holds_alternative, get, get_if): Improve
5 static assertion messages.
6 (bad_variant_access::bad_variant_access()): Change default message.
7 (__throw_bad_variant_access(bool)): New overload.
8 (get): Use new overload.
9 (visit, visit<R>): Improve exception message.
11 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
12 targets. Add more cases from P0608R3.
13 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
15 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
16 * include/experimental/type_traits (is_detected_exact)
17 (is_detected_exact_v): Likewise.
18 * include/pstl/execution_defs.h (is_execution_policy)
19 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
20 * include/pstl/execution_impl.h (__policy_traits): Likewise.
21 * testsuite/17_intro/names.cc: Check for more non-reserved names.
22 * testsuite/experimental/names.cc: New test.
25 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
26 assertions from the destructor.
27 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
28 Move static_assert for hash function to here.
29 (_Hash_table_base::_M_equals): Move static_assert for equality
31 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
33 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
34 the value directly instead of calling _S_value.
35 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
36 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
37 _S_key(_Const_Link_type).
38 * testsuite/23_containers/set/85965.cc: Check construction,
39 destruction, assignment and size() do not trigger the assertions.
40 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
41 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
43 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
44 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
45 * testsuite/23_containers/set/48101_neg.cc: Likewise.
46 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
47 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
48 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
49 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
51 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
52 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
55 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
57 * doc/html/*: Regenerate.
58 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
61 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
63 Move from state of allocators (LWG2593)
64 * include/bits/stl_deque.h
65 (_Deque_base(_Deque_base&&, false_type)): Remove.
66 (_Deque_base(_Deque_base&&, true_type)): Remove.
67 (_Deque_base(_Deque_base&&)): Adapt.
68 (_Deque_base::_M_move_impl()): Remove.
69 * testsuite/util/testsuite_allocator.h
70 (propagating_allocator(propagating_allocator&&)): Preserve move from
72 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
74 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
76 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
77 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
78 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
80 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
82 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
83 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
85 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
87 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
89 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
91 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
93 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
95 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
97 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
100 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
102 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
103 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
105 * include/std/variant (__overload_set): Remove.
107 (_Build_FUN): New class template to define a single FUN overload,
108 with specializations to prevent unwanted conversions, as per P0608R3.
109 (_Build_FUNs): New class template to build an overload set of FUN.
110 (_FUN_type): New alias template to perform overload resolution.
111 (__accepted_type): Use integer_constant base for failure case. Use
112 _FUN_type for successful case.
113 (variant::__accepted_index): Use _Tp instead of _Tp&&.
114 (variant::variant(_Tp&&)): Likewise.
115 (variant::operator=(_Tp&&)): Likewise.
117 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
118 Replace raw visitation with a runtime check for the valueless state
119 and a non-raw visitor.
120 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
121 (variant::index()): Remove branch.
122 (variant::swap(variant&)): Use valueless_by_exception() instead of
123 comparing the index to variant_npos, and add likelihood attribute.
125 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
126 (_Hashtable_base::_Equal_hash_code): Define new class template.
127 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
130 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
131 Replace with _M_get non-static member function.
132 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
134 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
135 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
137 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
138 _S_get accessors for members in EBO helpers.
139 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
140 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
142 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
144 (_Hashtable_base::_M_eq()): Remove non-const overload.
146 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
148 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
150 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
152 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
155 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
157 * config/os/solaris/solaris2.10: Move to ...
158 * config/os/solaris: ... this.
159 * configure.host (os_include_dir): Adapt.
160 (abi_baseline_pair): Remove Solaris 10 handling.
161 * config/abi/post/i386-solaris2.10: Remove.
162 * config/abi/post/sparc-solaris2.10: Remove.
163 * config/abi/post/i386-solaris2.11: Rename to ...
164 * config/abi/post/i386-solaris: ... this.
165 * config/abi/post/sparc-solaris2.11: Rename to ...
166 * config/abi/post/sparc-solaris: ... this.
168 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
171 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
174 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
176 * include/std/variant (__visit_with_index): Remove typedef.
177 (__deduce_visit_result): New tag type.
178 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
179 visitation of possibly-valueless variants, forwarding to __do_visit
180 with the relevant tag type.
181 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
182 and make lambda return void.
183 (__variant_construct): Likewise.
184 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
185 __raw_idx_visit and make lambda return void.
186 (_Multi_array::__untag_result): Add metafunction to check the function
187 pointer type for a tag type that dictates the kind of visitation.
188 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
189 Use decltype(auto) instead of tagged function pointer type.
190 (__gen_vtable_impl): Remove bool non-type parameter and unused
191 _Variant_tuple parameter.
192 (__gen_vtable_impl::__visit_invoke_impl): Remove.
193 (__gen_vtable_impl::__do_visit_invoke): Remove.
194 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
195 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
196 for the visit<R> case, rather than dispatching to separate functions.
197 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
199 (variant::swap): Likewise.
200 (__do_visit): Replace two non-type template parameters with a single
201 type parameter, so that the caller must specify the visitor's return
202 type (or one of the tag types).
203 (visit): Deduce a return type from the visitor and use the
204 __deduce_visit_result tag to enforce that all overloads return the
206 (visit<R>): Call __do_visit<R> with explicit result type.
207 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
210 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
212 nonesuch is insufficiently useless (lwg2996)
213 * include/std/type_traits (struct __nonesuch): Added private base
214 class to make __nonesuch not an aggregate and removed deleted default
216 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
217 (operator=(const pair&)): Use __nonesuch instead of
218 __nonesuch_no_braces.
219 (operator=(pair&&)): Likewise
220 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
221 of __nonesuch_no_braces.
222 (operator=(tuple&&)): Likewise
223 * include/experimental/type_traits (struct nonesuch): Added private
224 base class to make nonesuch not an aggregate and removed deleted
226 * testsuite/20_util/nonesuch/nonesuch.cc: New.
227 * testsuite/experimental/type_traits/nonesuch.cc: New.
229 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
231 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
232 (_Function_handler): Remove partial specializations for void return
233 types and pointers to member.
234 (_Function_handler::_M_manager): Adapt to removal of
235 _Simple_type_wrapper.
236 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
237 * include/std/functional (_Bind_result::__enable_if_void)
238 (_Bind_result::__disable_if_void): Remove sfinae helpers.
239 (_Bind_result::__call): Use __invoke_r and remove overloads for void
241 * include/std/future (__future_base::_Task_state::_M_run)
242 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
243 change return type of lambda expressions.
245 * include/bits/invoke.h (__invoke_r): Define new function implementing
246 the INVOKE<R> pseudo-function.
247 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
248 * testsuite/20_util/function_objects/invoke/2.cc: New test.
250 * include/std/type_traits (__is_nt_convertible_helper): Define it
251 unconditionally, not only for C++20.
252 (__is_nothrow_convertible): Define internal trait for use in C++11.
253 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
254 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
255 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
256 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
257 that has nothrow explicit conversion but potentially-throwing implicit
259 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
260 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
261 function to only consider implicit conversions.
262 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
264 * include/std/iterator: Include <iosfwd> instead of <istream> and
267 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
268 Remove unused, non-standard function.
270 * include/bits/regex.h (match_results::max_size()): Adjust return
271 value to account for prefix/suffix/unmatched subs.
272 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
273 reset the contained sub matches.
274 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
275 function to set result state following a failed match.
276 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
277 sub_match states after _M_resize. Use _M_establish_failed_match.
280 * include/std/thread (thread::_State_impl, thread::_S_make_state):
281 Replace single _Callable parameter with variadic _Args pack, to
282 forward them directly to the tuple of decayed copies.
283 * testsuite/30_threads/thread/cons/69724.cc: New test.
285 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
287 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
288 * include/bits/basic_string.h: (operator=(const basic_string&):
289 Move allocator decision to assign.
290 (assign(const basic_string&)): Move allocator decision here.
291 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
293 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
296 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
298 * testsuite/util/testsuite_allocator.h (memory_resource)
299 (default_resource_mgr): Fix indentation.
301 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
302 Use operator-> to access raw pointer member.
303 * testsuite/23_containers/vector/59829.cc: Likewise.
304 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
305 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
306 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
308 (PointerBase, PointerBase_void): Derive from NullablePointer and use
309 its constructors and equality operators. Change converting
310 constructors to use operator-> to access private member of the other
312 (PointerBase_void::operator->()): Add, for access to private member.
313 (operator-(PointerBase, PointerBase)): Change to hidden friend.
314 (operator==(PointerBase, PointerBase)): Remove.
315 (operator!=(PointerBase, PointerBase)): Remove.
317 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
318 not assume field called _M_head_impl is the first tuple element.
319 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
320 implementation more accurate.
321 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
322 empty pointer type and non-empty deleter.
324 LWG 2899 - Make is_move_constructible correct for unique_ptr
325 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
326 move assignment operator.
327 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
328 (__uniq_ptr_data): New class template with conditionally deleted
330 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
331 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
332 constructor and move assignment operator as defaulted.
333 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
334 __uniq_ptr_impl::release().
335 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
336 to __uniq_ptr_impl::reset(pointer).
337 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
338 Check for new __uniq_ptr_data type.
339 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
341 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
343 PR libstdc++/90454.cc path construction from void*
344 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
345 pointers to void are rejected as well as void.
346 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
347 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
349 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
351 * doc/xml/manual/policy_data_structures.xml: Comment out stray
352 <remark> elements. Fix formatting of bibliography references.
354 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
356 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
358 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
360 Remove Profile Mode, deprecated since 7.1.0
361 * doc/Makefile.am: Remove XML file for profile mode docs.
362 * doc/Makefile.in: Regenerate.
363 * doc/xml/authors.xml: Remove authors of profile mode docs.
364 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
366 * doc/xml/manual/debug.xml: Likewise.
367 * doc/xml/manual/evolution.xml: Document removal of profile mode.
368 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
369 * doc/xml/manual/spine.xml: Remove profile mode author credit.
370 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
372 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
374 * doc/html/*: Regenerate.
375 * include/Makefile.am: Remove profile mode headers.
376 * include/Makefile.in: Regenerate.
377 * include/bits/c++config (std::__profile): Remove namespace.
378 [_GLIBCXX_PROFILE]: Remove checks for macro.
379 * include/profile/array: Remove.
380 * include/profile/base.h: Remove.
381 * include/profile/bitset: Remove.
382 * include/profile/deque: Remove.
383 * include/profile/forward_list: Remove.
384 * include/profile/impl/profiler.h: Remove.
385 * include/profile/impl/profiler_algos.h: Remove.
386 * include/profile/impl/profiler_container_size.h: Remove.
387 * include/profile/impl/profiler_hash_func.h: Remove.
388 * include/profile/impl/profiler_hashtable_size.h: Remove.
389 * include/profile/impl/profiler_list_to_slist.h: Remove.
390 * include/profile/impl/profiler_list_to_vector.h: Remove.
391 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
392 * include/profile/impl/profiler_node.h: Remove.
393 * include/profile/impl/profiler_state.h: Remove.
394 * include/profile/impl/profiler_trace.h: Remove.
395 * include/profile/impl/profiler_vector_size.h: Remove.
396 * include/profile/impl/profiler_vector_to_list.h: Remove.
397 * include/profile/iterator_tracker.h: Remove.
398 * include/profile/list: Remove.
399 * include/profile/map: Remove.
400 * include/profile/map.h: Remove.
401 * include/profile/multimap.h: Remove.
402 * include/profile/multiset.h: Remove.
403 * include/profile/ordered_base.h: Remove.
404 * include/profile/set: Remove.
405 * include/profile/set.h: Remove.
406 * include/profile/unordered_base.h: Remove.
407 * include/profile/unordered_map: Remove.
408 * include/profile/unordered_set: Remove.
409 * include/profile/vector: Remove.
410 * scripts/run_doxygen: Do not process profile mode headers.
411 * testsuite/23_containers/array/element_access/60497.cc: Don't use
413 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
414 Remove dg-skip-if for profile mode.
415 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
416 preprocessor check for profile mode.
417 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
418 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
420 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
422 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
423 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
424 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
425 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
426 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
428 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
430 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
432 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
434 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
435 preprocessor check for profile mode.
436 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
438 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
439 Remove dg-skip-if for profile mode.
440 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
441 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
442 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
443 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
444 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
445 * testsuite/Makefile.am: Remove profile_flags variable and
446 * testsuite/Makefile.am: Remove profile_flags variable and
447 check-profile target.
448 * testsuite/Makefile.in: Regenerate.
449 * testsuite/ext/profile/all.cc: Remove.
450 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
451 * testsuite/ext/profile/profiler_algos.cc: Remove.
452 * testsuite/ext/profile/replace_new.cc: Remove.
453 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
454 preprocessor check for profile mode.
455 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
456 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
457 (check_v3_target_normal_mode): Do not check for profile mode macro.
458 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
460 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
461 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
462 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
463 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
464 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
465 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
466 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
467 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
468 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
469 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
471 Remove array_allocator extension, deprecated since 4.9.0
472 * doc/xml/manual/allocator.xml: Remove documentation for
474 * doc/xml/manual/evolution.xml: Document array_allocator removal.
475 * doc/xml/manual/using.xml: Remove header from documentation.
476 * include/Makefile.am: Remove <ext/array_allocator.h> header.
477 * include/Makefile.in: Regenerate.
478 * include/ext/array_allocator.h: Remove.
479 * include/precompiled/extc++.h: Do not include removed header.
480 * testsuite/ext/array_allocator/1.cc: Remove.
481 * testsuite/ext/array_allocator/2.cc: Remove.
482 * testsuite/ext/array_allocator/26875.cc: Remove.
483 * testsuite/ext/array_allocator/3.cc: Remove.
484 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
485 * testsuite/ext/array_allocator/check_delete.cc: Remove.
486 * testsuite/ext/array_allocator/check_new.cc: Remove.
487 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
488 * testsuite/ext/headers.cc: Do not include removed header.
490 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
492 * include/bits/stl_bvector.h
493 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
495 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
497 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
499 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
501 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
503 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
505 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
507 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
509 (_Bit_iterator::operator-(difference_type)): Likewise.
510 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
511 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
513 (_Bit_const_iterator::operator-(difference_type)): Likewise.
514 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
516 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
519 * testsuite/util/thread/all.h: Do not use remove_pointer for
520 std::thread::native_handle_type.
523 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
524 (_Variant_storage<true, Types...>::_M_reset()))
525 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
526 (__get_storage): Likewise.
527 (variant): Add noexcept to friend declarations for __get and
531 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
532 Use _Require for constraints.
533 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
535 (__uniq_ptr_hash): New base class with conditionally-disabled call
537 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
538 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
539 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
541 * include/bits/shared_ptr.h: Improve docs.
542 * include/bits/shared_ptr_base.h: Likewise.
543 * include/bits/stl_uninitialized.h: Likewise.
544 * include/bits/unique_ptr.h: Likewise.
545 * libsupc++/new: Likewise.
547 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
549 * include/bits/stl_deque.h
550 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
552 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
554 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
556 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
558 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
560 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
562 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
564 (_Deque_iterator<>::operator-(difference_type)): Likewise.
566 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
569 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
570 (test01): Reserve for number of insertions to avoid rehash during test.
571 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
573 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
578 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
580 * include/experimental/bits/fs_path.h: Improve docs.
581 * include/experimental/bits/net.h: Fix wrong header name in comment.
582 Do not document implementation details.
583 * include/experimental/netfwd: Fix doxygen grouping.
585 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
587 * include/bits/stl_pair.h: Improve docs.
588 * include/std/tuple: Likewise.
590 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
592 * include/std/chrono: Improve docs.
593 * include/std/ratio: Do not document implementation details.
594 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
596 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
599 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
600 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
601 (__duration_common_type): New helper.
602 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
603 __duration_common_type.
604 (__timepoint_common_type_wrapper): Replace with ...
605 (__timepoint_common_type): New helper.
606 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
607 Use __time_point_common_type.
608 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
609 (__common_type_impl): If either argument is transformed by decay,
610 use the common_type of the decayed types.
611 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
612 decayed, use __do_common_type_impl to get the common_type.
613 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
614 (__do_member_type_wrapper, __member_type_wrapper)
615 (__expanded_common_type_wrapper): Remove.
616 (__common_type_pack, __common_type_fold): New helpers.
617 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
618 __member_type_wrapper and __expanded_common_type_wrapper.
619 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
620 Test zero-length template argument list.
621 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
622 Test single argument cases and argument types that should decay.
623 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
624 Adjust expected error.
625 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
627 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
628 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
629 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
631 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
633 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
635 Make allocator propagation more consistent for
636 operator+(basic_string) (P1165R1)
637 * include/bits/basic_string.h
638 (operator+(basic_string&&, basic_string&&): Changed resulting
639 allocator to always be the one from the first parameter.
640 * include/bits/basic_string.tcc
641 (operator+(const _CharT*, const basic_string&)): Changed
642 resulting allocator to be SOCCC on the second parameter's allocator.
643 (operator+(_CharT, const basic_string&)): Likewise.
644 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
646 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
649 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
651 * include/bits/regex.h: Improve docs.
652 * include/bits/regex.tcc: Do not document implementation details.
654 * testsuite/19_diagnostics/error_code/hash.cc: New test.
656 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
658 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
659 Add type printer for container types in std::__debug namespace.
660 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
661 (gdb-tests): Use distinct parameters for the type of test and use of
663 (gdb-test): Check for regex test even if 'whatis' test.
664 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
666 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
667 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
668 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
669 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
670 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
671 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
672 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
674 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
676 * include/std/system_error (error_category): Fix comment.
679 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
680 argument is an empty path.
681 (absolute(const path&, error_code&)): Use invalid_argument as error
682 code instead of no_such_file_or_directory.
683 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
684 of non-existent paths and empty paths with both overloads of absolute.
686 * include/std/system_error (error_category, error_code)
687 (error_condition): Improve docs.
688 * libsupc++/exception: Add missing @addtogroup Doxygen command.
689 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
690 to class documentation. Suppress documentation for implementation
692 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
693 Suppress documentation for implementation details.
695 * include/std/system_error (error_code): Remove friend declaration
696 for hash<error_code>.
697 (hash<error_code>::operator()): Use public member functions to access
699 (hash<error_condition>::operator()): Use address of category, not
700 its object representation.
701 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
702 Use public member functions to access value and category.
703 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
705 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
707 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
708 * include/bits/hashtable_policy.h
709 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
710 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
711 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
712 smaller than input value rather than always greater. Preserve
713 _M_next_resize if called with 0 input. Use __builtin_floorl.
714 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
715 elements + number of insertions is greater than _M_next_resize. Start
716 with 11 buckets if not told otherwise. Use __builtin_floorl.
717 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
718 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
719 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
720 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
721 told otherwise. Use __builtin_floorl.
722 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
723 to also validate _Power2_rehash_policy.
724 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
727 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
730 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
734 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
735 overflow warning with -Wpedantic -Wsystem-headers.
737 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
740 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
741 * include/bits/move.h (swap): Remove extra parentheses.
743 * include/experimental/bits/lfts_config.h: Improve doc markup.
744 * include/experimental/optional: Improve docs.
745 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
746 (__constexpr_addressof): Remove.
747 (optional::operator->()): Use std::__addressof().
748 * include/std/optional (optional::operator->()): Adjust whitespace.
749 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
750 that operator-> is still constexpr with overloaded operator&. Change
751 to compile-only test.
752 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
755 * include/bits/shared_ptr.h: Improve docs.
756 * include/bits/shared_ptr_atomic.h: Likewise.
757 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
759 * include/bits/basic_string.h: Fix iterator/index confusion in
761 * include/bits/range_access.h: Fix Doxygen warnings.
762 * include/bits/refwrap.h: Do not document implementation details.
763 (ref, cref): Group docs with reference_wrapper.
764 * include/std/fstream: Fix Doxygen markup.
765 * libsupc++/initializer_list (begin, end): Group docs with
768 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
770 * include/bits/unique_lock.h: Fix/improve doxygen markup.
771 * include/std/mutex: Likewise.
772 * include/std/shared_mutex: Likewise.
774 * include/bits/fs_dir.h: Fix/improve doxygen markup.
775 * include/bits/fs_fwd.h: Likewise.
776 * include/bits/fs_ops.h: Likewise.
777 * include/bits/fs_path.h: Likewise.
778 * include/std/filesystem: Likewise.
780 * include/experimental/bits/net.h: Fix/improve doxygen markup.
781 * include/experimental/buffer: Likewise.
782 * include/experimental/executor: Likewise.
783 * include/experimental/internet: Likewise.
784 * include/experimental/io_context: Likewise.
785 * include/experimental/net: Likewise.
786 * include/experimental/netfwd: Likewise.
787 * include/experimental/socket: Likewise.
788 * include/experimental/timer: Likewise.
790 * doc/doxygen/doxygroups.cc: Move description of experimental group
792 * include/experimental/algorithm: Add to libfund-ts doc group.
793 * include/experimental/any: Likewise. Do not document implementation
795 * include/experimental/array: Add to libfund-ts doc group.
796 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
797 for Library Fundamentals.
798 * include/experimental/chrono: Add to libfund-ts doc group.
799 * include/experimental/deque: Likewise.
800 * include/experimental/forward_list: Likewise.
801 * include/experimental/functional: Likewise.
802 * include/experimental/iterator: Likewise.
803 * include/experimental/list: Likewise.
804 * include/experimental/map: Likewise.
805 * include/experimental/memory: Likewise.
806 * include/experimental/memory_resource: Likewise. Improve docs.
808 * include/experimental/numeric: Add to libfund-ts doc group.
809 * include/experimental/optional: Likewise.
810 * include/experimental/propagate_const: Likewise.
811 * include/experimental/random: Likewise.
812 * include/experimental/ratio: Likewise.
813 * include/experimental/regex: Likewise.
814 * include/experimental/set: Likewise.
815 * include/experimental/source_location: Likewise.
816 * include/experimental/string: Likewise.
817 * include/experimental/string_view: Likewise.
818 * include/experimental/system_error: Likewise.
819 * include/experimental/tuple: Likewise.
820 * include/experimental/type_traits: Likewise.
821 * include/experimental/unordered_map: Likewise.
822 * include/experimental/unordered_set: Likewise.
823 * include/experimental/utility: Likewise.
824 * include/experimental/vector: Likewise.
825 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
826 * testsuite/experimental/array/neg.cc: Adjust dg-error.
827 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
829 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
830 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
831 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
832 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
833 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
835 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
836 * include/experimental/bits/fs_fwd.h: Improve docs.
837 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
838 * include/experimental/bits/fs_path.h: Likewise.
839 (path, filesystem_error, u8path): Improve docs.
840 * include/experimental/filesystem: Link to docs for TS.
842 * config/allocator/new_allocator_base.h (__allocator_base): Add
843 workaround for Doxygen bug #6945.
844 * include/std/memory: Improve docs. Define group for pointer safety.
845 * include/std/scoped_allocator: Improve docs. Use "undocumented"
846 conditional to suppress documentation for implementation details.
848 * include/bits/specfun.h: Improve docs.
849 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
852 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
853 (std::experimental): Add docs.
854 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
855 namespace to nothing when generating docs.
856 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
857 * include/std/chrono (std::chrono): Likewise.
858 * include/std/functional (std::placeholders): Likewise.
859 * include/std/thread (std::this_thread): Likewise.
861 * include/parallel/settings.h: Fix Doxygen markup.
863 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
864 anything unless PB_DS_CLASS_C_DEC is defined.
865 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
866 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
867 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
868 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
869 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
870 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
871 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
873 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
874 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
875 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
876 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
877 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
878 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
879 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
880 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
881 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
882 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
883 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
885 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
886 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
888 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
891 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
892 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
893 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
896 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
898 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
899 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
900 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
901 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
902 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
903 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
905 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
906 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
909 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
912 * include/std/complex (__complex_proj): Return parameter unchanged.
913 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
914 floating-point types to take std::complex arguments.
915 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
916 floating-point types.
917 * testsuite/26_numerics/complex/proj.cc: New test.
919 2019-04-30 Jakub Jelinek <jakub@redhat.com>
921 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
922 to _Lock_policyE[012].
923 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
925 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
927 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
928 macros accidentally left in.
929 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
930 unnecessary -lstdc++fs option. Fix test for mingw.
931 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
934 2019-04-30 Jakub Jelinek <jakub@redhat.com>
936 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
938 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
940 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
942 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
943 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
946 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
948 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
951 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
952 class template and partial specialization.
955 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
957 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
958 functions to convert a value to an integral type.
959 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
960 (fill_n): Convert _Size parameter to an integral type.
961 * testsuite/25_algorithms/fill_n/87982.cc: New test.
962 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
963 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
964 * testsuite/25_algorithms/generate_n/87982.cc: New test.
965 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
966 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
968 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
970 Adding noexcept-specification on tuple constructors (LWG 2899)
971 * libstdc++-v3/include/std/tuple:
972 (tuple()): Add noexcept-specification.
973 (tuple(const _Elements&...)): Likewise
974 (tuple(_UElements&&...)): Likewise
975 (tuple(const tuple<_UElements...>&)): Likewise
976 (tuple(tuple<_UElements...>&&)): Likewise
977 (tuple(const _T1&, const _T2&)): Likewise
978 (tuple(_U1&&, _U2&&)): Likewise
979 (tuple(const tuple<_U1, _U2>&): Likewise
980 (tuple(tuple<_U1, _U2>&&): Likewise
981 (tuple(const pair<_U1, _U2>&): Likewise
982 (tuple(pair<_U1, _U2>&&): Likewise
983 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
985 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
988 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
989 arguments with __restrict.
991 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
993 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
995 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
997 * include/experimental/bits/fs_path.h
998 (path::_S_convert_loc<_InputIterator>): Create const std::string to
999 avoid redundant call to _S_convert_loc with non-const pointers.
1001 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1002 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1003 * testsuite/21_strings/basic_string/hash/hash.cc
1004 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1005 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1006 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1008 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1009 wstring::_M_replace_dispatch with more specific patterns.
1010 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1011 Create const std::string to avoid redundant call to _S_convert_loc
1012 with non-const pointers.
1013 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1014 avoid unnecessary basic_string::assign instantiations.
1016 * include/std/memory (__uses_alloc_args): Add string-literal to
1017 static_assert, to match the one in __uses_alloc.
1018 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1019 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1020 for recursive uses-allocator construction of nested pairs.
1021 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1024 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1026 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1027 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1028 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1029 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1031 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1032 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1033 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1034 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1035 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1036 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1037 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1039 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
1042 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1043 * include/std/scoped_allocator [__cplusplus > 201703L]
1044 (scoped_allocator_adaptor::construct): Define in terms of
1045 uses_allocator_construction_args, as per P0591R4.
1046 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1047 * testsuite/util/testsuite_allocator.h: Remove name of unused
1050 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
1052 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1053 * doc/html/*: Regenerate.
1055 * include/bits/fs_path.h (operator<, operator<=, operator>)
1056 (operator>=, operator==, operator!=): Make hidden friends, as per
1058 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1059 string type in test.
1060 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1062 * include/std/any (any::any(ValueType&&)): Use __and_v.
1063 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1066 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1068 * include/std/type_traits (__result_of_memfun): Use remove_reference
1069 instead of __remove_cvref_t and remove redundant is_same check.
1070 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1072 * include/experimental/string_view (basic_string_view::pointer)
1073 (basic_string_view::reference): Fix to refer to non-const value_type.
1074 * include/bits/basic_string.h (basic_string): Use __sv_check and
1075 __sv_limit instead of basic_string_view::_M_check and
1076 basic_string_view::_M_limit.
1077 * include/std/string_view (__sv_check, __sv_limit): New
1078 helper functions to replace basic_string_view::_M_check and
1079 basic_string_view::_M_limit.
1080 (basic_string_view): Add static assertions to enforce ill-formed
1081 requirement for traits_type::char_type from P1148R0, and to enforce
1082 required properties of char-like types.
1083 (basic_string_view::pointer, basic_string_view::reference): Fix to
1084 refer to non-const value_type.
1085 (basic_string_view::operator[], basic_string_view::at)
1086 (basic_string_view::front, basic_string_view::back)
1087 (basic_string_view::data): Use const_reference and const_pointer
1088 typedefs for return types.
1089 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1090 (hash<wstring_view>): Fix argument_type typedef.
1091 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1092 char/1.cc: Fix expected return type of basic_string_view::data().
1093 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1094 wchar_t/1.cc: Likewise.
1095 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1096 char/1.cc: Likewise.
1097 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1098 wchar_t/1.cc: Likewise.
1099 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1101 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1102 Check reference and pointer typedefs.
1103 * testsuite/experimental/string_view/requirements/typedefs.cc:
1105 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1106 Fix expected return type of basic_string_view::data().
1107 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1109 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1111 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
1115 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
1116 Avoid a runtime check for types that can never be stored in std::any.
1117 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1120 PR libstdc++/90220 (partial)
1121 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
1122 not attempt ill-formed static_cast to pointers to non-object types.
1123 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1126 * testsuite/20_util/variant/run.cc: Catch exception by reference to
1127 prevent -Wcatch-value warning.
1129 * include/std/variant (__variant_construct): Use template parameter
1130 type instead of equivalent decltype-specifier.
1131 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
1132 Replace forward with move.
1133 (_Move_ctor_base<false, Types...>::_M_destructive_move)
1134 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
1135 (_Move_ctor_base<true, Types...>::_M_destructive_move)
1136 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
1137 index after construction succeeds.
1138 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
1139 if-constexpr checks that are always true. Use __remove_cvref_t instead
1140 of remove_reference so that is_nothrow_move_constructible check
1141 doesn't use a const rvalue parameter. In the potentially-throwing case
1142 construct a temporary and move assign it, as per LWG 2904.
1143 (_Move_assign_base<false, Types...>::operator=): Remove redundant
1144 if-constexpr checks that are always true. Use emplace as per LWG 2904.
1145 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
1146 construct a temporary and move assign from it, as per LWG 2904.
1147 * testsuite/20_util/variant/exception_safety.cc: Check that
1148 assignment operators have strong exception safety guarantee.
1150 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
1152 Document PSTL linker flags
1154 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
1156 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1158 * include/std/variant (__detail::__variant::_Traits): Make
1159 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
1160 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
1162 (__detail::__variant::_Copy_assign_alias): Only depend on
1163 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
1164 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
1165 move assignment operators.
1168 * include/std/variant (variant::__not_self): New helper for the
1169 is_same_v<remove_cvref_t<T>, variant>==false constraints.
1170 (variant::__to_type_impl): Remove.
1171 (variant::__to_type): Add default argument to check pack size, instead
1172 of using __to_type_impl.
1173 (variant::__accepted_type): Add default argument using __not_self.
1174 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
1175 for variant(T&&) constructor constraint.
1176 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
1177 Extract __accepted_type into a named template parameter for reuse in
1178 other constraints and in the exception specification.
1179 (variant::variant(in_place_type_t<T>, Args&&...))
1180 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
1181 (variant::variant(in_place_index_t<T>, Args&&...))
1182 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
1183 (variant::operator=T&&)): Remove redundant && from trait arguments.
1184 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
1185 isn't used for in_place_type or in_place_index arguments.
1187 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
1188 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
1189 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
1191 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1192 Bernd Edlinger <bernd.edlinger@hotmail.de>
1193 Jakub Jelinek <jakub@redhat.com>
1196 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
1197 general-regs-only target attribute for ARM.
1199 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1202 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
1203 specialization also depend on is_nothrow_move_constructible.
1204 * include/std/variant (__detail::__variant::__never_valueless()):
1205 Only true if the variant would have a move assignment operator.
1206 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
1207 Check __never_valueless<T...>().
1208 (variant::emplace): Only perform non-throwing move assignments
1209 for never-valueless alternatives if the variant has a move assignment
1211 * testsuite/20_util/variant/compile.cc: Check that never-valueless
1212 types can be emplaced into non-assignable variants.
1213 * testsuite/20_util/variant/run.cc: Check that never-valueless types
1214 don't get copied when emplaced into non-assignable variants.
1216 * include/std/variant (__detail::__variant::__ref_cast): Remove
1218 (__detail::__variant::_Uninitialized::_M_get)
1219 (__detail::__variant::__get)
1220 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
1222 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
1224 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
1226 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1227 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1228 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1229 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1231 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1233 Delegate PSTL configuration to pstl/pstl_config.h
1235 * include/bits/c++config: Remove explicit PSTL configuration
1236 macros and use definitions from <pstl/pstl_config.h>.
1238 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1240 Cleanup algorithm implementations
1241 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
1243 (mismatch): Forward execution policy.
1244 (equal): Qualify call to std::equal().
1245 (partial_sort): Forward execution policy.
1246 (inplace_merge): Forward execution policy.
1248 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
1250 Improve implementation of parallel equal()
1251 * include/pstl/algorithm_impl.h
1252 (__internal::__brick_equal): use "4 iterator" version of
1254 (__internal::__brick_equal): use simd for random access
1255 iterators on unsequenced execution policies.
1256 (__internal::__pattern_equal): add "4 iterator" version
1257 (__internal::__pattern_equal): dispatch to simd __brick_equal
1258 for vector-only execution policies.
1259 (__internal::__pattern_equal): dispatch to __parallel_or for
1260 parallel execution policies.
1261 * include/pstl/glue_algorithm_impl.h
1262 (std::equal): dispatch to "4 iterator" version of
1263 __internal::__pattern_equal().
1265 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
1268 * include/bits/forward_list.h (operator==): Do not use operator!= to
1270 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1271 earlier in the list, so that sort is stable.
1272 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1273 * testsuite/23_containers/forward_list/comparable.cc: Test with
1274 types that meet the minimum EqualityComparable and LessThanComparable
1275 requirements. Remove irrelevant comment.
1277 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1278 Do not depend on whether all alternative types are move constructible.
1279 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1280 from the operand when deciding whether to perform the assignment.
1281 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1282 with deleted move constructor and deleted move assignment operator.
1283 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1284 behaviour of variants with DeletedMoves as an alternative.
1285 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1286 (move_ctor, move_assign): Check that moving a variant with a
1287 DeletedMoves alternative falls back to copying instead of moving.
1289 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1290 from static_assert declarations.
1292 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1293 actually match its name.
1294 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1295 (test_swap()): Fix result for MoveCtorOnly and check
1296 MoveCtorAndSwapOnly.
1298 * include/std/optional (optional::value_or(U&&) &&): Add missing
1299 constexpr specifier.
1300 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1301 for disengaged optionals and rvalue optionals.
1302 * testsuite/20_util/optional/observers/4.cc: Likewise.
1304 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
1306 * include/pstl/algorithm_impl.h: Uglify identfiers.
1307 * include/pstl/numeric_impl.h: Uglify identfiers.
1308 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1310 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
1312 * include/bits/c++config:
1313 Add definition for __PSTL_ASSERT.
1314 Add definition for __PSTL_ASSERT_MSG.
1315 * include/pstl/algorithm_impl.h: Replace use of assert().
1316 * include/pstl/numeric_impl.h: Replace use of assert().
1317 * include/pstl/parallel_backend_tbb.h:
1318 Replace use of assert().
1319 Replace use of __TBB_ASSERT().
1320 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1322 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
1325 * src/c++17/memory_resource.cc
1326 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1327 needed to allow placing a _Chunk at the end of the buffer.
1328 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1330 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
1332 * doc/xml/faq.xml: Add information about emergency EH pool.
1333 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1334 Move outdated information on mt_allocator to a separate section.
1335 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1336 doesn't affect the default allocator.
1338 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1342 * testsuite/20_util/variant/89851.cc: New test.
1344 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
1346 * include/std/variant: Adjust whitespace. Add comments.
1347 (_Multi_array): Leave primary template undefined.
1348 (_Multi_array<_Tp>): Define partial specialization for base case of
1350 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1351 which is always a reference.
1352 (__gen_vtable::_S_apply()): Remove function, inline body into
1353 default member initializer.
1354 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1356 * include/std/variant (__variant_idx_cookie): Add member type.
1357 (__visitor_result_type): Remove.
1358 (__do_visit): Use invoke_result instead of __visitor_result_type.
1359 * testsuite/20_util/variant/visit.cc: New test.
1362 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1364 * testsuite/20_util/variant/90008.cc: New test.
1366 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
1368 * include/pstl/algorithm_impl.h: Add namespace qualification.
1369 * include/pstl/execution_defs.h: Add namespace qualification.
1370 * include/pstl/execution_impl.h: Add namespace qualification.
1371 * include/pstl/numeric_impl.h: Add namespace qualification.
1372 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1373 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1374 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1376 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1378 Fix visit<R> for variant.
1379 * include/std/variant (__do_visit): Add a template parameter
1380 for enforcing same return types for visit.
1381 (__gen_vtable_impl): Likewise.
1382 (_S_apply_single_alt): Adjust.
1383 (__visit_invoke_impl): New. Handle casting to void.
1384 (__do_visit_invoke): New. Enforces same return types.
1385 (__do_visit_invoke_r): New. Converts return types.
1386 (__visit_invoke): Adjust.
1387 (__gen_vtable): Add a template parameter for enforcing
1388 same return types for visit.
1389 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1390 different return types.
1391 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1392 visitors with different return types don't accidentally
1393 compile with regular visitation.
1395 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1397 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1398 dg-require-filesystem-ts.
1400 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
1402 * doc/xml/manual/status_cxx2020.xml: Update status.
1403 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1404 * testsuite/20_util/variant/visit_r.cc: New test.
1406 * include/bits/fs_dir.h (directory_iterator::operator*)
1407 (directory_iterator::operator->): Add noexcept.
1408 (operator==, operator!=): Replace namespace-scope equality operators
1409 for directory iterators with hidden friends.
1412 * config/abi/pre/gnu.ver: Add missing exports.
1413 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1416 * config/abi/pre/gnu.ver: Export new symbols.
1417 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1418 (recursive_directory_iterator::recursion_pending())
1419 (recursive_directory_iterator::disable_recursion_pending()): Remove
1420 inline definitions. Make noexcept.
1421 (recursive_directory_iterator::depth())
1422 (recursive_directory_iterator::operator*())
1423 (recursive_directory_iterator::operator->()): Make noexcept.
1424 (recursive_directory_iterator::_M_options)
1425 (recursive_directory_iterator::_M_pending): Remove data members.
1426 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1427 (recursive_directory_iterator::recursive_directory_iterator): Remove
1428 ctor-initializer. Use new constructor for _Dir_stack.
1429 (recursive_directory_iterator::options())
1430 (recursive_directory_iterator::recursion_pending())
1431 (recursive_directory_iterator::disable_recursion_pending()): Add
1432 non-inline definitions.
1433 (recursive_directory_iterator::depth()): Make noexcept.
1434 (recursive_directory_iterator::increment(error_code&))
1435 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1436 location of options and recursion_pending members.
1437 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1438 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1439 user-declared move constructor and assignment operator, to make the
1442 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1443 d_type == DT_UNKNOWN immediately.
1444 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1446 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1448 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1450 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1451 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1454 PR libstdc++/87431 (again)
1455 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1456 Define partial specialization for basic_string.
1457 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1458 shared_ptr and weak_ptr.
1459 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1461 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1463 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1465 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1467 * include/std/any (_Never_valueless_alt): Define explicit
1468 specialization for any.
1469 * include/std/variant (_Never_valueless_alt): Define primary template.
1470 (__never_valueless): Use _Never_valueless_alt instead of
1471 is_trivially_copyable.
1472 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1473 initializations to avoid try-catch overhead. Add special case for
1474 scalars produced by potentially-throwing conversions. Use
1475 _Never_valueless_alt instead of is_trivially_copyable for the
1476 remaining strong exception-safety cases.
1477 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1478 * testsuite/20_util/variant/87431.cc: Run both test functions.
1479 * testsuite/20_util/variant/exception_safety.cc: New test.
1480 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1481 so the variant becomes valueless.
1483 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
1486 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1488 (variant::emplace<_Tp>): Return result of emplace<N> directly.
1490 * include/std/string (__hash_string_base): New class template defining
1491 operator() for hashing strings.
1492 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1493 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1494 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1495 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1497 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1499 Use single-visitation in variant assignment and swap and relops.
1500 Also use indices instead of types when checking whether
1501 variants hold the same thing.
1502 * include/std/variant (__do_visit): Add a template parameter
1503 for index visitation, invoke with indices if index visitation
1505 (__variant_idx_cookie): New.
1506 (__visit_with_index): Likewise.
1507 (_Copy_assign_base::operator=): Do single-visitation with
1509 (_Move_assign_base::operator=): Likewise.
1510 (_Extra_visit_slot_needed): Adjust.
1511 (__visit_invoke): Call with indices if it's an index visitor.
1512 (relops): Do single-visitation with an index visitor.
1514 (__visitor_result_type): New.
1516 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1518 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1520 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1522 Don't revisit a variant we are already visiting.
1523 * include/std/variant (__variant_construct_single): New.
1524 (__variant_construct): Use it.
1525 (_M_destructive_move): Likewise.
1526 (_M_destructive_copy): Likewise.
1527 (_Copy_assign_base::operator=): Adjust.
1528 (_Move_assign_base::operator=): Likewise.
1531 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
1534 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1535 destructor so they are not evaluated until the _Key type is complete.
1536 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1537 * testsuite/23_containers/set/85965.cc: New test.
1538 * testsuite/23_containers/unordered_set/85965.cc: New test.
1539 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1540 with regexp matching the corresponding _Rb_tree specialization.
1541 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1542 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1543 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1544 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1545 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1546 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1547 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1549 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1552 Fix based on a suggestion by Antony Polukhin.
1553 * include/std/variant (__never_valueless): New.
1555 (_Extra_visit_slot_needed): New.
1556 (_Multi_array): Use it.
1557 (_S_apply_all_alts): Likewise.
1559 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1562 Fix based on a suggestion by Antony Polukhin.
1563 * include/std/variant (__gen_vtable): Don't reserve an
1564 additional table slot, _Multi_array already does that.
1566 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1569 Fix based on a suggestion by Antony Polukhin.
1570 * include/std/variant (__variant_construct): Capture a pointer
1571 to the storage and visit just one variant.
1573 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
1575 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1576 Doxygen-generated pages with unstable URL.
1577 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1578 * doc/xml/manual/extensions.xml: Likewise.
1579 * doc/xml/manual/parallel_mode.xml: Likewise.
1580 * doc/xml/manual/support.xml: Likewise.
1582 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1583 avoid -Wconversion warnings.
1585 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
1587 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1588 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
1589 (allstamped): Add stamp-pstl.
1590 (install-headers): Add ptsl_builddir.
1591 * include/Makefile.in: Regenerate.
1592 * include/bits/c++config: Add pstl configuration.
1593 * include/pstl/LICENSE.txt: New file.
1594 * include/pstl/algorithm_fwd.h: New file.
1595 * include/pstl/algorithm_impl.h: New file.
1596 * include/pstl/execution_defs.h: New file.
1597 * include/pstl/execution_impl.h: New file.
1598 * include/pstl/glue_algorithm_defs.h: New file.
1599 * include/pstl/glue_algorithm_impl.h: New file.
1600 * include/pstl/glue_execution_defs.h: New file.
1601 * include/pstl/glue_memory_defs.h: New file.
1602 * include/pstl/glue_memory_impl.h: New file.
1603 * include/pstl/glue_numeric_defs.h: New file.
1604 * include/pstl/glue_numeric_impl.h: New file.
1605 * include/pstl/memory_impl.h: New file.
1606 * include/pstl/numeric_fwd.h: New file.
1607 * include/pstl/numeric_impl.h: New file.
1608 * include/pstl/parallel_backend.h: New file.
1609 * include/pstl/parallel_backend_tbb.h: New file.
1610 * include/pstl/parallel_backend_utils.h: New file.
1611 * include/pstl/parallel_impl.h: New file.
1612 * include/pstl/pstl_config.h: New file.
1613 * include/pstl/unseq_backend_simd.h: New file.
1614 * include/pstl/utils.h: New file.
1615 * include/std/algorithm: Include parallel algorithm implementations.
1616 * include/std/execution: New file.
1617 * include/std/memory: Include parallel algorithm implementations.
1618 * include/std/numeric: Include parallel algorithm implementations.
1619 * include/std/version: Add parallel algorithms feature test macro.
1620 * testsuite/util/pstl/pstl_test_config.h: New file.
1621 * testsuite/util/pstl/test_utils.h: New file.
1622 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1623 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1624 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1625 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1626 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1627 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1628 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1629 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1630 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1631 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1632 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1633 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1634 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1635 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1636 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1637 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1638 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1639 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1640 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1641 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1642 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1643 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1644 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1645 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1646 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1647 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1648 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1649 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1650 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1651 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1652 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1653 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1654 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1655 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1656 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1657 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1658 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1659 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1660 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1661 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1662 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1663 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1664 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1665 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1666 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1667 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1668 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1669 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1670 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1671 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1672 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1673 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1674 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1675 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1676 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1677 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1678 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1679 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1680 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1681 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1682 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1683 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1684 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1685 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1686 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1687 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1688 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1689 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1690 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1691 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1692 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1693 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1694 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1695 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1696 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1697 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1698 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1699 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1700 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1701 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1702 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1703 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1704 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1705 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1706 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1707 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1708 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1709 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1710 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1711 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1712 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1713 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1714 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1715 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1716 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1717 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1718 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1719 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1720 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1721 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1722 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1723 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1724 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1725 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1726 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1727 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1729 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
1731 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
1732 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
1733 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
1734 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
1735 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
1736 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
1737 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
1738 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
1739 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
1740 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
1741 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
1742 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
1743 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
1744 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
1745 when the special functions IS is enabled, not for C++17.
1746 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
1748 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
1749 without checks for special functions in C++17.
1750 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
1754 * include/backward/hash_map: Use <> for includes not "".
1755 * include/backward/hash_set: Likewise.
1756 * include/backward/strstream: Likewise.
1757 * include/tr1/bessel_function.tcc: Likewise.
1758 * include/tr1/exp_integral.tcc: Likewise.
1759 * include/tr1/legendre_function.tcc: Likewise.
1760 * include/tr1/modified_bessel_func.tcc: Likewise.
1761 * include/tr1/riemann_zeta.tcc: Likewise.
1763 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
1765 * doc/xml/manual/allocator.xml: Link to table documenting evolution
1766 of extension allocators.
1767 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
1768 Document new headers in 7.2, 8.1 and 9.1 releases.
1769 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
1770 * doc/html/*: Regenerate.
1772 2019-03-12 John David Anglin <dave.anglin@bell.net>
1775 * testsuite/lib/libstdc++.exp: Locate libatomic.
1776 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
1777 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
1779 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1780 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
1781 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
1782 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1784 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
1787 * configure.ac: Check for sockatmark.
1788 * crossconfig.m4: Check for sockatmark.
1789 * config.h.in: Regenerate.
1790 * configure: Regenerate.
1791 * include/experimental/internet (address_v4::_S_hton): Rename
1792 overloaded functions to _S_hton_16 and _S_ntoh_16.
1793 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
1794 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
1795 * include/experimental/socket (basic_socket::at_mark): Check
1796 _GLIBCXX_HAVE_SOCKATMARK.
1798 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
1799 const variables instead of macros.
1802 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
1803 Use correct type for len_aligned.
1804 * testsuite/20_util/hash/89629.cc: New test.
1806 2019-03-11 Jakub Jelinek <jakub@redhat.com>
1809 * include/std/atomic (atomic<T>::store, atomic<T>::load,
1810 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
1811 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
1812 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
1813 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
1814 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
1815 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
1816 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
1817 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
1818 memory_order_seq_cst to int.
1820 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
1822 * doc/xml/manual/using.xml: Use link element instead of xref.
1823 * doc/html/*: Regenerate.
1825 * include/bits/fs_path.h (path::format): Add fixed underlying type.
1827 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
1830 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
1831 parameters in deduction guides.
1832 * include/debug/multimap.h (multimap): Likewise.
1833 * include/debug/set.h (multimap): Likewise.
1834 * include/debug/multiset.h (multimap): Likewise.
1835 * include/debug/unordered_map (unordered_map): Likewise.
1836 (unordered_multimap): Likewise.
1837 * include/debug/unordered_set (unordered_set): Likewise.
1838 (unordered_multiset): Likewise.
1841 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
1842 Invalidate all iterators in case of rehash.
1843 (unordered_multimap<>::_M_check_rehashed): Likewise.
1844 * include/debug/unordered_set
1845 (unordered_set<>::_M_check_rehashed): Likewise.
1846 (unordered_multiset<>::_M_check_rehashed): Likewise.
1847 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
1849 2019-03-07 Andreas Schwab <schwab@suse.de>
1851 * config/abi/post/riscv64-linux-gnu: New directory.
1852 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
1854 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
1856 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
1857 compile test to run. Fix typo.
1859 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1860 * doc/html/*: Regenerate.
1862 P0356R5 Simplified partial function application
1863 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
1864 helpers for bind_front.
1865 (bind_front, __cpp_lib_bind_front): Define.
1866 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
1868 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1870 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
1871 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
1872 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
1873 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1875 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1877 PR libstdc++/86655 - std::assoc_legendre should not constrain
1878 the value of m (or x).
1879 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
1880 __sph_legendre): If degree > order Don't throw, return 0.
1881 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
1882 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
1883 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
1884 * testsuite/tr1/5_numerical_facilities/special_functions/
1885 02_assoc_legendre/pr86655.cc: New test.
1886 * testsuite/tr1/5_numerical_facilities/special_functions/
1887 22_sph_legendre/pr86655.cc: New test.
1889 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1892 Also PR libstdc++/85517
1893 * include/std/variant (__do_visit): New.
1894 (__variant_cast): Likewise.
1895 (__variant_cookie): Likewise.
1896 (__erased_*): Remove.
1897 (_Variant_storage::_S_vtable): Likewise.
1898 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
1899 (_Variant_storage::__M_reset): Adjust.
1900 (__variant_construct): New.
1901 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
1902 __variant_construct.
1903 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1904 (_Move_ctor_base::__M_destructive_copy): New.
1905 (_Move_ctor_base::__M_destructive_move): Adjust to use
1906 __variant_construct.
1907 (_Copy_assign_base::operator=): Adjust to use __do_visit.
1908 (_Copy_assign_alias): Adjust to check both copy assignment
1909 and copy construction for triviality.
1910 (_Move_assign_base::operator=): Adjust to use __do_visit.
1911 (_Multi_array): Add support for visitors that accept and return
1913 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
1914 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
1915 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
1916 a __variant_cookie temporary for a variant that is valueless and..
1917 (__gen_vtable_impl::__visit_invoke): ..adjust here.
1918 (__gen_vtable::_Array_type): Conditionally make space for
1919 the __variant_cookie visitor case.
1920 (__variant_construct_by_index): New.
1921 (get_if): Adjust to use std::addressof.
1922 (relops): Adjust to use __do_visit.
1923 (variant): Add __variant_cast and __variant_construct_by_index
1925 (variant::emplace): Use _M_reset() and __variant_construct_by_index
1926 instead of self-destruction.
1927 (variant::swap): Adjust to use __do_visit.
1928 (visit): Reimplement in terms of __do_visit.
1929 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
1930 * testsuite/20_util/variant/compile.cc: Adjust.
1931 * testsuite/20_util/variant/run.cc: Likewise.
1933 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
1935 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
1937 * testsuite/experimental/feat-char8_t.cc: Likewise.
1939 * include/std/type_traits [C++20] (is_bounded_array)
1940 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
1942 * testsuite/20_util/is_bounded_array/requirements/
1943 explicit_instantiation.cc: New test.
1944 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
1946 * testsuite/20_util/is_bounded_array/value.cc: New test.
1947 * testsuite/20_util/is_unbounded_array/requirements/
1948 explicit_instantiation.cc: New test.
1949 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
1951 * testsuite/20_util/is_unbounded_array/value.cc: New test.
1953 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
1955 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
1957 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
1959 * include/c_compatibility/math.h [C++20] (lerp): Add using
1961 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
1962 (__lerp): Define function template to implement lerp.
1963 (lerp(float, float, float), lerp(double, double, double))
1964 (lerp(long double, long double, long double)): Define for C++20.
1965 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
1966 (midpoint(T, T), midpoint(T*, T*)): Define.
1967 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
1968 * testsuite/26_numerics/lerp.cc: New test.
1969 * testsuite/26_numerics/midpoint/floating.cc: New test.
1970 * testsuite/26_numerics/midpoint/integral.cc: New test.
1971 * testsuite/26_numerics/midpoint/pointer.cc: New test.
1973 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
1975 PR libstdc++/88996 Implement P0439R0
1976 Make std::memory_order a scoped enumeration.
1977 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
1978 add variables for the old enumerators. Adjust calls.
1979 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
1980 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
1982 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
1984 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
1987 * include/std/memory_resource (polymorphic_allocator): Add default
1988 template argument for C++20.
1989 (polymorphic_allocator::allocate_bytes)
1990 (polymorphic_allocator::deallocate_bytes)
1991 (polymorphic_allocator::allocate_object)
1992 (polymorphic_allocator::deallocate_object)
1993 (polymorphic_allocator::new_object)
1994 (polymorphic_allocator::delete_object): New member functions for
1996 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
1999 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2002 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2005 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2007 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2008 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2010 * include/std/memory (uses_allocator_construction_args): New set of
2011 overloaded functions.
2012 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2014 * include/std/memory_resource (polymorphic_allocator::construct)
2015 [__cplusplus > 201703l]: Replace all overloads with a single function
2016 using uses_allocator_construction_args.
2017 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2019 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2021 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
2024 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2025 stylesheet directories before check for xsltproc. Try to use
2026 xmlcatalog to find local stylesheet directory before trying hardcoded
2027 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2028 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2029 use xsltproc if xmlcatalog fails to find a local stylesheet.
2030 * configure.ac: Check for xmlcatalog.
2031 * Makefile.in: Regenerate.
2032 * configure: Likewise.
2033 * doc/Makefile.in: Likewise.
2034 * include/Makefile.in: Likewise.
2035 * libsupc++/Makefile.in: Likewise.
2036 * po/Makefile.in: Likewise.
2037 * python/Makefile.in: Likewise.
2038 * src/Makefile.in: Likewise.
2039 * src/c++11/Makefile.in: Likewise.
2040 * src/c++17/Makefile.in: Likewise.
2041 * src/c++98/Makefile.in: Likewise.
2042 * src/filesystem/Makefile.in: Likewise.
2043 * testsuite/Makefile.in: Likewise.
2045 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
2048 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2049 container deduction guides.
2050 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2051 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2052 parameters in deduction guides.
2053 * include/bits/stl_multimap.h (multimap): Likewise.
2054 * include/bits/stl_multiset.h (multiset): Likewise.
2055 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2056 * include/bits/stl_set.h (set): Likewise.
2057 * include/bits/stl_stack.h (stack): Likewise.
2058 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2059 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2060 constrain parameters in deduction guides.
2061 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2063 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2065 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2066 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2067 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2068 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2070 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2072 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2075 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2076 to class template and partial specialization using void_t.
2077 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2079 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
2082 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2083 copy and move members public.
2085 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
2087 * include/std/type_traits (__underlying_type_impl): New helper to
2088 make underlying_type SFINAE-friendly.
2089 (underlying_type): Derive from __underlying_type_impl.
2090 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2094 * include/bits/char_traits.h (__constant_char_array): Check index is
2095 in range before dereferencing.
2096 (char_traits<char>::compare, char_traits<char>::find)
2097 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2098 immediately if n is zero.
2099 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2100 Remove workarounds for PR 67026.
2101 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2103 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2106 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2108 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2109 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2111 2019-02-22 Jakub Jelinek <jakub@redhat.com>
2114 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
2115 type to std::size_t and argument to type to long double.
2117 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2119 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
2120 * config/abi/post/sparc64-linux-gnu: New directory.
2121 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
2122 * config/abi/post/sparc64-linux-gnu/32: New directory.
2123 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
2125 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2127 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
2128 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
2131 2019-02-22 Tom Honermann <tom@honermann.net>
2133 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
2134 printers for u8string and u8string_view.
2136 2019-02-22 Tom Honermann <tom@honermann.net>
2138 * testsuite/18_support/byte/ops.cc: Validate
2139 std::to_integer<char8_t>, std::to_integer<char16_t>, and
2140 std::to_integer<char32_t>.
2141 * testsuite/18_support/numeric_limits/dr559.cc: Validate
2142 std::numeric_limits<char8_t>.
2143 * testsuite/18_support/numeric_limits/lowest.cc: Validate
2144 std::numeric_limits<char8_t>::lowest().
2145 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
2146 std::numeric_limits<char8_t>::max_digits10.
2147 * testsuite/18_support/type_info/fundamental.cc: Validate
2148 typeinfo for char8_t.
2149 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
2150 std::from_chars with char8_t.
2151 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
2152 Validate explicit instantiation of std::hash<char8_t>.
2153 * testsuite/20_util/is_integral/value.cc: Validate
2154 std::is_integral<char8_t>.
2155 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
2156 Validate std::make_signed<char8_t>.
2157 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2158 Validate u8string construction from char8_t sources.
2159 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
2161 * testsuite/21_strings/basic_string_view/operations/compare/
2162 char/70483.cc: Validate substr operations on u8string_view.
2163 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
2164 the u8string_view typedef is defined.
2165 * testsuite/21_strings/char_traits/requirements/
2166 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
2168 * testsuite/21_strings/char_traits/requirements/
2169 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
2170 constexpr member functions.
2171 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
2172 that the u8string typedef is defined.
2173 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
2174 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
2175 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
2176 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
2178 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2179 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
2181 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2182 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2183 Validate std::atomic<char8_t>::is_always_lock_free
2184 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
2185 Update line numbers.
2186 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
2188 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
2190 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2191 Validate std::experimental::pmr::u8string.
2192 * testsuite/experimental/string_view/typedefs.cc: Validate that the
2193 u8string_view typedef is defined.
2194 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
2195 char32_t to the typelists.
2197 2019-02-22 Tom Honermann <tom@honermann.net>
2199 * include/ext/typelist.h: Constrain a partial specialization of
2200 typelist::detail::append_ to only match chain<T1,T2>.
2202 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2205 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
2206 class template with class. Replace move and copy member types with
2207 member alias templates, so they are only instantiated when needed.
2208 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2209 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
2210 test for C++11/14/17 as well.
2211 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
2214 2019-02-20 Jakub Jelinek <jakub@redhat.com>
2217 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
2218 _GLIBCXX_PURE to the alias declaration.
2220 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
2222 * testsuite/21_strings/basic_string/literals/types.cc
2223 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
2224 * testsuite/21_strings/basic_string/literals/values.cc
2225 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2226 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
2227 potentially having different type.
2228 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2229 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
2231 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
2232 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2233 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
2234 string literals only using basic character set.
2235 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
2236 u8 literals to char.
2237 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
2238 Test ATOMIC_CHAR8_T_LOCK_FREE.
2239 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
2240 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
2241 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
2242 * testsuite/experimental/string_view/literals/types.cc
2243 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
2245 * testsuite/experimental/string_view/literals/values.cc
2246 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2248 2019-02-19 Tom Honermann <tom@honermann.net>
2250 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
2251 from char16_32_t.cc; validates numeric_limits<char8_t>.
2252 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
2253 test cloned from types.cc; validates operator""s for char8_t
2255 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
2256 test cloned from values.cc; validates construction and comparison
2258 * testsuite/21_strings/basic_string/requirements/
2259 /explicit_instantiation/char8_t/1.cc: New test cloned from
2260 char16_t/1.cc; validates explicit instantiation of
2261 basic_string<char8_t>.
2262 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2263 New test cloned from types.cc; validates operator""sv for char8_t
2264 returns u8string_view.
2265 * testsuite/21_strings/basic_string_view/literals/
2266 values-char8_t.cc: New test cloned from values.cc; validates
2267 construction and comparison of u8string_view values.
2268 * testsuite/21_strings/basic_string_view/requirements/
2269 explicit_instantiation/char8_t/1.cc: New test cloned from
2270 char16_t/1.cc; validates explicit instantiation of
2271 basic_string_view<char8_t>.
2272 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2273 New test cloned from char16_t/65049.cc; validates that
2274 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2275 * testsuite/21_strings/char_traits/requirements/char8_t/
2276 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2277 that char_traits<char8_t> member typedefs are present and correct.
2278 * testsuite/21_strings/char_traits/requirements/
2279 explicit_instantiation/char8_t/1.cc: New test cloned from
2280 char16_t/1.cc; validates explicit instantiation of
2281 char_traits<char8_t>.
2282 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2283 from char16_t.cc: validates
2284 codecvt<char16_t, char8_t, mbstate_t>.
2285 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2286 from char32_t.cc: validates
2287 codecvt<char32_t, char8_t, mbstate_t>.
2288 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2289 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2290 codecvt<char32_t, char8_t, std::mbstate_t>.
2291 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2292 test cloned from string.cc; validates filesystem::path construction
2294 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2295 the __cpp_lib_char8_t feature test macro is defined with the
2297 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2298 New test cloned from string.cc; validates filesystem::path
2299 construction from char8_t input.
2300 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2301 test cloned from types.cc; validates operator""sv for char8_t
2302 returns u8string_view.
2303 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2304 New test cloned from values.cc; validates construction and
2305 comparison of u8string_view values.
2306 * testsuite/experimental/string_view/requirements/
2307 explicit_instantiation/char8_t/1.cc: New test cloned from
2308 char16_t/1.cc; validates explicit instantiation of
2309 basic_string_view<char8_t>.
2310 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2311 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2314 2019-02-19 Tom Honermann <tom@honermann.net>
2316 P0482R5 char8_t: Standard library support
2317 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2318 typeinfo symbols for char8_t.
2319 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2320 (GLIBCXX_3.4.26): Add symbols for specializations of
2321 numeric_limits and codecvt that involve char8_t.
2322 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2323 * include/bits/atomic_base.h: Add atomic_char8_t.
2324 * include/bits/basic_string.h: Add std::hash<u8string> and
2325 operator""s(const char8_t*, size_t).
2326 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2328 * include/bits/char_traits.h: Add char_traits<char8_t>.
2329 * include/bits/codecvt.h: Add
2330 codecvt<char16_t, char8_t, mbstate_t>,
2331 codecvt<char32_t, char8_t, mbstate_t>,
2332 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2333 codecvt_byname<char32_t, char8_t, mbstate_t>.
2334 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2335 recognize char8_t as an integral type.
2336 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2338 (path::u8string): Return std::u8string when char8_t support is
2340 (path::generic_u8string): Likewise.
2341 (path::_S_convert): Handle conversion from char8_t input.
2342 (path::_S_str_convert): Likewise.
2343 * include/bits/functional_hash.h: Add hash<char8_t>.
2344 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2346 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2347 for new char8_t specializations.
2348 * include/bits/localefwd.h: Add missing declarations of
2349 codecvt<char16_t, char, mbstate_t> and
2350 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2351 codecvt<char16_t, char8_t, mbstate_t> and
2352 codecvt<char32_t, char8_t, mbstate_t>.
2353 * include/bits/postypes.h: Add u8streampos
2354 * include/bits/stringfwd.h: Add declarations of
2355 char_traits<char8_t> and u8string.
2356 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2357 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2359 (path::u8string): Return std::u8string when char8_t support is
2361 (path::generic_u8string): Likewise.
2362 (path::_S_convert): Handle conversion from char8_t input.
2363 (path::_S_str_convert): Likewise.
2364 * include/experimental/string: Add u8string.
2365 * include/experimental/string_view: Add u8string_view,
2366 hash<experimental::u8string_view>, and
2367 operator""sv(const char8_t*, size_t).
2368 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2369 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2370 as a character type.
2371 * include/std/limits: Add numeric_limits<char8_t>.
2372 * include/std/string_view: Add u8string_view,
2373 hash<experimental::u8string_view>, and
2374 operator""sv(const char8_t*, size_t).
2375 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2376 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2377 * libsupc++/atomic_lockfree_defines.h: Define
2378 ATOMIC_CHAR8_T_LOCK_FREE.
2379 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2380 codecvt.cc and limits.cc so that char8_t specializations of
2381 numeric_limits and codecvt and emitted.
2382 * src/c++11/Makefile.in: Likewise.
2383 * src/c++11/codecvt.cc: Define members of
2384 codecvt<char16_t, char8_t, mbstate_t>,
2385 codecvt<char32_t, char8_t, mbstate_t>,
2386 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2387 codecvt_byname<char32_t, char8_t, mbstate_t>.
2388 * src/c++11/limits.cc: Define members of
2389 numeric_limits<char8_t>.
2390 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2391 locale_init.cc and localename.cc.
2392 * src/c++98/Makefile.in: Likewise.
2393 * src/c++98/locale_init.cc: Add initialization for the
2394 codecvt<char16_t, char8_t, mbstate_t> and
2395 codecvt<char32_t, char8_t, mbstate_t> facets.
2396 * src/c++98/localename.cc: Likewise.
2397 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2399 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2401 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2402 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2403 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2405 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
2407 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2408 * doc/html/*: Regenerate.
2410 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2411 * doc/html/*: Regenerate.
2413 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2414 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2415 allocator type in is_constructible checks.
2416 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2417 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2418 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2419 problematic type from LWG 2586 discussion.
2420 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2421 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2423 * configure.ac: Check for C11 timespec_get function.
2424 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2426 * config.h.in: Regenerate.
2427 * configure: Regenerate.
2428 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2429 std for C++17 and up.
2431 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2432 * include/bits/stl_queue.h
2433 (priority_queue(const Compare&, const Container&, const Alloc&))
2434 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2436 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2438 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2439 * include/bits/stl_queue.h (queue, priority_queue): Add static
2440 assertions to enforce LWG 2566 requirement on value_type.
2441 * include/bits/stl_stack.h (stack): Likewise.
2444 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2446 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2447 * include/bits/std_abs.h: Add comment about LWG 2735.
2448 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2450 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
2453 * include/std/version [__cpp_impl_destroying_delete]
2454 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2455 * libsupc++/new [__cpp_impl_destroying_delete]
2456 (__cpp_lib_destroying_delete): Likewise.
2457 (destroying_delete_t, destroying_delete): Likewise, but define even
2458 when __cpp_impl_destroying_delete is not defined.
2459 * testsuite/18_support/destroying_delete.cc: New test.
2461 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
2464 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2465 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2466 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2467 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2469 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
2472 * include/bits/fs_path.h (path::has_root_name)
2473 (path::has_root_directory, path::has_root_path)
2474 (path::has_relative_path, path::has_parent_path)
2475 (path::has_filename, path::has_stem, path::has_extension)
2476 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2478 * src/c++17/fs_path.cc (path::has_root_name)
2479 (path::has_root_directory, path::has_root_path)
2480 (path::has_relative_path, path::has_parent_path)
2481 (path::has_filename, path::_M_find_extension): Add noexcept.
2483 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
2485 PR libstdc++/89102 (partial)
2486 * include/std/type_traits (common_type<>): Define.
2487 (common_type<T>): Derive from common_type<T, T>.
2488 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2489 Test zero-length template argument list.
2490 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2491 Test additional single argument cases.
2492 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2493 Adjust expected error.
2495 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
2498 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2500 * include/bits/stl_stack.h (stack): Likewise.
2501 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2502 * testsuite/23_containers/queue/deduction.cc: New test.
2503 * testsuite/23_containers/stack/deduction.cc: New test.
2506 * include/std/type_traits (__is_convertible_helper)
2507 (__is_convertible_helper<_From, _To, false>): Revert changes to
2508 support is_nothrow_convertible.
2509 (__is_nt_convertible_helper): New helper.
2510 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2512 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2513 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2516 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2517 __is_alloc_insertable_impl. Replace single type member with two
2518 members, one for each of copy and move insertable.
2519 (__is_move_insertable): New trait for internal use.
2520 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2521 (vector::_S_nothrow_relocate(true_type)): New functions to
2522 conditionally check if __relocate_a can throw.
2523 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2524 on __is_move_insertable.
2525 (vector::_S_do_relocate): New overloaded functions to conditionally
2527 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2528 based on _S_use_relocate.
2529 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2530 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2531 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2534 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2535 parameter unnamed. Add message to static assertion.
2536 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2537 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2540 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
2543 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2545 (__is_bitwise_relocatable): ... to this.
2546 (__relocate_a_1): Adapt.
2547 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2548 (__is_bitwise_relocatable): ... to this.
2550 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
2553 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2554 final component as well as from _M_pathname. Append the dot using
2555 operator+= instead of only to _M_pathname.
2556 (path::_M_find_extension): Reformat slightly.
2557 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2558 Add more test cases.
2560 2019-01-30 Ulrich Drepper <drepper@redhat.com>
2562 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2564 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
2566 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2567 constexpr specifiers from arg and proj.
2569 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2570 __shared_ptr instantiations used by gcc4-compatible ABI.
2572 * include/experimental/forward_list (experimental::erase): Qualify
2574 * include/experimental/list (experimental::erase): Likewise.
2575 * include/std/forward_list (std::erase): Likewise.
2576 * include/std/list (std::erase): Likewise.
2578 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2580 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2581 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2582 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2583 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2584 * testsuite/ext/array_allocator/26875.cc: Likewise.
2585 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2586 * testsuite/util/replacement_memory_operators.h: Likewise.
2587 * testsuite/util/testsuite_allocator.h: Likewise.
2589 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
2590 normal mode vector, even for debug mode.
2591 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
2592 Define alias template for normal mode vector.
2594 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
2597 * config/locale/generic/c_locale.h (__convert_from_v)
2598 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2599 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2600 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
2601 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2603 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
2606 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
2607 data member with static member function _S_use_relocate().
2608 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2609 (vector::_M_default_append): Use _S_use_relocate() instead of
2612 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
2615 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
2618 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
2619 write to stderr instead of using printf.
2621 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2624 * include/bits/char_traits.h (__constant_string_p,
2625 __constant_char_array_p): Use __builtin_is_constant_evaluated if
2628 2019-01-20 Ulrich Drepper <drepper@redhat.com>
2630 Implement C++20 P0600r1.
2631 * include/backward/hash_map: Add nodiscard attribute to empty.
2632 * include/backward/hash_set: Likewise.
2633 * backward/hashtable.h: Likewise.
2634 * include/bits/basic_string.h: Likewise.
2635 * include/bits/forward_list.h: Likewise.
2636 * include/bits/hashtable.h: Likewise.
2637 * include/bits/regex.h: Likewise.
2638 * include/bits/stl_deque.h: Likewise.
2639 * include/bits/stl_list.h: Likewise.
2640 * include/bits/stl_map.h: Likewise.
2641 * include/bits/stl_multimap.h: Likewise.
2642 * include/bits/stl_multiset.h: Likewise.
2643 * include/bits/stl_queue.h: Likewise.
2644 * include/bits/stl_set.h: Likewise.
2645 * include/bits/stl_stack.h: Likewise.
2646 * include/bits/stl_tree.h: Likewise.
2647 * include/bits/stl_vector.h: Likewise.
2648 * include/bits/unordered_map.h: Likewise.
2649 * include/bits/unordered_set.h: Likewise.
2650 * include/debug/array: Likewise.
2651 * include/experimental/any: Likewise.
2652 * include/experimental/bits/fs_path.h: Likewise.
2653 * include/experimental/internet: Likewise.
2654 * include/experimental/string_view: Likewise.
2655 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
2657 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
2659 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
2661 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
2663 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
2665 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
2667 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
2669 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
2671 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2672 info_fn_imps.hpp: Likewise.
2673 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2674 left_child_next_sibling_heap_.hpp: Likewise.
2675 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
2677 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
2679 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
2681 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
2683 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
2685 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
2687 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
2689 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
2690 * include/ext/pb_ds/trie_policy.hpp: Likewise.
2691 * include/ext/rope: Likewise.
2692 * include/ext/slist: Likewise.
2693 * include/ext/vstring.h: Likewise.
2694 * include/profile/array: Likewise.
2695 * include/std/array: Likewise.
2696 * include/tr1/array: Likewise.
2697 * include/tr1/hashtable.h: Likewise.
2698 * include/tr1/regex: Likewise.
2699 * include/tr2/dynamic_bitset: Likewise.
2700 * include/bits/alloc_traits.h: Add nodiscard attribute to
2702 * include/experimental/memory_resource: Likewise.
2703 * include/ext/alloc_traits.h: Likewise.
2704 * include/ext/array_allocator.h: Likewise.
2705 * include/ext/bitmap_allocator.h: Likewise.
2706 * include/ext/debug_allocator.h: Likewise.
2707 * include/ext/extptr_allocator.h: Likewise.
2708 * include/ext/mt_allocator.h: Likewise.
2709 * include/ext/new_allocator.h: Likewise.
2710 * include/ext/pool_allocator.h: Likewise.
2711 * include/ext/throw_allocator.h: Likewise.
2712 * include/std/scoped_allocator: Likewise.
2713 * libsupc++/eh_alloc.cc: Likewise.
2714 * include/std/future: Add nodiscard attribute to async.
2715 * libsupc++/new: Add nodiscard attribute to new.
2717 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
2722 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
2723 * include/bits/shared_ptr.h
2724 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
2725 (allocate_shared): Change to use new tag type.
2726 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
2727 Declare new member function.
2728 (_Sp_alloc_shared_tag): Define new type.
2729 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
2730 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
2731 _Sp_make_shared_tag::_S_eq to check type_info.
2732 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
2733 Constrain to prevent being called with _Sp_alloc_shared_tag.
2734 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
2735 Replace constructor with ...
2736 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
2737 reference parameter so address of the new object can be returned to
2738 the caller. Obtain the allocator from the tag type.
2739 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
2740 constructor with ...
2741 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
2742 to the __shared_count constructor.
2743 (__allocate_shared): Change to use new tag type.
2744 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
2746 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
2748 * src/c++17/fs_ops.cc
2749 (equivalent(const path&, const path&, error_code&))
2750 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
2751 compare files instead of relying on incomplete info returned by stat.
2754 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
2755 if the path is already absolute.
2756 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
2757 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
2760 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
2761 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
2762 of filesystem::exists.
2763 (create_directories(const path&, error_code&)): Add assertions.
2764 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2765 Add workaround for bug in _wstat for paths with trailing slash.
2766 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
2767 for expected behaviour on mingw.
2768 * testsuite/experimental/filesystem/operations/create_directories.cc:
2770 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
2771 "TMP" instead of "TMPDIR" and clean environment before each test. Do
2772 not test permissions on mingw targets.
2774 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
2776 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
2777 constructors and open members taking wide strings. Fix patterns for
2778 filesystem::path members to match wstring_view parameters. Add
2779 exports for shared_ptr members used by directory iterators.
2780 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
2781 error code parameter if the file doesn't exist.
2782 * src/filesystem/ops.cc (remove(const path&, error_code&)):
2784 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
2785 values for mingw targets, where "/" is not an absolute path. Do not
2786 test symlinks on mingw targets.
2787 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2788 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
2790 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2791 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
2792 that each component of the path is created.
2793 * testsuite/experimental/filesystem/operations/create_directories.cc:
2795 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
2796 permissions on mingw targets.
2797 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2798 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2799 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2800 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
2802 * testsuite/experimental/filesystem/operations/permissions.cc:
2804 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
2805 symlinks or permissions on mingw targets.
2806 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2807 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
2808 symlinks on mingw targets.
2809 * testsuite/experimental/filesystem/operations/remove_all.cc:
2811 * testsuite/27_io/filesystem/operations/status.cc: Do not test
2812 permissions on mingw targets.
2813 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
2814 test symlinks on mingw targets.
2815 * testsuite/experimental/filesystem/operations/space.cc: Fix test
2818 2019-02-14 Ulrich Drepper <drepper@redhat.com>
2821 Warn about unused comparisons of shared_ptr/unique_ptr
2822 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
2823 * include/bits/shared_ptr.h: Use it for operator ==, !=,
2824 <, <=, >, >= for shared_ptr.
2825 * include/bits/unique_ptr.h: Likewise for unique_ptr.
2827 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
2829 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
2830 as 201611L, because P0497R0 changes are supported.
2831 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
2833 * include/bits/erase_if.h [__cplusplus > 201703L]
2834 (__cpp_lib_erase_if): Only define for C++2a.
2835 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2836 (__cpp_lib_null_iterators): Define.
2837 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2838 (__cpp_lib_null_iterators): Define.
2839 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
2841 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
2843 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
2845 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
2846 changes are supported.
2847 * include/std/optional (__cpp_lib_optional): Likewise.
2848 * include/std/variant (__cpp_lib_variant): Likewise.
2849 * include/std/version [!__STRICT_ANSI__]
2850 (__cpp_lib_uncaught_exceptions): Define as long integer.
2851 [__cplusplus >= 201703L] (__cpp_lib_any)
2852 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
2853 (__cpp_lib_variant): Define for C++17.
2854 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
2856 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
2859 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
2861 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
2865 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
2867 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
2870 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2872 * doc/xml/manual/intro.xml: Include new section.
2873 * doc/xml/manual/status_cxx2017.xml: Document more
2874 implementation-defined properties of the library.
2875 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
2876 * doc/html/*: Regenerate.
2878 * include/bits/refwrap.h [__cplusplus > 201703L]
2879 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
2880 (_Reference_wrapper_base_memfun): Do not define for C++2a.
2881 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
2883 (reference_wrapper::operator()): Add static assertion.
2884 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
2886 * include/std/chrono (duration_values::zero(), duration_values::min())
2887 (duration_values::max()): Add noexcept.
2888 (duration::zero(), duration::min(), duration::max()): Likewise.
2889 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
2890 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
2891 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
2893 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
2895 2019-01-11 Jakub Jelinek <jakub@redhat.com>
2897 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
2898 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
2900 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
2903 * include/bits/functional_hash.h (hash<nullptr_t>): Define
2904 specialization for C++17 (P0513R0, LWG 2817).
2905 * testsuite/20_util/hash/nullptr.cc: New test.
2908 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
2909 pattern for std::basic_stringbuf::str().
2911 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
2912 basic_ostream::operator<< patterns.
2914 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2916 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
2917 test failures on targets with 32-bit time_t.
2919 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
2920 * include/std/deque: Likewise.
2921 * include/std/forward_list: Likewise.
2922 * include/std/list: Likewise.
2923 * include/std/string: Likewise.
2924 * include/std/vector: Likewise.
2925 * include/std/version: Likewise.
2926 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
2927 * testsuite/23_containers/deque/erasure.cc: Likewise.
2928 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2929 * testsuite/23_containers/list/erasure.cc: Likewise.
2930 * testsuite/23_containers/map/erasure.cc: Likewise.
2931 * testsuite/23_containers/set/erasure.cc: Likewise.
2932 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2933 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2934 * testsuite/23_containers/vector/erasure.cc: Likewise.
2936 * include/experimental/internet [AI_NUMERICSERV]
2937 (resolver_base::numeric_service): Define conditionally.
2938 * testsuite/experimental/net/internet/resolver/base.cc: Test it
2940 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2943 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2944 Jonathan Wakely <jwakely@redhat.com>
2947 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
2948 (GLIBCXX_3.4.26): Add new exports.
2949 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
2950 correct list of sources.
2951 * include/Makefile.in: Regenerate.
2952 * include/std/ostream (operator<<(nullptr_t)): New member function.
2953 * src/c++17/ostream-inst.cc: New file.
2954 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
2957 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
2959 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
2960 of the source file containing the caller.
2961 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
2962 directories created by test.
2963 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2965 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2967 * testsuite/experimental/filesystem/iterators/
2968 recursive_directory_iterator.cc: Likewise.
2970 2019-01-10 Jakub Jelinek <jakub@redhat.com>
2972 PR tree-optimization/88775
2973 * include/bits/stl_function.h (greater<_Tp*>::operator(),
2974 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
2975 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
2976 instead of __builtin_constant_p if available. Don't bother with
2977 the pointer comparison in C++11 and earlier.
2979 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2983 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
2986 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
2988 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
2989 for filesystem::path. Give variables more distinctive names.
2991 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
2992 member function to perform non-trivial assignment.
2993 (_Optional_payload_base::_M_move_assign): Likewise.
2994 (_Optional_payload<T, true, false, true>::operator=)
2995 (_Optional_payload<T, true, true, false>::operator=)
2996 (_Optional_payload<T, true, false, false>::operator=): Call
2997 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3000 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3001 test std::complex<long double> if long double format is IBM128.
3002 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3005 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3007 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3008 for old std::unique_ptr layout.
3009 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3010 to become valueless. Add filesystem::path tests.
3013 * include/std/optional (_Optional_payload_base): New class template
3014 for common code hoisted from _Optional_payload specializations. Use
3015 a template for the union, to allow a partial specialization for
3016 types with non-trivial destructors. Add constructors for in-place
3017 initialization to the union.
3018 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3019 to perform non-trivial copy construction, instead of relying on
3020 non-standard copy elision in a delegating constructor.
3021 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3022 non-trivial move construction.
3023 (_Optional_payload): Derive from _Optional_payload_base and use it
3024 for everything except the non-trivial assignment operators, which are
3026 (_Optional_payload<false, C, M>): Derive from the specialization
3027 _Optional_payload<true, false, false> and add a destructor.
3028 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3029 Forward to corresponding members of _Optional_payload.
3030 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3031 Hoist common members from _Optional_base.
3032 (_Optional_base): Make all members and base class public.
3033 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3034 _Optional_base_impl.
3035 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3036 support for new std::optional layout.
3037 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3040 * include/bits/locale_conv.h: Use <> for includes not "".
3041 * include/ext/random: Likewise.
3042 * include/ext/vstring.h: Likewise.
3044 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3046 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3047 (GLIBCXX_3.4.21): Likewise.
3049 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3052 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3053 to match the one that controls whether utimbuf and utime are declared.
3055 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
3058 * include/bits/char_traits.h (char_traits::move): Do not pass null
3059 pointers to memmove.
3060 * include/bits/locale_facets.h
3061 (ctype<char>::widen(const char*, const char*, char*)): Do not
3062 pass null pointers to memcpy.
3063 (ctype<char>::narrow(const char*, const char*, char, char*)):
3065 (ctype<char>::do_widen(const char*, const char*, char*)):
3067 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3070 * doc/xml/manual/spine.xml: Update copyright years.
3071 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3072 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3073 for C++17 filesystem library.
3074 * doc/html/*: Regenerate.
3076 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3077 * config.h.in: Regenerate.
3078 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3079 alphabetically and add missing entries for copy_symlink,
3080 hard_link_count, rename, and resize_file.
3081 * configure: Regenerate.
3082 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3083 used unconditionally.
3084 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3085 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3086 supports truncating to zero length.
3087 * testsuite/27_io/filesystem/operations/all.cc: New test.
3088 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3090 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
3093 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3094 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3095 * config.h.in: Regenerate.
3096 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3097 remaining std::filesystem types and functions.
3098 * configure: Regenerate.
3099 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3100 * src/c++17/Makefile.in: Regenerate.
3101 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3102 here, and change name of included file.
3103 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3104 here, and change name of included file.
3105 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3106 path to dir-common.h.
3107 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3108 path to ops-common.h. Disable -Wunused-parameter warnings.
3109 (internal_file_clock): Define unconditionally.
3110 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3112 (do_copy_file, do_space): Move definitions to ops.common.h.
3113 (copy, file_size, hard_link_count, last_write_time, space): Only
3114 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
3116 (last_write_time, read_symlink): Remove unused attributes from
3118 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
3119 * src/filesystem/Makefile.in: Regenerate.
3120 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
3121 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
3122 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
3123 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
3124 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
3125 dummy types and functions instead of using #error.
3126 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
3127 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
3129 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
3130 (do_copy_file, do_space): Move definitions here from std-ops.cc.
3131 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
3132 to account for new namespace.
3133 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
3134 -lstdc++fs from dg-options.
3135 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
3136 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
3137 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
3138 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
3139 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3141 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
3142 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3144 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
3145 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3146 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
3147 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3148 * testsuite/27_io/filesystem/operations/create_directories.cc:
3150 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
3151 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
3152 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
3153 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
3154 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3155 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
3156 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3157 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
3158 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
3159 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
3160 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
3161 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
3162 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3163 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3164 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
3165 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3166 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3167 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3169 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
3173 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
3174 typeinfo and vtables less greedy.
3175 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
3176 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
3177 * src/c++17/Makefile.in: Regenerate.
3178 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
3179 here, and change name of included file.
3180 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
3181 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
3183 * src/filesystem/Makefile.in: Regenerate.
3184 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
3185 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
3186 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
3187 from dg-options and remove dg-require-filesystem-ts.
3188 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
3189 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
3190 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
3191 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
3192 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3193 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3194 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3195 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
3196 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
3197 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
3198 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
3199 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
3200 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
3201 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
3202 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
3203 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
3204 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
3205 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
3206 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
3207 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
3208 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
3210 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
3211 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
3212 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
3213 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
3214 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
3215 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
3216 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
3217 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
3218 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
3219 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
3220 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
3221 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
3223 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
3225 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3227 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
3229 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
3230 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3231 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
3232 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
3233 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3234 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3235 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3236 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3237 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
3238 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3240 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3241 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3242 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3243 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
3244 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3247 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
3248 Check is_trivially_copyable instead of is_scalar.
3249 (variant::emplace<N, Args>(Args&&...)): If construction of the new
3250 contained value can throw and its type is trivially copyable then
3251 construct into a temporary variant and move from it, to provide the
3252 strong exception safety guarantee.
3253 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
3255 * testsuite/20_util/variant/87431.cc: New test.
3256 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
3257 conversion causes valueless state.
3260 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
3261 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
3262 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
3263 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
3264 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
3266 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
3268 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3269 (file_time_type): Redefine in terms of __file_clock.
3270 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3272 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3274 (internal_file_lock): New helper type for accessing __file_clock.
3275 (do_copy_file): Use internal_file_lock to convert system time to
3277 (last_write_time(const path&, error_code&)): Likewise.
3278 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3280 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
3282 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3283 for const member functions of std::basic_string.
3284 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3286 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3287 Make non-standard constructor private.
3288 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3290 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3291 explicit instantiations for C++17 as well as earlier dialects.
3292 * src/c++17/Makefile.am: Add new source files.
3293 * src/c++17/Makefile.in: Regenerate.
3294 * src/c++17/cow-string-inst.cc: New file defining explicit
3295 instantiations for basic_string member functions added in C++17.
3296 * src/c++17/string-inst.cc: Likewise.
3298 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3299 copy/move constructors for old std::basic_string.
3300 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3301 (basic_string::reference, basic_string::const_reference): Define
3302 as plain references for C++11 and later.
3303 (basic_string::basic_string()): Put constructor body outside
3304 preprocessor conditional groups.
3305 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3306 instead of copying it.
3307 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3309 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3311 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3312 cases for old basic_string.
3313 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3314 allocator-extended constructors unconditionally. Add extra members to
3315 allocator type when using old string ABI.
3316 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3318 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3320 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3321 -fno-inline added to test flags.
3323 * testsuite/21_strings/basic_string/requirements/
3324 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3326 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3327 assertion failures with old std::string ABI.
3329 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3331 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3332 functions that will only erase elements at the end.
3333 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3334 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3335 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3337 (path::_List::pop_back()): Define.
3338 (path::_List::_M_erase_from(const_iterator)): Define.
3339 (path::operator/=(const path&)): Use pop_back to remove last component
3340 and _M_erase_from to remove multiple components.
3341 (path::_M_append(basic_string_view<value_type>)): Likewise.
3342 (path::operator+=(const path&)): Likewise.
3343 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3344 (path::remove_filename()): Likewise.
3345 (path::lexically_normal()): Use _List::_Impl iterators instead of
3346 path::iterator. Use pop_back to remove components from the end. Clear
3347 trailing filename, instead of using erase(const_iterator) to remove
3348 a non-final component.
3349 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3351 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3353 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3354 incorrect treatment of empty filename after trailing slash.
3355 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3357 * testsuite/21_strings/basic_string/modifiers/assign/char/
3358 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3360 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3361 move_assign_optim.cc: Likewise.
3363 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3364 Jakub Jelinek <jakub@redhat.com>
3367 * include/experimental/memory: Replace UTF-8 quote characters.
3368 * include/std/future: Replace UTF-8 "em dash" characters.
3370 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3373 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3374 * include/debug/forward_list: Likewise.
3375 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3377 * include/experimental/chrono: Likewise.
3378 * include/experimental/functional: Likewise.
3379 * include/experimental/ratio: Likewise.
3380 * include/experimental/system_error: Likewise.
3381 * include/experimental/tuple: Likewise.
3382 * include/experimental/type_traits: Likewise.
3383 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3384 * include/parallel/multiseq_selection.h: Likewise.
3387 * config/abi/pre/gnu.ver: Add missing exports.
3388 * testsuite/22_locale/collate_byname/88681.cc: New test.
3389 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3390 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3392 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
3394 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3395 initializer_list<value_type> and from input iterator ranges.
3396 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3398 * testsuite/experimental/string_view/element_access/char/empty.cc:
3399 Fix year range in copyright header.
3401 2019-01-02 Joel Brobecker <brobecker@adacore.com>
3403 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3404 Fix year range in copyright header.
3406 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3408 Update copyright years.
3410 Copyright (C) 2019 Free Software Foundation, Inc.
3412 Copying and distribution of this file, with or without modification,
3413 are permitted in any medium without royalty provided the copyright
3414 notice and this notice are preserved.