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