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