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