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