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