1 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
3 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
6 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
7 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
8 * libsupc++/eh_term_handler.h: New header defining
9 _GLIBCXX_DEFAULT_TERM_HANDLER.
10 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
11 (set_terminate): Restore default handler when argument is null.
12 (set_unexpected): Likewise.
13 * testsuite/18_support/set_terminate.cc: New test.
14 * testsuite/18_support/set_unexpected.cc: New test.
16 * include/backward/hashtable.h (size_t, ptrdiff_t)
17 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
18 (distance, vector, pair, __iterator_category): Remove
19 using-declarations that add these names to namespace __gnu_cxx.
20 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
21 * include/ext/debug_allocator.h (size_t): Likewise.
22 * include/ext/functional (size_t, unary_function, binary_function)
23 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
25 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
26 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
27 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
28 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
29 * include/ext/numeric (iota): Fix outdated comment.
30 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
31 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
32 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
33 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
34 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
36 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
37 (allocator, __true_type, __false_type): Likewise.
39 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
42 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
43 New helpers for checking preconditions in traits.
44 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
45 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
46 (is_destructible, is_nothrow_destructible, is_constructible)
47 (is_default_constructible, is_copy_constructible)
48 (is_move_constructible, is_nothrow_default_constructible)
49 (is_nothrow_constructible, is_nothrow_copy_constructible)
50 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
51 (is_nothrow_assignable, is_nothrow_copy_assignable)
52 (is_nothrow_move_assignable, is_trivially_constructible)
53 (is_trivially_copy_constructible, is_trivially_move_constructible)
54 is_trivially_assignable, is_trivially_copy_assignable)
55 (is_trivially_move_assignable, is_trivially_destructible)
56 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
57 (is_invocable_r, is_nothrow_invocable)
58 (has_unique_object_representations, is_aggregate): Add static_asserts
59 to make sure that type traits are not misused with incomplete types.
60 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
61 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
62 base characteristics without assertions that can be reused in other
64 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
65 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
67 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
68 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
69 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
70 * testsuite/20_util/is_class/value.cc: Check incomplete type.
71 * testsuite/20_util/is_function/value.cc: Likewise.
72 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
73 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
75 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
76 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
77 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
78 * testsuite/20_util/is_union/value.cc: Likewise.
79 * testsuite/20_util/is_void/value.cc: Likewise.
80 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
82 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
84 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
85 Add new private member function.
86 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
87 (random_device::_M_init_pretr1(const string&)): Call new private
88 member with string data.
89 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
91 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
92 test using COW strings.
93 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
94 a value from the device.
95 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
96 Fix typo in token string.
98 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
100 LWG2788 basic_string spurious use of a default constructible allocator
101 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
102 (basic_string::_M_replace_dispatch): Construct temporary string with
103 the current allocator.
104 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
105 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
107 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
109 * doc/xml/manual/diagnostics.xml: Update list of headers that define
111 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
112 section about new/delete overloads. Improve section on verbose
114 * doc/html/*: Regenerate.
116 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
117 P0811R3. Change status of P1353R0.
118 * doc/html/*: Regenerate.
120 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
121 documentation of implementation-defined types for [thread.req.native].
122 * doc/xml/manual/status_cxx2017.xml: Update documentation of
123 implementation-defined strings for [variant.bad.access]. Fix typo in
124 documentation of implementation-defined support for [fs.conform.9945].
125 * doc/html/*: Regenerate.
127 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
130 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
131 that fails on mingw-w64.
134 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
135 (status(const path&, error_code&)): Use parent_path() to remove
137 (symlink_status(const path&, error_code&)): Duplicate workaround for
138 bug in _wstat for paths with trailing slash.
139 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
141 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
142 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
144 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
145 once instead of building it iteratively.
147 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
149 PR libstdc++/85494 use rdseed and rand_s in std::random_device
150 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
151 the assembler supports rdseed.
152 * config.h.in: Regenerate.
153 * configure: Regenerate.
154 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
155 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
156 * doc/html/*: Regenerate.
157 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
158 * include/bits/random.h (random_device::random_device()): Always call
159 _M_init rather than _M_init_pretr1.
160 (random_device::random_device(const string&)): Likewise.
161 (random_device::operator()()): Always call _M_getval().
162 (random_device::_M_file): Replace first member of union with an
163 anonymous struct, with _M_file as its first member.
164 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
165 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
166 (USE_MT19937): Define if none of the above are defined.
167 (USE_POSIX_FILE_IO): Define.
168 (_M_strtoul): Remove.
169 [USE_RDSEED] (__x86_rdseed): Define new function.
170 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
171 (random_device::_M_init(const string&)): Initialize new union members.
172 Add support for "rdseed" and "rand_s" tokens. Decide what the
173 "default" token does according to which USE_* macros are defined.
174 [USE_POSIX_FILE_IO]: Store a file descriptor.
175 [USE_MT19937]: Forward to _M_init_pretr1 instead.
176 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
177 code from _M_strtoul.
178 [!USE_MT19937]: Call _M_init, transforming the old default token or
179 numeric tokens to "default".
180 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
181 (random_device::_M_getval()): Use new union members to obtain a
182 random number from the stored function pointer or file descriptor.
183 [USE_MT19937]: Obtain a value from the mt19937 engine.
184 (random_device::_M_getval_pretr1()): Call _M_getval().
185 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
187 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
188 * testsuite/26_numerics/random/random_device/85494.cc: New test.
190 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
193 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
194 _M_split_cmpts() for a path with multiple components.
195 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
196 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
197 components and reserve space in vector. Return early when there is
199 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
200 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
202 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
203 form of std::equals for C++11 compatibility.
205 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
207 * doc/xml/manual/appendix_contributing.xml: Update pointer to
208 C++ standard at ansi.org.
210 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
212 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
213 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
216 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
217 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
219 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
221 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
223 * testsuite/20_util/function_objects/invoke/3.cc: New test.
224 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
225 "compile" test to "run".
227 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
228 * doc/html/*: Regenerate.
229 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
230 rvalue aliasing constructor.
231 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
232 (reinterpret_pointer_cast): Add overloads taking rvalues.
233 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
234 Add rvalue aliasing constructor.
235 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
236 "run" and check return values as well as types.
237 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
238 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
239 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
240 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
243 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
244 * doc/xml/manual/intro.xml: Likewise.
245 * include/std/future (__create_task_state): Add default arguments
246 to make providing an allocator optional.
247 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
248 instead of delegating to another constructor.
249 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
250 define allocator-extended constructors for C++17 and later.
251 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
253 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
254 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
255 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
257 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
259 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
260 Don't run the libstdc++/83237 part on simulator targets.
262 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
264 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
266 * doc/html/*: Regenerate.
268 * include/experimental/any (__any_caster): Use RTTI if comparing
269 addresses fails, to support non-unique addresses in shared libraries.
270 * include/std/any (__any_caster): Likewise.
273 * include/experimental/any (__any_caster): Constrain to only be
274 callable for object types. Use remove_cv_t instead of decay_t.
275 If the type decays or isn't copy constructible, compare the manager
276 function to a dummy specialization.
277 (__any_caster): Add overload constrained for non-object types.
278 (any::_Manager_internal<_Op>): Add dummy specialization.
279 * testsuite/experimental/any/misc/any_cast.cc: Test function types
282 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
285 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
286 reversed arguments to uninitialized_copy_n.
287 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
288 is unchanged by copy assignment.
289 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
290 compare path components.
293 * include/experimental/memory_resource: Add system header pragma and
294 do not define anything unless compiled as C++14 or later.
295 (__resource_adaptor_common::__guaranteed_alignment): Remove.
296 (__resource_adaptor_imp::do_allocate): If the requested alignment
297 is a fundamental alignment then either allocate directly from _M_alloc
298 or call the new _M_allocate function.
299 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
300 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
301 of the allocator rebound to a POD type with the specified alignment.
302 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
303 * testsuite/experimental/memory_resource/new_delete_resource.cc:
304 Adjust expected allocation sizes.
305 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
306 xfail for Solaris x86.
308 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
310 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
311 * include/pstl/execution_defs.h (__enable_if_execution_policy):
312 Use std::__remove_cvref_t when building with GCC.
314 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
317 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
318 Use "additional_flags" to pass -ltbb to v3_target_compile command.
319 Use check_v3_target_prop_cached to cache the result of the test.
321 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
323 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
326 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
327 Changed v3_target_compile check from preprocess to executable.
328 Added "-ltbb" to v3_target_compile flags.
330 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
332 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
333 Add check for Thread Building Blocks 2018 or later.
335 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
337 * testsuite/experimental/names.cc: Only include Networking TS headers
338 on targets with the necessary Gthreads support.
340 2019-05-20 Marek Polacek <polacek@redhat.com>
342 CWG 2094 - volatile scalars are trivially copyable.
344 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
345 result for volatile int.
347 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
349 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
350 * testsuite/experimental/names.cc: Include <experimental/filesystem>
353 PR c++/90532 Ensure __is_constructible(T[]) is false
354 * include/std/type_traits (__do_is_default_constructible_impl)
355 (__is_default_constructible_atom, __is_default_constructible_safe):
357 (is_default_constructible): Use is_constructible.
358 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
359 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
360 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
361 * testsuite/20_util/is_trivially_default_constructible/value.cc:
364 2019-05-20 Pádraig Brady <pbrady@fb.com>
366 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
367 to the deallocator with -fsized-deallocation.
369 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
371 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
372 test by passing correct alignment to deallocate function.
374 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
377 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
378 Raise exception if unique_ptr tuple member has unknown structure.
379 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
380 Adjust worker to support new __uniq_ptr_data base class. Do not
381 assume field called _M_head_impl is the first tuple element.
383 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
385 * include/bits/stl_deque.h
386 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
387 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
388 (_Deque_base::_Deque_impl_data): New.
389 (_Deque_base::_Deque_impl): Inherit latter.
390 (_Deque_base::_Deque_impl::_M_swap_data): Move...
391 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
392 (_Deque_base::_Deque_impl()): Add noexcept qualification.
393 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
394 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
395 (deque<>::deque()): Default.
396 (deque<>::deque(deque&&)): Default.
397 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
398 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
399 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
400 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
402 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
403 (deque<>::resize(size_type, const value_type&)): Share a single
405 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
407 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
408 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
409 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
410 * testsuite/23_containers/deque/allocator/default_init.cc: New.
412 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
415 * include/std/variant (holds_alternative, get, get_if): Improve
416 static assertion messages.
417 (bad_variant_access::bad_variant_access()): Change default message.
418 (__throw_bad_variant_access(bool)): New overload.
419 (get): Use new overload.
420 (visit, visit<R>): Improve exception message.
422 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
423 targets. Add more cases from P0608R3.
424 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
426 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
427 * include/experimental/type_traits (is_detected_exact)
428 (is_detected_exact_v): Likewise.
429 * include/pstl/execution_defs.h (is_execution_policy)
430 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
431 * include/pstl/execution_impl.h (__policy_traits): Likewise.
432 * testsuite/17_intro/names.cc: Check for more non-reserved names.
433 * testsuite/experimental/names.cc: New test.
436 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
437 assertions from the destructor.
438 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
439 Move static_assert for hash function to here.
440 (_Hash_table_base::_M_equals): Move static_assert for equality
442 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
444 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
445 the value directly instead of calling _S_value.
446 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
447 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
448 _S_key(_Const_Link_type).
449 * testsuite/23_containers/set/85965.cc: Check construction,
450 destruction, assignment and size() do not trigger the assertions.
451 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
452 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
454 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
455 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
456 * testsuite/23_containers/set/48101_neg.cc: Likewise.
457 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
458 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
459 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
460 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
462 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
463 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
466 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
468 * doc/html/*: Regenerate.
469 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
470 of decay_t (P0777R1).
472 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
474 Move from state of allocators (LWG2593)
475 * include/bits/stl_deque.h
476 (_Deque_base(_Deque_base&&, false_type)): Remove.
477 (_Deque_base(_Deque_base&&, true_type)): Remove.
478 (_Deque_base(_Deque_base&&)): Adapt.
479 (_Deque_base::_M_move_impl()): Remove.
480 * testsuite/util/testsuite_allocator.h
481 (propagating_allocator(propagating_allocator&&)): Preserve move from
483 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
485 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
487 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
488 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
489 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
491 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
493 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
494 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
496 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
498 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
500 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
502 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
504 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
506 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
508 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
511 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
513 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
514 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
516 * include/std/variant (__overload_set): Remove.
518 (_Build_FUN): New class template to define a single FUN overload,
519 with specializations to prevent unwanted conversions, as per P0608R3.
520 (_Build_FUNs): New class template to build an overload set of FUN.
521 (_FUN_type): New alias template to perform overload resolution.
522 (__accepted_type): Use integer_constant base for failure case. Use
523 _FUN_type for successful case.
524 (variant::__accepted_index): Use _Tp instead of _Tp&&.
525 (variant::variant(_Tp&&)): Likewise.
526 (variant::operator=(_Tp&&)): Likewise.
528 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
529 Replace raw visitation with a runtime check for the valueless state
530 and a non-raw visitor.
531 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
532 (variant::index()): Remove branch.
533 (variant::swap(variant&)): Use valueless_by_exception() instead of
534 comparing the index to variant_npos, and add likelihood attribute.
536 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
537 (_Hashtable_base::_Equal_hash_code): Define new class template.
538 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
541 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
542 Replace with _M_get non-static member function.
543 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
545 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
546 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
548 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
549 _S_get accessors for members in EBO helpers.
550 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
551 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
553 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
555 (_Hashtable_base::_M_eq()): Remove non-const overload.
557 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
559 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
561 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
563 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
566 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
568 * config/os/solaris/solaris2.10: Move to ...
569 * config/os/solaris: ... this.
570 * configure.host (os_include_dir): Adapt.
571 (abi_baseline_pair): Remove Solaris 10 handling.
572 * config/abi/post/i386-solaris2.10: Remove.
573 * config/abi/post/sparc-solaris2.10: Remove.
574 * config/abi/post/i386-solaris2.11: Rename to ...
575 * config/abi/post/i386-solaris: ... this.
576 * config/abi/post/sparc-solaris2.11: Rename to ...
577 * config/abi/post/sparc-solaris: ... this.
579 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
582 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
585 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
587 * include/std/variant (__visit_with_index): Remove typedef.
588 (__deduce_visit_result): New tag type.
589 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
590 visitation of possibly-valueless variants, forwarding to __do_visit
591 with the relevant tag type.
592 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
593 and make lambda return void.
594 (__variant_construct): Likewise.
595 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
596 __raw_idx_visit and make lambda return void.
597 (_Multi_array::__untag_result): Add metafunction to check the function
598 pointer type for a tag type that dictates the kind of visitation.
599 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
600 Use decltype(auto) instead of tagged function pointer type.
601 (__gen_vtable_impl): Remove bool non-type parameter and unused
602 _Variant_tuple parameter.
603 (__gen_vtable_impl::__visit_invoke_impl): Remove.
604 (__gen_vtable_impl::__do_visit_invoke): Remove.
605 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
606 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
607 for the visit<R> case, rather than dispatching to separate functions.
608 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
610 (variant::swap): Likewise.
611 (__do_visit): Replace two non-type template parameters with a single
612 type parameter, so that the caller must specify the visitor's return
613 type (or one of the tag types).
614 (visit): Deduce a return type from the visitor and use the
615 __deduce_visit_result tag to enforce that all overloads return the
617 (visit<R>): Call __do_visit<R> with explicit result type.
618 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
621 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
623 nonesuch is insufficiently useless (lwg2996)
624 * include/std/type_traits (struct __nonesuch): Added private base
625 class to make __nonesuch not an aggregate and removed deleted default
627 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
628 (operator=(const pair&)): Use __nonesuch instead of
629 __nonesuch_no_braces.
630 (operator=(pair&&)): Likewise
631 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
632 of __nonesuch_no_braces.
633 (operator=(tuple&&)): Likewise
634 * include/experimental/type_traits (struct nonesuch): Added private
635 base class to make nonesuch not an aggregate and removed deleted
637 * testsuite/20_util/nonesuch/nonesuch.cc: New.
638 * testsuite/experimental/type_traits/nonesuch.cc: New.
640 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
642 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
643 (_Function_handler): Remove partial specializations for void return
644 types and pointers to member.
645 (_Function_handler::_M_manager): Adapt to removal of
646 _Simple_type_wrapper.
647 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
648 * include/std/functional (_Bind_result::__enable_if_void)
649 (_Bind_result::__disable_if_void): Remove sfinae helpers.
650 (_Bind_result::__call): Use __invoke_r and remove overloads for void
652 * include/std/future (__future_base::_Task_state::_M_run)
653 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
654 change return type of lambda expressions.
656 * include/bits/invoke.h (__invoke_r): Define new function implementing
657 the INVOKE<R> pseudo-function.
658 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
659 * testsuite/20_util/function_objects/invoke/2.cc: New test.
661 * include/std/type_traits (__is_nt_convertible_helper): Define it
662 unconditionally, not only for C++20.
663 (__is_nothrow_convertible): Define internal trait for use in C++11.
664 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
665 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
666 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
667 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
668 that has nothrow explicit conversion but potentially-throwing implicit
670 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
671 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
672 function to only consider implicit conversions.
673 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
675 * include/std/iterator: Include <iosfwd> instead of <istream> and
678 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
679 Remove unused, non-standard function.
681 * include/bits/regex.h (match_results::max_size()): Adjust return
682 value to account for prefix/suffix/unmatched subs.
683 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
684 reset the contained sub matches.
685 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
686 function to set result state following a failed match.
687 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
688 sub_match states after _M_resize. Use _M_establish_failed_match.
691 * include/std/thread (thread::_State_impl, thread::_S_make_state):
692 Replace single _Callable parameter with variadic _Args pack, to
693 forward them directly to the tuple of decayed copies.
694 * testsuite/30_threads/thread/cons/69724.cc: New test.
696 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
698 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
699 * include/bits/basic_string.h: (operator=(const basic_string&):
700 Move allocator decision to assign.
701 (assign(const basic_string&)): Move allocator decision here.
702 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
704 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
707 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
709 * testsuite/util/testsuite_allocator.h (memory_resource)
710 (default_resource_mgr): Fix indentation.
712 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
713 Use operator-> to access raw pointer member.
714 * testsuite/23_containers/vector/59829.cc: Likewise.
715 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
716 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
717 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
719 (PointerBase, PointerBase_void): Derive from NullablePointer and use
720 its constructors and equality operators. Change converting
721 constructors to use operator-> to access private member of the other
723 (PointerBase_void::operator->()): Add, for access to private member.
724 (operator-(PointerBase, PointerBase)): Change to hidden friend.
725 (operator==(PointerBase, PointerBase)): Remove.
726 (operator!=(PointerBase, PointerBase)): Remove.
728 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
729 not assume field called _M_head_impl is the first tuple element.
730 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
731 implementation more accurate.
732 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
733 empty pointer type and non-empty deleter.
735 LWG 2899 - Make is_move_constructible correct for unique_ptr
736 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
737 move assignment operator.
738 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
739 (__uniq_ptr_data): New class template with conditionally deleted
741 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
742 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
743 constructor and move assignment operator as defaulted.
744 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
745 __uniq_ptr_impl::release().
746 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
747 to __uniq_ptr_impl::reset(pointer).
748 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
749 Check for new __uniq_ptr_data type.
750 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
752 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
754 PR libstdc++/90454.cc path construction from void*
755 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
756 pointers to void are rejected as well as void.
757 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
758 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
760 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
762 * doc/xml/manual/policy_data_structures.xml: Comment out stray
763 <remark> elements. Fix formatting of bibliography references.
765 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
767 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
769 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
771 Remove Profile Mode, deprecated since 7.1.0
772 * doc/Makefile.am: Remove XML file for profile mode docs.
773 * doc/Makefile.in: Regenerate.
774 * doc/xml/authors.xml: Remove authors of profile mode docs.
775 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
777 * doc/xml/manual/debug.xml: Likewise.
778 * doc/xml/manual/evolution.xml: Document removal of profile mode.
779 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
780 * doc/xml/manual/spine.xml: Remove profile mode author credit.
781 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
783 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
785 * doc/html/*: Regenerate.
786 * include/Makefile.am: Remove profile mode headers.
787 * include/Makefile.in: Regenerate.
788 * include/bits/c++config (std::__profile): Remove namespace.
789 [_GLIBCXX_PROFILE]: Remove checks for macro.
790 * include/profile/array: Remove.
791 * include/profile/base.h: Remove.
792 * include/profile/bitset: Remove.
793 * include/profile/deque: Remove.
794 * include/profile/forward_list: Remove.
795 * include/profile/impl/profiler.h: Remove.
796 * include/profile/impl/profiler_algos.h: Remove.
797 * include/profile/impl/profiler_container_size.h: Remove.
798 * include/profile/impl/profiler_hash_func.h: Remove.
799 * include/profile/impl/profiler_hashtable_size.h: Remove.
800 * include/profile/impl/profiler_list_to_slist.h: Remove.
801 * include/profile/impl/profiler_list_to_vector.h: Remove.
802 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
803 * include/profile/impl/profiler_node.h: Remove.
804 * include/profile/impl/profiler_state.h: Remove.
805 * include/profile/impl/profiler_trace.h: Remove.
806 * include/profile/impl/profiler_vector_size.h: Remove.
807 * include/profile/impl/profiler_vector_to_list.h: Remove.
808 * include/profile/iterator_tracker.h: Remove.
809 * include/profile/list: Remove.
810 * include/profile/map: Remove.
811 * include/profile/map.h: Remove.
812 * include/profile/multimap.h: Remove.
813 * include/profile/multiset.h: Remove.
814 * include/profile/ordered_base.h: Remove.
815 * include/profile/set: Remove.
816 * include/profile/set.h: Remove.
817 * include/profile/unordered_base.h: Remove.
818 * include/profile/unordered_map: Remove.
819 * include/profile/unordered_set: Remove.
820 * include/profile/vector: Remove.
821 * scripts/run_doxygen: Do not process profile mode headers.
822 * testsuite/23_containers/array/element_access/60497.cc: Don't use
824 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
825 Remove dg-skip-if for profile mode.
826 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
827 preprocessor check for profile mode.
828 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
829 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
831 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
833 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
834 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
835 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
836 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
837 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
839 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
841 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
843 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
845 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
846 preprocessor check for profile mode.
847 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
849 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
850 Remove dg-skip-if for profile mode.
851 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
852 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
853 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
854 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
855 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
856 * testsuite/Makefile.am: Remove profile_flags variable and
857 * testsuite/Makefile.am: Remove profile_flags variable and
858 check-profile target.
859 * testsuite/Makefile.in: Regenerate.
860 * testsuite/ext/profile/all.cc: Remove.
861 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
862 * testsuite/ext/profile/profiler_algos.cc: Remove.
863 * testsuite/ext/profile/replace_new.cc: Remove.
864 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
865 preprocessor check for profile mode.
866 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
867 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
868 (check_v3_target_normal_mode): Do not check for profile mode macro.
869 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
871 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
872 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
873 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
874 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
875 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
876 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
877 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
878 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
879 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
880 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
882 Remove array_allocator extension, deprecated since 4.9.0
883 * doc/xml/manual/allocator.xml: Remove documentation for
885 * doc/xml/manual/evolution.xml: Document array_allocator removal.
886 * doc/xml/manual/using.xml: Remove header from documentation.
887 * include/Makefile.am: Remove <ext/array_allocator.h> header.
888 * include/Makefile.in: Regenerate.
889 * include/ext/array_allocator.h: Remove.
890 * include/precompiled/extc++.h: Do not include removed header.
891 * testsuite/ext/array_allocator/1.cc: Remove.
892 * testsuite/ext/array_allocator/2.cc: Remove.
893 * testsuite/ext/array_allocator/26875.cc: Remove.
894 * testsuite/ext/array_allocator/3.cc: Remove.
895 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
896 * testsuite/ext/array_allocator/check_delete.cc: Remove.
897 * testsuite/ext/array_allocator/check_new.cc: Remove.
898 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
899 * testsuite/ext/headers.cc: Do not include removed header.
901 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
903 * include/bits/stl_bvector.h
904 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
906 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
908 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
910 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
912 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
914 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
916 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
918 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
920 (_Bit_iterator::operator-(difference_type)): Likewise.
921 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
922 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
924 (_Bit_const_iterator::operator-(difference_type)): Likewise.
925 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
927 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
930 * testsuite/util/thread/all.h: Do not use remove_pointer for
931 std::thread::native_handle_type.
934 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
935 (_Variant_storage<true, Types...>::_M_reset()))
936 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
937 (__get_storage): Likewise.
938 (variant): Add noexcept to friend declarations for __get and
942 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
943 Use _Require for constraints.
944 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
946 (__uniq_ptr_hash): New base class with conditionally-disabled call
948 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
949 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
950 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
952 * include/bits/shared_ptr.h: Improve docs.
953 * include/bits/shared_ptr_base.h: Likewise.
954 * include/bits/stl_uninitialized.h: Likewise.
955 * include/bits/unique_ptr.h: Likewise.
956 * libsupc++/new: Likewise.
958 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
960 * include/bits/stl_deque.h
961 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
963 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
965 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
967 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
969 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
971 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
973 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
975 (_Deque_iterator<>::operator-(difference_type)): Likewise.
977 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
980 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
981 (test01): Reserve for number of insertions to avoid rehash during test.
982 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
984 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
989 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
991 * include/experimental/bits/fs_path.h: Improve docs.
992 * include/experimental/bits/net.h: Fix wrong header name in comment.
993 Do not document implementation details.
994 * include/experimental/netfwd: Fix doxygen grouping.
996 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
998 * include/bits/stl_pair.h: Improve docs.
999 * include/std/tuple: Likewise.
1001 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
1003 * include/std/chrono: Improve docs.
1004 * include/std/ratio: Do not document implementation details.
1005 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
1007 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1010 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
1011 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
1012 (__duration_common_type): New helper.
1013 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
1014 __duration_common_type.
1015 (__timepoint_common_type_wrapper): Replace with ...
1016 (__timepoint_common_type): New helper.
1017 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
1018 Use __time_point_common_type.
1019 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
1020 (__common_type_impl): If either argument is transformed by decay,
1021 use the common_type of the decayed types.
1022 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
1023 decayed, use __do_common_type_impl to get the common_type.
1024 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
1025 (__do_member_type_wrapper, __member_type_wrapper)
1026 (__expanded_common_type_wrapper): Remove.
1027 (__common_type_pack, __common_type_fold): New helpers.
1028 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
1029 __member_type_wrapper and __expanded_common_type_wrapper.
1030 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1031 Test zero-length template argument list.
1032 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1033 Test single argument cases and argument types that should decay.
1034 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1035 Adjust expected error.
1036 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
1038 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1039 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1040 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1042 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
1044 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
1046 Make allocator propagation more consistent for
1047 operator+(basic_string) (P1165R1)
1048 * include/bits/basic_string.h
1049 (operator+(basic_string&&, basic_string&&): Changed resulting
1050 allocator to always be the one from the first parameter.
1051 * include/bits/basic_string.tcc
1052 (operator+(const _CharT*, const basic_string&)): Changed
1053 resulting allocator to be SOCCC on the second parameter's allocator.
1054 (operator+(_CharT, const basic_string&)): Likewise.
1055 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1057 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1060 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
1062 * include/bits/regex.h: Improve docs.
1063 * include/bits/regex.tcc: Do not document implementation details.
1065 * testsuite/19_diagnostics/error_code/hash.cc: New test.
1067 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
1069 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1070 Add type printer for container types in std::__debug namespace.
1071 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
1072 (gdb-tests): Use distinct parameters for the type of test and use of
1074 (gdb-test): Check for regex test even if 'whatis' test.
1075 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
1077 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1078 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1079 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1080 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1081 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1082 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1083 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1085 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
1087 * include/std/system_error (error_category): Fix comment.
1090 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
1091 argument is an empty path.
1092 (absolute(const path&, error_code&)): Use invalid_argument as error
1093 code instead of no_such_file_or_directory.
1094 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
1095 of non-existent paths and empty paths with both overloads of absolute.
1097 * include/std/system_error (error_category, error_code)
1098 (error_condition): Improve docs.
1099 * libsupc++/exception: Add missing @addtogroup Doxygen command.
1100 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
1101 to class documentation. Suppress documentation for implementation
1103 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
1104 Suppress documentation for implementation details.
1106 * include/std/system_error (error_code): Remove friend declaration
1107 for hash<error_code>.
1108 (hash<error_code>::operator()): Use public member functions to access
1110 (hash<error_condition>::operator()): Use address of category, not
1111 its object representation.
1112 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
1113 Use public member functions to access value and category.
1114 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
1116 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
1118 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
1119 * include/bits/hashtable_policy.h
1120 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
1121 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
1122 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
1123 smaller than input value rather than always greater. Preserve
1124 _M_next_resize if called with 0 input. Use __builtin_floorl.
1125 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
1126 elements + number of insertions is greater than _M_next_resize. Start
1127 with 11 buckets if not told otherwise. Use __builtin_floorl.
1128 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
1129 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1130 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
1131 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
1132 told otherwise. Use __builtin_floorl.
1133 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
1134 to also validate _Power2_rehash_policy.
1135 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
1138 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
1141 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
1145 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
1146 overflow warning with -Wpedantic -Wsystem-headers.
1148 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
1151 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
1152 * include/bits/move.h (swap): Remove extra parentheses.
1154 * include/experimental/bits/lfts_config.h: Improve doc markup.
1155 * include/experimental/optional: Improve docs.
1156 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
1157 (__constexpr_addressof): Remove.
1158 (optional::operator->()): Use std::__addressof().
1159 * include/std/optional (optional::operator->()): Adjust whitespace.
1160 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
1161 that operator-> is still constexpr with overloaded operator&. Change
1162 to compile-only test.
1163 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
1166 * include/bits/shared_ptr.h: Improve docs.
1167 * include/bits/shared_ptr_atomic.h: Likewise.
1168 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
1170 * include/bits/basic_string.h: Fix iterator/index confusion in
1172 * include/bits/range_access.h: Fix Doxygen warnings.
1173 * include/bits/refwrap.h: Do not document implementation details.
1174 (ref, cref): Group docs with reference_wrapper.
1175 * include/std/fstream: Fix Doxygen markup.
1176 * libsupc++/initializer_list (begin, end): Group docs with
1179 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
1181 * include/bits/unique_lock.h: Fix/improve doxygen markup.
1182 * include/std/mutex: Likewise.
1183 * include/std/shared_mutex: Likewise.
1185 * include/bits/fs_dir.h: Fix/improve doxygen markup.
1186 * include/bits/fs_fwd.h: Likewise.
1187 * include/bits/fs_ops.h: Likewise.
1188 * include/bits/fs_path.h: Likewise.
1189 * include/std/filesystem: Likewise.
1191 * include/experimental/bits/net.h: Fix/improve doxygen markup.
1192 * include/experimental/buffer: Likewise.
1193 * include/experimental/executor: Likewise.
1194 * include/experimental/internet: Likewise.
1195 * include/experimental/io_context: Likewise.
1196 * include/experimental/net: Likewise.
1197 * include/experimental/netfwd: Likewise.
1198 * include/experimental/socket: Likewise.
1199 * include/experimental/timer: Likewise.
1201 * doc/doxygen/doxygroups.cc: Move description of experimental group
1203 * include/experimental/algorithm: Add to libfund-ts doc group.
1204 * include/experimental/any: Likewise. Do not document implementation
1206 * include/experimental/array: Add to libfund-ts doc group.
1207 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
1208 for Library Fundamentals.
1209 * include/experimental/chrono: Add to libfund-ts doc group.
1210 * include/experimental/deque: Likewise.
1211 * include/experimental/forward_list: Likewise.
1212 * include/experimental/functional: Likewise.
1213 * include/experimental/iterator: Likewise.
1214 * include/experimental/list: Likewise.
1215 * include/experimental/map: Likewise.
1216 * include/experimental/memory: Likewise.
1217 * include/experimental/memory_resource: Likewise. Improve docs.
1219 * include/experimental/numeric: Add to libfund-ts doc group.
1220 * include/experimental/optional: Likewise.
1221 * include/experimental/propagate_const: Likewise.
1222 * include/experimental/random: Likewise.
1223 * include/experimental/ratio: Likewise.
1224 * include/experimental/regex: Likewise.
1225 * include/experimental/set: Likewise.
1226 * include/experimental/source_location: Likewise.
1227 * include/experimental/string: Likewise.
1228 * include/experimental/string_view: Likewise.
1229 * include/experimental/system_error: Likewise.
1230 * include/experimental/tuple: Likewise.
1231 * include/experimental/type_traits: Likewise.
1232 * include/experimental/unordered_map: Likewise.
1233 * include/experimental/unordered_set: Likewise.
1234 * include/experimental/utility: Likewise.
1235 * include/experimental/vector: Likewise.
1236 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
1237 * testsuite/experimental/array/neg.cc: Adjust dg-error.
1238 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
1240 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
1241 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
1242 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
1243 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
1244 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
1246 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
1247 * include/experimental/bits/fs_fwd.h: Improve docs.
1248 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
1249 * include/experimental/bits/fs_path.h: Likewise.
1250 (path, filesystem_error, u8path): Improve docs.
1251 * include/experimental/filesystem: Link to docs for TS.
1253 * config/allocator/new_allocator_base.h (__allocator_base): Add
1254 workaround for Doxygen bug #6945.
1255 * include/std/memory: Improve docs. Define group for pointer safety.
1256 * include/std/scoped_allocator: Improve docs. Use "undocumented"
1257 conditional to suppress documentation for implementation details.
1259 * include/bits/specfun.h: Improve docs.
1260 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
1263 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
1264 (std::experimental): Add docs.
1265 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
1266 namespace to nothing when generating docs.
1267 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
1268 * include/std/chrono (std::chrono): Likewise.
1269 * include/std/functional (std::placeholders): Likewise.
1270 * include/std/thread (std::this_thread): Likewise.
1272 * include/parallel/settings.h: Fix Doxygen markup.
1274 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
1275 anything unless PB_DS_CLASS_C_DEC is defined.
1276 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
1277 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
1278 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
1279 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
1280 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
1281 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
1282 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
1284 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
1285 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
1286 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
1287 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
1288 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
1289 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
1290 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
1291 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
1292 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
1293 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
1294 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
1296 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
1297 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
1299 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
1302 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
1303 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
1304 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
1307 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1309 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
1310 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
1311 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
1312 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
1313 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
1314 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
1316 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
1317 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
1320 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
1323 * include/std/complex (__complex_proj): Return parameter unchanged.
1324 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
1325 floating-point types to take std::complex arguments.
1326 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
1327 floating-point types.
1328 * testsuite/26_numerics/complex/proj.cc: New test.
1330 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1332 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
1333 to _Lock_policyE[012].
1334 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1336 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
1338 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
1339 macros accidentally left in.
1340 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
1341 unnecessary -lstdc++fs option. Fix test for mingw.
1342 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1345 2019-04-30 Jakub Jelinek <jakub@redhat.com>
1347 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1349 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
1351 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
1353 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
1354 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
1357 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
1359 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
1362 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
1363 class template and partial specialization.
1366 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
1368 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
1369 functions to convert a value to an integral type.
1370 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
1371 (fill_n): Convert _Size parameter to an integral type.
1372 * testsuite/25_algorithms/fill_n/87982.cc: New test.
1373 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
1374 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
1375 * testsuite/25_algorithms/generate_n/87982.cc: New test.
1376 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
1377 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
1379 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
1381 Adding noexcept-specification on tuple constructors (LWG 2899)
1382 * libstdc++-v3/include/std/tuple:
1383 (tuple()): Add noexcept-specification.
1384 (tuple(const _Elements&...)): Likewise
1385 (tuple(_UElements&&...)): Likewise
1386 (tuple(const tuple<_UElements...>&)): Likewise
1387 (tuple(tuple<_UElements...>&&)): Likewise
1388 (tuple(const _T1&, const _T2&)): Likewise
1389 (tuple(_U1&&, _U2&&)): Likewise
1390 (tuple(const tuple<_U1, _U2>&): Likewise
1391 (tuple(tuple<_U1, _U2>&&): Likewise
1392 (tuple(const pair<_U1, _U2>&): Likewise
1393 (tuple(pair<_U1, _U2>&&): Likewise
1394 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
1396 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
1399 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
1400 arguments with __restrict.
1402 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1404 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1406 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
1408 * include/experimental/bits/fs_path.h
1409 (path::_S_convert_loc<_InputIterator>): Create const std::string to
1410 avoid redundant call to _S_convert_loc with non-const pointers.
1412 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
1413 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
1414 * testsuite/21_strings/basic_string/hash/hash.cc
1415 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
1416 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
1417 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1419 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
1420 wstring::_M_replace_dispatch with more specific patterns.
1421 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
1422 Create const std::string to avoid redundant call to _S_convert_loc
1423 with non-const pointers.
1424 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
1425 avoid unnecessary basic_string::assign instantiations.
1427 * include/std/memory (__uses_alloc_args): Add string-literal to
1428 static_assert, to match the one in __uses_alloc.
1429 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
1430 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
1431 for recursive uses-allocator construction of nested pairs.
1432 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
1435 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1437 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1438 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1439 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1440 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1442 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1443 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1444 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1445 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1446 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1447 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1448 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1450 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
1453 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
1454 * include/std/scoped_allocator [__cplusplus > 201703L]
1455 (scoped_allocator_adaptor::construct): Define in terms of
1456 uses_allocator_construction_args, as per P0591R4.
1457 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
1458 * testsuite/util/testsuite_allocator.h: Remove name of unused
1461 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
1463 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
1464 * doc/html/*: Regenerate.
1466 * include/bits/fs_path.h (operator<, operator<=, operator>)
1467 (operator>=, operator==, operator!=): Make hidden friends, as per
1469 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
1470 string type in test.
1471 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1473 * include/std/any (any::any(ValueType&&)): Use __and_v.
1474 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
1477 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
1479 * include/std/type_traits (__result_of_memfun): Use remove_reference
1480 instead of __remove_cvref_t and remove redundant is_same check.
1481 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
1483 * include/experimental/string_view (basic_string_view::pointer)
1484 (basic_string_view::reference): Fix to refer to non-const value_type.
1485 * include/bits/basic_string.h (basic_string): Use __sv_check and
1486 __sv_limit instead of basic_string_view::_M_check and
1487 basic_string_view::_M_limit.
1488 * include/std/string_view (__sv_check, __sv_limit): New
1489 helper functions to replace basic_string_view::_M_check and
1490 basic_string_view::_M_limit.
1491 (basic_string_view): Add static assertions to enforce ill-formed
1492 requirement for traits_type::char_type from P1148R0, and to enforce
1493 required properties of char-like types.
1494 (basic_string_view::pointer, basic_string_view::reference): Fix to
1495 refer to non-const value_type.
1496 (basic_string_view::operator[], basic_string_view::at)
1497 (basic_string_view::front, basic_string_view::back)
1498 (basic_string_view::data): Use const_reference and const_pointer
1499 typedefs for return types.
1500 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
1501 (hash<wstring_view>): Fix argument_type typedef.
1502 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1503 char/1.cc: Fix expected return type of basic_string_view::data().
1504 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
1505 wchar_t/1.cc: Likewise.
1506 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1507 char/1.cc: Likewise.
1508 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
1509 wchar_t/1.cc: Likewise.
1510 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
1512 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1513 Check reference and pointer typedefs.
1514 * testsuite/experimental/string_view/requirements/typedefs.cc:
1516 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
1517 Fix expected return type of basic_string_view::data().
1518 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
1520 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
1522 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
1526 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
1527 Avoid a runtime check for types that can never be stored in std::any.
1528 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1531 PR libstdc++/90220 (partial)
1532 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
1533 not attempt ill-formed static_cast to pointers to non-object types.
1534 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
1537 * testsuite/20_util/variant/run.cc: Catch exception by reference to
1538 prevent -Wcatch-value warning.
1540 * include/std/variant (__variant_construct): Use template parameter
1541 type instead of equivalent decltype-specifier.
1542 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
1543 Replace forward with move.
1544 (_Move_ctor_base<false, Types...>::_M_destructive_move)
1545 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
1546 (_Move_ctor_base<true, Types...>::_M_destructive_move)
1547 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
1548 index after construction succeeds.
1549 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
1550 if-constexpr checks that are always true. Use __remove_cvref_t instead
1551 of remove_reference so that is_nothrow_move_constructible check
1552 doesn't use a const rvalue parameter. In the potentially-throwing case
1553 construct a temporary and move assign it, as per LWG 2904.
1554 (_Move_assign_base<false, Types...>::operator=): Remove redundant
1555 if-constexpr checks that are always true. Use emplace as per LWG 2904.
1556 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
1557 construct a temporary and move assign from it, as per LWG 2904.
1558 * testsuite/20_util/variant/exception_safety.cc: Check that
1559 assignment operators have strong exception safety guarantee.
1561 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
1563 Document PSTL linker flags
1565 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
1567 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1569 * include/std/variant (__detail::__variant::_Traits): Make
1570 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
1571 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
1573 (__detail::__variant::_Copy_assign_alias): Only depend on
1574 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
1575 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
1576 move assignment operators.
1579 * include/std/variant (variant::__not_self): New helper for the
1580 is_same_v<remove_cvref_t<T>, variant>==false constraints.
1581 (variant::__to_type_impl): Remove.
1582 (variant::__to_type): Add default argument to check pack size, instead
1583 of using __to_type_impl.
1584 (variant::__accepted_type): Add default argument using __not_self.
1585 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
1586 for variant(T&&) constructor constraint.
1587 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
1588 Extract __accepted_type into a named template parameter for reuse in
1589 other constraints and in the exception specification.
1590 (variant::variant(in_place_type_t<T>, Args&&...))
1591 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
1592 (variant::variant(in_place_index_t<T>, Args&&...))
1593 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
1594 (variant::operator=T&&)): Remove redundant && from trait arguments.
1595 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
1596 isn't used for in_place_type or in_place_index arguments.
1598 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
1599 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
1600 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
1602 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1603 Bernd Edlinger <bernd.edlinger@hotmail.de>
1604 Jakub Jelinek <jakub@redhat.com>
1607 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
1608 general-regs-only target attribute for ARM.
1610 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
1613 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
1614 specialization also depend on is_nothrow_move_constructible.
1615 * include/std/variant (__detail::__variant::__never_valueless()):
1616 Only true if the variant would have a move assignment operator.
1617 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
1618 Check __never_valueless<T...>().
1619 (variant::emplace): Only perform non-throwing move assignments
1620 for never-valueless alternatives if the variant has a move assignment
1622 * testsuite/20_util/variant/compile.cc: Check that never-valueless
1623 types can be emplaced into non-assignable variants.
1624 * testsuite/20_util/variant/run.cc: Check that never-valueless types
1625 don't get copied when emplaced into non-assignable variants.
1627 * include/std/variant (__detail::__variant::__ref_cast): Remove
1629 (__detail::__variant::_Uninitialized::_M_get)
1630 (__detail::__variant::__get)
1631 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
1633 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
1635 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
1637 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1638 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1639 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1640 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1642 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1644 Delegate PSTL configuration to pstl/pstl_config.h
1646 * include/bits/c++config: Remove explicit PSTL configuration
1647 macros and use definitions from <pstl/pstl_config.h>.
1649 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
1651 Cleanup algorithm implementations
1652 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
1654 (mismatch): Forward execution policy.
1655 (equal): Qualify call to std::equal().
1656 (partial_sort): Forward execution policy.
1657 (inplace_merge): Forward execution policy.
1659 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
1661 Improve implementation of parallel equal()
1662 * include/pstl/algorithm_impl.h
1663 (__internal::__brick_equal): use "4 iterator" version of
1665 (__internal::__brick_equal): use simd for random access
1666 iterators on unsequenced execution policies.
1667 (__internal::__pattern_equal): add "4 iterator" version
1668 (__internal::__pattern_equal): dispatch to simd __brick_equal
1669 for vector-only execution policies.
1670 (__internal::__pattern_equal): dispatch to __parallel_or for
1671 parallel execution policies.
1672 * include/pstl/glue_algorithm_impl.h
1673 (std::equal): dispatch to "4 iterator" version of
1674 __internal::__pattern_equal().
1676 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
1679 * include/bits/forward_list.h (operator==): Do not use operator!= to
1681 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1682 earlier in the list, so that sort is stable.
1683 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1684 * testsuite/23_containers/forward_list/comparable.cc: Test with
1685 types that meet the minimum EqualityComparable and LessThanComparable
1686 requirements. Remove irrelevant comment.
1688 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1689 Do not depend on whether all alternative types are move constructible.
1690 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1691 from the operand when deciding whether to perform the assignment.
1692 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1693 with deleted move constructor and deleted move assignment operator.
1694 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1695 behaviour of variants with DeletedMoves as an alternative.
1696 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1697 (move_ctor, move_assign): Check that moving a variant with a
1698 DeletedMoves alternative falls back to copying instead of moving.
1700 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1701 from static_assert declarations.
1703 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1704 actually match its name.
1705 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1706 (test_swap()): Fix result for MoveCtorOnly and check
1707 MoveCtorAndSwapOnly.
1709 * include/std/optional (optional::value_or(U&&) &&): Add missing
1710 constexpr specifier.
1711 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1712 for disengaged optionals and rvalue optionals.
1713 * testsuite/20_util/optional/observers/4.cc: Likewise.
1715 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
1717 * include/pstl/algorithm_impl.h: Uglify identfiers.
1718 * include/pstl/numeric_impl.h: Uglify identfiers.
1719 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1721 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
1723 * include/bits/c++config:
1724 Add definition for __PSTL_ASSERT.
1725 Add definition for __PSTL_ASSERT_MSG.
1726 * include/pstl/algorithm_impl.h: Replace use of assert().
1727 * include/pstl/numeric_impl.h: Replace use of assert().
1728 * include/pstl/parallel_backend_tbb.h:
1729 Replace use of assert().
1730 Replace use of __TBB_ASSERT().
1731 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1733 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
1736 * src/c++17/memory_resource.cc
1737 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1738 needed to allow placing a _Chunk at the end of the buffer.
1739 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1741 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
1743 * doc/xml/faq.xml: Add information about emergency EH pool.
1744 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1745 Move outdated information on mt_allocator to a separate section.
1746 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1747 doesn't affect the default allocator.
1749 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1753 * testsuite/20_util/variant/89851.cc: New test.
1755 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
1757 * include/std/variant: Adjust whitespace. Add comments.
1758 (_Multi_array): Leave primary template undefined.
1759 (_Multi_array<_Tp>): Define partial specialization for base case of
1761 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1762 which is always a reference.
1763 (__gen_vtable::_S_apply()): Remove function, inline body into
1764 default member initializer.
1765 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1767 * include/std/variant (__variant_idx_cookie): Add member type.
1768 (__visitor_result_type): Remove.
1769 (__do_visit): Use invoke_result instead of __visitor_result_type.
1770 * testsuite/20_util/variant/visit.cc: New test.
1773 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1775 * testsuite/20_util/variant/90008.cc: New test.
1777 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
1779 * include/pstl/algorithm_impl.h: Add namespace qualification.
1780 * include/pstl/execution_defs.h: Add namespace qualification.
1781 * include/pstl/execution_impl.h: Add namespace qualification.
1782 * include/pstl/numeric_impl.h: Add namespace qualification.
1783 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1784 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1785 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1787 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1789 Fix visit<R> for variant.
1790 * include/std/variant (__do_visit): Add a template parameter
1791 for enforcing same return types for visit.
1792 (__gen_vtable_impl): Likewise.
1793 (_S_apply_single_alt): Adjust.
1794 (__visit_invoke_impl): New. Handle casting to void.
1795 (__do_visit_invoke): New. Enforces same return types.
1796 (__do_visit_invoke_r): New. Converts return types.
1797 (__visit_invoke): Adjust.
1798 (__gen_vtable): Add a template parameter for enforcing
1799 same return types for visit.
1800 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1801 different return types.
1802 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1803 visitors with different return types don't accidentally
1804 compile with regular visitation.
1806 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1808 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1809 dg-require-filesystem-ts.
1811 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
1813 * doc/xml/manual/status_cxx2020.xml: Update status.
1814 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1815 * testsuite/20_util/variant/visit_r.cc: New test.
1817 * include/bits/fs_dir.h (directory_iterator::operator*)
1818 (directory_iterator::operator->): Add noexcept.
1819 (operator==, operator!=): Replace namespace-scope equality operators
1820 for directory iterators with hidden friends.
1823 * config/abi/pre/gnu.ver: Add missing exports.
1824 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1827 * config/abi/pre/gnu.ver: Export new symbols.
1828 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1829 (recursive_directory_iterator::recursion_pending())
1830 (recursive_directory_iterator::disable_recursion_pending()): Remove
1831 inline definitions. Make noexcept.
1832 (recursive_directory_iterator::depth())
1833 (recursive_directory_iterator::operator*())
1834 (recursive_directory_iterator::operator->()): Make noexcept.
1835 (recursive_directory_iterator::_M_options)
1836 (recursive_directory_iterator::_M_pending): Remove data members.
1837 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1838 (recursive_directory_iterator::recursive_directory_iterator): Remove
1839 ctor-initializer. Use new constructor for _Dir_stack.
1840 (recursive_directory_iterator::options())
1841 (recursive_directory_iterator::recursion_pending())
1842 (recursive_directory_iterator::disable_recursion_pending()): Add
1843 non-inline definitions.
1844 (recursive_directory_iterator::depth()): Make noexcept.
1845 (recursive_directory_iterator::increment(error_code&))
1846 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1847 location of options and recursion_pending members.
1848 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1849 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1850 user-declared move constructor and assignment operator, to make the
1853 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1854 d_type == DT_UNKNOWN immediately.
1855 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1857 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1859 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1861 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1862 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1865 PR libstdc++/87431 (again)
1866 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1867 Define partial specialization for basic_string.
1868 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1869 shared_ptr and weak_ptr.
1870 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1872 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1874 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1876 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1878 * include/std/any (_Never_valueless_alt): Define explicit
1879 specialization for any.
1880 * include/std/variant (_Never_valueless_alt): Define primary template.
1881 (__never_valueless): Use _Never_valueless_alt instead of
1882 is_trivially_copyable.
1883 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1884 initializations to avoid try-catch overhead. Add special case for
1885 scalars produced by potentially-throwing conversions. Use
1886 _Never_valueless_alt instead of is_trivially_copyable for the
1887 remaining strong exception-safety cases.
1888 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1889 * testsuite/20_util/variant/87431.cc: Run both test functions.
1890 * testsuite/20_util/variant/exception_safety.cc: New test.
1891 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1892 so the variant becomes valueless.
1894 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
1897 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1899 (variant::emplace<_Tp>): Return result of emplace<N> directly.
1901 * include/std/string (__hash_string_base): New class template defining
1902 operator() for hashing strings.
1903 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1904 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1905 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1906 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1908 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1910 Use single-visitation in variant assignment and swap and relops.
1911 Also use indices instead of types when checking whether
1912 variants hold the same thing.
1913 * include/std/variant (__do_visit): Add a template parameter
1914 for index visitation, invoke with indices if index visitation
1916 (__variant_idx_cookie): New.
1917 (__visit_with_index): Likewise.
1918 (_Copy_assign_base::operator=): Do single-visitation with
1920 (_Move_assign_base::operator=): Likewise.
1921 (_Extra_visit_slot_needed): Adjust.
1922 (__visit_invoke): Call with indices if it's an index visitor.
1923 (relops): Do single-visitation with an index visitor.
1925 (__visitor_result_type): New.
1927 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1929 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1931 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1933 Don't revisit a variant we are already visiting.
1934 * include/std/variant (__variant_construct_single): New.
1935 (__variant_construct): Use it.
1936 (_M_destructive_move): Likewise.
1937 (_M_destructive_copy): Likewise.
1938 (_Copy_assign_base::operator=): Adjust.
1939 (_Move_assign_base::operator=): Likewise.
1942 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
1945 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1946 destructor so they are not evaluated until the _Key type is complete.
1947 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1948 * testsuite/23_containers/set/85965.cc: New test.
1949 * testsuite/23_containers/unordered_set/85965.cc: New test.
1950 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1951 with regexp matching the corresponding _Rb_tree specialization.
1952 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1953 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1954 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1955 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1956 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1957 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1958 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1960 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1963 Fix based on a suggestion by Antony Polukhin.
1964 * include/std/variant (__never_valueless): New.
1966 (_Extra_visit_slot_needed): New.
1967 (_Multi_array): Use it.
1968 (_S_apply_all_alts): Likewise.
1970 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1973 Fix based on a suggestion by Antony Polukhin.
1974 * include/std/variant (__gen_vtable): Don't reserve an
1975 additional table slot, _Multi_array already does that.
1977 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1980 Fix based on a suggestion by Antony Polukhin.
1981 * include/std/variant (__variant_construct): Capture a pointer
1982 to the storage and visit just one variant.
1984 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
1986 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1987 Doxygen-generated pages with unstable URL.
1988 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1989 * doc/xml/manual/extensions.xml: Likewise.
1990 * doc/xml/manual/parallel_mode.xml: Likewise.
1991 * doc/xml/manual/support.xml: Likewise.
1993 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1994 avoid -Wconversion warnings.
1996 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
1998 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1999 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
2000 (allstamped): Add stamp-pstl.
2001 (install-headers): Add ptsl_builddir.
2002 * include/Makefile.in: Regenerate.
2003 * include/bits/c++config: Add pstl configuration.
2004 * include/pstl/LICENSE.txt: New file.
2005 * include/pstl/algorithm_fwd.h: New file.
2006 * include/pstl/algorithm_impl.h: New file.
2007 * include/pstl/execution_defs.h: New file.
2008 * include/pstl/execution_impl.h: New file.
2009 * include/pstl/glue_algorithm_defs.h: New file.
2010 * include/pstl/glue_algorithm_impl.h: New file.
2011 * include/pstl/glue_execution_defs.h: New file.
2012 * include/pstl/glue_memory_defs.h: New file.
2013 * include/pstl/glue_memory_impl.h: New file.
2014 * include/pstl/glue_numeric_defs.h: New file.
2015 * include/pstl/glue_numeric_impl.h: New file.
2016 * include/pstl/memory_impl.h: New file.
2017 * include/pstl/numeric_fwd.h: New file.
2018 * include/pstl/numeric_impl.h: New file.
2019 * include/pstl/parallel_backend.h: New file.
2020 * include/pstl/parallel_backend_tbb.h: New file.
2021 * include/pstl/parallel_backend_utils.h: New file.
2022 * include/pstl/parallel_impl.h: New file.
2023 * include/pstl/pstl_config.h: New file.
2024 * include/pstl/unseq_backend_simd.h: New file.
2025 * include/pstl/utils.h: New file.
2026 * include/std/algorithm: Include parallel algorithm implementations.
2027 * include/std/execution: New file.
2028 * include/std/memory: Include parallel algorithm implementations.
2029 * include/std/numeric: Include parallel algorithm implementations.
2030 * include/std/version: Add parallel algorithms feature test macro.
2031 * testsuite/util/pstl/pstl_test_config.h: New file.
2032 * testsuite/util/pstl/test_utils.h: New file.
2033 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2034 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2035 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2036 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2037 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2038 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2039 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2040 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2041 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2042 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2043 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2044 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2045 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2046 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2047 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2048 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2049 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2050 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2051 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2052 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2053 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2054 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2055 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2056 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2057 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2058 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2059 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2060 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2061 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2062 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2063 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2064 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2065 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2066 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2067 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2068 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2069 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2070 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2071 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2072 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2073 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2074 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2075 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2076 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2077 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2078 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2079 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2080 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2081 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2082 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2083 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2084 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2085 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2086 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
2087 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
2088 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
2089 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
2090 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
2091 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
2092 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
2093 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
2094 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
2095 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
2096 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
2097 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
2098 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
2099 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
2100 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
2101 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
2102 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
2103 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
2104 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
2105 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
2106 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
2107 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
2108 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
2109 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
2110 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
2111 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
2112 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
2113 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
2114 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
2115 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
2116 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
2117 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
2118 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
2119 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
2120 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
2121 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
2122 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
2123 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
2124 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
2125 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
2126 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
2127 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
2128 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
2129 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
2130 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
2131 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
2132 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
2133 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
2134 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
2135 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
2136 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
2137 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
2138 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
2140 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
2142 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
2143 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
2144 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
2145 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
2146 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
2147 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
2148 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
2149 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
2150 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
2151 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
2152 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
2153 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
2154 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
2155 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
2156 when the special functions IS is enabled, not for C++17.
2157 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
2159 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
2160 without checks for special functions in C++17.
2161 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2165 * include/backward/hash_map: Use <> for includes not "".
2166 * include/backward/hash_set: Likewise.
2167 * include/backward/strstream: Likewise.
2168 * include/tr1/bessel_function.tcc: Likewise.
2169 * include/tr1/exp_integral.tcc: Likewise.
2170 * include/tr1/legendre_function.tcc: Likewise.
2171 * include/tr1/modified_bessel_func.tcc: Likewise.
2172 * include/tr1/riemann_zeta.tcc: Likewise.
2174 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
2176 * doc/xml/manual/allocator.xml: Link to table documenting evolution
2177 of extension allocators.
2178 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
2179 Document new headers in 7.2, 8.1 and 9.1 releases.
2180 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
2181 * doc/html/*: Regenerate.
2183 2019-03-12 John David Anglin <dave.anglin@bell.net>
2186 * testsuite/lib/libstdc++.exp: Locate libatomic.
2187 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
2188 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
2190 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2191 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2192 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2193 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2195 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
2198 * configure.ac: Check for sockatmark.
2199 * crossconfig.m4: Check for sockatmark.
2200 * config.h.in: Regenerate.
2201 * configure: Regenerate.
2202 * include/experimental/internet (address_v4::_S_hton): Rename
2203 overloaded functions to _S_hton_16 and _S_ntoh_16.
2204 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
2205 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
2206 * include/experimental/socket (basic_socket::at_mark): Check
2207 _GLIBCXX_HAVE_SOCKATMARK.
2209 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
2210 const variables instead of macros.
2213 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
2214 Use correct type for len_aligned.
2215 * testsuite/20_util/hash/89629.cc: New test.
2217 2019-03-11 Jakub Jelinek <jakub@redhat.com>
2220 * include/std/atomic (atomic<T>::store, atomic<T>::load,
2221 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
2222 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
2223 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
2224 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
2225 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
2226 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
2227 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
2228 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
2229 memory_order_seq_cst to int.
2231 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
2233 * doc/xml/manual/using.xml: Use link element instead of xref.
2234 * doc/html/*: Regenerate.
2236 * include/bits/fs_path.h (path::format): Add fixed underlying type.
2238 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
2241 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
2242 parameters in deduction guides.
2243 * include/debug/multimap.h (multimap): Likewise.
2244 * include/debug/set.h (multimap): Likewise.
2245 * include/debug/multiset.h (multimap): Likewise.
2246 * include/debug/unordered_map (unordered_map): Likewise.
2247 (unordered_multimap): Likewise.
2248 * include/debug/unordered_set (unordered_set): Likewise.
2249 (unordered_multiset): Likewise.
2252 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
2253 Invalidate all iterators in case of rehash.
2254 (unordered_multimap<>::_M_check_rehashed): Likewise.
2255 * include/debug/unordered_set
2256 (unordered_set<>::_M_check_rehashed): Likewise.
2257 (unordered_multiset<>::_M_check_rehashed): Likewise.
2258 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
2260 2019-03-07 Andreas Schwab <schwab@suse.de>
2262 * config/abi/post/riscv64-linux-gnu: New directory.
2263 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
2265 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
2267 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
2268 compile test to run. Fix typo.
2270 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
2271 * doc/html/*: Regenerate.
2273 P0356R5 Simplified partial function application
2274 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
2275 helpers for bind_front.
2276 (bind_front, __cpp_lib_bind_front): Define.
2277 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
2279 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2281 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
2282 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
2283 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
2284 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2286 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
2288 PR libstdc++/86655 - std::assoc_legendre should not constrain
2289 the value of m (or x).
2290 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
2291 __sph_legendre): If degree > order Don't throw, return 0.
2292 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
2293 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
2294 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
2295 * testsuite/tr1/5_numerical_facilities/special_functions/
2296 02_assoc_legendre/pr86655.cc: New test.
2297 * testsuite/tr1/5_numerical_facilities/special_functions/
2298 22_sph_legendre/pr86655.cc: New test.
2300 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2303 Also PR libstdc++/85517
2304 * include/std/variant (__do_visit): New.
2305 (__variant_cast): Likewise.
2306 (__variant_cookie): Likewise.
2307 (__erased_*): Remove.
2308 (_Variant_storage::_S_vtable): Likewise.
2309 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
2310 (_Variant_storage::__M_reset): Adjust.
2311 (__variant_construct): New.
2312 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
2313 __variant_construct.
2314 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
2315 (_Move_ctor_base::__M_destructive_copy): New.
2316 (_Move_ctor_base::__M_destructive_move): Adjust to use
2317 __variant_construct.
2318 (_Copy_assign_base::operator=): Adjust to use __do_visit.
2319 (_Copy_assign_alias): Adjust to check both copy assignment
2320 and copy construction for triviality.
2321 (_Move_assign_base::operator=): Adjust to use __do_visit.
2322 (_Multi_array): Add support for visitors that accept and return
2324 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
2325 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
2326 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
2327 a __variant_cookie temporary for a variant that is valueless and..
2328 (__gen_vtable_impl::__visit_invoke): ..adjust here.
2329 (__gen_vtable::_Array_type): Conditionally make space for
2330 the __variant_cookie visitor case.
2331 (__variant_construct_by_index): New.
2332 (get_if): Adjust to use std::addressof.
2333 (relops): Adjust to use __do_visit.
2334 (variant): Add __variant_cast and __variant_construct_by_index
2336 (variant::emplace): Use _M_reset() and __variant_construct_by_index
2337 instead of self-destruction.
2338 (variant::swap): Adjust to use __do_visit.
2339 (visit): Reimplement in terms of __do_visit.
2340 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
2341 * testsuite/20_util/variant/compile.cc: Adjust.
2342 * testsuite/20_util/variant/run.cc: Likewise.
2344 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
2346 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
2348 * testsuite/experimental/feat-char8_t.cc: Likewise.
2350 * include/std/type_traits [C++20] (is_bounded_array)
2351 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
2353 * testsuite/20_util/is_bounded_array/requirements/
2354 explicit_instantiation.cc: New test.
2355 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
2357 * testsuite/20_util/is_bounded_array/value.cc: New test.
2358 * testsuite/20_util/is_unbounded_array/requirements/
2359 explicit_instantiation.cc: New test.
2360 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
2362 * testsuite/20_util/is_unbounded_array/value.cc: New test.
2364 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
2366 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
2368 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
2370 * include/c_compatibility/math.h [C++20] (lerp): Add using
2372 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
2373 (__lerp): Define function template to implement lerp.
2374 (lerp(float, float, float), lerp(double, double, double))
2375 (lerp(long double, long double, long double)): Define for C++20.
2376 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
2377 (midpoint(T, T), midpoint(T*, T*)): Define.
2378 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
2379 * testsuite/26_numerics/lerp.cc: New test.
2380 * testsuite/26_numerics/midpoint/floating.cc: New test.
2381 * testsuite/26_numerics/midpoint/integral.cc: New test.
2382 * testsuite/26_numerics/midpoint/pointer.cc: New test.
2384 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
2386 PR libstdc++/88996 Implement P0439R0
2387 Make std::memory_order a scoped enumeration.
2388 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
2389 add variables for the old enumerators. Adjust calls.
2390 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
2391 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
2393 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
2395 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
2398 * include/std/memory_resource (polymorphic_allocator): Add default
2399 template argument for C++20.
2400 (polymorphic_allocator::allocate_bytes)
2401 (polymorphic_allocator::deallocate_bytes)
2402 (polymorphic_allocator::allocate_object)
2403 (polymorphic_allocator::deallocate_object)
2404 (polymorphic_allocator::new_object)
2405 (polymorphic_allocator::delete_object): New member functions for
2407 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
2410 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
2413 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
2416 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
2418 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
2419 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
2421 * include/std/memory (uses_allocator_construction_args): New set of
2422 overloaded functions.
2423 (make_obj_using_allocator, uninitialized_construct_using_allocator):
2425 * include/std/memory_resource (polymorphic_allocator::construct)
2426 [__cplusplus > 201703l]: Replace all overloads with a single function
2427 using uses_allocator_construction_args.
2428 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
2430 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
2432 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
2435 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
2436 stylesheet directories before check for xsltproc. Try to use
2437 xmlcatalog to find local stylesheet directory before trying hardcoded
2438 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
2439 check to look for the same stylesheet as doc/Makefile.am uses. Don't
2440 use xsltproc if xmlcatalog fails to find a local stylesheet.
2441 * configure.ac: Check for xmlcatalog.
2442 * Makefile.in: Regenerate.
2443 * configure: Likewise.
2444 * doc/Makefile.in: Likewise.
2445 * include/Makefile.in: Likewise.
2446 * libsupc++/Makefile.in: Likewise.
2447 * po/Makefile.in: Likewise.
2448 * python/Makefile.in: Likewise.
2449 * src/Makefile.in: Likewise.
2450 * src/c++11/Makefile.in: Likewise.
2451 * src/c++17/Makefile.in: Likewise.
2452 * src/c++98/Makefile.in: Likewise.
2453 * src/filesystem/Makefile.in: Likewise.
2454 * testsuite/Makefile.in: Likewise.
2456 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
2459 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
2460 container deduction guides.
2461 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
2462 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
2463 parameters in deduction guides.
2464 * include/bits/stl_multimap.h (multimap): Likewise.
2465 * include/bits/stl_multiset.h (multiset): Likewise.
2466 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
2467 * include/bits/stl_set.h (set): Likewise.
2468 * include/bits/stl_stack.h (stack): Likewise.
2469 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
2470 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
2471 constrain parameters in deduction guides.
2472 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
2474 * testsuite/23_containers/map/cons/deduction.cc: Test additional
2476 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2477 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2478 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
2479 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2481 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2483 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
2486 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
2487 to class template and partial specialization using void_t.
2488 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2490 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
2493 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
2494 copy and move members public.
2496 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
2498 * include/std/type_traits (__underlying_type_impl): New helper to
2499 make underlying_type SFINAE-friendly.
2500 (underlying_type): Derive from __underlying_type_impl.
2501 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
2505 * include/bits/char_traits.h (__constant_char_array): Check index is
2506 in range before dereferencing.
2507 (char_traits<char>::compare, char_traits<char>::find)
2508 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
2509 immediately if n is zero.
2510 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
2511 Remove workarounds for PR 67026.
2512 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
2514 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
2517 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2519 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
2520 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2522 2019-02-22 Jakub Jelinek <jakub@redhat.com>
2525 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
2526 type to std::size_t and argument to type to long double.
2528 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
2530 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
2531 * config/abi/post/sparc64-linux-gnu: New directory.
2532 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
2533 * config/abi/post/sparc64-linux-gnu/32: New directory.
2534 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
2536 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2538 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
2539 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
2542 2019-02-22 Tom Honermann <tom@honermann.net>
2544 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
2545 printers for u8string and u8string_view.
2547 2019-02-22 Tom Honermann <tom@honermann.net>
2549 * testsuite/18_support/byte/ops.cc: Validate
2550 std::to_integer<char8_t>, std::to_integer<char16_t>, and
2551 std::to_integer<char32_t>.
2552 * testsuite/18_support/numeric_limits/dr559.cc: Validate
2553 std::numeric_limits<char8_t>.
2554 * testsuite/18_support/numeric_limits/lowest.cc: Validate
2555 std::numeric_limits<char8_t>::lowest().
2556 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
2557 std::numeric_limits<char8_t>::max_digits10.
2558 * testsuite/18_support/type_info/fundamental.cc: Validate
2559 typeinfo for char8_t.
2560 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
2561 std::from_chars with char8_t.
2562 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
2563 Validate explicit instantiation of std::hash<char8_t>.
2564 * testsuite/20_util/is_integral/value.cc: Validate
2565 std::is_integral<char8_t>.
2566 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
2567 Validate std::make_signed<char8_t>.
2568 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2569 Validate u8string construction from char8_t sources.
2570 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
2572 * testsuite/21_strings/basic_string_view/operations/compare/
2573 char/70483.cc: Validate substr operations on u8string_view.
2574 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
2575 the u8string_view typedef is defined.
2576 * testsuite/21_strings/char_traits/requirements/
2577 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
2579 * testsuite/21_strings/char_traits/requirements/
2580 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
2581 constexpr member functions.
2582 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
2583 that the u8string typedef is defined.
2584 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
2585 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
2586 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
2587 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
2589 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2590 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
2592 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2593 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2594 Validate std::atomic<char8_t>::is_always_lock_free
2595 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
2596 Update line numbers.
2597 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
2599 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
2601 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2602 Validate std::experimental::pmr::u8string.
2603 * testsuite/experimental/string_view/typedefs.cc: Validate that the
2604 u8string_view typedef is defined.
2605 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
2606 char32_t to the typelists.
2608 2019-02-22 Tom Honermann <tom@honermann.net>
2610 * include/ext/typelist.h: Constrain a partial specialization of
2611 typelist::detail::append_ to only match chain<T1,T2>.
2613 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
2616 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
2617 class template with class. Replace move and copy member types with
2618 member alias templates, so they are only instantiated when needed.
2619 (__is_copy_insertable, __is_move_insertable): Adjust base class.
2620 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
2621 test for C++11/14/17 as well.
2622 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
2625 2019-02-20 Jakub Jelinek <jakub@redhat.com>
2628 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
2629 _GLIBCXX_PURE to the alias declaration.
2631 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
2633 * testsuite/21_strings/basic_string/literals/types.cc
2634 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
2635 * testsuite/21_strings/basic_string/literals/values.cc
2636 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2637 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
2638 potentially having different type.
2639 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2640 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
2642 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
2643 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2644 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
2645 string literals only using basic character set.
2646 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
2647 u8 literals to char.
2648 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
2649 Test ATOMIC_CHAR8_T_LOCK_FREE.
2650 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
2651 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
2652 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
2653 * testsuite/experimental/string_view/literals/types.cc
2654 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
2656 * testsuite/experimental/string_view/literals/values.cc
2657 [_GLIBCXX_USE_CHAR8_T]: Likewise.
2659 2019-02-19 Tom Honermann <tom@honermann.net>
2661 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
2662 from char16_32_t.cc; validates numeric_limits<char8_t>.
2663 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
2664 test cloned from types.cc; validates operator""s for char8_t
2666 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
2667 test cloned from values.cc; validates construction and comparison
2669 * testsuite/21_strings/basic_string/requirements/
2670 /explicit_instantiation/char8_t/1.cc: New test cloned from
2671 char16_t/1.cc; validates explicit instantiation of
2672 basic_string<char8_t>.
2673 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2674 New test cloned from types.cc; validates operator""sv for char8_t
2675 returns u8string_view.
2676 * testsuite/21_strings/basic_string_view/literals/
2677 values-char8_t.cc: New test cloned from values.cc; validates
2678 construction and comparison of u8string_view values.
2679 * testsuite/21_strings/basic_string_view/requirements/
2680 explicit_instantiation/char8_t/1.cc: New test cloned from
2681 char16_t/1.cc; validates explicit instantiation of
2682 basic_string_view<char8_t>.
2683 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2684 New test cloned from char16_t/65049.cc; validates that
2685 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2686 * testsuite/21_strings/char_traits/requirements/char8_t/
2687 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2688 that char_traits<char8_t> member typedefs are present and correct.
2689 * testsuite/21_strings/char_traits/requirements/
2690 explicit_instantiation/char8_t/1.cc: New test cloned from
2691 char16_t/1.cc; validates explicit instantiation of
2692 char_traits<char8_t>.
2693 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2694 from char16_t.cc: validates
2695 codecvt<char16_t, char8_t, mbstate_t>.
2696 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2697 from char32_t.cc: validates
2698 codecvt<char32_t, char8_t, mbstate_t>.
2699 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2700 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2701 codecvt<char32_t, char8_t, std::mbstate_t>.
2702 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2703 test cloned from string.cc; validates filesystem::path construction
2705 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2706 the __cpp_lib_char8_t feature test macro is defined with the
2708 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2709 New test cloned from string.cc; validates filesystem::path
2710 construction from char8_t input.
2711 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2712 test cloned from types.cc; validates operator""sv for char8_t
2713 returns u8string_view.
2714 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2715 New test cloned from values.cc; validates construction and
2716 comparison of u8string_view values.
2717 * testsuite/experimental/string_view/requirements/
2718 explicit_instantiation/char8_t/1.cc: New test cloned from
2719 char16_t/1.cc; validates explicit instantiation of
2720 basic_string_view<char8_t>.
2721 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2722 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2725 2019-02-19 Tom Honermann <tom@honermann.net>
2727 P0482R5 char8_t: Standard library support
2728 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2729 typeinfo symbols for char8_t.
2730 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2731 (GLIBCXX_3.4.26): Add symbols for specializations of
2732 numeric_limits and codecvt that involve char8_t.
2733 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2734 * include/bits/atomic_base.h: Add atomic_char8_t.
2735 * include/bits/basic_string.h: Add std::hash<u8string> and
2736 operator""s(const char8_t*, size_t).
2737 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2739 * include/bits/char_traits.h: Add char_traits<char8_t>.
2740 * include/bits/codecvt.h: Add
2741 codecvt<char16_t, char8_t, mbstate_t>,
2742 codecvt<char32_t, char8_t, mbstate_t>,
2743 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2744 codecvt_byname<char32_t, char8_t, mbstate_t>.
2745 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2746 recognize char8_t as an integral type.
2747 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2749 (path::u8string): Return std::u8string when char8_t support is
2751 (path::generic_u8string): Likewise.
2752 (path::_S_convert): Handle conversion from char8_t input.
2753 (path::_S_str_convert): Likewise.
2754 * include/bits/functional_hash.h: Add hash<char8_t>.
2755 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2757 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2758 for new char8_t specializations.
2759 * include/bits/localefwd.h: Add missing declarations of
2760 codecvt<char16_t, char, mbstate_t> and
2761 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2762 codecvt<char16_t, char8_t, mbstate_t> and
2763 codecvt<char32_t, char8_t, mbstate_t>.
2764 * include/bits/postypes.h: Add u8streampos
2765 * include/bits/stringfwd.h: Add declarations of
2766 char_traits<char8_t> and u8string.
2767 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2768 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2770 (path::u8string): Return std::u8string when char8_t support is
2772 (path::generic_u8string): Likewise.
2773 (path::_S_convert): Handle conversion from char8_t input.
2774 (path::_S_str_convert): Likewise.
2775 * include/experimental/string: Add u8string.
2776 * include/experimental/string_view: Add u8string_view,
2777 hash<experimental::u8string_view>, and
2778 operator""sv(const char8_t*, size_t).
2779 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2780 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2781 as a character type.
2782 * include/std/limits: Add numeric_limits<char8_t>.
2783 * include/std/string_view: Add u8string_view,
2784 hash<experimental::u8string_view>, and
2785 operator""sv(const char8_t*, size_t).
2786 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2787 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2788 * libsupc++/atomic_lockfree_defines.h: Define
2789 ATOMIC_CHAR8_T_LOCK_FREE.
2790 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2791 codecvt.cc and limits.cc so that char8_t specializations of
2792 numeric_limits and codecvt and emitted.
2793 * src/c++11/Makefile.in: Likewise.
2794 * src/c++11/codecvt.cc: Define members of
2795 codecvt<char16_t, char8_t, mbstate_t>,
2796 codecvt<char32_t, char8_t, mbstate_t>,
2797 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2798 codecvt_byname<char32_t, char8_t, mbstate_t>.
2799 * src/c++11/limits.cc: Define members of
2800 numeric_limits<char8_t>.
2801 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2802 locale_init.cc and localename.cc.
2803 * src/c++98/Makefile.in: Likewise.
2804 * src/c++98/locale_init.cc: Add initialization for the
2805 codecvt<char16_t, char8_t, mbstate_t> and
2806 codecvt<char32_t, char8_t, mbstate_t> facets.
2807 * src/c++98/localename.cc: Likewise.
2808 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2810 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2812 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2813 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2814 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2816 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
2818 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2819 * doc/html/*: Regenerate.
2821 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2822 * doc/html/*: Regenerate.
2824 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2825 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2826 allocator type in is_constructible checks.
2827 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2828 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2829 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2830 problematic type from LWG 2586 discussion.
2831 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2832 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2834 * configure.ac: Check for C11 timespec_get function.
2835 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2837 * config.h.in: Regenerate.
2838 * configure: Regenerate.
2839 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2840 std for C++17 and up.
2842 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2843 * include/bits/stl_queue.h
2844 (priority_queue(const Compare&, const Container&, const Alloc&))
2845 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2847 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2849 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2850 * include/bits/stl_queue.h (queue, priority_queue): Add static
2851 assertions to enforce LWG 2566 requirement on value_type.
2852 * include/bits/stl_stack.h (stack): Likewise.
2855 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2857 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2858 * include/bits/std_abs.h: Add comment about LWG 2735.
2859 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2861 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
2864 * include/std/version [__cpp_impl_destroying_delete]
2865 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2866 * libsupc++/new [__cpp_impl_destroying_delete]
2867 (__cpp_lib_destroying_delete): Likewise.
2868 (destroying_delete_t, destroying_delete): Likewise, but define even
2869 when __cpp_impl_destroying_delete is not defined.
2870 * testsuite/18_support/destroying_delete.cc: New test.
2872 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
2875 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2876 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2877 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2878 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2880 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
2883 * include/bits/fs_path.h (path::has_root_name)
2884 (path::has_root_directory, path::has_root_path)
2885 (path::has_relative_path, path::has_parent_path)
2886 (path::has_filename, path::has_stem, path::has_extension)
2887 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2889 * src/c++17/fs_path.cc (path::has_root_name)
2890 (path::has_root_directory, path::has_root_path)
2891 (path::has_relative_path, path::has_parent_path)
2892 (path::has_filename, path::_M_find_extension): Add noexcept.
2894 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
2896 PR libstdc++/89102 (partial)
2897 * include/std/type_traits (common_type<>): Define.
2898 (common_type<T>): Derive from common_type<T, T>.
2899 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2900 Test zero-length template argument list.
2901 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2902 Test additional single argument cases.
2903 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2904 Adjust expected error.
2906 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
2909 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2911 * include/bits/stl_stack.h (stack): Likewise.
2912 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2913 * testsuite/23_containers/queue/deduction.cc: New test.
2914 * testsuite/23_containers/stack/deduction.cc: New test.
2917 * include/std/type_traits (__is_convertible_helper)
2918 (__is_convertible_helper<_From, _To, false>): Revert changes to
2919 support is_nothrow_convertible.
2920 (__is_nt_convertible_helper): New helper.
2921 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2923 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2924 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2927 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2928 __is_alloc_insertable_impl. Replace single type member with two
2929 members, one for each of copy and move insertable.
2930 (__is_move_insertable): New trait for internal use.
2931 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2932 (vector::_S_nothrow_relocate(true_type)): New functions to
2933 conditionally check if __relocate_a can throw.
2934 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2935 on __is_move_insertable.
2936 (vector::_S_do_relocate): New overloaded functions to conditionally
2938 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2939 based on _S_use_relocate.
2940 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2941 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2942 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2945 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2946 parameter unnamed. Add message to static assertion.
2947 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2948 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2951 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
2954 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2956 (__is_bitwise_relocatable): ... to this.
2957 (__relocate_a_1): Adapt.
2958 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2959 (__is_bitwise_relocatable): ... to this.
2961 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
2964 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2965 final component as well as from _M_pathname. Append the dot using
2966 operator+= instead of only to _M_pathname.
2967 (path::_M_find_extension): Reformat slightly.
2968 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2969 Add more test cases.
2971 2019-01-30 Ulrich Drepper <drepper@redhat.com>
2973 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2975 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
2977 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2978 constexpr specifiers from arg and proj.
2980 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2981 __shared_ptr instantiations used by gcc4-compatible ABI.
2983 * include/experimental/forward_list (experimental::erase): Qualify
2985 * include/experimental/list (experimental::erase): Likewise.
2986 * include/std/forward_list (std::erase): Likewise.
2987 * include/std/list (std::erase): Likewise.
2989 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2991 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2992 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2993 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2994 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2995 * testsuite/ext/array_allocator/26875.cc: Likewise.
2996 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2997 * testsuite/util/replacement_memory_operators.h: Likewise.
2998 * testsuite/util/testsuite_allocator.h: Likewise.
3000 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
3001 normal mode vector, even for debug mode.
3002 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
3003 Define alias template for normal mode vector.
3005 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
3008 * config/locale/generic/c_locale.h (__convert_from_v)
3009 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3010 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3011 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
3012 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
3014 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
3017 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
3018 data member with static member function _S_use_relocate().
3019 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3020 (vector::_M_default_append): Use _S_use_relocate() instead of
3023 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
3026 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
3029 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
3030 write to stderr instead of using printf.
3032 2019-01-21 Jakub Jelinek <jakub@redhat.com>
3035 * include/bits/char_traits.h (__constant_string_p,
3036 __constant_char_array_p): Use __builtin_is_constant_evaluated if
3039 2019-01-20 Ulrich Drepper <drepper@redhat.com>
3041 Implement C++20 P0600r1.
3042 * include/backward/hash_map: Add nodiscard attribute to empty.
3043 * include/backward/hash_set: Likewise.
3044 * backward/hashtable.h: Likewise.
3045 * include/bits/basic_string.h: Likewise.
3046 * include/bits/forward_list.h: Likewise.
3047 * include/bits/hashtable.h: Likewise.
3048 * include/bits/regex.h: Likewise.
3049 * include/bits/stl_deque.h: Likewise.
3050 * include/bits/stl_list.h: Likewise.
3051 * include/bits/stl_map.h: Likewise.
3052 * include/bits/stl_multimap.h: Likewise.
3053 * include/bits/stl_multiset.h: Likewise.
3054 * include/bits/stl_queue.h: Likewise.
3055 * include/bits/stl_set.h: Likewise.
3056 * include/bits/stl_stack.h: Likewise.
3057 * include/bits/stl_tree.h: Likewise.
3058 * include/bits/stl_vector.h: Likewise.
3059 * include/bits/unordered_map.h: Likewise.
3060 * include/bits/unordered_set.h: Likewise.
3061 * include/debug/array: Likewise.
3062 * include/experimental/any: Likewise.
3063 * include/experimental/bits/fs_path.h: Likewise.
3064 * include/experimental/internet: Likewise.
3065 * include/experimental/string_view: Likewise.
3066 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
3068 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
3070 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
3072 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
3074 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
3076 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
3078 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
3080 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
3082 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3083 info_fn_imps.hpp: Likewise.
3084 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
3085 left_child_next_sibling_heap_.hpp: Likewise.
3086 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
3088 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
3090 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
3092 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
3094 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
3096 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
3098 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
3100 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
3101 * include/ext/pb_ds/trie_policy.hpp: Likewise.
3102 * include/ext/rope: Likewise.
3103 * include/ext/slist: Likewise.
3104 * include/ext/vstring.h: Likewise.
3105 * include/profile/array: Likewise.
3106 * include/std/array: Likewise.
3107 * include/tr1/array: Likewise.
3108 * include/tr1/hashtable.h: Likewise.
3109 * include/tr1/regex: Likewise.
3110 * include/tr2/dynamic_bitset: Likewise.
3111 * include/bits/alloc_traits.h: Add nodiscard attribute to
3113 * include/experimental/memory_resource: Likewise.
3114 * include/ext/alloc_traits.h: Likewise.
3115 * include/ext/array_allocator.h: Likewise.
3116 * include/ext/bitmap_allocator.h: Likewise.
3117 * include/ext/debug_allocator.h: Likewise.
3118 * include/ext/extptr_allocator.h: Likewise.
3119 * include/ext/mt_allocator.h: Likewise.
3120 * include/ext/new_allocator.h: Likewise.
3121 * include/ext/pool_allocator.h: Likewise.
3122 * include/ext/throw_allocator.h: Likewise.
3123 * include/std/scoped_allocator: Likewise.
3124 * libsupc++/eh_alloc.cc: Likewise.
3125 * include/std/future: Add nodiscard attribute to async.
3126 * libsupc++/new: Add nodiscard attribute to new.
3128 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
3133 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
3134 * include/bits/shared_ptr.h
3135 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
3136 (allocate_shared): Change to use new tag type.
3137 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
3138 Declare new member function.
3139 (_Sp_alloc_shared_tag): Define new type.
3140 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
3141 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
3142 _Sp_make_shared_tag::_S_eq to check type_info.
3143 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
3144 Constrain to prevent being called with _Sp_alloc_shared_tag.
3145 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
3146 Replace constructor with ...
3147 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
3148 reference parameter so address of the new object can be returned to
3149 the caller. Obtain the allocator from the tag type.
3150 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
3151 constructor with ...
3152 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
3153 to the __shared_count constructor.
3154 (__allocate_shared): Change to use new tag type.
3155 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
3157 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
3159 * src/c++17/fs_ops.cc
3160 (equivalent(const path&, const path&, error_code&))
3161 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
3162 compare files instead of relying on incomplete info returned by stat.
3165 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
3166 if the path is already absolute.
3167 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
3168 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
3171 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
3172 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
3173 of filesystem::exists.
3174 (create_directories(const path&, error_code&)): Add assertions.
3175 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
3176 Add workaround for bug in _wstat for paths with trailing slash.
3177 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
3178 for expected behaviour on mingw.
3179 * testsuite/experimental/filesystem/operations/create_directories.cc:
3181 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
3182 "TMP" instead of "TMPDIR" and clean environment before each test. Do
3183 not test permissions on mingw targets.
3185 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
3187 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
3188 constructors and open members taking wide strings. Fix patterns for
3189 filesystem::path members to match wstring_view parameters. Add
3190 exports for shared_ptr members used by directory iterators.
3191 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
3192 error code parameter if the file doesn't exist.
3193 * src/filesystem/ops.cc (remove(const path&, error_code&)):
3195 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
3196 values for mingw targets, where "/" is not an absolute path. Do not
3197 test symlinks on mingw targets.
3198 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3199 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
3201 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3202 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
3203 that each component of the path is created.
3204 * testsuite/experimental/filesystem/operations/create_directories.cc:
3206 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
3207 permissions on mingw targets.
3208 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3209 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3210 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3211 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
3213 * testsuite/experimental/filesystem/operations/permissions.cc:
3215 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
3216 symlinks or permissions on mingw targets.
3217 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3218 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
3219 symlinks on mingw targets.
3220 * testsuite/experimental/filesystem/operations/remove_all.cc:
3222 * testsuite/27_io/filesystem/operations/status.cc: Do not test
3223 permissions on mingw targets.
3224 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
3225 test symlinks on mingw targets.
3226 * testsuite/experimental/filesystem/operations/space.cc: Fix test
3229 2019-02-14 Ulrich Drepper <drepper@redhat.com>
3232 Warn about unused comparisons of shared_ptr/unique_ptr
3233 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
3234 * include/bits/shared_ptr.h: Use it for operator ==, !=,
3235 <, <=, >, >= for shared_ptr.
3236 * include/bits/unique_ptr.h: Likewise for unique_ptr.
3238 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
3240 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
3241 as 201611L, because P0497R0 changes are supported.
3242 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
3244 * include/bits/erase_if.h [__cplusplus > 201703L]
3245 (__cpp_lib_erase_if): Only define for C++2a.
3246 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3247 (__cpp_lib_null_iterators): Define.
3248 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
3249 (__cpp_lib_null_iterators): Define.
3250 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
3252 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
3254 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
3256 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
3257 changes are supported.
3258 * include/std/optional (__cpp_lib_optional): Likewise.
3259 * include/std/variant (__cpp_lib_variant): Likewise.
3260 * include/std/version [!__STRICT_ANSI__]
3261 (__cpp_lib_uncaught_exceptions): Define as long integer.
3262 [__cplusplus >= 201703L] (__cpp_lib_any)
3263 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
3264 (__cpp_lib_variant): Define for C++17.
3265 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
3267 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
3270 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
3272 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
3276 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
3278 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
3281 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3283 * doc/xml/manual/intro.xml: Include new section.
3284 * doc/xml/manual/status_cxx2017.xml: Document more
3285 implementation-defined properties of the library.
3286 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
3287 * doc/html/*: Regenerate.
3289 * include/bits/refwrap.h [__cplusplus > 201703L]
3290 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
3291 (_Reference_wrapper_base_memfun): Do not define for C++2a.
3292 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
3294 (reference_wrapper::operator()): Add static assertion.
3295 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
3297 * include/std/chrono (duration_values::zero(), duration_values::min())
3298 (duration_values::max()): Add noexcept.
3299 (duration::zero(), duration::min(), duration::max()): Likewise.
3300 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
3301 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
3302 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
3304 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
3306 2019-01-11 Jakub Jelinek <jakub@redhat.com>
3308 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
3309 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
3311 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
3314 * include/bits/functional_hash.h (hash<nullptr_t>): Define
3315 specialization for C++17 (P0513R0, LWG 2817).
3316 * testsuite/20_util/hash/nullptr.cc: New test.
3319 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
3320 pattern for std::basic_stringbuf::str().
3322 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
3323 basic_ostream::operator<< patterns.
3325 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3327 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
3328 test failures on targets with 32-bit time_t.
3330 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
3331 * include/std/deque: Likewise.
3332 * include/std/forward_list: Likewise.
3333 * include/std/list: Likewise.
3334 * include/std/string: Likewise.
3335 * include/std/vector: Likewise.
3336 * include/std/version: Likewise.
3337 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
3338 * testsuite/23_containers/deque/erasure.cc: Likewise.
3339 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3340 * testsuite/23_containers/list/erasure.cc: Likewise.
3341 * testsuite/23_containers/map/erasure.cc: Likewise.
3342 * testsuite/23_containers/set/erasure.cc: Likewise.
3343 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3344 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3345 * testsuite/23_containers/vector/erasure.cc: Likewise.
3347 * include/experimental/internet [AI_NUMERICSERV]
3348 (resolver_base::numeric_service): Define conditionally.
3349 * testsuite/experimental/net/internet/resolver/base.cc: Test it
3351 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3354 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
3355 Jonathan Wakely <jwakely@redhat.com>
3358 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
3359 (GLIBCXX_3.4.26): Add new exports.
3360 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
3361 correct list of sources.
3362 * include/Makefile.in: Regenerate.
3363 * include/std/ostream (operator<<(nullptr_t)): New member function.
3364 * src/c++17/ostream-inst.cc: New file.
3365 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
3368 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
3370 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
3371 of the source file containing the caller.
3372 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
3373 directories created by test.
3374 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3376 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3378 * testsuite/experimental/filesystem/iterators/
3379 recursive_directory_iterator.cc: Likewise.
3381 2019-01-10 Jakub Jelinek <jakub@redhat.com>
3383 PR tree-optimization/88775
3384 * include/bits/stl_function.h (greater<_Tp*>::operator(),
3385 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
3386 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
3387 instead of __builtin_constant_p if available. Don't bother with
3388 the pointer comparison in C++11 and earlier.
3390 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
3394 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
3397 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
3399 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
3400 for filesystem::path. Give variables more distinctive names.
3402 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
3403 member function to perform non-trivial assignment.
3404 (_Optional_payload_base::_M_move_assign): Likewise.
3405 (_Optional_payload<T, true, false, true>::operator=)
3406 (_Optional_payload<T, true, true, false>::operator=)
3407 (_Optional_payload<T, true, false, false>::operator=): Call
3408 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
3411 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
3412 test std::complex<long double> if long double format is IBM128.
3413 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
3416 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3418 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
3419 for old std::unique_ptr layout.
3420 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
3421 to become valueless. Add filesystem::path tests.
3424 * include/std/optional (_Optional_payload_base): New class template
3425 for common code hoisted from _Optional_payload specializations. Use
3426 a template for the union, to allow a partial specialization for
3427 types with non-trivial destructors. Add constructors for in-place
3428 initialization to the union.
3429 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
3430 to perform non-trivial copy construction, instead of relying on
3431 non-standard copy elision in a delegating constructor.
3432 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
3433 non-trivial move construction.
3434 (_Optional_payload): Derive from _Optional_payload_base and use it
3435 for everything except the non-trivial assignment operators, which are
3437 (_Optional_payload<false, C, M>): Derive from the specialization
3438 _Optional_payload<true, false, false> and add a destructor.
3439 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
3440 Forward to corresponding members of _Optional_payload.
3441 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
3442 Hoist common members from _Optional_base.
3443 (_Optional_base): Make all members and base class public.
3444 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
3445 _Optional_base_impl.
3446 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
3447 support for new std::optional layout.
3448 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
3451 * include/bits/locale_conv.h: Use <> for includes not "".
3452 * include/ext/random: Likewise.
3453 * include/ext/vstring.h: Likewise.
3455 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3457 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
3458 (GLIBCXX_3.4.21): Likewise.
3460 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
3463 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
3464 to match the one that controls whether utimbuf and utime are declared.
3466 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
3469 * include/bits/char_traits.h (char_traits::move): Do not pass null
3470 pointers to memmove.
3471 * include/bits/locale_facets.h
3472 (ctype<char>::widen(const char*, const char*, char*)): Do not
3473 pass null pointers to memcpy.
3474 (ctype<char>::narrow(const char*, const char*, char, char*)):
3476 (ctype<char>::do_widen(const char*, const char*, char*)):
3478 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
3481 * doc/xml/manual/spine.xml: Update copyright years.
3482 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
3483 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
3484 for C++17 filesystem library.
3485 * doc/html/*: Regenerate.
3487 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
3488 * config.h.in: Regenerate.
3489 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
3490 alphabetically and add missing entries for copy_symlink,
3491 hard_link_count, rename, and resize_file.
3492 * configure: Regenerate.
3493 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
3494 used unconditionally.
3495 * src/filesystem/ops-common.h (__gnu_posix::truncate)
3496 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
3497 supports truncating to zero length.
3498 * testsuite/27_io/filesystem/operations/all.cc: New test.
3499 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
3501 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
3504 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
3505 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
3506 * config.h.in: Regenerate.
3507 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
3508 remaining std::filesystem types and functions.
3509 * configure: Regenerate.
3510 * src/c++17/Makefile.am: Add C++17 filesystem sources.
3511 * src/c++17/Makefile.in: Regenerate.
3512 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
3513 here, and change name of included file.
3514 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
3515 here, and change name of included file.
3516 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
3517 path to dir-common.h.
3518 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
3519 path to ops-common.h. Disable -Wunused-parameter warnings.
3520 (internal_file_clock): Define unconditionally.
3521 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
3523 (do_copy_file, do_space): Move definitions to ops.common.h.
3524 (copy, file_size, hard_link_count, last_write_time, space): Only
3525 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
3527 (last_write_time, read_symlink): Remove unused attributes from
3529 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
3530 * src/filesystem/Makefile.in: Regenerate.
3531 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
3532 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
3533 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
3534 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
3535 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
3536 dummy types and functions instead of using #error.
3537 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
3538 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
3540 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
3541 (do_copy_file, do_space): Move definitions here from std-ops.cc.
3542 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
3543 to account for new namespace.
3544 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
3545 -lstdc++fs from dg-options.
3546 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
3547 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
3548 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
3549 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
3550 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3552 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
3553 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3555 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
3556 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3557 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
3558 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3559 * testsuite/27_io/filesystem/operations/create_directories.cc:
3561 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
3562 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
3563 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
3564 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
3565 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3566 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
3567 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3568 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
3569 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
3570 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
3571 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
3572 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
3573 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3574 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3575 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
3576 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3577 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3578 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3580 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
3584 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
3585 typeinfo and vtables less greedy.
3586 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
3587 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
3588 * src/c++17/Makefile.in: Regenerate.
3589 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
3590 here, and change name of included file.
3591 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
3592 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
3594 * src/filesystem/Makefile.in: Regenerate.
3595 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
3596 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
3597 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
3598 from dg-options and remove dg-require-filesystem-ts.
3599 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
3600 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
3601 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
3602 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
3603 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3604 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3605 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3606 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
3607 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
3608 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
3609 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
3610 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
3611 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
3612 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
3613 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
3614 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
3615 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
3616 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
3617 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
3618 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
3619 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
3621 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
3622 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
3623 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
3624 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
3625 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
3626 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
3627 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
3628 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
3629 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
3630 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
3631 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
3632 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
3634 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
3636 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3638 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
3640 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
3641 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3642 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
3643 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
3644 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
3645 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
3646 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
3647 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
3648 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
3649 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
3651 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
3652 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
3653 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
3654 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
3655 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
3658 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
3659 Check is_trivially_copyable instead of is_scalar.
3660 (variant::emplace<N, Args>(Args&&...)): If construction of the new
3661 contained value can throw and its type is trivially copyable then
3662 construct into a temporary variant and move from it, to provide the
3663 strong exception safety guarantee.
3664 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
3666 * testsuite/20_util/variant/87431.cc: New test.
3667 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
3668 conversion causes valueless state.
3671 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
3672 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
3673 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
3674 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
3675 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
3677 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
3679 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3680 (file_time_type): Redefine in terms of __file_clock.
3681 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3683 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3685 (internal_file_lock): New helper type for accessing __file_clock.
3686 (do_copy_file): Use internal_file_lock to convert system time to
3688 (last_write_time(const path&, error_code&)): Likewise.
3689 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3691 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
3693 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3694 for const member functions of std::basic_string.
3695 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3697 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3698 Make non-standard constructor private.
3699 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3701 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3702 explicit instantiations for C++17 as well as earlier dialects.
3703 * src/c++17/Makefile.am: Add new source files.
3704 * src/c++17/Makefile.in: Regenerate.
3705 * src/c++17/cow-string-inst.cc: New file defining explicit
3706 instantiations for basic_string member functions added in C++17.
3707 * src/c++17/string-inst.cc: Likewise.
3709 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3710 copy/move constructors for old std::basic_string.
3711 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3712 (basic_string::reference, basic_string::const_reference): Define
3713 as plain references for C++11 and later.
3714 (basic_string::basic_string()): Put constructor body outside
3715 preprocessor conditional groups.
3716 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3717 instead of copying it.
3718 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3720 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3722 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3723 cases for old basic_string.
3724 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3725 allocator-extended constructors unconditionally. Add extra members to
3726 allocator type when using old string ABI.
3727 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3729 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3731 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3732 -fno-inline added to test flags.
3734 * testsuite/21_strings/basic_string/requirements/
3735 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3737 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3738 assertion failures with old std::string ABI.
3740 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3742 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3743 functions that will only erase elements at the end.
3744 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3745 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3746 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3748 (path::_List::pop_back()): Define.
3749 (path::_List::_M_erase_from(const_iterator)): Define.
3750 (path::operator/=(const path&)): Use pop_back to remove last component
3751 and _M_erase_from to remove multiple components.
3752 (path::_M_append(basic_string_view<value_type>)): Likewise.
3753 (path::operator+=(const path&)): Likewise.
3754 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3755 (path::remove_filename()): Likewise.
3756 (path::lexically_normal()): Use _List::_Impl iterators instead of
3757 path::iterator. Use pop_back to remove components from the end. Clear
3758 trailing filename, instead of using erase(const_iterator) to remove
3759 a non-final component.
3760 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3762 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3764 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3765 incorrect treatment of empty filename after trailing slash.
3766 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3768 * testsuite/21_strings/basic_string/modifiers/assign/char/
3769 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3771 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3772 move_assign_optim.cc: Likewise.
3774 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3775 Jakub Jelinek <jakub@redhat.com>
3778 * include/experimental/memory: Replace UTF-8 quote characters.
3779 * include/std/future: Replace UTF-8 "em dash" characters.
3781 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
3784 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3785 * include/debug/forward_list: Likewise.
3786 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3788 * include/experimental/chrono: Likewise.
3789 * include/experimental/functional: Likewise.
3790 * include/experimental/ratio: Likewise.
3791 * include/experimental/system_error: Likewise.
3792 * include/experimental/tuple: Likewise.
3793 * include/experimental/type_traits: Likewise.
3794 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3795 * include/parallel/multiseq_selection.h: Likewise.
3798 * config/abi/pre/gnu.ver: Add missing exports.
3799 * testsuite/22_locale/collate_byname/88681.cc: New test.
3800 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3801 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3803 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
3805 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3806 initializer_list<value_type> and from input iterator ranges.
3807 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3809 * testsuite/experimental/string_view/element_access/char/empty.cc:
3810 Fix year range in copyright header.
3812 2019-01-02 Joel Brobecker <brobecker@adacore.com>
3814 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3815 Fix year range in copyright header.
3817 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3819 Update copyright years.
3821 Copyright (C) 2019 Free Software Foundation, Inc.
3823 Copying and distribution of this file, with or without modification,
3824 are permitted in any medium without royalty provided the copyright
3825 notice and this notice are preserved.