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