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