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