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