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