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