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