]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
Make std::match_results::_M_resize more useful
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
e0bcd31d 12019-05-14 Jonathan Wakely <jwakely@redhat.com>
2
d4a9b293 3 * include/bits/regex.h (match_results::max_size()): Adjust return
4 value to account for prefix/suffix/unmatched subs.
5 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
6 reset the contained sub matches.
7 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
8 function to set result state following a failed match.
9 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
10 sub_match states after _M_resize. Use _M_establish_failed_match.
11
e0bcd31d 12 PR libstdc++/69724
13 * include/std/thread (thread::_State_impl, thread::_S_make_state):
14 Replace single _Callable parameter with variadic _Args pack, to
15 forward them directly to the tuple of decayed copies.
16 * testsuite/30_threads/thread/cons/69724.cc: New test.
17
872d7a1f 182019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
19
20 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
21 * include/bits/basic_string.h: (operator=(const basic_string&):
22 Move allocator decision to assign.
23 (assign(const basic_string&)): Move allocator decision here.
24 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
25 Add tests.
26 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
27 Add tests.
28
67dff8a4 292019-05-14 Jonathan Wakely <jwakely@redhat.com>
30
155856f9 31 * testsuite/util/testsuite_allocator.h (memory_resource)
32 (default_resource_mgr): Fix indentation.
33
94e98eda 34 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
35 Use operator-> to access raw pointer member.
36 * testsuite/23_containers/vector/59829.cc: Likewise.
37 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
38 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
39 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
40 for tests.
41 (PointerBase, PointerBase_void): Derive from NullablePointer and use
42 its constructors and equality operators. Change converting
43 constructors to use operator-> to access private member of the other
44 pointer type.
45 (PointerBase_void::operator->()): Add, for access to private member.
46 (operator-(PointerBase, PointerBase)): Change to hidden friend.
47 (operator==(PointerBase, PointerBase)): Remove.
48 (operator!=(PointerBase, PointerBase)): Remove.
49
8ac285f1 50 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
51 not assume field called _M_head_impl is the first tuple element.
52 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
53 implementation more accurate.
54 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
55 empty pointer type and non-empty deleter.
56
67dff8a4 57 LWG 2899 - Make is_move_constructible correct for unique_ptr
58 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
59 move assignment operator.
60 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
61 (__uniq_ptr_data): New class template with conditionally deleted
62 special members.
63 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
64 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
65 constructor and move assignment operator as defaulted.
66 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
67 __uniq_ptr_impl::release().
68 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
69 to __uniq_ptr_impl::reset(pointer).
70 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
71 Check for new __uniq_ptr_data type.
72 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
73
6818ab51 742019-05-13 Jonathan Wakely <jwakely@redhat.com>
75
fecfaafd 76 PR libstdc++/90454.cc path construction from void*
77 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
78 pointers to void are rejected as well as void.
79 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
80 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
81 pointers to void.
82 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
83
6818ab51 84 * doc/xml/manual/policy_data_structures.xml: Comment out stray
85 <remark> elements. Fix formatting of bibliography references.
86
8967657e 872019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
88
89 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
90
8dd55415 912019-05-13 Jonathan Wakely <jwakely@redhat.com>
ca8ead92 92
b6cabd65 93 Remove Profile Mode, deprecated since 7.1.0
94 * doc/Makefile.am: Remove XML file for profile mode docs.
95 * doc/Makefile.in: Regenerate.
96 * doc/xml/authors.xml: Remove authors of profile mode docs.
97 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
98 mode.
99 * doc/xml/manual/debug.xml: Likewise.
100 * doc/xml/manual/evolution.xml: Document removal of profile mode.
101 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
102 * doc/xml/manual/spine.xml: Remove profile mode author credit.
103 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
104 directive.
105 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
106 macro.
107 * doc/html/*: Regenerate.
108 * include/Makefile.am: Remove profile mode headers.
109 * include/Makefile.in: Regenerate.
110 * include/bits/c++config (std::__profile): Remove namespace.
111 [_GLIBCXX_PROFILE]: Remove checks for macro.
112 * include/profile/array: Remove.
113 * include/profile/base.h: Remove.
114 * include/profile/bitset: Remove.
115 * include/profile/deque: Remove.
116 * include/profile/forward_list: Remove.
117 * include/profile/impl/profiler.h: Remove.
118 * include/profile/impl/profiler_algos.h: Remove.
119 * include/profile/impl/profiler_container_size.h: Remove.
120 * include/profile/impl/profiler_hash_func.h: Remove.
121 * include/profile/impl/profiler_hashtable_size.h: Remove.
122 * include/profile/impl/profiler_list_to_slist.h: Remove.
123 * include/profile/impl/profiler_list_to_vector.h: Remove.
124 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
125 * include/profile/impl/profiler_node.h: Remove.
126 * include/profile/impl/profiler_state.h: Remove.
127 * include/profile/impl/profiler_trace.h: Remove.
128 * include/profile/impl/profiler_vector_size.h: Remove.
129 * include/profile/impl/profiler_vector_to_list.h: Remove.
130 * include/profile/iterator_tracker.h: Remove.
131 * include/profile/list: Remove.
132 * include/profile/map: Remove.
133 * include/profile/map.h: Remove.
134 * include/profile/multimap.h: Remove.
135 * include/profile/multiset.h: Remove.
136 * include/profile/ordered_base.h: Remove.
137 * include/profile/set: Remove.
138 * include/profile/set.h: Remove.
139 * include/profile/unordered_base.h: Remove.
140 * include/profile/unordered_map: Remove.
141 * include/profile/unordered_set: Remove.
142 * include/profile/vector: Remove.
143 * scripts/run_doxygen: Do not process profile mode headers.
144 * testsuite/23_containers/array/element_access/60497.cc: Don't use
145 profile mode type.
146 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
147 Remove dg-skip-if for profile mode.
148 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
149 preprocessor check for profile mode.
150 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
151 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
152 for profile mode.
153 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
154 Likewise.
155 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
156 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
157 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
158 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
159 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
160 Likewise.
161 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
162 Likewise.
163 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
164 Likewise.
165 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
166 Likewise.
167 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
168 preprocessor check for profile mode.
169 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
170 Likewise.
171 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
172 Remove dg-skip-if for profile mode.
173 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
174 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
175 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
176 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
177 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
178 * testsuite/Makefile.am: Remove profile_flags variable and
179 * testsuite/Makefile.am: Remove profile_flags variable and
180 check-profile target.
181 * testsuite/Makefile.in: Regenerate.
182 * testsuite/ext/profile/all.cc: Remove.
183 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
184 * testsuite/ext/profile/profiler_algos.cc: Remove.
185 * testsuite/ext/profile/replace_new.cc: Remove.
186 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
187 preprocessor check for profile mode.
188 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
189 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
190 (check_v3_target_normal_mode): Do not check for profile mode macro.
191 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
192 profile mode.
193 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
194 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
195 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
196 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
197 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
198 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
199 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
200 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
201 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
202 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
203
ca8ead92 204 Remove array_allocator extension, deprecated since 4.9.0
205 * doc/xml/manual/allocator.xml: Remove documentation for
206 array_allocator.
207 * doc/xml/manual/evolution.xml: Document array_allocator removal.
208 * doc/xml/manual/using.xml: Remove header from documentation.
209 * include/Makefile.am: Remove <ext/array_allocator.h> header.
210 * include/Makefile.in: Regenerate.
211 * include/ext/array_allocator.h: Remove.
212 * include/precompiled/extc++.h: Do not include removed header.
213 * testsuite/ext/array_allocator/1.cc: Remove.
214 * testsuite/ext/array_allocator/2.cc: Remove.
215 * testsuite/ext/array_allocator/26875.cc: Remove.
216 * testsuite/ext/array_allocator/3.cc: Remove.
217 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
218 * testsuite/ext/array_allocator/check_delete.cc: Remove.
219 * testsuite/ext/array_allocator/check_new.cc: Remove.
220 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
221 * testsuite/ext/headers.cc: Do not include removed header.
222
64b2700c 2232019-05-11 François Dumont <fdumont@gcc.gnu.org>
224
225 * include/bits/stl_bvector.h
226 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
227 Make hidden friend.
228 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
229 Likewise.
230 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
231 Likewise.
232 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
233 Likewise.
234 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
235 Likewise.
236 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
237 Likewise.
238 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
239 Likewise.
240 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
241 copy elision.
242 (_Bit_iterator::operator-(difference_type)): Likewise.
243 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
244 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
245 NRVO copy elision.
246 (_Bit_const_iterator::operator-(difference_type)): Likewise.
247 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
248
de3f1d9a 2492019-05-10 Jonathan Wakely <jwakely@redhat.com>
250
eb1be9e7 251 PR libstdc++/81266
252 * testsuite/util/thread/all.h: Do not use remove_pointer for
253 std::thread::native_handle_type.
254
5c6334a5 255 PR libstdc++/90397
256 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
257 (_Variant_storage<true, Types...>::_M_reset()))
258 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
259 (__get_storage): Likewise.
260 (variant): Add noexcept to friend declarations for __get and
261 __get_storage.
262
3e5c91bd 263 PR libstdc++/90388
264 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
265 Use _Require for constraints.
266 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
267 per the standard.
268 (__uniq_ptr_hash): New base class with conditionally-disabled call
269 operator.
270 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
271 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
272 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
273
de3f1d9a 274 * include/bits/shared_ptr.h: Improve docs.
275 * include/bits/shared_ptr_base.h: Likewise.
276 * include/bits/stl_uninitialized.h: Likewise.
277 * include/bits/unique_ptr.h: Likewise.
278 * libsupc++/new: Likewise.
279
d084c5ba 2802019-05-09 François Dumont <fdumont@gcc.gnu.org>
281
282 * include/bits/stl_deque.h
283 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
284 Make hidden friend.
285 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
286 Likewise.
287 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
288 Likewise.
289 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
290 Likewise.
291 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
292 Likewise.
293 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
294 Likewise.
295 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
296 copy elision.
297 (_Deque_iterator<>::operator-(difference_type)): Likewise.
298
0f61cb49 2992019-05-08 François Dumont <fdumont@gcc.gnu.org>
300
301 PR libstdc++/90277
302 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
303 (test01): Reserve for number of insertions to avoid rehash during test.
304 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
305 (test01): Likewise.
306 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
307 (test01): Likewise.
308 (test02): Likewise.
309 (test03): Likewise.
310
c800ee48 3112019-05-08 Jonathan Wakely <jwakely@redhat.com>
312
313 * include/experimental/bits/fs_path.h: Improve docs.
314 * include/experimental/bits/net.h: Fix wrong header name in comment.
315 Do not document implementation details.
316 * include/experimental/netfwd: Fix doxygen grouping.
317
b103d23d 3182019-05-07 Jonathan Wakely <jwakely@redhat.com>
319
aa371af3 320 * include/bits/stl_pair.h: Improve docs.
321 * include/std/tuple: Likewise.
322
dceea60f 323 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
324 inline namespace.
325 * include/std/chrono: Improve docs.
326 * include/std/ratio: Do not document implementation details.
327 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
328 line numbers.
329 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
330
a9ae69b5 331 PR libstdc++/89102
332 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
333 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
334 (__duration_common_type): New helper.
335 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
336 __duration_common_type.
337 (__timepoint_common_type_wrapper): Replace with ...
338 (__timepoint_common_type): New helper.
339 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
340 Use __time_point_common_type.
341 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
342 (__common_type_impl): If either argument is transformed by decay,
343 use the common_type of the decayed types.
344 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
345 decayed, use __do_common_type_impl to get the common_type.
346 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
347 (__do_member_type_wrapper, __member_type_wrapper)
348 (__expanded_common_type_wrapper): Remove.
349 (__common_type_pack, __common_type_fold): New helpers.
350 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
351 __member_type_wrapper and __expanded_common_type_wrapper.
352 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
353 Test zero-length template argument list.
354 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
355 Test single argument cases and argument types that should decay.
356 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
357 Adjust expected error.
358 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
359 dg-error lineno.
360 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
361 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
362 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
363
b103d23d 364 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
365
69be6ea5 3662019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
367
368 Make allocator propagation more consistent for
369 operator+(basic_string) (P1165R1)
370 * include/bits/basic_string.h
371 (operator+(basic_string&&, basic_string&&): Changed resulting
372 allocator to always be the one from the first parameter.
373 * include/bits/basic_string.tcc
374 (operator+(const _CharT*, const basic_string&)): Changed
375 resulting allocator to be SOCCC on the second parameter's allocator.
376 (operator+(_CharT, const basic_string&)): Likewise.
377 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
378 New.
379 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
380 New.
381
845d0fd6 3822019-05-07 Jonathan Wakely <jwakely@redhat.com>
383
29499715 384 * include/bits/regex.h: Improve docs.
385 * include/bits/regex.tcc: Do not document implementation details.
386
845d0fd6 387 * testsuite/19_diagnostics/error_code/hash.cc: New test.
388
3eec8b67 3892019-05-06 François Dumont <fdumont@gcc.gnu.org>
390
391 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
392 Add type printer for container types in std::__debug namespace.
393 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
394 (gdb-tests): Use distinct parameters for the type of test and use of
395 regex.
396 (gdb-test): Check for regex test even if 'whatis' test.
397 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
398 mode.
399 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
400 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
401 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
402 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
403 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
404 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
405 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
406
80175534 4072019-05-04 Jonathan Wakely <jwakely@redhat.com>
408
2d527eb0 409 * include/std/system_error (error_category): Fix comment.
410
84eda927 411 PR libstdc++/90299
412 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
413 argument is an empty path.
414 (absolute(const path&, error_code&)): Use invalid_argument as error
415 code instead of no_such_file_or_directory.
416 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
417 of non-existent paths and empty paths with both overloads of absolute.
418
98a3d630 419 * include/std/system_error (error_category, error_code)
420 (error_condition): Improve docs.
421 * libsupc++/exception: Add missing @addtogroup Doxygen command.
422 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
423 to class documentation. Suppress documentation for implementation
424 details.
425 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
426 Suppress documentation for implementation details.
427
80175534 428 * include/std/system_error (error_code): Remove friend declaration
429 for hash<error_code>.
430 (hash<error_code>::operator()): Use public member functions to access
431 value and category.
432 (hash<error_condition>::operator()): Use address of category, not
433 its object representation.
434 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
435 Use public member functions to access value and category.
436 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
437
476bdccf 4382019-05-04 François Dumont <fdumont@gcc.gnu.org>
439
440 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
441 * include/bits/hashtable_policy.h
442 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
443 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
444 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
445 smaller than input value rather than always greater. Preserve
446 _M_next_resize if called with 0 input. Use __builtin_floorl.
447 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
448 elements + number of insertions is greater than _M_next_resize. Start
449 with 11 buckets if not told otherwise. Use __builtin_floorl.
450 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
451 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
452 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
453 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
454 told otherwise. Use __builtin_floorl.
455 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
456 to also validate _Power2_rehash_policy.
457 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
458 Adapt.
459
2051f7c0 4602019-05-03 Jonathan Wakely <jwakely@redhat.com>
461
85015e21 462 PR libstdc++/61761
463 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
464 std::copysign.
465
2051f7c0 466 PR libstdc++/52119
467 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
468 overflow warning with -Wpedantic -Wsystem-headers.
469
c47265a8 4702019-05-02 Jonathan Wakely <jwakely@redhat.com>
471
9766cefe 472 PR libstdc++/90314
473 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
474 * include/bits/move.h (swap): Remove extra parentheses.
475
6bd15da3 476 * include/experimental/bits/lfts_config.h: Improve doc markup.
477 * include/experimental/optional: Improve docs.
478 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
479 (__constexpr_addressof): Remove.
480 (optional::operator->()): Use std::__addressof().
481 * include/std/optional (optional::operator->()): Adjust whitespace.
482 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
483 that operator-> is still constexpr with overloaded operator&. Change
484 to compile-only test.
485 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
486 compile-only test.
487
f4673ac1 488 * include/bits/shared_ptr.h: Improve docs.
489 * include/bits/shared_ptr_atomic.h: Likewise.
490 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
491
c88f1c9d 492 * include/bits/basic_string.h: Fix iterator/index confusion in
493 Doxygen comments.
494 * include/bits/range_access.h: Fix Doxygen warnings.
495 * include/bits/refwrap.h: Do not document implementation details.
496 (ref, cref): Group docs with reference_wrapper.
497 * include/std/fstream: Fix Doxygen markup.
498 * libsupc++/initializer_list (begin, end): Group docs with
499 initializer_list.
500
0276ef36 501 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
502
5ba27b7d 503 * include/bits/unique_lock.h: Fix/improve doxygen markup.
504 * include/std/mutex: Likewise.
505 * include/std/shared_mutex: Likewise.
506
c2046340 507 * include/bits/fs_dir.h: Fix/improve doxygen markup.
508 * include/bits/fs_fwd.h: Likewise.
509 * include/bits/fs_ops.h: Likewise.
510 * include/bits/fs_path.h: Likewise.
511 * include/std/filesystem: Likewise.
512
f73340aa 513 * include/experimental/bits/net.h: Fix/improve doxygen markup.
514 * include/experimental/buffer: Likewise.
515 * include/experimental/executor: Likewise.
516 * include/experimental/internet: Likewise.
517 * include/experimental/io_context: Likewise.
518 * include/experimental/net: Likewise.
519 * include/experimental/netfwd: Likewise.
520 * include/experimental/socket: Likewise.
521 * include/experimental/timer: Likewise.
522
b87d52bd 523 * doc/doxygen/doxygroups.cc: Move description of experimental group
524 here.
525 * include/experimental/algorithm: Add to libfund-ts doc group.
526 * include/experimental/any: Likewise. Do not document implementation
527 details.
528 * include/experimental/array: Add to libfund-ts doc group.
529 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
530 for Library Fundamentals.
531 * include/experimental/chrono: Add to libfund-ts doc group.
532 * include/experimental/deque: Likewise.
533 * include/experimental/forward_list: Likewise.
534 * include/experimental/functional: Likewise.
535 * include/experimental/iterator: Likewise.
536 * include/experimental/list: Likewise.
537 * include/experimental/map: Likewise.
538 * include/experimental/memory: Likewise.
539 * include/experimental/memory_resource: Likewise. Improve docs.
540 details.
541 * include/experimental/numeric: Add to libfund-ts doc group.
542 * include/experimental/optional: Likewise.
543 * include/experimental/propagate_const: Likewise.
544 * include/experimental/random: Likewise.
545 * include/experimental/ratio: Likewise.
546 * include/experimental/regex: Likewise.
547 * include/experimental/set: Likewise.
548 * include/experimental/source_location: Likewise.
549 * include/experimental/string: Likewise.
550 * include/experimental/string_view: Likewise.
551 * include/experimental/system_error: Likewise.
552 * include/experimental/tuple: Likewise.
553 * include/experimental/type_traits: Likewise.
554 * include/experimental/unordered_map: Likewise.
555 * include/experimental/unordered_set: Likewise.
556 * include/experimental/utility: Likewise.
557 * include/experimental/vector: Likewise.
558 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
559 * testsuite/experimental/array/neg.cc: Adjust dg-error.
560 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
561 Likewise.
562 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
563 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
564 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
565 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
566 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
567
07894d48 568 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
569 * include/experimental/bits/fs_fwd.h: Improve docs.
570 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
571 * include/experimental/bits/fs_path.h: Likewise.
572 (path, filesystem_error, u8path): Improve docs.
573 * include/experimental/filesystem: Link to docs for TS.
574
cd877474 575 * config/allocator/new_allocator_base.h (__allocator_base): Add
576 workaround for Doxygen bug #6945.
577 * include/std/memory: Improve docs. Define group for pointer safety.
578 * include/std/scoped_allocator: Improve docs. Use "undocumented"
579 conditional to suppress documentation for implementation details.
580
72e8cf41 581 * include/bits/specfun.h: Improve docs.
582 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
583 and namespaces.
584
633c66f0 585 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
586 (std::experimental): Add docs.
587 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
588 namespace to nothing when generating docs.
589 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
590 * include/std/chrono (std::chrono): Likewise.
591 * include/std/functional (std::placeholders): Likewise.
592 * include/std/thread (std::this_thread): Likewise.
593
17035a16 594 * include/parallel/settings.h: Fix Doxygen markup.
595
6de90d17 596 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
597 anything unless PB_DS_CLASS_C_DEC is defined.
598 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
599 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
600 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
601 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
602 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
603 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
604 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
605 Likewise.
606 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
607 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
608 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
609 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
610 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
611 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
612 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
613 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
614 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
615 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
616 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
617 Likewise.
618 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
619 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
620 Likewise.
621 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
622 Likewise.
623
c47265a8 624 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
625 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
626 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
627 Doxygen expands.
628
269f393a 6292019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
630
631 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
632 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
633 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
634 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
635 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
636 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
637 Likewise.
638 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
639 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
640 Likewise.
641
c64aa5a2 6422019-05-01 Jonathan Wakely <jwakely@redhat.com>
643
644 PR libstdc++/61761
645 * include/std/complex (__complex_proj): Return parameter unchanged.
646 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
647 floating-point types to take std::complex arguments.
648 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
649 floating-point types.
650 * testsuite/26_numerics/complex/proj.cc: New test.
651
9d5de90f 6522019-04-30 Jakub Jelinek <jakub@redhat.com>
653
654 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
655 to _Lock_policyE[012].
656 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
657
612b2ae7 6582019-04-30 Jonathan Wakely <jwakely@redhat.com>
659
660 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
661 macros accidentally left in.
662 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
663 unnecessary -lstdc++fs option. Fix test for mingw.
664 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
665 Fix test for mingw.
666
55843567 6672019-04-30 Jakub Jelinek <jakub@redhat.com>
668
669 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
670
c5aaf0af 6712019-04-29 Jonathan Wakely <jwakely@redhat.com>
672
d9375e49 673 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
674
744a3010 675 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
676 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
677
e3600f25 678 PR libstdc++/71312
679 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
680
4b7f4f12 681 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
682 attribute.
683
94ed6c0a 684 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
685 class template and partial specialization.
686
c5aaf0af 687 PR libstdc++/87982
688 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
689 an integral type.
690 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
691 functions to convert a value to an integral type.
692 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
693 (fill_n): Convert _Size parameter to an integral type.
694 * testsuite/25_algorithms/fill_n/87982.cc: New test.
695 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
696 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
697 * testsuite/25_algorithms/generate_n/87982.cc: New test.
698 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
699 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
700
ac8f540e 7012019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
a4360611 702
703 Adding noexcept-specification on tuple constructors (LWG 2899)
704 * libstdc++-v3/include/std/tuple:
705 (tuple()): Add noexcept-specification.
706 (tuple(const _Elements&...)): Likewise
707 (tuple(_UElements&&...)): Likewise
708 (tuple(const tuple<_UElements...>&)): Likewise
709 (tuple(tuple<_UElements...>&&)): Likewise
710 (tuple(const _T1&, const _T2&)): Likewise
711 (tuple(_U1&&, _U2&&)): Likewise
712 (tuple(const tuple<_U1, _U2>&): Likewise
713 (tuple(tuple<_U1, _U2>&&): Likewise
714 (tuple(const pair<_U1, _U2>&): Likewise
715 (tuple(pair<_U1, _U2>&&): Likewise
716 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
717
b9fe1c54 7182019-04-27 Marc Glisse <marc.glisse@inria.fr>
719
720 PR libstdc++/87106
721 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
722 arguments with __restrict.
723
a596cded 7242019-04-26 H.J. Lu <hongjiu.lu@intel.com>
725
726 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
727
051e444d 7282019-04-26 Jonathan Wakely <jwakely@redhat.com>
729
3c259ff8 730 * include/experimental/bits/fs_path.h
731 (path::_S_convert_loc<_InputIterator>): Create const std::string to
732 avoid redundant call to _S_convert_loc with non-const pointers.
733
2f95fa8e 734 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
735 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
736 * testsuite/21_strings/basic_string/hash/hash.cc
737 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
738 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
739 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
740
46933618 741 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
742 wstring::_M_replace_dispatch with more specific patterns.
743 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
744 Create const std::string to avoid redundant call to _S_convert_loc
745 with non-const pointers.
746 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
747 avoid unnecessary basic_string::assign instantiations.
748
051e444d 749 * include/std/memory (__uses_alloc_args): Add string-literal to
750 static_assert, to match the one in __uses_alloc.
751 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
752 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
753 for recursive uses-allocator construction of nested pairs.
754 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
755 comment.
756
db1349a6 7572019-04-26 Jakub Jelinek <jakub@redhat.com>
758
dd693c4a 759 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
760 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
761 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
762 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
763
db1349a6 764 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
765 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
766 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
767 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
768 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
769 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
770 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
771
f0a82465 7722019-04-25 Jonathan Wakely <jwakely@redhat.com>
773
774 PR libstdc++/90239
775 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
776 * include/std/scoped_allocator [__cplusplus > 201703L]
777 (scoped_allocator_adaptor::construct): Define in terms of
778 uses_allocator_construction_args, as per P0591R4.
779 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
780 * testsuite/util/testsuite_allocator.h: Remove name of unused
781 parameter.
782
fd1863e1 7832019-04-24 Jonathan Wakely <jwakely@redhat.com>
784
9ed11778 785 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
786 * doc/html/*: Regenerate.
787
39b59bb9 788 * include/bits/fs_path.h (operator<, operator<=, operator>)
789 (operator>=, operator==, operator!=): Make hidden friends, as per
790 LWG 3065.
791 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
792 string type in test.
793 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
794
dd3b7006 795 * include/std/any (any::any(ValueType&&)): Use __and_v.
796 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
797 Likewise.
798
14710c9d 799 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
800 as per P0777R1.
801 * include/std/type_traits (__result_of_memfun): Use remove_reference
802 instead of __remove_cvref_t and remove redundant is_same check.
803 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
804
809f1d63 805 * include/experimental/string_view (basic_string_view::pointer)
806 (basic_string_view::reference): Fix to refer to non-const value_type.
807 * include/bits/basic_string.h (basic_string): Use __sv_check and
808 __sv_limit instead of basic_string_view::_M_check and
809 basic_string_view::_M_limit.
810 * include/std/string_view (__sv_check, __sv_limit): New
811 helper functions to replace basic_string_view::_M_check and
812 basic_string_view::_M_limit.
813 (basic_string_view): Add static assertions to enforce ill-formed
814 requirement for traits_type::char_type from P1148R0, and to enforce
815 required properties of char-like types.
816 (basic_string_view::pointer, basic_string_view::reference): Fix to
817 refer to non-const value_type.
818 (basic_string_view::operator[], basic_string_view::at)
819 (basic_string_view::front, basic_string_view::back)
820 (basic_string_view::data): Use const_reference and const_pointer
821 typedefs for return types.
822 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
823 (hash<wstring_view>): Fix argument_type typedef.
824 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
825 char/1.cc: Fix expected return type of basic_string_view::data().
826 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
827 wchar_t/1.cc: Likewise.
828 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
829 char/1.cc: Likewise.
830 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
831 wchar_t/1.cc: Likewise.
832 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
833 New test.
834 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
835 Check reference and pointer typedefs.
836 * testsuite/experimental/string_view/requirements/typedefs.cc:
837 Likewise.
838 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
839 Fix expected return type of basic_string_view::data().
840 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
841 1.cc: Likewise.
842 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
843 Likewise.
844 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
845 1.cc: Likewise.
846
37020b0a 847 PR libstdc++/90220
848 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
849 Avoid a runtime check for types that can never be stored in std::any.
850 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
851 array types.
852
b8e73341 853 PR libstdc++/90220 (partial)
854 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
855 not attempt ill-formed static_cast to pointers to non-object types.
856 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
857 function types.
858
1c9c8e0d 859 * testsuite/20_util/variant/run.cc: Catch exception by reference to
860 prevent -Wcatch-value warning.
861
fd1863e1 862 * include/std/variant (__variant_construct): Use template parameter
863 type instead of equivalent decltype-specifier.
864 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
865 Replace forward with move.
866 (_Move_ctor_base<false, Types...>::_M_destructive_move)
867 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
868 (_Move_ctor_base<true, Types...>::_M_destructive_move)
869 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
870 index after construction succeeds.
871 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
872 if-constexpr checks that are always true. Use __remove_cvref_t instead
873 of remove_reference so that is_nothrow_move_constructible check
874 doesn't use a const rvalue parameter. In the potentially-throwing case
875 construct a temporary and move assign it, as per LWG 2904.
876 (_Move_assign_base<false, Types...>::operator=): Remove redundant
877 if-constexpr checks that are always true. Use emplace as per LWG 2904.
878 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
879 construct a temporary and move assign from it, as per LWG 2904.
880 * testsuite/20_util/variant/exception_safety.cc: Check that
881 assignment operators have strong exception safety guarantee.
882
55bb4515 8832019-04-23 Thomas Rodgers <trodgers@redhat.com>
884
885 Document PSTL linker flags
886
7f6a1a9c 887 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
55bb4515 888
b48cc8c5 8892019-04-23 Jonathan Wakely <jwakely@redhat.com>
890
a4265b66 891 * include/std/variant (__detail::__variant::_Traits): Make
892 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
893 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
894 P0602R4.
895 (__detail::__variant::_Copy_assign_alias): Only depend on
896 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
897 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
898 move assignment operators.
899
28cc38ec 900 PR libstdc++/90165
901 * include/std/variant (variant::__not_self): New helper for the
902 is_same_v<remove_cvref_t<T>, variant>==false constraints.
903 (variant::__to_type_impl): Remove.
904 (variant::__to_type): Add default argument to check pack size, instead
905 of using __to_type_impl.
906 (variant::__accepted_type): Add default argument using __not_self.
907 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
908 for variant(T&&) constructor constraint.
909 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
910 Extract __accepted_type into a named template parameter for reuse in
911 other constraints and in the exception specification.
912 (variant::variant(in_place_type_t<T>, Args&&...))
913 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
914 (variant::variant(in_place_index_t<T>, Args&&...))
915 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
916 (variant::operator=T&&)): Remove redundant && from trait arguments.
917 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
918 isn't used for in_place_type or in_place_index arguments.
919
b48cc8c5 920 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
921 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
922 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
923
9ac9ee83 9242019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
925 Bernd Edlinger <bernd.edlinger@hotmail.de>
926 Jakub Jelinek <jakub@redhat.com>
927
928 PR target/89093
929 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
930 general-regs-only target attribute for ARM.
931
e11f5aed 9322019-04-23 Jonathan Wakely <jwakely@redhat.com>
933
b9d8292f 934 PR libstdc++/87431
935 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
936 specialization also depend on is_nothrow_move_constructible.
937 * include/std/variant (__detail::__variant::__never_valueless()):
938 Only true if the variant would have a move assignment operator.
939 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
940 Check __never_valueless<T...>().
941 (variant::emplace): Only perform non-throwing move assignments
942 for never-valueless alternatives if the variant has a move assignment
943 operator.
944 * testsuite/20_util/variant/compile.cc: Check that never-valueless
945 types can be emplaced into non-assignable variants.
946 * testsuite/20_util/variant/run.cc: Check that never-valueless types
947 don't get copied when emplaced into non-assignable variants.
948
e11f5aed 949 * include/std/variant (__detail::__variant::__ref_cast): Remove
950 unused function.
951 (__detail::__variant::_Uninitialized::_M_get)
952 (__detail::__variant::__get)
953 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
954
46fbb8aa 9552019-04-21 Iain Sandoe <iain@sandoe.co.uk>
956
957 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
958 to Darwin10.
959 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
960 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
961 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
962 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
963
dff3f73c 9642019-04-20 Thomas Rodgers <trodgers@redhat.com>
965
966 Delegate PSTL configuration to pstl/pstl_config.h
967
968 * include/bits/c++config: Remove explicit PSTL configuration
969 macros and use definitions from <pstl/pstl_config.h>.
970
3dbad48e 9712019-04-20 Thomas Rodgers <trodgers@redhat.com>
972
973 Cleanup algorithm implementations
974 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
ed42fdb5 975 execution policy.
3dbad48e 976 (mismatch): Forward execution policy.
977 (equal): Qualify call to std::equal().
978 (partial_sort): Forward execution policy.
979 (inplace_merge): Forward execution policy.
980
5d637ddd 9812019-04-19 Thomas Rodgers <trodgers@redhat.com>
982
983 Improve implementation of parallel equal()
984 * include/pstl/algorithm_impl.h
985 (__internal::__brick_equal): use "4 iterator" version of
986 std::equal().
987 (__internal::__brick_equal): use simd for random access
988 iterators on unsequenced execution policies.
989 (__internal::__pattern_equal): add "4 iterator" version
990 (__internal::__pattern_equal): dispatch to simd __brick_equal
991 for vector-only execution policies.
992 (__internal::__pattern_equal): dispatch to __parallel_or for
993 parallel execution policies.
994 * include/pstl/glue_algorithm_impl.h
995 (std::equal): dispatch to "4 iterator" version of
996 __internal::__pattern_equal().
997
88dbeb04 9982019-04-17 Jonathan Wakely <jwakely@redhat.com>
999
a0295ab5 1000 PR libstdc++/90105
1001 * include/bits/forward_list.h (operator==): Do not use operator!= to
1002 compare elements.
1003 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
1004 earlier in the list, so that sort is stable.
1005 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
1006 * testsuite/23_containers/forward_list/comparable.cc: Test with
1007 types that meet the minimum EqualityComparable and LessThanComparable
1008 requirements. Remove irrelevant comment.
1009
37a7dbf9 1010 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
1011 Do not depend on whether all alternative types are move constructible.
1012 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
1013 from the operand when deciding whether to perform the assignment.
1014 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
1015 with deleted move constructor and deleted move assignment operator.
1016 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
1017 behaviour of variants with DeletedMoves as an alternative.
1018 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
1019 (move_ctor, move_assign): Check that moving a variant with a
1020 DeletedMoves alternative falls back to copying instead of moving.
1021
e9a490a4 1022 * testsuite/20_util/variant/compile.cc: Remove empty string literals
1023 from static_assert declarations.
1024
c4495ab1 1025 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
1026 actually match its name.
1027 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
1028 (test_swap()): Fix result for MoveCtorOnly and check
1029 MoveCtorAndSwapOnly.
1030
88dbeb04 1031 * include/std/optional (optional::value_or(U&&) &&): Add missing
1032 constexpr specifier.
1033 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
1034 for disengaged optionals and rvalue optionals.
1035 * testsuite/20_util/optional/observers/4.cc: Likewise.
1036
11deac81 10372019-04-12 Thomas Rodgers <trodgers@redhat.com>
1038
1039 * include/pstl/algorithm_impl.h: Uglify identfiers.
1040 * include/pstl/numeric_impl.h: Uglify identfiers.
1041 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
1042
34d8d757 10432019-04-11 Thomas Rodgers <trodgers@redhat.com>
1044
1045 * include/bits/c++config:
1046 Add definition for __PSTL_ASSERT.
1047 Add definition for __PSTL_ASSERT_MSG.
1048 * include/pstl/algorithm_impl.h: Replace use of assert().
1049 * include/pstl/numeric_impl.h: Replace use of assert().
1050 * include/pstl/parallel_backend_tbb.h:
1051 Replace use of assert().
1052 Replace use of __TBB_ASSERT().
34d8d757 1053 * include/pstl/parallel_backend_utils.h: Replace use of assert().
1054
629a2d18 10552019-04-11 Jonathan Wakely <jwakely@redhat.com>
1056
1057 PR libstdc++/90046
1058 * src/c++17/memory_resource.cc
1059 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
1060 needed to allow placing a _Chunk at the end of the buffer.
1061 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
1062
b047c9ae 10632019-04-10 Jonathan Wakely <jwakely@redhat.com>
1064
6a98b075 1065 * doc/xml/faq.xml: Add information about emergency EH pool.
1066 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
1067 Move outdated information on mt_allocator to a separate section.
1068 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
1069 doesn't affect the default allocator.
1070
706bf2a5 1071 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
1072 typo.
1073
b047c9ae 1074 PR libstdc++/89851
1075 * testsuite/20_util/variant/89851.cc: New test.
1076
faa382bd 10772019-04-09 Jonathan Wakely <jwakely@redhat.com>
1078
492debfa 1079 * include/std/variant: Adjust whitespace. Add comments.
1080 (_Multi_array): Leave primary template undefined.
1081 (_Multi_array<_Tp>): Define partial specialization for base case of
1082 recursion.
1083 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
1084 which is always a reference.
1085 (__gen_vtable::_S_apply()): Remove function, inline body into
1086 default member initializer.
1087 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
1088
47cf9c4c 1089 * include/std/variant (__variant_idx_cookie): Add member type.
1090 (__visitor_result_type): Remove.
1091 (__do_visit): Use invoke_result instead of __visitor_result_type.
1092 * testsuite/20_util/variant/visit.cc: New test.
1093
faa382bd 1094 PR libstdc++/90008
1095 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
1096 unused capture.
1097 * testsuite/20_util/variant/90008.cc: New test.
1098
e4da4897 10992019-04-09 Thomas Rodgers <trodgers@redhat.com>
1100
1101 * include/pstl/algorithm_impl.h: Add namespace qualification.
1102 * include/pstl/execution_defs.h: Add namespace qualification.
1103 * include/pstl/execution_impl.h: Add namespace qualification.
1104 * include/pstl/numeric_impl.h: Add namespace qualification.
1105 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
1106 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
1107 * include/pstl/parallel_backend_utils.h: Include <cassert>.
1108
ff7d433d 11092019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
1110
1111 Fix visit<R> for variant.
1112 * include/std/variant (__do_visit): Add a template parameter
1113 for enforcing same return types for visit.
1114 (__gen_vtable_impl): Likewise.
1115 (_S_apply_single_alt): Adjust.
1116 (__visit_invoke_impl): New. Handle casting to void.
1117 (__do_visit_invoke): New. Enforces same return types.
1118 (__do_visit_invoke_r): New. Converts return types.
1119 (__visit_invoke): Adjust.
1120 (__gen_vtable): Add a template parameter for enforcing
1121 same return types for visit.
1122 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
1123 different return types.
1124 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
1125 visitors with different return types don't accidentally
1126 compile with regular visitation.
1127
d0f56531 11282019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
1129
1130 * testsuite/27_io/filesystem/iterators/caching.cc: Add
1131 dg-require-filesystem-ts.
1132
781cb64d 11332019-04-05 Jonathan Wakely <jwakely@redhat.com>
1134
bfbd20f7 1135 * doc/xml/manual/status_cxx2020.xml: Update status.
1136 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
1137 * testsuite/20_util/variant/visit_r.cc: New test.
1138
83bd31bf 1139 * include/bits/fs_dir.h (directory_iterator::operator*)
1140 (directory_iterator::operator->): Add noexcept.
1141 (operator==, operator!=): Replace namespace-scope equality operators
1142 for directory iterators with hidden friends.
1143
0067a809 1144 PR libstdc++/89986
1145 * config/abi/pre/gnu.ver: Add missing exports.
1146 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
1147 increment member.
1148
7d0ae205 1149 * config/abi/pre/gnu.ver: Export new symbols.
1150 * include/bits/fs_dir.h (recursive_directory_iterator::options())
1151 (recursive_directory_iterator::recursion_pending())
1152 (recursive_directory_iterator::disable_recursion_pending()): Remove
1153 inline definitions. Make noexcept.
1154 (recursive_directory_iterator::depth())
1155 (recursive_directory_iterator::operator*())
1156 (recursive_directory_iterator::operator->()): Make noexcept.
1157 (recursive_directory_iterator::_M_options)
1158 (recursive_directory_iterator::_M_pending): Remove data members.
1159 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
1160 (recursive_directory_iterator::recursive_directory_iterator): Remove
1161 ctor-initializer. Use new constructor for _Dir_stack.
1162 (recursive_directory_iterator::options())
1163 (recursive_directory_iterator::recursion_pending())
1164 (recursive_directory_iterator::disable_recursion_pending()): Add
1165 non-inline definitions.
1166 (recursive_directory_iterator::depth()): Make noexcept.
1167 (recursive_directory_iterator::increment(error_code&))
1168 (recursive_directory_iterator::pop(error_code&)): Adjust to new
1169 location of options and recursion_pending members.
1170 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
1171 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
1172 user-declared move constructor and assignment operator, to make the
1173 type move-only.
1174
5a6e0b73 1175 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
1176 d_type == DT_UNKNOWN immediately.
1177 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
1178 handling here.
1179 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
1180
aa9c570e 1181 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
1182 assignment.
1183 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
1184 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
1185 assignment.
1186
781cb64d 1187 PR libstdc++/87431 (again)
1188 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
1189 Define partial specialization for basic_string.
1190 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
1191 shared_ptr and weak_ptr.
1192 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
1193 function.
1194 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
1195 vector.
1196 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
1197 unique_ptr.
1198 * include/debug/vector (_Never_valueless_alt): Likewise for debug
1199 vector.
1200 * include/std/any (_Never_valueless_alt): Define explicit
1201 specialization for any.
1202 * include/std/variant (_Never_valueless_alt): Define primary template.
1203 (__never_valueless): Use _Never_valueless_alt instead of
1204 is_trivially_copyable.
1205 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
1206 initializations to avoid try-catch overhead. Add special case for
1207 scalars produced by potentially-throwing conversions. Use
1208 _Never_valueless_alt instead of is_trivially_copyable for the
1209 remaining strong exception-safety cases.
1210 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
1211 * testsuite/20_util/variant/87431.cc: Run both test functions.
1212 * testsuite/20_util/variant/exception_safety.cc: New test.
1213 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
1214 so the variant becomes valueless.
1215
62fd39e8 12162019-04-03 Jonathan Wakely <jwakely@redhat.com>
1217
e1d699b8 1218 PR libstdc++/85184
1219 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
1220 Remove assertions.
72be2bb7 1221 (variant::emplace<_Tp>): Return result of emplace<N> directly.
e1d699b8 1222
62fd39e8 1223 * include/std/string (__hash_string_base): New class template defining
1224 operator() for hashing strings.
1225 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
1226 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
1227 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
1228 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
1229
4f3e024d 12302019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
1231
1232 Use single-visitation in variant assignment and swap and relops.
1233 Also use indices instead of types when checking whether
1234 variants hold the same thing.
1235 * include/std/variant (__do_visit): Add a template parameter
1236 for index visitation, invoke with indices if index visitation
1237 is used.
1238 (__variant_idx_cookie): New.
1239 (__visit_with_index): Likewise.
1240 (_Copy_assign_base::operator=): Do single-visitation with
1241 an index visitor.
1242 (_Move_assign_base::operator=): Likewise.
1243 (_Extra_visit_slot_needed): Adjust.
1244 (__visit_invoke): Call with indices if it's an index visitor.
1245 (relops): Do single-visitation with an index visitor.
1246 (swap): Likewise.
1247 (__visitor_result_type): New.
1248
106979b7 12492019-03-30 Eric Botcazou <ebotcazou@adacore.com>
1250
1251 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
1252
225ca87b 12532019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1254
1255 Don't revisit a variant we are already visiting.
1256 * include/std/variant (__variant_construct_single): New.
1257 (__variant_construct): Use it.
1258 (_M_destructive_move): Likewise.
1259 (_M_destructive_copy): Likewise.
1260 (_Copy_assign_base::operator=): Adjust.
1261 (_Move_assign_base::operator=): Likewise.
1262 (swap): Likewise.
1263
7237dce7 12642019-03-26 Jonathan Wakely <jwakely@redhat.com>
1265
1266 PR libstdc++/85965
1267 * include/bits/hashtable.h (_Hashtable): Move static assertions to
1268 destructor so they are not evaluated until the _Key type is complete.
1269 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1270 * testsuite/23_containers/set/85965.cc: New test.
1271 * testsuite/23_containers/unordered_set/85965.cc: New test.
1272 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
1273 with regexp matching the corresponding _Rb_tree specialization.
1274 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1275 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
1276 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1277 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1278 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1279 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1280 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1281
4c0ef551 12822019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1283
1284 PR libstdc++/89825
1285 Fix based on a suggestion by Antony Polukhin.
1286 * include/std/variant (__never_valueless): New.
1287 (_M_valid): Use it.
1288 (_Extra_visit_slot_needed): New.
1289 (_Multi_array): Use it.
1290 (_S_apply_all_alts): Likewise.
1291
28b460dd 12922019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1293
1294 PR libstdc++/89824
1295 Fix based on a suggestion by Antony Polukhin.
1296 * include/std/variant (__gen_vtable): Don't reserve an
1297 additional table slot, _Multi_array already does that.
1298
4d235dc5 12992019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1300
1301 PR libstdc++/89816
1302 Fix based on a suggestion by Antony Polukhin.
1303 * include/std/variant (__variant_construct): Capture a pointer
1304 to the storage and visit just one variant.
1305
d0595c7e 13062019-03-22 Jonathan Wakely <jwakely@redhat.com>
1307
5c34f7ca 1308 * doc/xml/manual/backwards_compatibility.xml: Remove link to
1309 Doxygen-generated pages with unstable URL.
1310 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1311 * doc/xml/manual/extensions.xml: Likewise.
1312 * doc/xml/manual/parallel_mode.xml: Likewise.
1313 * doc/xml/manual/support.xml: Likewise.
1314
d0595c7e 1315 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
1316 avoid -Wconversion warnings.
1317
7e155e54 13182019-03-21 Thomas Rodgers <trodgers@redhat.com>
1319
1320 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
1321 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
1322 (allstamped): Add stamp-pstl.
1323 (install-headers): Add ptsl_builddir.
1324 * include/Makefile.in: Regenerate.
1325 * include/bits/c++config: Add pstl configuration.
1326 * include/pstl/LICENSE.txt: New file.
1327 * include/pstl/algorithm_fwd.h: New file.
1328 * include/pstl/algorithm_impl.h: New file.
1329 * include/pstl/execution_defs.h: New file.
1330 * include/pstl/execution_impl.h: New file.
1331 * include/pstl/glue_algorithm_defs.h: New file.
1332 * include/pstl/glue_algorithm_impl.h: New file.
1333 * include/pstl/glue_execution_defs.h: New file.
1334 * include/pstl/glue_memory_defs.h: New file.
1335 * include/pstl/glue_memory_impl.h: New file.
1336 * include/pstl/glue_numeric_defs.h: New file.
1337 * include/pstl/glue_numeric_impl.h: New file.
1338 * include/pstl/memory_impl.h: New file.
1339 * include/pstl/numeric_fwd.h: New file.
1340 * include/pstl/numeric_impl.h: New file.
1341 * include/pstl/parallel_backend.h: New file.
1342 * include/pstl/parallel_backend_tbb.h: New file.
1343 * include/pstl/parallel_backend_utils.h: New file.
1344 * include/pstl/parallel_impl.h: New file.
1345 * include/pstl/pstl_config.h: New file.
1346 * include/pstl/unseq_backend_simd.h: New file.
1347 * include/pstl/utils.h: New file.
1348 * include/std/algorithm: Include parallel algorithm implementations.
1349 * include/std/execution: New file.
1350 * include/std/memory: Include parallel algorithm implementations.
1351 * include/std/numeric: Include parallel algorithm implementations.
1352 * include/std/version: Add parallel algorithms feature test macro.
1353 * testsuite/util/pstl/pstl_test_config.h: New file.
1354 * testsuite/util/pstl/test_utils.h: New file.
1355 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1356 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1357 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1358 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1359 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1360 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1361 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1362 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1363 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1364 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1365 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1366 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1367 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1368 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1369 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1370 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1371 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1372 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1373 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1374 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1375 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1376 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1377 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1378 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1379 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1380 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1381 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1382 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1383 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1384 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1385 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1386 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1387 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1388 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1389 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1390 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1391 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1392 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1393 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1394 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1395 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1396 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1397 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1398 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1399 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1400 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1401 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1402 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1403 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1404 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1405 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1406 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1407 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1408 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
1409 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
1410 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
1411 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
1412 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
1413 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
1414 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
1415 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
1416 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
1417 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
1418 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
1419 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
1420 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
1421 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
1422 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
1423 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
1424 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
1425 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
1426 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
1427 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
1428 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
1429 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
1430 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
1431 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
1432 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
1433 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
1434 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
1435 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
1436 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
1437 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
1438 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
1439 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
1440 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
1441 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
1442 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
1443 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
1444 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
1445 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
1446 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
1447 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
1448 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
1449 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
1450 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
1451 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
1452 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
1453 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
1454 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
1455 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
1456 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
1457 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
1458 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
1459 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
1460 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
1461
480b3b75 14622019-03-21 Jonathan Wakely <jwakely@redhat.com>
1463
0a4390ac 1464 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
1465 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
1466 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
1467 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
1468 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
1469 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
1470 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
1471 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
1472 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
1473 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
1474 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
1475 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
1476 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
1477 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
1478 when the special functions IS is enabled, not for C++17.
1479 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
1480 Replace with ...
1481 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
1482 without checks for special functions in C++17.
1483 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
1484 New test.
1485
480b3b75 1486 PR libstdc++/88066
1487 * include/backward/hash_map: Use <> for includes not "".
1488 * include/backward/hash_set: Likewise.
1489 * include/backward/strstream: Likewise.
1490 * include/tr1/bessel_function.tcc: Likewise.
1491 * include/tr1/exp_integral.tcc: Likewise.
1492 * include/tr1/legendre_function.tcc: Likewise.
1493 * include/tr1/modified_bessel_func.tcc: Likewise.
1494 * include/tr1/riemann_zeta.tcc: Likewise.
1495
ed360d55 14962019-03-19 Jonathan Wakely <jwakely@redhat.com>
1497
1498 * doc/xml/manual/allocator.xml: Link to table documenting evolution
1499 of extension allocators.
1500 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
1501 Document new headers in 7.2, 8.1 and 9.1 releases.
1502 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
1503 * doc/html/*: Regenerate.
1504
8f9d7eb1 15052019-03-12 John David Anglin <dave.anglin@bell.net>
1506
1507 PR libstdc++/89461
1508 * testsuite/lib/libstdc++.exp: Locate libatomic.
1509 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
1510 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
1511 libatomic options.
1512 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
1513 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
1514 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
1515 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1516
0bd005b6 15172019-03-11 Jonathan Wakely <jwakely@redhat.com>
1518
5995ba3a 1519 PR libstdc++/89460
1520 * configure.ac: Check for sockatmark.
1521 * crossconfig.m4: Check for sockatmark.
1522 * config.h.in: Regenerate.
1523 * configure: Regenerate.
1524 * include/experimental/internet (address_v4::_S_hton): Rename
1525 overloaded functions to _S_hton_16 and _S_ntoh_16.
1526 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
1527 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
1528 * include/experimental/socket (basic_socket::at_mark): Check
1529 _GLIBCXX_HAVE_SOCKATMARK.
1530
5aa8571a 1531 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
1532 const variables instead of macros.
1533
0bd005b6 1534 PR libstdc++/89629
1535 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
1536 Use correct type for len_aligned.
1537 * testsuite/20_util/hash/89629.cc: New test.
1538
bc204227 15392019-03-11 Jakub Jelinek <jakub@redhat.com>
1540
1541 PR libstdc++/89641
1542 * include/std/atomic (atomic<T>::store, atomic<T>::load,
1543 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
1544 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
1545 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
1546 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
1547 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
1548 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
1549 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
1550 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
1551 memory_order_seq_cst to int.
1552
fc557c2b 15532019-03-08 Jonathan Wakely <jwakely@redhat.com>
1554
59b5e890 1555 * doc/xml/manual/using.xml: Use link element instead of xref.
1556 * doc/html/*: Regenerate.
1557
fc557c2b 1558 * include/bits/fs_path.h (path::format): Add fixed underlying type.
1559
66c6ff9e 15602019-03-08 François Dumont <fdumont@gcc.gnu.org>
1561
448338d0 1562 PR libstdc++/89477
1563 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
1564 parameters in deduction guides.
1565 * include/debug/multimap.h (multimap): Likewise.
1566 * include/debug/set.h (multimap): Likewise.
1567 * include/debug/multiset.h (multimap): Likewise.
1568 * include/debug/unordered_map (unordered_map): Likewise.
1569 (unordered_multimap): Likewise.
1570 * include/debug/unordered_set (unordered_set): Likewise.
1571 (unordered_multiset): Likewise.
1572
66c6ff9e 1573 PR libstdc++/89608
1574 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
1575 Invalidate all iterators in case of rehash.
1576 (unordered_multimap<>::_M_check_rehashed): Likewise.
1577 * include/debug/unordered_set
1578 (unordered_set<>::_M_check_rehashed): Likewise.
1579 (unordered_multiset<>::_M_check_rehashed): Likewise.
1580 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
1581
32e92dc2 15822019-03-07 Andreas Schwab <schwab@suse.de>
1583
1584 * config/abi/post/riscv64-linux-gnu: New directory.
1585 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
1586
61dcf2e1 15872019-03-07 Jonathan Wakely <jwakely@redhat.com>
1588
682ee94e 1589 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
1590 compile test to run. Fix typo.
1591
f24442bd 1592 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1593 * doc/html/*: Regenerate.
1594
61dcf2e1 1595 P0356R5 Simplified partial function application
1596 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
1597 helpers for bind_front.
1598 (bind_front, __cpp_lib_bind_front): Define.
1599 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
1600
b4af2395 16012019-03-06 Jonathan Wakely <jwakely@redhat.com>
1602
1603 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
1604 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
1605 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
1606 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1607
f1857b8b 16082019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
1609
1610 PR libstdc++/86655 - std::assoc_legendre should not constrain
1611 the value of m (or x).
1612 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
1613 __sph_legendre): If degree > order Don't throw, return 0.
1614 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
1615 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
1616 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
1617 * testsuite/tr1/5_numerical_facilities/special_functions/
1618 02_assoc_legendre/pr86655.cc: New test.
1619 * testsuite/tr1/5_numerical_facilities/special_functions/
1620 22_sph_legendre/pr86655.cc: New test.
1621
49c83dca 16222019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1623
1624 Rewrite variant.
1625 Also PR libstdc++/85517
1626 * include/std/variant (__do_visit): New.
1627 (__variant_cast): Likewise.
1628 (__variant_cookie): Likewise.
1629 (__erased_*): Remove.
1630 (_Variant_storage::_S_vtable): Likewise.
1631 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
1632 (_Variant_storage::__M_reset): Adjust.
1633 (__variant_construct): New.
1634 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
1635 __variant_construct.
1636 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1637 (_Move_ctor_base::__M_destructive_copy): New.
1638 (_Move_ctor_base::__M_destructive_move): Adjust to use
1639 __variant_construct.
1640 (_Copy_assign_base::operator=): Adjust to use __do_visit.
1641 (_Copy_assign_alias): Adjust to check both copy assignment
1642 and copy construction for triviality.
1643 (_Move_assign_base::operator=): Adjust to use __do_visit.
1644 (_Multi_array): Add support for visitors that accept and return
1645 a __variant_cookie.
1646 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
1647 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
1648 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
1649 a __variant_cookie temporary for a variant that is valueless and..
1650 (__gen_vtable_impl::__visit_invoke): ..adjust here.
1651 (__gen_vtable::_Array_type): Conditionally make space for
1652 the __variant_cookie visitor case.
1653 (__variant_construct_by_index): New.
1654 (get_if): Adjust to use std::addressof.
1655 (relops): Adjust to use __do_visit.
1656 (variant): Add __variant_cast and __variant_construct_by_index
1657 as friends.
1658 (variant::emplace): Use _M_reset() and __variant_construct_by_index
1659 instead of self-destruction.
1660 (variant::swap): Adjust to use __do_visit.
1661 (visit): Reimplement in terms of __do_visit.
1662 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
1663 * testsuite/20_util/variant/compile.cc: Adjust.
1664 * testsuite/20_util/variant/run.cc: Likewise.
1665
13825fb2 16662019-03-06 Jonathan Wakely <jwakely@redhat.com>
1667
2613fa6b 1668 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
1669 constant.
1670 * testsuite/experimental/feat-char8_t.cc: Likewise.
1671
a17f06b3 1672 * include/std/type_traits [C++20] (is_bounded_array)
1673 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
1674 Define.
1675 * testsuite/20_util/is_bounded_array/requirements/
1676 explicit_instantiation.cc: New test.
1677 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
1678 test.
1679 * testsuite/20_util/is_bounded_array/value.cc: New test.
1680 * testsuite/20_util/is_unbounded_array/requirements/
1681 explicit_instantiation.cc: New test.
1682 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
1683 * test.
1684 * testsuite/20_util/is_unbounded_array/value.cc: New test.
1685
13825fb2 1686 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
1687 Add constexpr.
1688 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
1689
2e73e63a 16902019-03-05 Jonathan Wakely <jwakely@redhat.com>
1691
1692 * include/c_compatibility/math.h [C++20] (lerp): Add using
1693 declaration.
1694 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
1695 (__lerp): Define function template to implement lerp.
1696 (lerp(float, float, float), lerp(double, double, double))
1697 (lerp(long double, long double, long double)): Define for C++20.
1698 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
1699 (midpoint(T, T), midpoint(T*, T*)): Define.
1700 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
1701 * testsuite/26_numerics/lerp.cc: New test.
1702 * testsuite/26_numerics/midpoint/floating.cc: New test.
1703 * testsuite/26_numerics/midpoint/integral.cc: New test.
1704 * testsuite/26_numerics/midpoint/pointer.cc: New test.
1705
08d3ce5b 17062019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
1707
1708 PR libstdc++/88996 Implement P0439R0
1709 Make std::memory_order a scoped enumeration.
1710 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
1711 add variables for the old enumerators. Adjust calls.
1712 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
1713 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
1714
ad29ad75 17152019-03-04 Jonathan Wakely <jwakely@redhat.com>
1716
4233f2a8 1717 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
1718 directive.
1719
ad29ad75 1720 * include/std/memory_resource (polymorphic_allocator): Add default
1721 template argument for C++20.
1722 (polymorphic_allocator::allocate_bytes)
1723 (polymorphic_allocator::deallocate_bytes)
1724 (polymorphic_allocator::allocate_object)
1725 (polymorphic_allocator::deallocate_object)
1726 (polymorphic_allocator::new_object)
1727 (polymorphic_allocator::delete_object): New member functions for
1728 C++20.
1729 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
1730 test.
1731
d4c27c4a 17322019-03-03 Jonathan Wakely <jwakely@redhat.com>
1733
1734 PR libstdc++/89562
1735 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
1736 mode for mingw.
1737
6a9c77f1 17382019-03-01 Jonathan Wakely <jwakely@redhat.com>
1739
5b313df9 1740 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
1741 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
1742
6a9c77f1 1743 * include/std/memory (uses_allocator_construction_args): New set of
1744 overloaded functions.
1745 (make_obj_using_allocator, uninitialized_construct_using_allocator):
1746 New functions.
1747 * include/std/memory_resource (polymorphic_allocator::construct)
1748 [__cplusplus > 201703l]: Replace all overloads with a single function
1749 using uses_allocator_construction_args.
1750 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
1751 test.
1752 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
1753
53ea0887 17542019-02-27 Jonathan Wakely <jwakely@redhat.com>
1755
1756 PR libstdc++/89466
1757 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
1758 stylesheet directories before check for xsltproc. Try to use
1759 xmlcatalog to find local stylesheet directory before trying hardcoded
1760 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
1761 check to look for the same stylesheet as doc/Makefile.am uses. Don't
1762 use xsltproc if xmlcatalog fails to find a local stylesheet.
1763 * configure.ac: Check for xmlcatalog.
1764 * Makefile.in: Regenerate.
1765 * configure: Likewise.
1766 * doc/Makefile.in: Likewise.
1767 * include/Makefile.in: Likewise.
1768 * libsupc++/Makefile.in: Likewise.
1769 * po/Makefile.in: Likewise.
1770 * python/Makefile.in: Likewise.
1771 * src/Makefile.in: Likewise.
1772 * src/c++11/Makefile.in: Likewise.
1773 * src/c++17/Makefile.in: Likewise.
1774 * src/c++98/Makefile.in: Likewise.
1775 * src/filesystem/Makefile.in: Likewise.
1776 * testsuite/Makefile.in: Likewise.
1777
72ebb7e8 17782019-02-26 Jonathan Wakely <jwakely@redhat.com>
1779
a7f2f1b1 1780 PR libstdc++/89477
1781 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
1782 container deduction guides.
1783 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
1784 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
1785 parameters in deduction guides.
1786 * include/bits/stl_multimap.h (multimap): Likewise.
1787 * include/bits/stl_multiset.h (multiset): Likewise.
1788 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
1789 * include/bits/stl_set.h (set): Likewise.
1790 * include/bits/stl_stack.h (stack): Likewise.
1791 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
1792 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
1793 constrain parameters in deduction guides.
1794 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
1795 Likewise.
1796 * testsuite/23_containers/map/cons/deduction.cc: Test additional
1797 deduction cases.
1798 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
1799 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
1800 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
1801 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
1802 Likewise.
1803 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
1804 Likewise.
1805 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
1806
72ebb7e8 1807 PR libstdc++/89416
1808 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
1809 to class template and partial specialization using void_t.
1810 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1811
c9f61a64 18122019-02-24 Jonathan Wakely <jwakely@redhat.com>
1813
1814 PR libstdc++/89416
1815 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
1816 copy and move members public.
1817
61e2d6f7 18182019-02-23 Jonathan Wakely <jwakely@redhat.com>
1819
87798f3f 1820 * include/std/type_traits (__underlying_type_impl): New helper to
1821 make underlying_type SFINAE-friendly.
1822 (underlying_type): Derive from __underlying_type_impl.
1823 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
1824 test.
1825
61e2d6f7 1826 PR libstdc++/89446
1827 * include/bits/char_traits.h (__constant_char_array): Check index is
1828 in range before dereferencing.
1829 (char_traits<char>::compare, char_traits<char>::find)
1830 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
1831 immediately if n is zero.
1832 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
1833 Remove workarounds for PR 67026.
1834 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
1835 New test.
1836 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
1837 New test.
1838
90a443b3 18392019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1840
1841 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
1842 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
1843
98485ce3 18442019-02-22 Jakub Jelinek <jakub@redhat.com>
1845
1846 PR libstdc++/89402
1847 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
1848 type to std::size_t and argument to type to long double.
1849
26b4fc38 18502019-02-22 Eric Botcazou <ebotcazou@adacore.com>
1851
1852 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
1853 * config/abi/post/sparc64-linux-gnu: New directory.
1854 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
1855 * config/abi/post/sparc64-linux-gnu/32: New directory.
1856 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
1857
4f847a8e 18582019-02-21 Jonathan Wakely <jwakely@redhat.com>
1859
1860 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
1861 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
1862 test.
1863
aad651b3 18642019-02-22 Tom Honermann <tom@honermann.net>
1865
1866 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
1867 printers for u8string and u8string_view.
1868
c783b3cc 18692019-02-22 Tom Honermann <tom@honermann.net>
1870
1871 * testsuite/18_support/byte/ops.cc: Validate
1872 std::to_integer<char8_t>, std::to_integer<char16_t>, and
1873 std::to_integer<char32_t>.
1874 * testsuite/18_support/numeric_limits/dr559.cc: Validate
1875 std::numeric_limits<char8_t>.
1876 * testsuite/18_support/numeric_limits/lowest.cc: Validate
1877 std::numeric_limits<char8_t>::lowest().
1878 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
1879 std::numeric_limits<char8_t>::max_digits10.
1880 * testsuite/18_support/type_info/fundamental.cc: Validate
1881 typeinfo for char8_t.
1882 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
1883 std::from_chars with char8_t.
1884 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
1885 Validate explicit instantiation of std::hash<char8_t>.
1886 * testsuite/20_util/is_integral/value.cc: Validate
1887 std::is_integral<char8_t>.
1888 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
1889 Validate std::make_signed<char8_t>.
1890 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
1891 Validate u8string construction from char8_t sources.
1892 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
1893 std::pmr::u8string.
1894 * testsuite/21_strings/basic_string_view/operations/compare/
1895 char/70483.cc: Validate substr operations on u8string_view.
1896 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
1897 the u8string_view typedef is defined.
1898 * testsuite/21_strings/char_traits/requirements/
1899 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
1900 member functions.
1901 * testsuite/21_strings/char_traits/requirements/
1902 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
1903 constexpr member functions.
1904 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
1905 that the u8string typedef is defined.
1906 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
1907 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
1908 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
1909 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
1910 numbers.
1911 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1912 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
1913 Likewise.
1914 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1915 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
1916 Validate std::atomic<char8_t>::is_always_lock_free
1917 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
1918 Update line numbers.
1919 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
1920 Likewise.
1921 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
1922 Likewise.
1923 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1924 Validate std::experimental::pmr::u8string.
1925 * testsuite/experimental/string_view/typedefs.cc: Validate that the
1926 u8string_view typedef is defined.
1927 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
1928 char32_t to the typelists.
1929
ef96a935 19302019-02-22 Tom Honermann <tom@honermann.net>
1931
1932 * include/ext/typelist.h: Constrain a partial specialization of
1933 typelist::detail::append_ to only match chain<T1,T2>.
1934
d373b606 19352019-02-21 Jonathan Wakely <jwakely@redhat.com>
1936
1937 PR libstdc++/89416
1938 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
1939 class template with class. Replace move and copy member types with
1940 member alias templates, so they are only instantiated when needed.
1941 (__is_copy_insertable, __is_move_insertable): Adjust base class.
1942 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
1943 test for C++11/14/17 as well.
1944 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
1945 test.
1946
25395ee8 19472019-02-20 Jakub Jelinek <jakub@redhat.com>
1948
1949 PR libstdc++/89402
1950 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
1951 _GLIBCXX_PURE to the alias declaration.
1952
affcb65b 19532019-02-19 Jonathan Wakely <jwakely@redhat.com>
1954
1955 * testsuite/21_strings/basic_string/literals/types.cc
1956 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
1957 * testsuite/21_strings/basic_string/literals/values.cc
1958 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1959 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
1960 potentially having different type.
1961 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
1962 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
1963 to char.
1964 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
1965 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
1966 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
1967 string literals only using basic character set.
1968 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
1969 u8 literals to char.
1970 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
1971 Test ATOMIC_CHAR8_T_LOCK_FREE.
1972 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
1973 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
1974 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
1975 * testsuite/experimental/string_view/literals/types.cc
1976 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
1977 literal.
1978 * testsuite/experimental/string_view/literals/values.cc
1979 [_GLIBCXX_USE_CHAR8_T]: Likewise.
1980
4acc5060 19812019-02-19 Tom Honermann <tom@honermann.net>
1982
1983 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
1984 from char16_32_t.cc; validates numeric_limits<char8_t>.
1985 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
1986 test cloned from types.cc; validates operator""s for char8_t
1987 returns u8string.
1988 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
1989 test cloned from values.cc; validates construction and comparison
1990 of u8string values.
1991 * testsuite/21_strings/basic_string/requirements/
1992 /explicit_instantiation/char8_t/1.cc: New test cloned from
1993 char16_t/1.cc; validates explicit instantiation of
1994 basic_string<char8_t>.
1995 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1996 New test cloned from types.cc; validates operator""sv for char8_t
1997 returns u8string_view.
1998 * testsuite/21_strings/basic_string_view/literals/
1999 values-char8_t.cc: New test cloned from values.cc; validates
2000 construction and comparison of u8string_view values.
2001 * testsuite/21_strings/basic_string_view/requirements/
2002 explicit_instantiation/char8_t/1.cc: New test cloned from
2003 char16_t/1.cc; validates explicit instantiation of
2004 basic_string_view<char8_t>.
2005 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
2006 New test cloned from char16_t/65049.cc; validates that
2007 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
2008 * testsuite/21_strings/char_traits/requirements/char8_t/
2009 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
2010 that char_traits<char8_t> member typedefs are present and correct.
2011 * testsuite/21_strings/char_traits/requirements/
2012 explicit_instantiation/char8_t/1.cc: New test cloned from
2013 char16_t/1.cc; validates explicit instantiation of
2014 char_traits<char8_t>.
2015 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
2016 from char16_t.cc: validates
2017 codecvt<char16_t, char8_t, mbstate_t>.
2018 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
2019 from char32_t.cc: validates
2020 codecvt<char32_t, char8_t, mbstate_t>.
2021 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
2022 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
2023 codecvt<char32_t, char8_t, std::mbstate_t>.
2024 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
2025 test cloned from string.cc; validates filesystem::path construction
2026 from char8_t input.
2027 * testsuite/experimental/feat-char8_t.cc: New test; validates that
2028 the __cpp_lib_char8_t feature test macro is defined with the
2029 correct value.
2030 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2031 New test cloned from string.cc; validates filesystem::path
2032 construction from char8_t input.
2033 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
2034 test cloned from types.cc; validates operator""sv for char8_t
2035 returns u8string_view.
2036 * testsuite/experimental/string_view/literals/values-char8_t.cc:
2037 New test cloned from values.cc; validates construction and
2038 comparison of u8string_view values.
2039 * testsuite/experimental/string_view/requirements/
2040 explicit_instantiation/char8_t/1.cc: New test cloned from
2041 char16_t/1.cc; validates explicit instantiation of
2042 basic_string_view<char8_t>.
2043 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
2044 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
2045 enabled.
2046
25694c85 20472019-02-19 Tom Honermann <tom@honermann.net>
2048
2049 P0482R5 char8_t: Standard library support
2050 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
2051 typeinfo symbols for char8_t.
2052 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
2053 (GLIBCXX_3.4.26): Add symbols for specializations of
2054 numeric_limits and codecvt that involve char8_t.
2055 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
2056 * include/bits/atomic_base.h: Add atomic_char8_t.
2057 * include/bits/basic_string.h: Add std::hash<u8string> and
2058 operator""s(const char8_t*, size_t).
2059 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
2060 __cpp_lib_char8_t.
2061 * include/bits/char_traits.h: Add char_traits<char8_t>.
2062 * include/bits/codecvt.h: Add
2063 codecvt<char16_t, char8_t, mbstate_t>,
2064 codecvt<char32_t, char8_t, mbstate_t>,
2065 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2066 codecvt_byname<char32_t, char8_t, mbstate_t>.
2067 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
2068 recognize char8_t as an integral type.
2069 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
2070 char8_t.
2071 (path::u8string): Return std::u8string when char8_t support is
2072 enabled.
2073 (path::generic_u8string): Likewise.
2074 (path::_S_convert): Handle conversion from char8_t input.
2075 (path::_S_str_convert): Likewise.
2076 * include/bits/functional_hash.h: Add hash<char8_t>.
2077 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
2078 char8_t.
2079 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
2080 for new char8_t specializations.
2081 * include/bits/localefwd.h: Add missing declarations of
2082 codecvt<char16_t, char, mbstate_t> and
2083 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
2084 codecvt<char16_t, char8_t, mbstate_t> and
2085 codecvt<char32_t, char8_t, mbstate_t>.
2086 * include/bits/postypes.h: Add u8streampos
2087 * include/bits/stringfwd.h: Add declarations of
2088 char_traits<char8_t> and u8string.
2089 * include/c_global/cstddef: Add __byte_operand<char8_t>.
2090 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2091 Recognize char8_t.
2092 (path::u8string): Return std::u8string when char8_t support is
2093 enabled.
2094 (path::generic_u8string): Likewise.
2095 (path::_S_convert): Handle conversion from char8_t input.
2096 (path::_S_str_convert): Likewise.
2097 * include/experimental/string: Add u8string.
2098 * include/experimental/string_view: Add u8string_view,
2099 hash<experimental::u8string_view>, and
2100 operator""sv(const char8_t*, size_t).
2101 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
2102 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
2103 as a character type.
2104 * include/std/limits: Add numeric_limits<char8_t>.
2105 * include/std/string_view: Add u8string_view,
2106 hash<experimental::u8string_view>, and
2107 operator""sv(const char8_t*, size_t).
2108 * include/std/type_traits: Add __is_integral_helper<char8_t>,
2109 __make_unsigned<char8_t>, and __make_signed<char8_t>.
2110 * libsupc++/atomic_lockfree_defines.h: Define
2111 ATOMIC_CHAR8_T_LOCK_FREE.
2112 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
2113 codecvt.cc and limits.cc so that char8_t specializations of
2114 numeric_limits and codecvt and emitted.
2115 * src/c++11/Makefile.in: Likewise.
2116 * src/c++11/codecvt.cc: Define members of
2117 codecvt<char16_t, char8_t, mbstate_t>,
2118 codecvt<char32_t, char8_t, mbstate_t>,
2119 codecvt_byname<char16_t, char8_t, mbstate_t>, and
2120 codecvt_byname<char32_t, char8_t, mbstate_t>.
2121 * src/c++11/limits.cc: Define members of
2122 numeric_limits<char8_t>.
2123 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
2124 locale_init.cc and localename.cc.
2125 * src/c++98/Makefile.in: Likewise.
2126 * src/c++98/locale_init.cc: Add initialization for the
2127 codecvt<char16_t, char8_t, mbstate_t> and
2128 codecvt<char32_t, char8_t, mbstate_t> facets.
2129 * src/c++98/localename.cc: Likewise.
2130 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
2131
140615bb 21322019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
2133
2134 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
2135 * 27_io/filesystem/operations/resize_file.cc: Likewise.
2136 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
2137
c677a9d7 21382019-02-14 Jonathan Wakely <jwakely@redhat.com>
2139
1bbfe9f8 2140 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
2141 * doc/html/*: Regenerate.
2142
b24f00b1 2143 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
2144 * doc/html/*: Regenerate.
2145
a3d1baa9 2146 * doc/xml/manual/intro.xml: Document LWG 2586 status.
2147 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
2148 allocator type in is_constructible checks.
2149 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
2150 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
2151 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
2152 problematic type from LWG 2586 discussion.
2153 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
2154 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2155
99d130bf 2156 * configure.ac: Check for C11 timespec_get function.
2157 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
2158 (openbsd): Likewise
2159 * config.h.in: Regenerate.
2160 * configure: Regenerate.
2161 * include/c_global/ctime (timespec, timespec_get): Add to namespace
2162 std for C++17 and up.
2163
48772ec3 2164 * doc/xml/manual/intro.xml: Document LWG 2537 status.
2165 * include/bits/stl_queue.h
2166 (priority_queue(const Compare&, const Container&, const Alloc&))
2167 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
2168 make_heap.
2169 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
2170
ee32dd64 2171 * doc/xml/manual/intro.xml: Document LWG 2566 status.
2172 * include/bits/stl_queue.h (queue, priority_queue): Add static
2173 assertions to enforce LWG 2566 requirement on value_type.
2174 * include/bits/stl_stack.h (stack): Likewise.
2175
9724de38 2176 PR middle-end/89303
2177 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
2178
c677a9d7 2179 * doc/xml/manual/intro.xml: Document LWG 2735 status.
2180 * include/bits/std_abs.h: Add comment about LWG 2735.
2181 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
2182
4194f872 21832019-02-13 Jonathan Wakely <jwakely@redhat.com>
2184
2185 PR libstdc++/89345
2186 * include/std/version [__cpp_impl_destroying_delete]
2187 (__cpp_lib_destroying_delete): Only define for C++2a and later.
2188 * libsupc++/new [__cpp_impl_destroying_delete]
2189 (__cpp_lib_destroying_delete): Likewise.
2190 (destroying_delete_t, destroying_delete): Likewise, but define even
2191 when __cpp_impl_destroying_delete is not defined.
2192 * testsuite/18_support/destroying_delete.cc: New test.
2193
aaacaee2 21942019-02-11 Jonathan Wakely <jwakely@redhat.com>
2195
2196 PR libstdc++/89023
2197 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
2198 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
2199 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
2200 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
2201
5256b0dd 22022019-02-09 Jonathan Wakely <jwakely@redhat.com>
2203
2204 PR libstdc++/71044
2205 * include/bits/fs_path.h (path::has_root_name)
2206 (path::has_root_directory, path::has_root_path)
2207 (path::has_relative_path, path::has_parent_path)
2208 (path::has_filename, path::has_stem, path::has_extension)
2209 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
2210 noexcept.
2211 * src/c++17/fs_path.cc (path::has_root_name)
2212 (path::has_root_directory, path::has_root_path)
2213 (path::has_relative_path, path::has_parent_path)
2214 (path::has_filename, path::_M_find_extension): Add noexcept.
2215
e32f625e 22162019-02-06 Jonathan Wakely <jwakely@redhat.com>
2217
2218 PR libstdc++/89102 (partial)
2219 * include/std/type_traits (common_type<>): Define.
2220 (common_type<T>): Derive from common_type<T, T>.
2221 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2222 Test zero-length template argument list.
2223 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2224 Test additional single argument cases.
2225 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2226 Adjust expected error.
2227
b03489db 22282019-02-05 Jonathan Wakely <jwakely@redhat.com>
2229
e89e4fec 2230 PR libstdc++/89128
2231 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
2232 guides.
2233 * include/bits/stl_stack.h (stack): Likewise.
2234 * testsuite/23_containers/priority_queue/deduction.cc: New test.
2235 * testsuite/23_containers/queue/deduction.cc: New test.
2236 * testsuite/23_containers/stack/deduction.cc: New test.
2237
b640dd11 2238 PR libstdc++/89194
2239 * include/std/type_traits (__is_convertible_helper)
2240 (__is_convertible_helper<_From, _To, false>): Revert changes to
2241 support is_nothrow_convertible.
2242 (__is_nt_convertible_helper): New helper.
2243 (is_nothrow_convertible): Use __is_nt_convertible_helper.
2244
74c88c5f 2245 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
2246 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
2247
eca5e8d4 2248 PR libstdc++/89130
2249 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
2250 __is_alloc_insertable_impl. Replace single type member with two
2251 members, one for each of copy and move insertable.
2252 (__is_move_insertable): New trait for internal use.
2253 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
2254 (vector::_S_nothrow_relocate(true_type)): New functions to
2255 conditionally check if __relocate_a can throw.
2256 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
2257 on __is_move_insertable.
2258 (vector::_S_do_relocate): New overloaded functions to conditionally
2259 call __relocate_a.
2260 (vector::_S_relocate): New function that dispatches to _S_do_relocate
2261 based on _S_use_relocate.
2262 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2263 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
2264 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
2265
b03489db 2266 PR libstdc++/89090
2267 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
2268 parameter unnamed. Add message to static assertion.
2269 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2270 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
2271 in C++11 code.
2272
71625a15 22732019-02-05 Marc Glisse <marc.glisse@inria.fr>
2274
2275 PR libstdc++/87106
2276 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
2277 Rename...
2278 (__is_bitwise_relocatable): ... to this.
2279 (__relocate_a_1): Adapt.
2280 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
2281 (__is_bitwise_relocatable): ... to this.
2282
e7b22e58 22832019-01-30 Jonathan Wakely <jwakely@redhat.com>
2284
2285 PR libstdc++/89117
2286 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
2287 final component as well as from _M_pathname. Append the dot using
2288 operator+= instead of only to _M_pathname.
2289 (path::_M_find_extension): Reformat slightly.
2290 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2291 Add more test cases.
2292
dae923a7 22932019-01-30 Ulrich Drepper <drepper@redhat.com>
2294
2295 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
2296
710397ad 22972019-01-29 Jonathan Wakely <jwakely@redhat.com>
2298
5efc4356 2299 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
2300 constexpr specifiers from arg and proj.
2301
5f15e718 2302 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
2303 __shared_ptr instantiations used by gcc4-compatible ABI.
2304
307e86fc 2305 * include/experimental/forward_list (experimental::erase): Qualify
2306 call to erase_if.
2307 * include/experimental/list (experimental::erase): Likewise.
2308 * include/std/forward_list (std::erase): Likewise.
2309 * include/std/list (std::erase): Likewise.
2310
38129d1a 2311 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
2312 C++2a.
2313 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
2314 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
2315 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
2316 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
2317 * testsuite/ext/array_allocator/26875.cc: Likewise.
2318 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
2319 * testsuite/util/replacement_memory_operators.h: Likewise.
2320 * testsuite/util/testsuite_allocator.h: Likewise.
2321
710397ad 2322 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
2323 normal mode vector, even for debug mode.
2324 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
2325 Define alias template for normal mode vector.
2326
70f71249 23272019-01-28 Jonathan Wakely <jwakely@redhat.com>
2328
2329 PR libstdc++/68737
2330 * config/locale/generic/c_locale.h (__convert_from_v)
2331 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2332 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2333 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
2334 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
2335
f1074115 23362019-01-24 Jonathan Wakely <jwakely@redhat.com>
2337
4bc4fd90 2338 PR libstdc++/88840
2339 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
2340 data member with static member function _S_use_relocate().
2341 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
2342 (vector::_M_default_append): Use _S_use_relocate() instead of
2343 __use_relocate.
2344
f1074115 2345 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
2346 sign of results.
2347
1c4657a3 23482019-01-22 Jonathan Wakely <jwakely@redhat.com>
2349
2350 PR libstdc++/88740
2351 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
2352 write to stderr instead of using printf.
2353
dafe8c59 23542019-01-21 Jakub Jelinek <jakub@redhat.com>
2355
2356 PR libstdc++/86590
2357 * include/bits/char_traits.h (__constant_string_p,
2358 __constant_char_array_p): Use __builtin_is_constant_evaluated if
2359 available.
2360
eaf966f3 23612019-01-20 Ulrich Drepper <drepper@redhat.com>
2362
2363 Implement C++20 P0600r1.
2364 * include/backward/hash_map: Add nodiscard attribute to empty.
2365 * include/backward/hash_set: Likewise.
2366 * backward/hashtable.h: Likewise.
2367 * include/bits/basic_string.h: Likewise.
2368 * include/bits/forward_list.h: Likewise.
2369 * include/bits/hashtable.h: Likewise.
2370 * include/bits/regex.h: Likewise.
2371 * include/bits/stl_deque.h: Likewise.
2372 * include/bits/stl_list.h: Likewise.
2373 * include/bits/stl_map.h: Likewise.
2374 * include/bits/stl_multimap.h: Likewise.
2375 * include/bits/stl_multiset.h: Likewise.
2376 * include/bits/stl_queue.h: Likewise.
2377 * include/bits/stl_set.h: Likewise.
2378 * include/bits/stl_stack.h: Likewise.
2379 * include/bits/stl_tree.h: Likewise.
2380 * include/bits/stl_vector.h: Likewise.
2381 * include/bits/unordered_map.h: Likewise.
2382 * include/bits/unordered_set.h: Likewise.
2383 * include/debug/array: Likewise.
2384 * include/experimental/any: Likewise.
2385 * include/experimental/bits/fs_path.h: Likewise.
2386 * include/experimental/internet: Likewise.
2387 * include/experimental/string_view: Likewise.
2388 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
2389 Likewise.
2390 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
2391 Likewise.
2392 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
2393 Likewise.
2394 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
2395 Likewise.
2396 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
2397 Likewise.
2398 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
2399 Likewise.
2400 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
2401 Likewise.
2402 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
2403 Likewise.
2404 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2405 info_fn_imps.hpp: Likewise.
2406 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
2407 left_child_next_sibling_heap_.hpp: Likewise.
2408 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
2409 Likewise.
2410 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
2411 Likewise.
2412 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
2413 Likewise.
2414 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
2415 Likewise.
2416 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
2417 Likewise.
2418 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
2419 Likewise.
2420 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
2421 Likewise.
2422 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
2423 * include/ext/pb_ds/trie_policy.hpp: Likewise.
2424 * include/ext/rope: Likewise.
2425 * include/ext/slist: Likewise.
2426 * include/ext/vstring.h: Likewise.
2427 * include/profile/array: Likewise.
2428 * include/std/array: Likewise.
2429 * include/tr1/array: Likewise.
2430 * include/tr1/hashtable.h: Likewise.
2431 * include/tr1/regex: Likewise.
2432 * include/tr2/dynamic_bitset: Likewise.
2433 * include/bits/alloc_traits.h: Add nodiscard attribute to
2434 allocate.
2435 * include/experimental/memory_resource: Likewise.
2436 * include/ext/alloc_traits.h: Likewise.
2437 * include/ext/array_allocator.h: Likewise.
2438 * include/ext/bitmap_allocator.h: Likewise.
2439 * include/ext/debug_allocator.h: Likewise.
2440 * include/ext/extptr_allocator.h: Likewise.
2441 * include/ext/mt_allocator.h: Likewise.
2442 * include/ext/new_allocator.h: Likewise.
2443 * include/ext/pool_allocator.h: Likewise.
2444 * include/ext/throw_allocator.h: Likewise.
2445 * include/std/scoped_allocator: Likewise.
2446 * libsupc++/eh_alloc.cc: Likewise.
2447 * include/std/future: Add nodiscard attribute to async.
2448 * libsupc++/new: Add nodiscard attribute to new.
2449
3c1c2a8c 24502019-01-18 Jonathan Wakely <jwakely@redhat.com>
2451
2452 PR libstdc++/87514
2453 PR libstdc++/87520
2454 PR libstdc++/88782
2455 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
2456 * include/bits/shared_ptr.h
2457 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
2458 (allocate_shared): Change to use new tag type.
2459 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
2460 Declare new member function.
2461 (_Sp_alloc_shared_tag): Define new type.
2462 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
2463 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
2464 _Sp_make_shared_tag::_S_eq to check type_info.
2465 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
2466 Constrain to prevent being called with _Sp_alloc_shared_tag.
2467 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
2468 Replace constructor with ...
2469 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
2470 reference parameter so address of the new object can be returned to
2471 the caller. Obtain the allocator from the tag type.
2472 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
2473 constructor with ...
2474 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
2475 to the __shared_count constructor.
2476 (__allocate_shared): Change to use new tag type.
2477 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
2478
21a962b2 24792019-01-17 Jonathan Wakely <jwakely@redhat.com>
2480
464ac146 2481 * src/c++17/fs_ops.cc
2482 (equivalent(const path&, const path&, error_code&))
2483 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
2484 compare files instead of relying on incomplete info returned by stat.
2485
2987a93d 2486 PR libstdc++/88884
2487 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
2488 if the path is already absolute.
2489 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
2490 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
2491
21a962b2 2492 PR libstdc++/88881
2493 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
2494 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
2495 of filesystem::exists.
2496 (create_directories(const path&, error_code&)): Add assertions.
2497 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2498 Add workaround for bug in _wstat for paths with trailing slash.
2499 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
2500 for expected behaviour on mingw.
2501 * testsuite/experimental/filesystem/operations/create_directories.cc:
2502 Likewise.
2503 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
2504 "TMP" instead of "TMPDIR" and clean environment before each test. Do
2505 not test permissions on mingw targets.
2506
93478c9f 25072019-01-16 Jonathan Wakely <jwakely@redhat.com>
2508
2509 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
2510 constructors and open members taking wide strings. Fix patterns for
2511 filesystem::path members to match wstring_view parameters. Add
2512 exports for shared_ptr members used by directory iterators.
2513 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
2514 error code parameter if the file doesn't exist.
2515 * src/filesystem/ops.cc (remove(const path&, error_code&)):
2516 Likewise.
2517 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
2518 values for mingw targets, where "/" is not an absolute path. Do not
2519 test symlinks on mingw targets.
2520 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2521 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
2522 on mingw targets.
2523 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2524 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
2525 that each component of the path is created.
2526 * testsuite/experimental/filesystem/operations/create_directories.cc:
2527 Likewise.
2528 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
2529 permissions on mingw targets.
2530 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2531 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2532 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2533 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
2534 mingw targets.
2535 * testsuite/experimental/filesystem/operations/permissions.cc:
2536 Likewise.
2537 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
2538 symlinks or permissions on mingw targets.
2539 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2540 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
2541 symlinks on mingw targets.
2542 * testsuite/experimental/filesystem/operations/remove_all.cc:
2543 Likewise.
2544 * testsuite/27_io/filesystem/operations/status.cc: Do not test
2545 permissions on mingw targets.
2546 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
2547 test symlinks on mingw targets.
2548 * testsuite/experimental/filesystem/operations/space.cc: Fix test
2549 for mingw targets.
2550
af93b844 25512019-02-14 Ulrich Drepper <drepper@redhat.com>
2552
2553 PR libstdc++/88738
2554 Warn about unused comparisons of shared_ptr/unique_ptr
2555 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
2556 * include/bits/shared_ptr.h: Use it for operator ==, !=,
2557 <, <=, >, >= for shared_ptr.
2558 * include/bits/unique_ptr.h: Likewise for unique_ptr.
2559
8793c0de 25602019-01-15 Jonathan Wakely <jwakely@redhat.com>
2561
afa61572 2562 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
2563 as 201611L, because P0497R0 changes are supported.
2564 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
2565
feb89906 2566 * include/bits/erase_if.h [__cplusplus > 201703L]
2567 (__cpp_lib_erase_if): Only define for C++2a.
2568 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2569 (__cpp_lib_null_iterators): Define.
2570 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
2571 (__cpp_lib_null_iterators): Define.
2572 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
2573
d253bcb1 2574 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
2575 status.
2576 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
2577 Define.
2578 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
2579 changes are supported.
2580 * include/std/optional (__cpp_lib_optional): Likewise.
2581 * include/std/variant (__cpp_lib_variant): Likewise.
2582 * include/std/version [!__STRICT_ANSI__]
2583 (__cpp_lib_uncaught_exceptions): Define as long integer.
2584 [__cplusplus >= 201703L] (__cpp_lib_any)
2585 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
2586 (__cpp_lib_variant): Define for C++17.
2587 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
2588 as long integer.
2589 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
2590 integer.
2591
8793c0de 2592 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
2593
a8cd4b2b 25942019-01-12 Jonathan Wakely <jwakely@redhat.com>
2595
2596 PR libstdc++/88811
2597 PR libstdc++/83306
2598 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
2599 before second path.
2600 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
2601 test.
2602
a5b1332c 26032019-01-11 Jonathan Wakely <jwakely@redhat.com>
2604
656ac8b7 2605 * doc/xml/manual/intro.xml: Include new section.
2606 * doc/xml/manual/status_cxx2017.xml: Document more
2607 implementation-defined properties of the library.
2608 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
2609 * doc/html/*: Regenerate.
2610
f5480b8c 2611 * include/bits/refwrap.h [__cplusplus > 201703L]
2612 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
2613 (_Reference_wrapper_base_memfun): Do not define for C++2a.
2614 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
2615 for C++2a.
2616 (reference_wrapper::operator()): Add static assertion.
2617 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
2618
36496c4d 2619 * include/std/chrono (duration_values::zero(), duration_values::min())
2620 (duration_values::max()): Add noexcept.
2621 (duration::zero(), duration::min(), duration::max()): Likewise.
2622 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
2623 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
2624 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
2625
a5b1332c 2626 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
2627
d9de68bc 26282019-01-11 Jakub Jelinek <jakub@redhat.com>
2629
2630 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
2631 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
2632
beb370cb 26332019-01-11 Jonathan Wakely <jwakely@redhat.com>
2634
1d628fd4 2635 PR libstdc++/88802
2636 * include/bits/functional_hash.h (hash<nullptr_t>): Define
2637 specialization for C++17 (P0513R0, LWG 2817).
2638 * testsuite/20_util/hash/nullptr.cc: New test.
2639
a18b3766 2640 PR libstdc++/88125
2641 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
2642 pattern for std::basic_stringbuf::str().
2643
beb370cb 2644 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
2645 basic_ostream::operator<< patterns.
2646
cbbb35ec 26472019-01-10 Jonathan Wakely <jwakely@redhat.com>
2648
1715824b 2649 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
2650 test failures on targets with 32-bit time_t.
2651
f5529091 2652 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
2653 * include/std/deque: Likewise.
2654 * include/std/forward_list: Likewise.
2655 * include/std/list: Likewise.
2656 * include/std/string: Likewise.
2657 * include/std/vector: Likewise.
2658 * include/std/version: Likewise.
2659 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
2660 * testsuite/23_containers/deque/erasure.cc: Likewise.
2661 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2662 * testsuite/23_containers/list/erasure.cc: Likewise.
2663 * testsuite/23_containers/map/erasure.cc: Likewise.
2664 * testsuite/23_containers/set/erasure.cc: Likewise.
2665 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2666 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2667 * testsuite/23_containers/vector/erasure.cc: Likewise.
2668
cbbb35ec 2669 * include/experimental/internet [AI_NUMERICSERV]
2670 (resolver_base::numeric_service): Define conditionally.
2671 * testsuite/experimental/net/internet/resolver/base.cc: Test it
2672 conditionally.
2673 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2674 Likewise.
2675
ac9a8436 26762019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2677 Jonathan Wakely <jwakely@redhat.com>
2678
2679 Implement LWG 2221
2680 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
2681 (GLIBCXX_3.4.26): Add new exports.
2682 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
2683 correct list of sources.
2684 * include/Makefile.in: Regenerate.
2685 * include/std/ostream (operator<<(nullptr_t)): New member function.
2686 * src/c++17/ostream-inst.cc: New file.
2687 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
2688 test.
2689
5f027941 26902019-01-10 Jonathan Wakely <jwakely@redhat.com>
2691
2692 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
2693 of the source file containing the caller.
2694 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
2695 directories created by test.
2696 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2697 Likewise.
2698 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2699 Likewise.
2700 * testsuite/experimental/filesystem/iterators/
2701 recursive_directory_iterator.cc: Likewise.
2702
3273d2e6 27032019-01-10 Jakub Jelinek <jakub@redhat.com>
2704
2705 PR tree-optimization/88775
2706 * include/bits/stl_function.h (greater<_Tp*>::operator(),
2707 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
2708 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
2709 instead of __builtin_constant_p if available. Don't bother with
2710 the pointer comparison in C++11 and earlier.
2711
f4d3c071 27122019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2713
2714 PR other/16615
2715
2716 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
2717 with "cannot".
2718
8eba10af 27192019-01-09 Jonathan Wakely <jwakely@redhat.com>
2720
6a6ade9f 2721 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
2722 for filesystem::path. Give variables more distinctive names.
2723
41cda271 2724 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
2725 member function to perform non-trivial assignment.
2726 (_Optional_payload_base::_M_move_assign): Likewise.
2727 (_Optional_payload<T, true, false, true>::operator=)
2728 (_Optional_payload<T, true, true, false>::operator=)
2729 (_Optional_payload<T, true, false, false>::operator=): Call
2730 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
2731
8eba10af 2732 PR libstdc++/88204
2733 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
2734 test std::complex<long double> if long double format is IBM128.
2735 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
2736 Likewise.
2737
64a50f48 27382019-01-08 Jonathan Wakely <jwakely@redhat.com>
2739
73f3ad16 2740 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
2741 for old std::unique_ptr layout.
2742 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
2743 to become valueless. Add filesystem::path tests.
2744
58e897da 2745 PR libstdc++/87855
2746 * include/std/optional (_Optional_payload_base): New class template
2747 for common code hoisted from _Optional_payload specializations. Use
2748 a template for the union, to allow a partial specialization for
2749 types with non-trivial destructors. Add constructors for in-place
2750 initialization to the union.
2751 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
2752 to perform non-trivial copy construction, instead of relying on
2753 non-standard copy elision in a delegating constructor.
2754 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
2755 non-trivial move construction.
2756 (_Optional_payload): Derive from _Optional_payload_base and use it
2757 for everything except the non-trivial assignment operators, which are
2758 defined as needed.
2759 (_Optional_payload<false, C, M>): Derive from the specialization
2760 _Optional_payload<true, false, false> and add a destructor.
2761 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
2762 Forward to corresponding members of _Optional_payload.
2763 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
2764 Hoist common members from _Optional_base.
2765 (_Optional_base): Make all members and base class public.
2766 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
2767 _Optional_base_impl.
2768 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
2769 support for new std::optional layout.
2770 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
2771
64a50f48 2772 PR libstdc++/88066
2773 * include/bits/locale_conv.h: Use <> for includes not "".
2774 * include/ext/random: Likewise.
2775 * include/ext/vstring.h: Likewise.
2776
95b40931 27772019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2778
2779 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
2780 (GLIBCXX_3.4.21): Likewise.
2781
fa00ec77 27822019-01-08 Jonathan Wakely <jwakely@redhat.com>
2783
2784 PR libstdc++/88749
2785 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
2786 to match the one that controls whether utimbuf and utime are declared.
2787
3f304b2d 27882019-01-07 Jonathan Wakely <jwakely@redhat.com>
2789
fc6ac813 2790 PR libstdc++/87787
2791 * include/bits/char_traits.h (char_traits::move): Do not pass null
2792 pointers to memmove.
2793 * include/bits/locale_facets.h
2794 (ctype<char>::widen(const char*, const char*, char*)): Do not
2795 pass null pointers to memcpy.
2796 (ctype<char>::narrow(const char*, const char*, char, char*)):
2797 Likewise.
2798 (ctype<char>::do_widen(const char*, const char*, char*)):
2799 Likewise.
2800 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
2801 Likewise.
2802
bbc66c45 2803 * doc/xml/manual/spine.xml: Update copyright years.
2804 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
2805 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
2806 for C++17 filesystem library.
2807 * doc/html/*: Regenerate.
2808
3f304b2d 2809 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
2810 * config.h.in: Regenerate.
2811 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
2812 alphabetically and add missing entries for copy_symlink,
2813 hard_link_count, rename, and resize_file.
2814 * configure: Regenerate.
2815 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
2816 used unconditionally.
2817 * src/filesystem/ops-common.h (__gnu_posix::truncate)
2818 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
2819 supports truncating to zero length.
2820 * testsuite/27_io/filesystem/operations/all.cc: New test.
2821 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
2822
0ebb0980 28232019-01-06 Jonathan Wakely <jwakely@redhat.com>
2824
3935f409 2825 PR libstdc++/86756
2826 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
2827 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
2828 * config.h.in: Regenerate.
2829 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
2830 remaining std::filesystem types and functions.
2831 * configure: Regenerate.
2832 * src/c++17/Makefile.am: Add C++17 filesystem sources.
2833 * src/c++17/Makefile.in: Regenerate.
2834 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
2835 here, and change name of included file.
2836 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
2837 here, and change name of included file.
2838 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
2839 path to dir-common.h.
2840 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
2841 path to ops-common.h. Disable -Wunused-parameter warnings.
2842 (internal_file_clock): Define unconditionally.
2843 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
2844 define.
2845 (do_copy_file, do_space): Move definitions to ops.common.h.
2846 (copy, file_size, hard_link_count, last_write_time, space): Only
2847 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
2848 report an error.
2849 (last_write_time, read_symlink): Remove unused attributes from
2850 parameters.
2851 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
2852 * src/filesystem/Makefile.in: Regenerate.
2853 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
2854 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
2855 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
2856 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
2857 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
2858 dummy types and functions instead of using #error.
2859 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
2860 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
2861 in terms of stat.
2862 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
2863 (do_copy_file, do_space): Move definitions here from std-ops.cc.
2864 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
2865 to account for new namespace.
2866 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
2867 -lstdc++fs from dg-options.
2868 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
2869 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
2870 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
2871 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
2872 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
2873 Likewise.
2874 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
2875 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2876 Likewise.
2877 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
2878 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
2879 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
2880 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
2881 * testsuite/27_io/filesystem/operations/create_directories.cc:
2882 Likewise.
2883 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
2884 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
2885 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
2886 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
2887 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
2888 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
2889 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2890 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
2891 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
2892 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
2893 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
2894 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
2895 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
2896 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
2897 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
2898 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2899 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2900 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
2901 Likewise.
2902 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
2903
2904
c6e37a9f 2905 PR libstdc++/86756
2906 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
2907 typeinfo and vtables less greedy.
2908 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
2909 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
2910 * src/c++17/Makefile.in: Regenerate.
2911 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
2912 here, and change name of included file.
2913 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
2914 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
2915 from sources.
2916 * src/filesystem/Makefile.in: Regenerate.
2917 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
2918 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
2919 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
2920 from dg-options and remove dg-require-filesystem-ts.
2921 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
2922 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
2923 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
2924 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
2925 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
2926 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
2927 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
2928 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
2929 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
2930 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
2931 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
2932 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
2933 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
2934 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
2935 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
2936 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
2937 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
2938 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
2939 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
2940 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
2941 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
2942 Likewise.
2943 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
2944 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
2945 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
2946 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
2947 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
2948 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
2949 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
2950 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
2951 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
2952 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
2953 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
2954 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
2955 Likewise.
2956 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
2957 Likewise.
2958 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2959 Likewise.
2960 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
2961 Likewise.
2962 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
2963 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2964 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
2965 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
2966 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2967 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2968 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2969 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2970 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
2971 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2972 Likewise.
2973 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2974 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2975 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2976 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
2977 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2978
8815ac91 2979 PR libstdc++/87431
2980 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
2981 Check is_trivially_copyable instead of is_scalar.
2982 (variant::emplace<N, Args>(Args&&...)): If construction of the new
2983 contained value can throw and its type is trivially copyable then
2984 construct into a temporary variant and move from it, to provide the
2985 strong exception safety guarantee.
2986 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
2987 Likewise.
2988 * testsuite/20_util/variant/87431.cc: New test.
2989 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
2990 conversion causes valueless state.
2991
0ebb0980 2992 PR libstdc++/88607
2993 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
2994 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
2995 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
2996 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
2997 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
2998
adc6beee 29992019-01-05 Jonathan Wakely <jwakely@redhat.com>
3000
3001 * include/bits/fs_fwd.h (__file_clock): Define new clock.
3002 (file_time_type): Redefine in terms of __file_clock.
3003 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
3004 overflow.
3005 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
3006 internal linkage.
3007 (internal_file_lock): New helper type for accessing __file_clock.
3008 (do_copy_file): Use internal_file_lock to convert system time to
3009 file_time_type.
3010 (last_write_time(const path&, error_code&)): Likewise.
3011 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
3012
6b4a77f2 30132019-01-04 Jonathan Wakely <jwakely@redhat.com>
3014
98185b9f 3015 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
3016 for const member functions of std::basic_string.
3017 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
3018 in C++17.
3019 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
3020 Make non-standard constructor private.
3021 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
3022 Likewise.
3023 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
3024 explicit instantiations for C++17 as well as earlier dialects.
3025 * src/c++17/Makefile.am: Add new source files.
3026 * src/c++17/Makefile.in: Regenerate.
3027 * src/c++17/cow-string-inst.cc: New file defining explicit
3028 instantiations for basic_string member functions added in C++17.
3029 * src/c++17/string-inst.cc: Likewise.
3030
859e6fed 3031 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
3032 copy/move constructors for old std::basic_string.
3033 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3034 (basic_string::reference, basic_string::const_reference): Define
3035 as plain references for C++11 and later.
3036 (basic_string::basic_string()): Put constructor body outside
3037 preprocessor conditional groups.
3038 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
3039 instead of copying it.
3040 (basic_string::basic_string(const basic_string&, const _Alloc&)):
3041 Define.
3042 (basic_string::basic_string(basic_string&&, const _Alloc&)):
3043 Define.
3044 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
3045 cases for old basic_string.
3046 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
3047 allocator-extended constructors unconditionally. Add extra members to
3048 allocator type when using old string ABI.
3049 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
3050 for old string ABI.
3051 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
3052
e13f6a7f 3053 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
3054 -fno-inline added to test flags.
3055
a18fccd0 3056 * testsuite/21_strings/basic_string/requirements/
3057 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
3058
7f77ca07 3059 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
3060 assertion failures with old std::string ABI.
3061
9346fb0e 3062 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
3063 with ...
3064 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
3065 functions that will only erase elements at the end.
3066 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
3067 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
3068 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
3069 of erase(p, end()).
3070 (path::_List::pop_back()): Define.
3071 (path::_List::_M_erase_from(const_iterator)): Define.
3072 (path::operator/=(const path&)): Use pop_back to remove last component
3073 and _M_erase_from to remove multiple components.
3074 (path::_M_append(basic_string_view<value_type>)): Likewise.
3075 (path::operator+=(const path&)): Likewise.
3076 (path::_M_concat(basic_string_view<value_type>)): Likewise.
3077 (path::remove_filename()): Likewise.
3078 (path::lexically_normal()): Use _List::_Impl iterators instead of
3079 path::iterator. Use pop_back to remove components from the end. Clear
3080 trailing filename, instead of using erase(const_iterator) to remove
3081 a non-final component.
3082 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
3083 additional cases.
3084 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
3085
24230cab 3086 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
3087 incorrect treatment of empty filename after trailing slash.
3088 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
3089
6b4a77f2 3090 * testsuite/21_strings/basic_string/modifiers/assign/char/
3091 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
3092 to test flags.
3093 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3094 move_assign_optim.cc: Likewise.
3095
02df5941 30962019-01-03 Jonathan Wakely <jwakely@redhat.com>
3097 Jakub Jelinek <jakub@redhat.com>
3098
3099 PR libstdc++/88607
3100 * include/experimental/memory: Replace UTF-8 quote characters.
3101 * include/std/future: Replace UTF-8 "em dash" characters.
3102
f8ad40d8 31032019-01-03 Jonathan Wakely <jwakely@redhat.com>
3104
9013258b 3105 PR libstdc++/88607
3106 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
3107 * include/debug/forward_list: Likewise.
3108 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
3109 character.
3110 * include/experimental/chrono: Likewise.
3111 * include/experimental/functional: Likewise.
3112 * include/experimental/ratio: Likewise.
3113 * include/experimental/system_error: Likewise.
3114 * include/experimental/tuple: Likewise.
3115 * include/experimental/type_traits: Likewise.
3116 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
3117 * include/parallel/multiseq_selection.h: Likewise.
3118
f8ad40d8 3119 PR libstdc++/88681
3120 * config/abi/pre/gnu.ver: Add missing exports.
3121 * testsuite/22_locale/collate_byname/88681.cc: New test.
3122 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
3123 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
3124
138292f4 31252019-01-02 Jonathan Wakely <jwakely@redhat.com>
3126
553d41a8 3127 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
3128 initializer_list<value_type> and from input iterator ranges.
3129 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
3130
138292f4 3131 * testsuite/experimental/string_view/element_access/char/empty.cc:
3132 Fix year range in copyright header.
3133
963c0125 31342019-01-02 Joel Brobecker <brobecker@adacore.com>
3135
3136 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3137 Fix year range in copyright header.
3138
fbd26352 31392019-01-01 Jakub Jelinek <jakub@redhat.com>
d353bf18 3140
3141 Update copyright years.
fb96fbb3 3142\f
fbd26352 3143Copyright (C) 2019 Free Software Foundation, Inc.
fb96fbb3 3144
3145Copying and distribution of this file, with or without modification,
3146are permitted in any medium without royalty provided the copyright
3147notice and this notice are preserved.