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