Check precondition for std::ssize(const Container&)
[gcc.git] / libstdc++-v3 / ChangeLog
1 2019-10-31 Jonathan Wakely <jwakely@redhat.com>
2
3 * testsuite/24_iterators/range_access*.cc: Move to ...
4 * testsuite/24_iterators/range_access/range_access*.cc: ... here.
5 * testsuite/24_iterators/range_access/range_access_cpp20_neg.cc: New
6 test.
7
8 2019-10-30 Jonathan Wakely <jwakely@redhat.com>
9
10 * include/std/concepts (std::ranges::swap): Use a single overload for
11 the non-array cases, and switch using if-constexpr.
12
13 * include/bits/stl_iterator.h (__normal_iterator::iterator_concept):
14 Guard with __cpp_lib_concepts macro.
15
16 * include/std/bit (__cpp_lib_bitops): Define.
17 * include/std/version (__cpp_lib_constexpr): Remove.
18 (__cpp_lib_bitops, __cpp_lib_constexpr_dynamic_alloc): Define.
19 * testsuite/26_numerics/bit/header.cc: New test.
20 * testsuite/26_numerics/bit/header-2.cc: New test.
21 * testsuite/20_util/allocator_traits/header.cc: New test.
22 * testsuite/20_util/allocator_traits/header-2.cc: New test.
23
24 * include/bits/stl_iterator.h (namespace __gnu_cxx): Remove
25 using-declarations for std::iterator and std::iterator_traits.
26 (__gnu_cxx::__normal_iterator): Qualify iterator_traits.
27 * include/ext/algorithm (namespace __gnu_cxx): Remove
28 using-declarations for std names and qualify those names when used.
29 Also refer to std::min in parentheses to protect against function-like
30 macros.
31 * include/ext/rc_string_base.h: Qualify iterator_traits.
32 * include/ext/sso_string_base.h: Qualify iterator_traits.
33
34 PR libstdc++/92272
35 * include/bits/stl_bvector.h (_Bit_iterator::pointer)
36 (_Bit_const_iterator::pointer): Define as void for C++20.
37 * include/bits/stl_iterator.h (reverse_iterator::operator->()): Add
38 constraints for C++20.
39 (__normal_iterator::iterator_concept): Define for C++20.
40 * include/bits/streambuf_iterator.h (istreambuf_iterator::pointer):
41 Define as void for C++20.
42 (ostreambuf_iterator::difference_type): Define as ptrdiff_t for C++20.
43 (ostreambuf_iterator::ostreambuf_iterator()): Add default constructor
44 for C++20.
45 * testsuite/23_containers/vector/bool/iterator_c++20.cc: New test.
46 * testsuite/24_iterators/bidirectional/concept.cc: New test.
47 * testsuite/24_iterators/bidirectional/tag.cc: New test.
48 * testsuite/24_iterators/contiguous/concept.cc: New test.
49 * testsuite/24_iterators/contiguous/tag.cc: New test.
50 * testsuite/24_iterators/forward/concept.cc: New test.
51 * testsuite/24_iterators/forward/tag.cc: New test.
52 * testsuite/24_iterators/input/concept.cc: New test.
53 * testsuite/24_iterators/input/tag.cc: New test.
54 * testsuite/24_iterators/istreambuf_iterator/requirements/typedefs.cc:
55 New test.
56 * testsuite/24_iterators/ostreambuf_iterator/requirements/typedefs.cc:
57 New test.
58 * testsuite/24_iterators/output/concept.cc: New test.
59 * testsuite/24_iterators/output/tag.cc: New test.
60 * testsuite/24_iterators/random_access/concept.cc: New test.
61 * testsuite/24_iterators/random_access/tag.cc: New test.
62 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: New
63 test.
64 * testsuite/24_iterators/random_access_iterator/26020.cc: Move to ...
65 * testsuite/24_iterators/operations/26020.cc: ... here.
66 * testsuite/24_iterators/random_access_iterator/
67 string_vector_iterators.cc: Move to ...
68 * testsuite/24_iterators/random_access/string_vector_iterators.cc: ...
69 here.
70
71 * testsuite/util/testsuite_iterators.h: Fix typo in __cplusplus check.
72
73 2019-10-29 Jonathan Wakely <jwakely@redhat.com>
74
75 * include/bits/range_access.h (ranges::disable_sized_range)
76 (ranges::begin, ranges::end, ranges::cbegin, ranges::cend)
77 (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend)
78 (ranges::size, ranges::empty, ranges::data, ranges::cdata)
79 (ranges::range, ranges::sized_range, ranges::advance, ranges::distance)
80 (ranges::next, ranges::prev): Guard with __cpp_lib_concepts.
81 * include/bits/stl_iterator.h (disable_sized_sentinel): Likewise.
82
83 * include/bits/alloc_traits.h (__cpp_lib_constexpr_dynamic_alloc):
84 Define.
85 (allocator_traits::_S_construct, allocator_traits::_S_destroy)
86 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use
87 _GLIBCXX14_CONSTEXPR instead of constexpr.
88 * include/bits/stl_construct.h (_Destroy): Likewise.
89
90 * include/Makefile.am: Add new header.
91 * include/Makefile.in: Regenerate.
92 * include/bits/iterator_concepts.h: New header.
93 (contiguous_iterator_tag, iter_reference_t, ranges::iter_move)
94 (iter_rvalue_reference_t, incrementable_traits, iter_difference_t)
95 (readable_traits, iter_value_t, readable, iter_common_reference_t)
96 (writable, waekly_incrementable, incrementable)
97 (input_or_output_iterator, sentinel_for, disable_sized_sentinel)
98 (sized_sentinel_for, input_iterator, output_iterator)
99 (forward_iterator, bidirectional_iterator, random_access_iterator)
100 (contiguous_iterator, indirectly_unary_invocable)
101 (indirectly_regular_unary_invocable, indirect_unary_predicate)
102 (indirect_relation, indirect_strict_weak_order, indirect_result_t)
103 (projected, indirectly_movable, indirectly_movable_storable)
104 (indirectly_copyable, indirectly_copyable_storable, ranges::iter_swap)
105 (indirectly_swappable, indirectly_comparable, permutable, mergeable)
106 (sortable, unreachable_sentinel_t, unreachable_sentinel)
107 (default_sentinel_t, default_sentinel): Define.
108 (__detail::__cpp17_iterator, __detail::__cpp17_input_iterator)
109 (__detail::__cpp17_fwd_iterator, __detail::__cpp17_bidi_iterator)
110 (__detail::__cpp17_randacc_iterator): Define.
111 (__iterator_traits): Define constrained specializations.
112 * include/bits/move.h (move): Only use old concept check for C++98.
113 * include/bits/range_access.h (ranges::disable_sized_range)
114 (ranges::begin, ranges::end, ranges::cbegin, ranges::cend)
115 (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend)
116 (ranges::size, ranges::empty, ranges::data, ranges::cdata): Define
117 new customization points for C++20.
118 (ranges::range, ranges::sized_range): Define new concepts for C++20.
119 (ranges::advance, ranges::distance, ranges::next, ranges::prev):
120 Define new functions for C++20.
121 (__adl_end, __adl_cdata, __adl_cbegin, __adl_cend, __adl_rbegin)
122 (__adl_rend, __adl_crbegin, __adl_crend, __adl_cdata, __adl_size)
123 (__adl_empty): Remove.
124 * include/bits/stl_iterator.h (disable_sized_sentinel): Specialize
125 for reverse_iterator.
126 * include/bits/stl_iterator_base_types.h (contiguous_iterator_tag):
127 Define new struct for C++20.
128 (iterator_traits<_Tp*>): Constrain partial specialization in C++20.
129 * include/std/concepts (__is_class_or_enum): Move to __detail
130 namespace.
131 * testsuite/20_util/forward/c_neg.cc: Adjust dg-error line number.
132 * testsuite/20_util/forward/f_neg.cc: Likewise.
133 * testsuite/24_iterators/associated_types/incrementable.traits.cc: New
134 test.
135 * testsuite/24_iterators/associated_types/readable.traits.cc: New test.
136 * testsuite/24_iterators/contiguous/concept.cc: New test.
137 * testsuite/24_iterators/contiguous/tag.cc: New test.
138 * testsuite/24_iterators/customization_points/iter_move.cc: New test.
139 * testsuite/24_iterators/customization_points/iter_swap.cc: New test.
140 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: New test.
141 * testsuite/24_iterators/range_operations/advance.cc: New test.
142 * testsuite/24_iterators/range_operations/distance.cc: New test.
143 * testsuite/24_iterators/range_operations/next.cc: New test.
144 * testsuite/24_iterators/range_operations/prev.cc: New test.
145 * testsuite/26_numerics/adjacent_difference/requirements/
146 explicit_instantiation/2.cc: Rename types that conflict with C++20
147 concepts.
148 * testsuite/26_numerics/adjacent_difference/requirements/
149 explicit_instantiation/pod.cc: Likewise.
150 * testsuite/26_numerics/partial_sum/requirements/
151 explicit_instantiation/2.cc: Likewise.
152 * testsuite/26_numerics/partial_sum/requirements/
153 explicit_instantiation/pod.cc: Likewise.
154 * testsuite/experimental/iterator/requirements.cc: Likewise.
155 * testsuite/std/ranges/access/begin.cc: New test.
156 * testsuite/std/ranges/access/cbegin.cc: New test.
157 * testsuite/std/ranges/access/cdata.cc: New test.
158 * testsuite/std/ranges/access/cend.cc: New test.
159 * testsuite/std/ranges/access/crbegin.cc: New test.
160 * testsuite/std/ranges/access/crend.cc: New test.
161 * testsuite/std/ranges/access/data.cc: New test.
162 * testsuite/std/ranges/access/empty.cc: New test.
163 * testsuite/std/ranges/access/end.cc: New test.
164 * testsuite/std/ranges/access/rbegin.cc: New test.
165 * testsuite/std/ranges/access/rend.cc: New test.
166 * testsuite/std/ranges/access/size.cc: New test.
167 * testsuite/util/testsuite_iterators.h (contiguous_iterator_wrapper)
168 (test_range, test_sized_range): New test utilities.
169
170 * testsuite/util/testsuite_iterators.h (BoundsContainer::size()): Add
171 new member function.
172 (WritableObject::operator=): Constrain with enable_if when available.
173 (remove_cv): Use std::remove_if when available.
174 (test_container::it(int)): Use size().
175 (test_container::size()): Use BoundsContainer::size().
176
177 PR libstdc++/92267
178 * include/bits/stl_deque.h (_Deque_iterator(const _Deque_iterator&)):
179 Do not define as defaulted.
180 * testsuite/23_containers/deque/types/92267.cc: New test.
181
182 2019-10-26 Gerald Pfeifer <gerald@pfeifer.com>
183
184 * doc/xml/manual/codecvt.xml: Switch pubs.opengroup.org to https.
185 * doc/xml/manual/locale.xml (LC_ALL): Ditto.
186 * doc/xml/manual/messages.xml: Ditto.
187
188 2019-10-26 John David Anglin <danglin@gcc.gnu.org>
189
190 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
191
192 2019-10-25 Jonathan Wakely <jwakely@redhat.com>
193
194 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper)
195 (input_iterator_wrapper, forward_iterator_wrapper)
196 bidirectional_iterator_wrapper, random_access_iterator_wrapper): Remove
197 user-provided copy constructors and copy assignment operators so they
198 are defined implicitly.
199 (input_iterator_wrapper): Initialize members in default constructor.
200 (forward_iterator_wrapper): Remove assignments to members of base.
201
202 * include/bits/allocator.h: Check __cpp_constexpr_dynamic_alloc
203 before making the std::allocator destructor constexpr.
204 * testsuite/20_util/allocator/requirements/constexpr.cc: New test.
205
206 * include/bits/range_cmp.h: Check __cpp_lib_concepts before defining
207 concepts. Fix comment.
208 * include/bits/allocator.h
209
210 2019-10-25 Gerald Pfeifer <gerald@pfeifer.com>
211
212 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
213 pubs.opengroup.org to https.
214
215 2019-10-25 Gerald Pfeifer <gerald@pfeifer.com>
216
217 * doc/xml/gnu/gpl-3.0.xml: Switch www.gnu.org to https.
218
219 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
220
221 * doc/xml/manual/status_cxx2020.xml: Add rows and update status.
222
223 2019-10-24 Jonathan Wakely <jwakely@redhat.com>
224
225 * include/bits/allocator.h (allocator<void>): Restore the explicit
226 specialization for C++20, but make its API consistent with the primary
227 template.
228 (allocator::~allocator()): Restore the destructor for C++20, but make
229 it constexpr.
230 * testsuite/20_util/allocator/rebind_c++20.cc: Check allocator<void>.
231 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: Likewise.
232 * testsuite/20_util/allocator/void.cc: Check that constructors and
233 destructors are trivial. Check for converting constructor in C++20.
234 * testsuite/ext/malloc_allocator/variadic_construct.cc: Simplify
235 dejagnu target selector.
236 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
237
238 * include/experimental/executor (__use_future_ct, use_future_t):
239 Define partial specializations for std::allocator.
240 (__use_future_ch): Overload constructor for completion tokens using
241 std::allocator.
242
243 PR libstdc++/88338 Implement P0898R3, C++20 concepts library
244 * doc/xml/manual/status_cxx2020.xml: Update status.
245 * doc/html/*: Regenerate.
246 * testsuite/std/concepts/1.cc: New test.
247 * testsuite/std/concepts/2.cc: New test.
248
249 * include/bits/random.h (uniform_random_bit_generator): Define for
250 C++20.
251 * testsuite/26_numerics/random/concept.cc: New test.
252 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
253
254 2019-10-23 Jonathan Wakely <jwakely@redhat.com>
255
256 * include/std/functional (invoke): Add constexpr for C++20.
257 * include/std/version (__cpp_lib_constexpr_invoke): Define.
258 * testsuite/20_util/function_objects/invoke/constexpr.cc: New test.
259
260 PR c++/91369 Implement P0784R7 changes to allocation and construction
261 * include/bits/alloc_traits.h: Include <bits/stl_construct.h>.
262 (allocator_traits::_S_allocate, allocator_traits::_S_construct)
263 (allocator_traits::_S_destroy, allocator_traits::_S_max_size)
264 (allocator_traits::_S_select, allocator_traits::allocate)
265 (allocator_traits::deallocate, allocator_traits::construct)
266 (allocator_traits::destroy, allocator_traits::max_size)
267 (allocator_traits::select_on_container_copy_construction)
268 (allocator_traits<allocator<T>>): Add constexpr specifier for C++20.
269 (allocator_traits<allocator<T>>::construct): Use construct_at.
270 (allocator_traits<allocator<T>>::destroy): Use destroy_at.
271 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Add constexpr
272 specifier.
273 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
274 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move here
275 from <bits/stl_construct.h>.
276 * include/bits/allocator.h (allocator::~allocator): Remove for C++20.
277 (allocator::allocate, allocate::deallocate): Define for C++20 and up.
278 (operator==, operator!=): Add constexpr specifier for C++20.
279 * include/bits/stl_construct.h: Don't include <ext/alloc_traits.h>.
280 (destroy_at): For C++20 add constexpr specifier and support for
281 destroying arrays.
282 (construct_at): Define new function for C++20.
283 (_Construct): Return result of placement new-expression. For C++11 and
284 up add constexpr. For C++20 dispatch to std::construct_at during
285 constant evaluation.
286 (_Destroy(pointer)): Add constexpr specifier. For C++20 dispatch to
287 std::destroy_at during constant evaluation.
288 (_Destroy_aux::__destroy, _Destroy_n_aux::__destroy_n): Add constexpr
289 specifier for C++20.
290 (_Destroy(ForwardIterator, ForwardIterator))
291 (_Destroy(ForwardIterator, Size)): Likewise. Do not elide trivial
292 destructors during constant evaluation.
293 (destroy, destroy_n): Add constexpr specifier for C++20.
294 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
295 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move to
296 <bits/alloc_traits.h>, to remove dependency on allocators.
297 * include/bits/stl_uninitialized.h: Include <ext/alloc_traits.h>.
298 Include <bits/stl_pair.h> instead of <utility>.
299 * include/ext/alloc_traits.h: Always include <bits/alloc_traits.h>.
300 (__alloc_traits::construct, __alloc_traits::destroy)
301 (__alloc_traits::_S_select_on_copy, __alloc_traits::_S_on_swap): Add
302 constexpr specifier.
303 * include/ext/malloc_allocator.h (operator==, operator!=): Add
304 constexpr specifier for C++20.
305 * include/ext/new_allocator.h (operator==, operator!=): Likewise.
306 * testsuite/20_util/headers/memory/synopsis.cc: Add constexpr.
307 * testsuite/20_util/scoped_allocator/69293_neg.cc: Ignore additional
308 errors due to constexpr function called after failed static_assert.
309 * testsuite/20_util/specialized_algorithms/construct_at/1.cc: New test.
310 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
311 Ignore additional errors due to constexpr function called after failed
312 static_assert.
313 * testsuite/23_containers/vector/cons/destructible_neg.cc: Likewise.
314
315 * testsuite/20_util/bind/91371.cc: Fix test to compile as C++11.
316
317 * include/debug/helper_functions.h (__valid_range): Change
318 _GLIBCXX_CONSTEXPR to _GLIBCXX14_CONSTEXPR.
319
320 * include/ext/throw_allocator.h (throw_allocator_base): Qualify
321 size_t and ptrdiff_t.
322
323 * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp:
324 Use detail::rebind_traits.
325 * include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp:
326 Likewise.
327 * include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Likewise.
328 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise.
329 * include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp: Likewise.
330 * include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp: Likewise.
331 * include/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp:
332 Likewise.
333 * include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp:
334 Likewise.
335 * include/ext/pb_ds/detail/branch_policy/branch_policy.hpp: Likewise.
336 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Likewise.
337 * include/ext/pb_ds/detail/cond_dealtor.hpp: Likewise.
338 * include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp (has_eq_fn): Likewise.
339 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Likewise.
340 * include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp: Likewise.
341 * include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Likewise.
342 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
343 left_child_next_sibling_heap_.hpp: Likewise.
344 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp:
345 Likewise.
346 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
347 point_const_iterator.hpp: Likewise.
348 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Likewise.
349 * include/ext/pb_ds/detail/ov_tree_map_/
350 constructors_destructor_fn_imps.hpp: Likewise.
351 * include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Likewise.
352 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Likewise.
353 * include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Likewise.
354 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Likewise.
355 * include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Likewise.
356 * include/ext/pb_ds/detail/rb_tree_map_/node.hpp: Likewise.
357 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Likewise.
358 * include/ext/pb_ds/detail/splay_tree_/node.hpp: Likewise.
359 * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Likewise.
360 * include/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp:
361 Likewise.
362 * include/ext/pb_ds/detail/type_utils.hpp: Fix typo in comment.
363 * include/ext/pb_ds/detail/types_traits.hpp (stored_value): Add
364 bool parameter to control whether the hash value is stored.
365 (select_base_type): New class template and partial specialization.
366 (maybe_null_type): Likewise.
367 (rebind_traits): New class template.
368 (type_base): Remove four nearly identical specializations.
369 (type_dispatch): Remove.
370 (type_traits): Use select_base_type and maybe_null_type instead of
371 type_base to control differences between specializations.
372 * include/ext/pb_ds/list_update_policy.hpp: Use detail::rebind_traits.
373 * include/ext/pb_ds/priority_queue.hpp: Likewise.
374 * include/ext/pb_ds/tree_policy.hpp: Likewise.
375 * include/ext/pb_ds/trie_policy.hpp: Likewise.
376
377 * include/backward/hash_set (hash_set): Use __alloc_traits.
378 * include/backward/hashtable.h (_Hashtable): Likewise.
379 * include/ext/alloc_traits.h (__alloc_traits::allocate): Add overload
380 taking a hint.
381 * include/ext/extptr_allocator.h (_ExtPtr_allocator::allocate): Ignore
382 hint.
383 * include/ext/slist (_Slist_base): Use __alloc_traits.
384 * include/tr1/hashtable.h (_Hashtable): Likewise.
385 * include/tr1/regex (match_results): Use vector::const_reference
386 instead of assuming the allocator defines it.
387 * testsuite/backward/hash_map/23528.cc: Use allocator_traits in C++11.
388 * testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc: Use
389 __gnu_test::max_size.
390 * testsuite/tr1/6_containers/unordered_multimap/capacity/
391 29134-multimap.cc: Likewise.
392 * testsuite/tr1/6_containers/unordered_multiset/capacity/
393 29134-multiset.cc: Likewise.
394 * testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc:
395 Likewise.
396
397 2019-10-22 Jonathan Wakely <jwakely@redhat.com>
398
399 * testsuite/util/testsuite_abi.h: Restore use of tr1/unordered_map
400 when compiled as C++98.
401
402 * include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
403 * testsuite/17_intro/names.cc: Check uses_allocator in C++98.
404
405 * include/bits/alloc_traits.h
406 (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20.
407 (allocator_traits<allocator<T>>::construct): Perform placement new
408 directly for C++20, instead of calling allocator<T>::construct.
409 (allocator_traits<allocator<T>>::destroy): Call destructor directly
410 for C++20, instead of calling allocator<T>::destroy.
411 (allocator_traits<allocator<T>>::max_size): Return value directly
412 for C++20, instead of calling std::allocator<T>::max_size().
413 (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not
414 define for C++17 and up.
415 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr
416 for C++17 and up, instead of tag dispatching.
417 * include/bits/allocator.h (allocator<void>): Remove for C++20.
418 (allocator::pointer, allocator::const_pointer, allocator::reference)
419 (allocator::const_reference, allocator::rebind): Remove for C++20.
420 * include/bits/basic_string.h (basic_string): Use __alloc_traits to
421 rebind allocator.
422 * include/bits/memoryfwd.h (allocator<void>): Remove for C++20.
423 * include/ext/debug_allocator.h: Use __alloc_traits for rebinding.
424 * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator)
425 (malloc_allocator::pointer, malloc_allocator::const_pointer)
426 (malloc_allocator::reference, malloc_allocator::const_reference)
427 (malloc_allocator::rebind, malloc_allocator::max_size)
428 (malloc_allocator::construct, malloc_allocator::destroy): Do not
429 define for C++20.
430 (malloc_allocator::_M_max_size): Define new function.
431 * include/ext/new_allocator.h (new_allocator::~new_allocator)
432 (new_allocator::pointer, new_allocator::const_pointer)
433 (new_allocator::reference, new_allocator::const_reference)
434 (new_allocator::rebind, new_allocator::max_size)
435 (new_allocator::construct, new_allocator::destroy): Do not
436 define for C++20.
437 (new_allocator::_M_max_size): Define new function.
438 * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use
439 __alloc_traits to rebind allocator.
440 * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise.
441 (rope::rope(CharT, const allocator_type&)): Use __alloc_traits
442 to construct character.
443 * include/ext/slist (_Slist_base): Use __alloc_traits to rebind
444 allocator.
445 * include/ext/sso_string_base.h (__sso_string_base::_M_max_size):
446 Use __alloc_traits.
447 * include/ext/throw_allocator.h (throw_allocator): Do not use optional
448 members of std::allocator, use __alloc_traits members instead.
449 * include/ext/vstring.h (__versa_string): Use __alloc_traits.
450 * include/ext/vstring_util.h (__vstring_utility): Likewise.
451 * include/std/memory: Include <bits/alloc_traits.h>.
452 * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size.
453 * testsuite/20_util/allocator/rebind_c++20.cc: New test.
454 * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check
455 for pointer, const_pointer, reference, const_reference or rebind in
456 C++20.
457 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test.
458 * testsuite/23_containers/deque/capacity/29134.cc: Use
459 __gnu_test::max_size.
460 * testsuite/23_containers/forward_list/capacity/1.cc: Likewise.
461 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
462 * testsuite/23_containers/map/capacity/29134.cc: Likewise.
463 * testsuite/23_containers/multimap/capacity/29134.cc: Likewise.
464 * testsuite/23_containers/multiset/capacity/29134.cc: Likewise.
465 * testsuite/23_containers/set/capacity/29134.cc: Likewise.
466 * testsuite/23_containers/vector/capacity/29134.cc: Likewise.
467 * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run
468 test for C++20.
469 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
470 * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size.
471 * testsuite/util/replacement_memory_operators.h: Do not assume
472 Alloc::pointer exists.
473 * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define
474 helper to call max_size for any allocator.
475
476 2019-10-22 Andreas Schwab <schwab@suse.de>
477
478 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
479
480 2019-10-18 Jonathan Wakely <jwakely@redhat.com>
481
482 PR libstdc++/92143
483 * libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment
484 to at least sizeof(void*).
485
486 * include/bits/range_cmp.h (ranges::less::operator()): Inline the
487 logic from std::less::operator() to remove the dependency on it.
488
489 2019-10-17 Jonathan Wakely <jwakely@redhat.com>
490
491 * doc/doxygen/user.cfg.in (INPUT): Add new C++17 and C++20 headers.
492
493 * include/Makefile.am: Add new header.
494 * include/Makefile.in: Regenerate.
495 * include/bits/range_cmp.h: New header for C++20 function objects.
496 * include/std/functional: Include new header.
497 * testsuite/20_util/function_objects/identity/1.cc: New test.
498 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: New test.
499 * testsuite/20_util/function_objects/range.cmp/greater.cc: New test.
500 * testsuite/20_util/function_objects/range.cmp/greater_equal.cc: New
501 test.
502 * testsuite/20_util/function_objects/range.cmp/less.cc: New test.
503 * testsuite/20_util/function_objects/range.cmp/less_equal.cc: New test.
504 * testsuite/20_util/function_objects/range.cmp/not_equal_to.cc: New
505 test.
506
507 PR libstdc++/92124
508 * include/bits/forward_list.h
509 (_M_move_assign(forward_list&&, false_type)): Do not use
510 __make_move_if_noexcept, instead move unconditionally.
511 * include/bits/stl_deque.h (_M_move_assign2(deque&&, false_type)):
512 Likewise.
513 * include/bits/stl_list.h (_M_move_assign(list&&, false_type)):
514 Likewise.
515 * include/bits/stl_vector.h (_M_move_assign(vector&&, false_type)):
516 Likewise.
517 * testsuite/23_containers/vector/92124.cc: New test.
518
519 2019-10-16 Jonathan Wakely <jwakely@redhat.com>
520
521 * include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to
522 one of __is_same_as or __is_same when available.
523 * include/std/concepts (__detail::__same_as): Use std::is_same_v.
524 * include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]:
525 Use new macro instead of __is_same_as.
526 (is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial
527 specialization.
528 (is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro.
529 (is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same.
530
531 2019-10-16 François Dumont <fdumont@gcc.gnu.org>
532
533 * src/c++11/debug.cc (print_field): Replace constness_names <unknown>
534 entry with <unknown constness>. Replace state_names <unknown> entry with
535 <unknown state>.
536
537 2019-10-11 Jonathan Wakely <jwakely@redhat.com>
538
539 * include/Makefile.am: Add new header.
540 * include/Makefile.in: Regenerate.
541 * include/precompiled/stdc++.h: Include <concepts>.
542 * include/std/concepts: New header for C++20.
543 * include/std/version (__cpp_lib_concepts): Define.
544 * scripts/create_testsuite_files: Look for test files in new std
545 directory.
546 * testsuite/libstdc++-dg/conformance.exp: Likewise.
547 * testsuite/std/concepts/concepts.callable/invocable.cc: New test.
548 * testsuite/std/concepts/concepts.callable/regular_invocable.cc: New
549 test.
550 * testsuite/std/concepts/concepts.callable/relation.cc: New test.
551 * testsuite/std/concepts/concepts.callable/strictweakorder.cc: New
552 test.
553 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
554 floating_point.cc: New test.
555 * testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc:
556 New test.
557 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
558 signed_integral.cc: New test.
559 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
560 unsigned_integral.cc: New test.
561 * testsuite/std/concepts/concepts.lang/concept.assignable/1.cc: New
562 test.
563 * testsuite/std/concepts/concepts.lang/concept.common/1.cc: New test.
564 * testsuite/std/concepts/concepts.lang/concept.commonref/1.cc: New
565 test.
566 * testsuite/std/concepts/concepts.lang/concept.constructible/1.cc:
567 New test.
568 * testsuite/std/concepts/concepts.lang/concept.convertible/1.cc:
569 New test.
570 * testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc:
571 New test.
572 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/
573 1.cc: New test.
574 * testsuite/std/concepts/concepts.lang/concept.derived/1.cc:
575 New test.
576 * testsuite/std/concepts/concepts.lang/concept.destructible/1.cc:
577 New test.
578 * testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc:
579 New test.
580 * testsuite/std/concepts/concepts.lang/concept.same/1.cc:
581 New test.
582 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
583 New test.
584 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
585 New test.
586 * testsuite/std/concepts/concepts.lang/concept.swappable/
587 swappable_with.cc: New test.
588 * testsuite/std/concepts/concepts.object/copyable.cc: New test.
589 * testsuite/std/concepts/concepts.object/movable.cc: New test.
590 * testsuite/std/concepts/concepts.object/regular.cc: New test.
591 * testsuite/std/concepts/concepts.object/semiregular.cc: New test.
592
593 * include/std/type_traits (is_same): Replace partial specialization
594 by using __is_same_as built-in in primary template.
595 (is_same_v): Use __is_same_as built-in instead of instantiating the
596 is_same trait.
597
598 PR libstdc++/92059
599 * include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
600 special member functions as defaulted. Add noexcept to most members.
601 (__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)):
602 Mask off unwanted bits in the __val parameter. Avoid undefined left
603 shifts.
604 (__dynamic_bitset_base::_M_assign): Remove.
605 (__dynamic_bitset_base::_M_do_reset): Use std::fill.
606 (__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when
607 block_type has lower rank than int.
608 (dynamic_bitset): Add noexcept to most members. Use injected-class-name
609 in return types and parameter types.
610 (dynamic_bitset::_M_Nb): Add default member initializer.
611 (dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as
612 defaulted.
613 (dynamic_bitset(dynamic_bitset&&)): Clear source object after move.
614 (dynamic_bitset::operator=(const dynamic_bitset&)): Define as
615 defaulted.
616 (dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier.
617 Define without using swap, to propagate allocator correctly.
618 (dynamic_bitset(const char*, const _Alloc&)): Use strlen.
619 (dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use
620 casts to avoid unwanted integer promotions.
621 (dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and
622 add default template arguments and default argument to simplify usage.
623 (dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr.
624 (operator==(const dynamic_bitset&, const dynamic_bitset&))
625 (operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb.
626 * include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr):
627 Adjust template parameters to match declaration.
628 * testsuite/tr2/dynamic_bitset/cmp.cc: New test.
629 * testsuite/tr2/dynamic_bitset/cons.cc: New test.
630 * testsuite/tr2/dynamic_bitset/copy.cc: New test.
631 * testsuite/tr2/dynamic_bitset/move.cc: New test.
632 * testsuite/tr2/dynamic_bitset/pr92059.cc: New test.
633
634 * include/bits/charconv.h (__to_chars_len): Avoid -Wsign-compare
635 warnings.
636
637 2019-10-10 Jonathan Wakely <jwakely@redhat.com>
638
639 PR libstdc++/91057
640 * src/c++98/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]
641 (find_ldbl_sync_facet): Fix parameter type and missing return.
642
643 2019-10-09 Marek Polacek <polacek@redhat.com>
644
645 PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound.
646 PR c++/69531 - DR 1307: Differently bounded array parameters.
647 PR c++/88128 - DR 330: Qual convs and pointers to arrays of pointers.
648 * testsuite/23_containers/span/lwg3255.cc: Adjust test to match the
649 post-P0388R4 behavior.
650
651 2019-10-09 Jonathan Wakely <jwakely@redhat.com>
652
653 PR libstdc++/91057
654 * src/c++98/locale.cc (locale::id::_M_id()) [__GTHREADS]: Use atomic
655 compare-exchange or double-checked lock to ensure only one thread sets
656 the _M_index variable.
657 [_GLIBCXX_LONG_DOUBLE_COMPAT]: Call find_ldbl_sync_facet to detect
658 facets that share another facet's ID.
659 [_GLIBCXX_LONG_DOUBLE_COMPAT] (find_ldbl_sync_facet): New function.
660
661 PR libstdc++/78552
662 * src/c++98/locale_init.cc (locale::classic()): Do not construct a new
663 locale object for every call.
664 (locale::_S_initialize_once()): Construct C locale here.
665
666 2019-10-08 Jonathan Wakely <jwakely@redhat.com>
667
668 * doc/Makefile.am (doc-html-docbook-regenerate): New target.
669 (${docbook_outdir}/html): Do not create unused 'html/ext' directory.
670 * doc/Makefile.in: Regenerate.
671 * doc/xml/manual/documentation_hacking.xml: Document new target.
672 * doc/html/*: Regenerate.
673
674 * doc/xml/manual/allocator.xml: Use archived copy of CUJ article.
675 * doc/html/*: Regenerate.
676
677 2019-10-06 François Dumont <fdumont@gcc.gnu.org>
678
679 * include/bits/stl_algo.h
680 (__copy_n_a(_IIte, _Size, _OIte)): New.
681 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
682 (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
683 latter.
684 * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
685 std::__copy_n_a friend.
686 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
687 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
688 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
689 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.
690
691 * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define
692 for C++11.
693 (_RequireInputIte): Likewise and use __enable_if_t.
694 * include/std/numeric
695 (__is_random_access_iter): Use __iterator_category_t.
696
697 * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment
698 debug checks.
699 * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New.
700 * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New.
701
702 2019-10-04 François Dumont <fdumont@gcc.gnu.org>
703
704 * include/debug/forward_list
705 (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign
706 distance when not empty.
707 * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size):
708 Likewise.
709 * include/debug/helper_functions.h (__dp_sign_max_size): New
710 _Distance_precision enum entry.
711 (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type,
712 __false_type)): Adapt.
713 * include/debug/safe_iterator.tcc
714 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review
715 distance computation.
716
717 2019-10-04 Jonathan Wakely <jwakely@redhat.com>
718
719 PR libstdc++/81091
720 PR libstdc++/91947
721 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
722 * config.h.in: Regenerate:
723 * configure: Regenerate:
724 * include/Makefile.am (${host_builddir}/largefile-config.h): New
725 target to generate config header for filesystem library.
726 (${host_builddir}/c++config.h): Rename macros for large file support.
727 * include/Makefile.in: Regenerate.
728 * src/c++17/fs_dir.cc: Include new config header.
729 * src/c++17/fs_ops.cc: Likewise.
730 (filesystem::file_size): Use uintmax_t for size.
731 * src/filesystem/dir.cc: Include new config header.
732 * src/filesystem/ops.cc: Likewise.
733 (experimental::filesystem::file_size): Use uintmax_t for size.
734
735 * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
736 std::tr1::unordered_map.
737 * testsuite/util/testsuite_allocator.h: Likewise.
738
739 * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.
740
741 * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
742 __gnu_cxx::__alloc_traits for allocator construct function.
743 (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function.
744
745 * include/precompiled/stdc++.h: Include <span> for C++20.
746 * testsuite/17_intro/names.cc: Do not define 'e' for C++20.
747
748 2019-10-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
749
750 * include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp.
751
752 2019-10-02 Jonathan Wakely <jwakely@redhat.com>
753
754 * config/abi/pre/gnu.ver: Tighten up greedy wildcards.
755
756 * doc/xml/manual/parallel_mode.xml: Add caveat about support for
757 recent standards.
758 * doc/html/*: Regenerate.
759
760 2019-10-01 Jonathan Wakely <jwakely@redhat.com>
761
762 * include/experimental/algorithm (experimental::sample): Qualify call
763 to __sample correctly.
764 * include/parallel/algo.h (sample, for_each_n): Add using-declarations
765 for algorithms that don't have parallel implementations.
766
767 * include/parallel/algobase.h (equal, lexicographical_compare): Add
768 _GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
769 constant evaluated.
770 * include/parallel/algorithmfwd.h (equal, lexicographical_compare):
771 Add _GLIBCXX20_CONSTEXPR.
772
773 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for
774 parallel mode.
775 * testsuite/20_util/hash/84998.cc: Likewise.
776 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise.
777 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise.
778 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
779 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
780 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
781 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
782 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
783 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
784 Likewise.
785 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
786 Likewise.
787 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
788 Likewise.
789 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
790 Likewise.
791 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
792 Likewise.
793 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise.
794 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
795 * testsuite/25_algorithms/copy/86658.cc: Likewise.
796 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
797 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
798 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
799 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
800
801 * include/parallel/algo.h: Replace non-reserved names.
802 * include/parallel/multiway_merge.h: Likewise.
803 * include/parallel/multiway_mergesort.h: Likewise.
804 * include/parallel/numericfwd.h: Likewise.
805 * testsuite/17_intro/names.cc: Add RAI to test macros.
806
807 2019-09-30 François Dumont <fdumont@gcc.gnu.org>
808
809 * include/debug/array: Add C++20 constexpr to comparison operators.
810 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt
811 dg-error line numbers.
812 * testsuite/23_containers/array/tuple_interface/
813 tuple_element_debug_neg.cc: Likewise.
814
815 2019-09-30 Andreas Tobler <andreast@gcc.gnu.org>
816
817 * include/experimental/internet: Include netinet/in.h if we have
818 _GLIBCXX_HAVE_NETINET_IN_H defined.
819
820 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
821 FreeBSD warning about lower advertised precision of tgammal.
822 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
823 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
824 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
825 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
826 * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
827 * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
828 * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
829 * testsuite/tr1/5_numerical_facilities/special_functions/
830 08_cyl_bessel_i/check_nan.cc: Likewise.
831 * testsuite/tr1/5_numerical_facilities/special_functions/
832 09_cyl_bessel_j/check_nan.cc: Likewise.
833 * testuite/tr1/5_numerical_facilities/special_functions/
834 10_cyl_bessel_k/check_nan.cc: Likewise.
835 * testsuite/tr1/5_numerical_facilities/special_functions/
836 11_cyl_neumann/check_nan.cc: Likewise.
837 * testsuite/tr1/5_numerical_facilities/special_functions/
838 21_sph_bessel/check_nan.cc: Likewise.
839 * testsuite/tr1/5_numerical_facilities/special_functions/
840 23_sph_neumann/check_nan.cc: Likewise.
841
842 2019-09-30 Jonathan Wakely <jwakely@redhat.com>
843
844 * include/std/span (span(element_type(&)[N]))
845 (span(array<value_type, N>&), span(const array<value_type, N>&)):
846 Deduce array element type to allow safe const conversions (LWG 3255).
847 [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use
848 remove_cv_t on arguments to __is_std_span and __is_std_array.
849 * testsuite/23_containers/span/lwg3255.cc: New test.
850
851 PR libstdc++/77936
852 * include/parallel/checkers.h (__is_sorted): Remove unused variable.
853
854 2019-09-28 François Dumont <fdumont@gcc.gnu.org>
855
856 * include/bits/stl_algo.h (merge): Fix documentation.
857 * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr.
858 (__check_sorted): Likewise and remove nested irreflexive check.
859 (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr.
860 (__check_partitioned_lower, __check_partitioned_upper): Likewise.
861 (_Irreflexive_checker::_S_is_valid): Likewise.
862 (__is_irreflexive, __is_irreflexive_pred): Likewise.
863 * include/debug/helper_functions.h (__get_distance): Add constexpr.
864 (__valid_range_aux): Add C++20 constexpr.
865 (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)):
866 Likewise and add std::is_constant_evaluated check.
867 (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New.
868 (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New.
869 (__valid_range_aux(_Integral, _Integral, std::__true_type)): New,
870 use latter.
871 (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and
872 __builtin_is_contant_evaludated check..
873 (__can_advance, __base): Add constexpr.
874 * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED]
875 (_GLIBCXX_DEBUG_VERIFY_COND_AT): New.
876 (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive.
877 (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred.
878 * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive
879 std::less.
880 * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
881 * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix
882 lambda to be irreflexive.
883
884 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
885
886 * configure: Regenerate.
887
888 2019-09-27 Jonathan Wakely <jwakely@redhat.com>
889
890 PR libstdc++/91910
891 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer
892 atomically and lock the mutex before accessing the sequence.
893 (_Safe_local_iterator_base::_M_detach()): Likewise.
894 (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
895
896 2019-09-26 Jonathan Wakely <jwakely@redhat.com>
897
898 * include/debug/array (to_array): Define for debug mode.
899
900 * include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to
901 piecewise construction constructor, assignment operators, and swap.
902 * include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)):
903 Add _GLIBCXX20_CONSTEXPR.
904 (pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise.
905 * testsuite/20_util/pair/constexpr_assign.cc: New test.
906 * testsuite/20_util/pair/constexpr_swap.cc: New test.
907
908 * include/experimental/internet (operator==, operator<): Fix loop
909 condition to avoid reading past the end of the array.
910
911 * include/std/array: Remove references to profile mode.
912 * include/std/bitset: Likewise.
913 * include/std/deque: Likewise.
914 * include/std/forward_list: Likewise.
915 * include/std/list: Likewise.
916 * include/std/map: Likewise.
917 * include/std/set: Likewise.
918 * include/std/unordered_map: Likewise.
919 * include/std/unordered_set: Likewise.
920 * include/std/vector: Likewise.
921 * testsuite/17_intro/headers/c++1998/profile_mode.cc: New test.
922 * testsuite/17_intro/headers/c++2011/profile_mode.cc: New test.
923
924 2019-09-25 Jonathan Wakely <jwakely@redhat.com>
925
926 * include/bits/regex.h
927 (basic_regex::assign(const C*, size_t, flag_type)): Add default
928 argument (LWG 3296).
929 * testsuite/28_regex/basic_regex/assign/char/lwg3296.cc: New test.
930 * testsuite/28_regex/basic_regex/assign/wchar_t/lwg3296.cc: New test.
931
932 2019-09-24 Jonathan Wakely <jwakely@redhat.com>
933
934 * include/std/variant (variant::index()): Remove impossible case.
935
936 PR libstdc++/91871
937 * testsuite/util/testsuite_hooks.h
938 (conversion::iterator_to_const_iterator()): Do not return an invalid
939 iterator. Test direct-initialization and direct-list-initialization
940 as well as implicit conversion.
941
942 2019-09-23 Jonathan Wakely <jwakely@redhat.com>
943
944 PR libstdc++/91788 (partial)
945 * include/std/variant (variant::index()): Improve codegen for cases
946 where conversion to size_t already works correctly.
947
948 2019-09-23 Andreas Schwab <schwab@suse.de>
949
950 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
951
952 2019-09-12 Jonathan Wakely <jwakely@redhat.com>
953
954 PR libstdc++/91748
955 * include/bits/stl_algo.h (for_each_n): Fix random access iterator
956 case.
957 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
958 access iterators.
959
960 2019-09-11 Jonathan Wakely <jwakely@redhat.com>
961
962 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
963 Fix syntax error.
964
965 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
966 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
967 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile
968 for C++2a and up.
969
970 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
971
972 * include/std/type_traits (__do_common_type_impl): Implement
973 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20.
974 (basic_common_reference, common_reference, common_reference_t): Define
975 for C++20.
976 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New
977 test.
978 * testsuite/20_util/common_reference/requirements/
979 explicit_instantiation.cc: New test.
980 * testsuite/20_util/common_reference/requirements/typedefs.cc: New
981 test.
982
983 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
984 non-template overloads for each signed and unsigned integer type and
985 char. Define deleted overload for bool (LWG 3266).
986 * testsuite/20_util/to_chars/1_neg.cc: Remove.
987 * testsuite/20_util/to_chars/3.cc: New test.
988 * testsuite/20_util/to_chars/lwg3266.cc: New test.
989
990 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
991
992 * acinclude.m4: Handle uclinux*.
993 * configure: Regenerate.
994 * configure.host: Handle uclinux*
995
996 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
997 Mickaël Guêné <mickael.guene@st.com>
998
999 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
1000 support.
1001
1002 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
1003
1004 PR libstdc++/91711
1005 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
1006 0ul being a valid null pointer constant.
1007
1008 * include/std/type_traits (__remove_cv_t): New alias template.
1009 (is_void, is_integral, is_floating_point, is_pointer)
1010 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
1011 (is_member_point), __is_signed_integer, __is_unsigned_integer)
1012 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
1013 (__decay_selector): Use __remove_cv_t.
1014 (remove_cv): Add partial specializations for cv-qualified types.
1015 (__decay_t): New alias template.
1016 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
1017 __decay_t.
1018 (__enable_if_t): Move earlier in the file.
1019 (_Require): Use __enable_if_t.
1020 (swap(T&, T&)): Use _Require.
1021 (swap(T(&)[N])): Use __enable_if_t.
1022
1023 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1024
1025 Implement C++20 p1424 - 'constexpr' feature macro concerns,
1026 Issue 3256 - Feature testing macro for constexpr algorithms,
1027 and Issue 3257 - Missing feature testing macro update from P0858.
1028 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
1029 * include/bits/algorithmfwd.h: Ditto.
1030 * include/std/utility: Ditto.
1031 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
1032 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
1033 __cpp_lib_constexpr macro in <algorith>.
1034 * testsuite/20_util/exchange/constexpr.cc: Add check for
1035 __cpp_lib_constexpr macro in <utility>.
1036 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
1037 __cpp_lib_constexpr_algorithms.
1038 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
1039 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
1040 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
1041 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
1042 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
1043 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
1044 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
1045 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
1046 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
1047 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
1048 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
1049 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
1050 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
1051 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
1052 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
1053 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
1054 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
1055 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
1056 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
1057 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
1058 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
1059 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
1060 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
1061 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
1062 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
1063 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
1064 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
1065 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
1066 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
1067 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
1068 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
1069 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
1070 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
1071 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
1072 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
1073 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
1074 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
1075 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
1076 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
1077 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
1078 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
1079 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
1080 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
1081 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
1082 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
1083 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
1084 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
1085 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
1086 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
1087 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
1088 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
1089 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
1090 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
1091
1092 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1093
1094 Update docs for recent <span> and constexpr lib changes.
1095 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
1096 p1023r0, p1085r2 status.
1097 * doc/html/manual/status.html: Regenerate.
1098
1099 2019-09-09 Antony Polukhin <antoshkka@gmail.com>
1100
1101 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
1102 final offsets with constants.
1103
1104 2019-09-09 Jonathan Wakely <jwakely@redhat.com>
1105
1106 * include/bits/range_access.h (__adl_to_address): Remove.
1107 * include/std/span (__is_base_derived_safe_convertible_v): Replace
1108 with span::__is_compatible.
1109 (__is_std_array_v): Replace with __is_std_array class template and
1110 partial specializations.
1111 (__is_std_array, __is_std_span): New class templates and partial
1112 specializations.
1113 (span::__is_compatible): New alias template for SFINAE constraints.
1114 (span::span(element_type (&)[N])): Remove redundant constraints. Do
1115 not use __adl_data to obtain a pointer.
1116 (span::span(array<value_type, N>&)): Likewise.
1117 (span::span(const array<value_type, N>&)): Likewise.
1118 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
1119 (span::iter_value_t, span::derived_from): New alias templates for
1120 SFINAE constraints, until the equivalents are supported in <concepts>
1121 and <iterator>.
1122 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
1123 for SFINAE constraints.
1124 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
1125 SFINAE constraints.
1126 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
1127 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
1128 Use std::to_address instead of __adl_to_address.
1129 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
1130 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
1131 template for SFINAE constraints.
1132 [!_GLIBCXX_P1394] (span::span(Container&))
1133 (span::span(const Container&)): Improve constraints.
1134 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
1135 (span::span(pointer, pointer)): Remove redundant cast of pointer.
1136 (span(const span<OType, OExtent>&)): New constructor.
1137
1138 2019-09-06 Jonathan Wakely <jwakely@redhat.com>
1139
1140 * include/bits/range_access.h (ssize): Define for C++20.
1141 * testsuite/24_iterators/range_access_cpp20.cc: New test.
1142 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
1143 * doc/html/*: Regenerate.
1144
1145 2019-09-06 Florian Weimer <fweimer@redhat.com>
1146
1147 * configure: Regenerate.
1148
1149 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
1150
1151 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
1152 P1024R3. Remove entry for P0920R2.
1153 * include/std/span (__cpp_lib_span): Change value.
1154 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
1155 constructor.
1156 (span): Replace __extent_storage base class with data member.
1157 (span::_S_subspan_extent): New function.
1158 (span::empty()): Add nodiscard attribute.
1159 (span::front, span::back, span::operator[]): Check preconditions.
1160 (span::first, span::last, span::subspan): Add noexcept. Improve
1161 precondition checks (LWG 3103).
1162 (get): Remove redundant condition from static_assert.
1163 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
1164 (as_writable_bytes): Add inline specifier.
1165 * include/std/version (__cpp_lib_span): Change value.
1166 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
1167 * testsuite/23_containers/span/front_neg.cc: Likewise.
1168 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
1169 * testsuite/23_containers/span/last_neg.cc: Improve test.
1170 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
1171 * testsuite/23_containers/span/1.cc: New test.
1172 * testsuite/23_containers/span/2.cc: New test.
1173 * testsuite/23_containers/span/back_assert_neg.cc: New test.
1174 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
1175 * testsuite/23_containers/span/first_assert_neg.cc: New test.
1176 * testsuite/23_containers/span/first_neg.cc: New test.
1177 * testsuite/23_containers/span/front_assert_neg.cc: New test.
1178 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
1179 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
1180 * testsuite/23_containers/span/last_assert_neg.cc: New test.
1181 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
1182 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
1183 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
1184 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
1185 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
1186 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
1187
1188 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
1189
1190 * include/Makefile.am: Add <span> header.
1191 * include/Makefile.in: Regenerate.
1192 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
1193 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
1194 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
1195 New functions for performing argument-dependent lookup of range
1196 customization points.
1197 * include/bits/stl_iterator.h (__normal_iterator): Add
1198 _GLIBCXX20_CONSTEXPR to all functions.
1199 * include/std/span: New header.
1200 * include/std/version (__cpp_lib_span): Define feature test macro.
1201 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
1202 * testsuite/23_containers/span/everything.cc: New test.
1203 * testsuite/23_containers/span/get_neg.cc: New test.
1204 * testsuite/23_containers/span/last_neg.cc: New test.
1205 * testsuite/23_containers/span/subspan_neg.cc: New test.
1206 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
1207 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
1208 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
1209
1210 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
1211
1212 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
1213 * doc/html/*: Regenerate.
1214
1215 2019-09-04 Mike Crowe <mac@mcrowe.com>
1216
1217 PR libstdc++/41861
1218 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
1219 pthread_cond_clockwait function.
1220 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
1221 * configure: Regenerate.
1222 * config.h.in: Regenerate.
1223 * include/std/condition_variable: (condition_variable): Rename
1224 __steady_clock_t typedef and add system_clock. Change __clock_t to be
1225 a typedef for the preferred clock to convert arbitrary other clocks to.
1226 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
1227 overload.
1228 (wait_until): Change __clock_t overload to use system_clock.
1229 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
1230 steady_clock overload that calls pthread_cond_clockwait.
1231 (__wait_until_impl): Change __clock_t overload to use system_clock.
1232 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
1233 steady_clock for __clock_t if pthread_cond_clockwait is available.
1234
1235 2019-09-04 Mike Crowe <mac@mcrowe.com>
1236
1237 * testsuite/30_threads/condition_variable/members/2.cc (test01):
1238 Parameterise so that test can be run against an arbitrary clock.
1239 (main): Test using std::chrono::steady_clock and a user-defined
1240 clock in addition to the previous std::chrono::system_clock.
1241 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
1242
1243 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
1244
1245 * crossconfig.m4: Remove references to spu.
1246 * configure: Regenerate.
1247 * doc/xml/manual/appendix_contributing.xml: Remove references
1248 to __ea as "badword" for spu.
1249 * doc/html/manual/source_code_style.html: Regenerate.
1250 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
1251 to avoid __ea (as "badword" for spu).
1252 (__ellint_rj): Likewise.
1253
1254 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
1255
1256 PR other/79543
1257 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
1258 scanning to conform to the GNU Coding Standards.
1259 * configure: Regenerate.
1260
1261 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1262
1263 * src/c++17/memory_resource.cc: Use __constinit keyword.
1264
1265 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1266
1267 * doc/xml/manual/abi.xml: Document 9.x library versions.
1268 * doc/html/*: Regenerate.
1269
1270 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1271
1272 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
1273 (__detail::__to_chars_8_len): Remove.
1274 (__detail::__to_chars_8): Inline length calculation here.
1275 (__detail::__from_chars_binary): Use numeric_limits instead of
1276 CHAR_BIT.
1277
1278 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1279
1280 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
1281 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
1282 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
1283 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
1284 Likewise.
1285
1286 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
1287
1288 * testsuite_files/util/testsuite_performance.h
1289 (resource_counter::start): Ignore unused malloc(0) result.
1290
1291 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1292
1293 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
1294 Model Object Technologies): Adjust name and link.
1295
1296 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
1297
1298 * include/std/charconv (__detail::__to_chars_8)
1299 __detail::__to_chars_16): Replace array of precomputed digits with
1300 arithmetic operations to avoid CPU cache misses. Remove zero
1301 termination from array of digits to allow symbol merge with generic
1302 implementation of __detail::__to_chars. Replace final offsets with
1303 constants. Use __detail::__to_chars_len_2 instead of a generic
1304 __detail::__to_chars_len.
1305 (__detail::__to_chars): Remove zero termination from array of digits.
1306 (__detail::__to_chars_2): Leading digit is always '1'.
1307
1308 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
1309
1310 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
1311
1312 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
1313
1314 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
1315
1316 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
1317
1318 PR libstdc++/89164
1319 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
1320 to template parameters.
1321 * include/bits/stl_uninitialized.h (uninitialized_copy)
1322 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
1323 diagnose invalid uses.
1324 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
1325 Adjust expected error.
1326 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
1327 New test.
1328 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
1329 89164.cc: New test.
1330 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
1331 New test.
1332 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
1333 89164.cc: New test.
1334 * testsuite/23_containers/vector/cons/89164.cc: New test.
1335 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
1336
1337 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
1338
1339 PR libstdc++/91067
1340 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
1341 * configure: Regenerate.
1342 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
1343 missing symbols.
1344 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
1345 constructors.
1346 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1347
1348 2019-08-29 Jakub Jelinek <jakub@redhat.com>
1349
1350 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1351 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1352
1353 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
1354
1355 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1356 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1357 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1358 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1359 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1360 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1361 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1362
1363 2019-08-23 Joseph Myers <joseph@codesourcery.com>
1364
1365 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1366 (std::filesystem::__gnu_posix::lstat): Add return type.
1367
1368 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
1369
1370 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
1371
1372 * include/std/numeric (reduce): Fix Doxygen markup.
1373
1374 PR libstdc++/91371
1375 * include/std/type_traits (is_function): Simplify definition. Remove
1376 partial specializations for function types.
1377 (__is_referenceable): Simplify definition.
1378 * testsuite/20_util/bind/91371.cc: New test.
1379 * testsuite/20_util/is_function/91371.cc: New test.
1380 * testsuite/20_util/is_function/value.cc: Check more pointer types.
1381 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
1382 * testsuite/20_util/is_object/91371.cc: New test.
1383
1384 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
1385
1386 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
1387
1388 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
1389
1390 PR libstdc++/91456
1391 * include/bits/std_function.h (__check_func_return_type): Remove.
1392 (function::_Callable): Use std::__is_invocable_impl instead of
1393 __check_func_return_type.
1394 * include/std/type_traits (__is_invocable_impl): Add another defaulted
1395 template parameter. Define a separate partial specialization for
1396 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
1397 with a check that models delayed temporary materialization.
1398 * testsuite/20_util/function/91456.cc: New test.
1399 * testsuite/20_util/is_invocable/91456.cc: New test.
1400
1401 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
1402
1403 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
1404
1405 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
1406
1407 Implement C++20 p0879 - Constexpr for swap and swap related functions.
1408 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
1409 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
1410 New macro.
1411 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
1412 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
1413 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
1414 * include/bits/move.h (swap): Add constexpr.
1415 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
1416 (__gcd, __rotate, rotate, __partition, __heap_select)
1417 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
1418 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
1419 (__introselect, __chunk_insertion_sort, next_permutation)
1420 (prev_permutation, partition, partial_sort, nth_element, sort)
1421 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
1422 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
1423 (swap_ranges): Add constexpr.
1424 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
1425 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
1426 Add constexpr.
1427 * include/std/type_traits (swap): Add constexpr.
1428 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
1429 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
1430 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
1431 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
1432 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
1433 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
1434 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
1435 * testsuite/25_algorithms/partition/constexpr.cc: New test.
1436 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
1437 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
1438 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
1439 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
1440 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
1441 * testsuite/25_algorithms/sort/constexpr.cc: New test.
1442 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
1443 * testsuite/25_algorithms/swap/constexpr.cc: New test.
1444 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
1445
1446 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
1447
1448 PR libstdc++/90361
1449 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
1450
1451 * include/std/tuple (__unpack_std_tuple): New variable template and
1452 partial specializations.
1453 (apply, make_from_tuple): Add noexcept-specifier.
1454 * testsuite/20_util/tuple/apply/2.cc: New test.
1455 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
1456
1457 2019-08-09 Corentin Gay <gay@adacore.com>
1458
1459 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
1460 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
1461 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
1462 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
1463 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
1464 Add call to `VERIFY`.
1465
1466 2019-08-09 Alexandre Oliva <oliva@adacore.com>
1467
1468 * include/ext/random
1469 (normal_mv_distribution::param_type::param_type): New private
1470 ctor taking a decomposed varcov matrix, for use by...
1471 (operator>>): ... this, befriended.
1472 * include/ext/random.tcc (operator>>): Use it.
1473 (normal_mv_distribution::param_type::_M_init_lower): Adjust
1474 member function name in exception message.
1475
1476 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
1477
1478 P0325R4 to_array from LFTS with updates
1479 * include/experimental/array (to_array): Qualify call to __to_array.
1480 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
1481 * include/std/version (__cpp_lib_to_array): Likewise.
1482 * testsuite/23_containers/array/creation/1.cc: New test.
1483 * testsuite/23_containers/array/creation/2.cc: New test.
1484 * testsuite/23_containers/array/creation/3_neg.cc: New test.
1485 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
1486 Use zero for dg-error line number.
1487
1488 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
1489
1490 P1651R0 bind_front should not unwrap reference_wrapper
1491 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
1492 * include/std/version (__cpp_lib_bind_front): Update value.
1493 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
1494 feature test macro.
1495 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
1496
1497 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
1498 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
1499 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
1500 specializations for __float128.
1501 * testsuite/26_numerics/numbers/float128.cc: New test.
1502
1503 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
1504
1505 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
1506 doxygen.nl.
1507
1508 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1509
1510 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
1511 in <algorithm> and <utility> Headers.
1512 Implement C++20 p1023 - constexpr comparison operators for std::array.
1513 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
1514 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
1515 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
1516 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
1517 none_of, partition_copy, partition_point, remove, remove_if,
1518 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
1519 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
1520 count_if, equal, find, find_first_of, find_if, for_each, generate,
1521 generate_n, lexicographical_compare, merge, mismatch, replace,
1522 replace_if, search, search_n, set_difference, set_intersection,
1523 set_symmetric_difference, set_union, transform, unique_copy):
1524 Mark constexpr.
1525 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
1526 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
1527 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
1528 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
1529 Use const ref instead of ref arg;
1530 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
1531 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
1532 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
1533 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
1534 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
1535 __iter_comp_iter): Mark constexpr.
1536 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
1537 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
1538 none_of, any_of, find_if_not, is_partitioned, partition_point,
1539 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
1540 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
1541 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
1542 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
1543 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
1544 __equal_range, equal_range, binary_search, __includes, includes,
1545 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
1546 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
1547 is_sorted_until, __is_permutation, is_permutation, for_each, find,
1548 find_if, find_first_of, adjacent_find, count, count_if, search,
1549 search_n, transform, replace, replace_if, generate, generate_n,
1550 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
1551 set_intersection, __set_difference, set_difference,
1552 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
1553 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
1554 wrappers around __builtin_memmove and __builtin_memcmp
1555 respectively;
1556 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
1557 copy, move, __copy_move_b, __copy_move_backward_a,
1558 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
1559 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
1560 __lexicographical_compare_impl, __lexicographical_compare,
1561 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
1562 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
1563 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
1564 is_heap): Mark constexpr.
1565 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
1566 is_heap): Mark constexpr.
1567 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
1568 * include/std/array: Make comparison ops constexpr.
1569 * include/std/utility: Make exchange constexpr.
1570 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
1571 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
1572 * testsuite/23_containers/array/tuple_interface/
1573 tuple_element_neg.cc: Adjust.
1574 * testsuite/20_util/exchange/constexpr.cc: New.
1575 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
1576 * testsuite/25_algorithms/constexpr_macro.cc: New.
1577 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
1578 * testsuite/25_algorithms/all_of/constexpr.cc: New.
1579 * testsuite/25_algorithms/any_of/constexpr.cc: New.
1580 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
1581 * testsuite/25_algorithms/copy/constexpr.cc: New.
1582 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
1583 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
1584 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
1585 * testsuite/25_algorithms/count/constexpr.cc: New.
1586 * testsuite/25_algorithms/count_if/constexpr.cc: New.
1587 * testsuite/25_algorithms/equal/constexpr.cc: New.
1588 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
1589 * testsuite/25_algorithms/fill/constexpr.cc: New.
1590 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
1591 * testsuite/25_algorithms/find/constexpr.cc: New.
1592 * testsuite/25_algorithms/find_end/constexpr.cc: New.
1593 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
1594 * testsuite/25_algorithms/find_if/constexpr.cc: New.
1595 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
1596 * testsuite/25_algorithms/for_each/constexpr.cc: New.
1597 * testsuite/25_algorithms/generate/constexpr.cc: New.
1598 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
1599 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
1600 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
1601 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
1602 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
1603 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
1604 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
1605 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
1606 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
1607 * testsuite/25_algorithms/merge/constexpr.cc: New.
1608 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
1609 * testsuite/25_algorithms/none_of/constexpr.cc: New.
1610 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
1611 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
1612 * testsuite/25_algorithms/remove/constexpr.cc: New.
1613 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
1614 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
1615 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
1616 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
1617 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
1618 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
1619 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
1620 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
1621 * testsuite/25_algorithms/search/constexpr.cc: New.
1622 * testsuite/25_algorithms/search_n/constexpr.cc: New.
1623 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
1624 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
1625 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
1626 * testsuite/25_algorithms/set_union/constexpr.cc: New.
1627 * testsuite/25_algorithms/transform/constexpr.cc: New.
1628 * testsuite/25_algorithms/unique/constexpr.cc: New.
1629 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
1630 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
1631
1632 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
1633
1634 * include/std/memory (make_obj_using_allocator): Qualify call to
1635 uses_allocator_construction_args.
1636
1637 P0631R4 Math Constants
1638 * include/Makefile.am: Add new header.
1639 * include/Makefile.in: Regenerate.
1640 * include/precompiled/stdc++.h: Include new header.
1641 * include/std/numbers: New header.
1642 * include/std/version (__cpp_lib_math_constants): Define.
1643 * testsuite/26_numerics/numbers/1.cc: New test.
1644 * testsuite/26_numerics/numbers/2.cc: New test.
1645 * testsuite/26_numerics/numbers/3.cc: New test.
1646 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
1647
1648 * include/std/bit: Add Doxygen comments.
1649
1650 PR libstdc++/91308
1651 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
1652 constraints on deleter that should only apply to the constructor.
1653 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
1654 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
1655 constraints on deleter here.
1656 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
1657
1658 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
1659
1660 PR libstdc++/51333
1661 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
1662 constructor inline.
1663 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
1664 constructor.
1665 * testsuite/18_support/51333.cc: New test.
1666
1667 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
1668
1669 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
1670 to the Doxygen manual. Avoid a "here" link on the way.
1671 Fix another broken link to Doxygen docblocks.
1672
1673 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
1674
1675 * include/std/bit (__cpp_lib_endian): Define.
1676 * include/std/version (__cpp_lib_endian): Define.
1677 * testsuite/26_numerics/endian/2.cc: New.
1678 * testsuite/26_numerics/endian/3.cc: New.
1679 * testsuite/26_numerics/endian/4.cc: New.
1680
1681 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
1682
1683 * testsuite/util/testsuite_iterators.h
1684 (bidirectional_iterator_wrapper): Fix type comment.
1685 (random_access_iterator_wrapper): Likewise.
1686
1687 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
1688
1689 * include/std/bit (endian): Move definition here as per P1612R1.
1690 * include/std/type_traits (endian): Remove definition from here.
1691 * testsuite/20_util/endian/1.cc: Rename to ...
1692 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
1693
1694 2019-07-25 Martin Liska <mliska@suse.cz>
1695 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1696
1697 PR c++/23383
1698 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
1699 -fno-allocation-dce.
1700 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
1701 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
1702 * testsuite/ext/new_allocator/check_new.cc: Likewise.
1703
1704 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
1705
1706 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
1707 * testsuite/26_numerics/bit/bit.count/*: Here.
1708
1709 * include/std/bit (__rotl, __rotr): Change second parameter from
1710 unsigned int to int and handle negative values.
1711 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
1712 parameter from unsigned int to int. Add nodiscard attribute.
1713 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
1714 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
1715 shifts.
1716 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
1717 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
1718 shifts.
1719
1720 * include/std/bit (__ceil2): Make unrepresentable results undefined,
1721 as per P1355R2. Add debug assertion. Perform one left shift, not two,
1722 so that out of range values cause undefined behaviour. Ensure that
1723 shift will still be undefined if left operand is promoted.
1724 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
1725 unrepresentable values with checks that they are not core constant
1726 expressions.
1727 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
1728
1729 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
1730
1731 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
1732 sized deallocation size computation.
1733
1734 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
1735
1736 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
1737
1738 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
1739
1740 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
1741 (~_Temporary_buffer()): Use latter.
1742 (_Temporary_buffer(_FIterator, size_type)): Likewise.
1743
1744 2019-07-17 Andreas Schwab <schwab@suse.de>
1745
1746 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1747
1748 2019-07-16 Jason Merrill <jason@redhat.com>
1749
1750 * include/std/memory (uses_allocator_construction_args): Add parens
1751 around constraint.
1752
1753 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
1754
1755 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
1756
1757 * include/experimental/string_view (__detail::__idt): Remove.
1758 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1759 Use __type_identity_t instead of __detail::__idt;
1760 * include/std/string_view (__detail::__idt): Remove.
1761 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1762 Use __type_identity_t instead of __detail::__idt;
1763 * include/std/type_traits (__type_identity_t): New alias template.
1764
1765 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
1766 and floating point atomics.
1767
1768 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
1769
1770 * doc/xml/manual/configure.xml: Improve documentation of
1771 --enable-libstdcxx-time option.
1772
1773 * include/bits/atomic_base.h (__atomic_impl): New namespace for
1774 wrappers around atomic built-ins.
1775 (__atomic_float, __atomic_ref): New class templates for use as base
1776 classes.
1777 * include/std/atomic (atomic<float>, atomic<double>)
1778 (atomic<long double>): New explicit specializations.
1779 (atomic_ref): New class template.
1780 (__cpp_lib_atomic_ref): Define.
1781 * include/std/version (__cpp_lib_atomic_ref): Define.
1782 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
1783 * testsuite/29_atomics/atomic_float/1.cc: New test.
1784 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
1785 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
1786 * testsuite/29_atomics/atomic_ref/float.cc: New test.
1787 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
1788 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
1789 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
1790 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
1791
1792 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
1793
1794 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
1795 throw() with _GLIBCXX_NOTHROW.
1796 (__atomic_add_dispatch): Return after performing atomic increment.
1797
1798 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
1799
1800 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
1801 (__exchange_and_add): Replace static specifier with always_inline
1802 attribute.
1803 (__exchange_and_add_single, __atomic_add_single): Likewise.
1804 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
1805 combine !__gthread_active_p() and !__GTHREADS branches.
1806
1807 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
1808
1809 PR libstdc++/91067
1810 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
1811 * configure: Regenerate.
1812 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
1813 missing symbols.
1814 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
1815 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1816
1817 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
1818
1819 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
1820 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
1821 instead of __is_identifier to detect Clang support.
1822
1823 2019-07-02 Jim Wilson <jimw@sifive.com>
1824
1825 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
1826 and xmllint.
1827 * configure: Regenerate.
1828
1829 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
1830
1831 PR libstdc++/91012
1832 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
1833 for the what_arg parameters.
1834 (filesystem_error::filesystem_error): Pass system_error::what() to
1835 the _Impl constructor.
1836 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
1837 filesystem_error::what() contains system_error::what().
1838
1839 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
1840
1841 * include/std/charconv (chars_format): Define bitmask type.
1842 * testsuite/20_util/to_chars/chars_format.cc: New test.
1843
1844 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
1845 * include/std/bit (_If_is_unsigned_integer_type): Remove.
1846 (_If_is_unsigned_integer): Use __is_unsigned_integer.
1847 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
1848 (countl_one(byte), countr_zero(byte), countr_one(byte))
1849 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
1850 (log2p1(byte)): Remove.
1851 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
1852 (__detail::__is_int_to_chars_type): Remove.
1853 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
1854 and __is_unsigned_integer.
1855 * include/std/type_traits (__is_one_of): Move here from <charconv>.
1856 (__is_signed_integer, __is_unsigned_integer): New helpers.
1857 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
1858 std::byte overload.
1859 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
1860 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
1861 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
1862 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
1863 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
1864 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
1865 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
1866 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
1867 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
1868 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
1869
1870 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
1871
1872 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
1873 function.
1874
1875 2019-06-25 Jakub Jelinek <jakub@redhat.com>
1876
1877 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
1878 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
1879 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
1880 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
1881
1882 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
1883
1884 * include/std/numeric (midpoint(T, T)): Change implementation for
1885 floating-point types to avoid incorrect rounding of denormals.
1886 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
1887 rounding with denormals.
1888 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
1889 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1890
1891 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
1892
1893 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
1894
1895 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
1896 stage of bootstrap.
1897 * configure: Regenerate.
1898
1899 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
1900 Qualify calls to __never_valueless.
1901
1902 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
1903 C++17 working draft.
1904
1905 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
1906 vector<bool> for test.
1907 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1908
1909 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1910
1911 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
1912 private.
1913 (istream_iterator::_M_read()): Do not check stream state before
1914 attempting extraction. Set stream pointer to null when extraction
1915 fails (P0738R2).
1916 (operator==(const istream_iterator&, const istream_iterator&)): Change
1917 to be a hidden friend of istream_iterator.
1918 (operator!=(const istream_iterator&, const istream_iterator&)):
1919 Likewise.
1920 (ostream_iterator::ostream_iterator()): Add default constructor.
1921 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
1922 addressof.
1923 * testsuite/24_iterators/istream_iterator/1.cc: New test.
1924 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
1925 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
1926 constructor taking a string.
1927 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
1928 New test.
1929
1930 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
1931 Jonathan Wakely <jwakely@redhat.com>
1932
1933 PR libstdc++/90945
1934 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
1935 values of type bool for vector<bool> elements.
1936 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
1937 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1938
1939 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1940
1941 PR libstdc++/90920 partially revert r263433
1942 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
1943 (rotate): Remove checks.
1944 * testsuite/25_algorithms/rotate/90920.cc: New test.
1945
1946 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
1947 category used in invocable check.
1948 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
1949 * testsuite/26_numerics/reduce/2.cc: New test.
1950
1951 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
1952
1953 * include/bits/algorithmfwd.h: Change title of doc group.
1954 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
1955 P0024R2.
1956 * include/bits/stl_numeric.h: Define doc group and add algos to it.
1957 * include/std/numeric (__is_random_access_iter): New internal trait.
1958 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
1959 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
1960 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
1961 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
1962 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
1963 * testsuite/26_numerics/reduce/1.cc: New test.
1964 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
1965 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
1966 * testsuite/26_numerics/transform_reduce/1.cc: New test.
1967 * testsuite/util/testsuite_iterators.h (test_container::size()): New
1968 member function.
1969
1970 * include/c_global/cstddef (std::byte): Perform arithmetic operations
1971 in unsigned int to avoid promotion (LWG 2950).
1972
1973 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1974
1975 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
1976 failure on AIX.
1977
1978 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
1979
1980 PR libstdc++/90281 Fix string conversions for filesystem::path
1981 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1982 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
1983 __str_codecvt_in_all to fail for partial conversions and throw on
1984 error.
1985 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
1986 (path::_Cvt<char8_t>): Add explicit specialization.
1987 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
1988 overloads.
1989 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1990 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
1991 instead of codecvt_utf8. Use __str_codecvt_in_all and
1992 __str_codecvt_out_all.
1993 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1994 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1995 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1996 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1997 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
1998 after converting to UTF-8.
1999 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
2000 __str_codecvt_in_all.
2001 (path::string): Fix initialization of string types with different
2002 allocators.
2003 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2004 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
2005 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
2006 runtime conditions.
2007 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
2008 return false for partial conversions.
2009 * include/experimental/bits/fs_path.h (u8path):
2010 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
2011 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
2012 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
2013 instead of codecvt_utf8. Use __str_codecvt_in_all and
2014 __str_codecvt_out_all.
2015 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
2016 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
2017 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2018 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
2019 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
2020 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2021 __str_codecvt_in_all.
2022 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2023 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
2024 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
2025 __str_codecvt_in_all.
2026 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
2027 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
2028 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
2029 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
2030 strings and with Unicode characters outside the basic multilingual
2031 plane.
2032 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
2033 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
2034 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
2035 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
2036 * testsuite/experimental/filesystem/path/native/string.cc: Test with
2037 empty strings and with Unicode characters outside the basic
2038 multilingual plane.
2039
2040 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
2041 Jonathan Wakely <jwakely@redhat.com>
2042
2043 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
2044 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
2045 deallocate node if insertion fails.
2046 (_Hashtable::_M_insert_multi_node): Likewise.
2047 (_Hashtable::_M_reinsert_node): Pass additional key argument.
2048 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
2049 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
2050 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
2051 (_Hashtable::extract(const _Key&)): Likewise.
2052 (_Hashtable::_M_merge_unique): Pass additional key argument.
2053 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
2054 _Scoped_node.
2055 (_Hashtable::_M_insert): Likewise.
2056 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
2057 (_Hashtable_alloc): Add comments to functions with misleading names.
2058
2059 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
2060
2061 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
2062 for std::string.
2063 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
2064 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
2065 header for std::allocator.
2066 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
2067 using-declaration for std::size_t.
2068 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
2069 Likewise.
2070 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
2071 std::istream.
2072 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
2073 * testsuite/experimental/map/erasure.cc: Include <string> for
2074 std::string.
2075 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
2076
2077 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
2078
2079 * include/experimental/type_traits (experimental::nonesuch): Use
2080 pragma to disable -Wctor-dtor-privacy warnings.
2081 * include/std/type_traits (__is_convertible_helper<From, To, false>)
2082 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
2083
2084 * include/std/version (__cpp_lib_bind_front): Add missing macro.
2085
2086 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
2087
2088 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
2089 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
2090 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
2091 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
2092
2093 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
2094 (variant::emplace): Change static_assert messages from "should be"
2095 to "must be".
2096 (hash<monostate>::operator()): Remove name of unused parameter.
2097
2098 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
2099 expression.
2100
2101 * include/Makefile.am: Add new <bits/charconv.h> header.
2102 * include/Makefile.in: Regenerate.
2103 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
2104 (to_string(long), to_string(unsigned long), to_string(long long))
2105 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
2106 * include/bits/charconv.h: New header.
2107 (__detail::__to_chars_len): Move here from <charconv>.
2108 (__detail::__to_chars_10_impl): New function extracted from
2109 __detail::__to_chars_10.
2110 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
2111 (__to_chars_unsigned_type): New class template that reuses
2112 __make_unsigned_selector_base::__select to pick a type.
2113 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
2114 (__detail::__to_chars_len): Move to new header.
2115 (__detail::__to_chars_10): Add inline specifier. Move code doing the
2116 output to __detail::__to_chars_10_impl and call that.
2117 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
2118 * testsuite/21_strings/basic_string/numeric_conversions/char/
2119 to_string.cc: Fix reference in comment. Remove unused variable.
2120 * testsuite/21_strings/basic_string/numeric_conversions/char/
2121 to_string_int.cc: New test.
2122
2123 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
2124
2125 Fix ConstexprIterator requirements tests - No constexpr algorithms!
2126 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
2127 Replace copy with hand-rolled loop.
2128 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
2129 Ditto.
2130
2131 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
2132
2133 Test for C++20 p0858 - ConstexprIterator requirements.
2134 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
2135 New test.
2136 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
2137 New test.
2138
2139 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
2140
2141 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
2142 project) standards.
2143 * include/bits/c++config: Rename all macros of the form __PSTL* to
2144 _PSTL*.
2145 * include/std/algorithm: Likewise.
2146 * include/std/execution: Likewise.
2147 * include/std/numeric: Likewise.
2148 * include/std/memory: Likewise.
2149 * include/pstl/glue_memory_impl.h: Likewise.
2150 * include/pstl/numeric_impl.h: Likewise.
2151 * include/pstl/glue_memory_defs.h: Likewise.
2152 * include/pstl/execution_defs.h: Likewise.
2153 * include/pstl/utils.h: Likewise.
2154 * include/pstl/algorithm_fwd.h: Likewise.
2155 * include/pstl/unseq_backend_simd.h: Likewise.
2156 * include/pstl/glue_execution_defs.h: Likewise.
2157 * include/pstl/algorithm_impl.h: Likewise.
2158 * include/pstl/parallel_impl.h: Likewise.
2159 * include/pstl/memory_impl.h: Likewise.
2160 * include/pstl/glue_numeric_defs.h: Likewise.
2161 * include/pstl/parallel_backend_utils.h: Likewise.
2162 * include/pstl/glue_algorithm_defs.h: Likewise.
2163 * include/pstl/parallel_backend.h: Likewise.
2164 * include/pstl/glue_numeric_impl.h: Likewise.
2165 * include/pstl/parallel_backend_tbb.h: Likewise.
2166 * include/pstl/numeric_fwd.h: Likewise.
2167 * include/pstl/glue_algorithm_impl.h: Likewise.
2168 * include/pstl/execution_impl.h: Likewise.
2169 * include/pstl/pstl_config.h: Likewise.
2170 * testsuite/util/pstl/pstl_test_config.h: Likewise.
2171 * testsuite/util/pstl/test_utils.h: Likewise.
2172 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
2173 Likewise.
2174 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
2175 Likewise.
2176 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
2177 Likewise.
2178 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
2179 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
2180 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
2181 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
2182 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
2183 Likewise.
2184 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
2185 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
2186 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
2187 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
2188 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
2189 Likewise.
2190 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
2191 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
2192 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
2193 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
2194 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
2195 Likewise.
2196 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
2197 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
2198 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
2199 Likewise.
2200 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
2201 Likewise.
2202 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
2203 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
2204 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
2205 Likewise.
2206 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
2207 Likewise.
2208 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
2209 Likewise.
2210 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
2211 Likewise.
2212 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
2213 Likewise.
2214 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
2215 Likewise.
2216 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
2217 Likewise.
2218 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
2219 Likewise.
2220 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
2221 Likewise.
2222 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
2223 Likewise.
2224 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
2225 Likewise.
2226 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
2227
2228 Rename header guards to be consistent with upstream project's
2229 conventions.
2230 * include/pstl/glue_memory_impl.h: Rename all macros of the form
2231 _PSTL_(.*)_H to _PSTL_\U\1_H.
2232 * include/pstl/numeric_impl.h: Likewise.
2233 * include/pstl/glue_memory_defs.h: Likewise.
2234 * include/pstl/execution_defs.h: Likewise.
2235 * include/pstl/utils.h: Likewise.
2236 * include/pstl/algorithm_fwd.h: Likewise.
2237 * include/pstl/unseq_backend_simd.h: Likewise.
2238 * include/pstl/glue_execution_defs.h: Likewise.
2239 * include/pstl/algorithm_impl.h: Likewise.
2240 * include/pstl/parallel_impl.h: Likewise.
2241 * include/pstl/memory_impl.h: Likewise.
2242 * include/pstl/glue_numeric_defs.h: Likewise.
2243 * include/pstl/parallel_backend_utils.h: Likewise.
2244 * include/pstl/glue_algorithm_defs.h: Likewise.
2245 * include/pstl/parallel_backend.h: Likewise.
2246 * include/pstl/glue_numeric_impl.h: Likewise.
2247 * include/pstl/parallel_backend_tbb.h: Likewise.
2248 * include/pstl/numeric_fwd.h: Likewise.
2249 * include/pstl/glue_algorithm_impl.h: Likewise.
2250 * include/pstl/execution_impl.h: Likewise.
2251 * include/pstl/pstl_config.h: Likewise.
2252 * testsuite/util/pstl/pstl_test_config.h: Likewise.
2253
2254 Synchronize libstdc++ parallel algorithms with upstream
2255 project.
2256 * include/pstl/algorithm_fwd.h: Synchronize with
2257 upstream PSTL project.
2258 * include/pstl/algorithm_impl.h: Likewise.
2259 * include/pstl/execution_defs.h: Likewise.
2260 * include/pstl/execution_impl.h: Likewise.
2261 * include/pstl/glue_algorithm_impl.h: Likewise.
2262 * include/pstl/glue_execution_defs.h: Likewise.
2263 * include/pstl/numeric_fwd.h: Likewise.
2264 * include/pstl/numeric_impl.h: Likewise.
2265 * include/pstl/parallel_backend.h: Likewise.
2266 * include/pstl/pstl_config.h: Likewise.
2267 * include/pstl/unseq_backend_simd.h: Likewise.
2268 * include/pstl/parallel_backend_serial.h: New file.
2269 * include/Makefile.am (pstl_headers): Add
2270 parallel_backend_serial.h.
2271 * include/Makefile.in: Regenerate.
2272
2273 Clean up non-conforming names
2274 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
2275 Uglfiy copy_range1 and copy_range2
2276 (__pattern_walk2_n): Rename local n to __n
2277 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
2278 Rename parameter _T to _Tp.
2279
2280 Integrate non-TBB serial backend support
2281 * include/bits/c++config: Adjust TBB detection logic to select serial
2282 PSTL backend if no TBB present.
2283 * testsuite/utils/pstl/test_utils.h: Remove check for
2284 _PSTL_USE_PAR_POLICIES
2285
2286 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
2287
2288 * testsuite/24_iterators/container_access.cc: Move dg-options before
2289 dg-do directive so the target check uses the -std option.
2290
2291 PR libstdc++/90770
2292 * configure: Regenerate.
2293 * src/Makefile.am (stamp-debug): Also test for missing makefile.
2294 * src/Makefile.in: Regenerate.
2295
2296 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
2297
2298 * include/std/array: Do not include <stdexcept>.
2299 * include/std/optional: Include <exception> and
2300 <bits/exception_defines.h> instead of <stdexcept>.
2301 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
2302 for std::isalnum.
2303 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
2304 std::allocator.
2305 * testsuite/23_containers/map/erasure.cc: Include <string>.
2306 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2307
2308 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
2309 dg-prune-output for different C++98 diagnostic.
2310 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
2311 Likewise.
2312 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
2313 Likewise.
2314 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
2315 Likewise.
2316 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
2317 Likewise.
2318 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
2319 Likewise.
2320 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
2321 Likewise.
2322 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
2323 Likewise.
2324 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
2325 Likewise.
2326 * testsuite/23_containers/vector/requirements/dr438/
2327 constructor_1_neg.cc: Likewise.
2328 * testsuite/23_containers/vector/requirements/dr438/
2329 constructor_2_neg.cc: Likewise.
2330 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
2331 Likewise.
2332 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
2333
2334 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
2335 Do not test allocator rebinding extension for C++2a.
2336 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2337 dg-do directive for C++17 and C++2a.
2338
2339 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2340 1_c++0x.cc: Remove redundant test.
2341 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2342 2.cc: Use target selector instead of preprocessor condition.
2343 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2344 3.cc: Do not run test for C++2a.
2345 * testsuite/23_containers/forward_list/requirements/
2346 explicit_instantiation/3.cc: Likewise.
2347 * testsuite/23_containers/forward_list/requirements/
2348 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2349 for C++2a.
2350 * testsuite/23_containers/list/requirements/explicit_instantiation/
2351 1_c++0x.cc: Remove redundant test.
2352 * testsuite/23_containers/list/requirements/explicit_instantiation/
2353 2.cc: Use target selector instead of preprocessor condition.
2354 * testsuite/23_containers/list/requirements/explicit_instantiation/
2355 3.cc: Do not run test for C++2a.
2356 * testsuite/23_containers/list/requirements/explicit_instantiation/
2357 5.cc: Do not test allocator rebinding extension for C++2a.
2358 * testsuite/23_containers/map/requirements/explicit_instantiation/
2359 1_c++0x.cc: Remove redundant test.
2360 * testsuite/23_containers/map/requirements/explicit_instantiation/
2361 2.cc: Adjust comment.
2362 * testsuite/23_containers/map/requirements/explicit_instantiation/
2363 3.cc: Do not run test for C++2a.
2364 * testsuite/23_containers/map/requirements/explicit_instantiation/
2365 5.cc: Do not test allocator rebinding extension for C++2a.
2366 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2367 1_c++0x.cc: Remove redundant test.
2368 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2369 3.cc: Do not run test for C++2a.
2370 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2371 5.cc: Do not test allocator rebinding extension for C++2a.
2372 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
2373 3.cc: Do not run test for C++2a.
2374 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
2375 5.cc: Do not test allocator rebinding extension for C++2a.
2376 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
2377 Do not run test for C++2a.
2378 * testsuite/23_containers/set/requirements/explicit_instantiation/
2379 1_c++0x.cc: Remove redundant test.
2380 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
2381 Do not test allocator rebinding extension for C++2a.
2382 * testsuite/23_containers/unordered_map/requirements/
2383 explicit_instantiation/3.cc: Likewise.
2384 * testsuite/23_containers/unordered_map/requirements/
2385 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2386 for C++2a.
2387 * testsuite/23_containers/unordered_multimap/requirements/
2388 explicit_instantiation/3.cc: Do not run test for C++2a.
2389 * testsuite/23_containers/unordered_multimap/requirements/
2390 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2391 for C++2a.
2392 * testsuite/23_containers/unordered_multiset/requirements/
2393 explicit_instantiation/3.cc: Do not run test for C++2a.
2394 * testsuite/23_containers/unordered_multiset/requirements/
2395 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2396 for C++2a.
2397 * testsuite/23_containers/unordered_set/requirements/
2398 explicit_instantiation/3.cc: Do not run test for C++2a.
2399 * testsuite/23_containers/unordered_set/requirements/
2400 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2401 for C++2a.
2402 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2403 2.cc: Remove redundant test.
2404 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2405 3.cc: Do not run test for C++2a.
2406 * testsuite/23_containers/vector/requirements/explicit_instantiation/
2407 3.cc: Likewise.
2408
2409 * include/std/type_traits (is_empty, is_polymorphic, is_final)
2410 (is_abstract, is_aggregate): Remove static_assert.
2411 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
2412 from builtin only.
2413 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
2414 missing -std=gnu++17 option.
2415 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
2416 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
2417 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
2418 from builtin only.
2419
2420 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
2421 * testsuite/18_support/set_unexpected.cc: Likewise.
2422 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
2423 void.
2424 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
2425 function to be valid in C++11.
2426 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
2427 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
2428 include Library Fundamentals or Networking headers in C++11 mode.
2429 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
2430
2431 * include/std/tuple (_TC): Replace with _TupleConstraints.
2432 (_TupleConstraints): New helper for SFINAE constraints, with more
2433 expressive member functions to reduce duplication when used.
2434 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
2435 (tuple::_TCC): Replace dummy type parameter with bool non-type
2436 parameter that can be used to check the pack size.
2437 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
2438 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
2439 checking constraints in constructors.
2440 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
2441 New SFINAE helpers.
2442 (tuple::tuple): Use new helpers to reduce repitition in constraints.
2443 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
2444 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
2445 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
2446 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
2447 constraints in constructors.
2448 (tuple::__is_alloc_arg()): New SFINAE helpers.
2449 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
2450 constraints.
2451 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
2452 * testsuite/20_util/tuple/cons/90700.cc: New test.
2453 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
2454 to meet new constraint on allocator-extended default constructor.
2455
2456 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2457
2458 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
2459 * include/bits/stl_multimap.h (multimap): Likewise.
2460
2461 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
2462
2463 Rename variables and cleanup comments.
2464 * include/bits/hashtable_policy.h
2465 * include/bits/hashtable.h
2466
2467 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2468
2469 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
2470 Fix bgcolor for P0340R3.
2471 * doc/html/*: Regenerate.
2472
2473 PR libstdc++/90686
2474 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
2475 <experimental/memory_resource>.
2476 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
2477 P0339R6, P0340R3, P1164R1 and P1357R1.
2478 * doc/html/*: Regenerate.
2479
2480 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
2481 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
2482 allocator::value_type assertion for C++2a.
2483 * include/bits/hashtable.h: Likewise.
2484 * include/bits/stl_deque.h: Likewise.
2485 * include/bits/stl_list.h: Likewise.
2486 * include/bits/stl_map.h: Likewise.
2487 * include/bits/stl_multimap.h: Likewise.
2488 * include/bits/stl_multiset.h: Likewise.
2489 * include/bits/stl_set.h: Likewise.
2490 * include/bits/stl_vector.h: Likewise.
2491 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
2492 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
2493 * testsuite/23_containers/list/48101-3_neg.cc: New test.
2494 * testsuite/23_containers/map/48101-3_neg.cc: New test.
2495 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
2496 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
2497 * testsuite/23_containers/set/48101-3_neg.cc: New test.
2498 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
2499 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
2500 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
2501 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
2502 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
2503
2504 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
2505
2506 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
2507
2508 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2509
2510 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
2511 constructors.
2512 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
2513 function.
2514 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
2515
2516 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2517
2518 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
2519
2520 PR libstdc++/90682
2521 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
2522 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
2523 * libsupc++/eh_term_handler.h: New header defining
2524 _GLIBCXX_DEFAULT_TERM_HANDLER.
2525 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
2526 (set_terminate): Restore default handler when argument is null.
2527 (set_unexpected): Likewise.
2528 * testsuite/18_support/set_terminate.cc: New test.
2529 * testsuite/18_support/set_unexpected.cc: New test.
2530
2531 * include/backward/hashtable.h (size_t, ptrdiff_t)
2532 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
2533 (distance, vector, pair, __iterator_category): Remove
2534 using-declarations that add these names to namespace __gnu_cxx.
2535 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
2536 * include/ext/debug_allocator.h (size_t): Likewise.
2537 * include/ext/functional (size_t, unary_function, binary_function)
2538 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
2539 Likewise.
2540 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
2541 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
2542 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
2543 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
2544 * include/ext/numeric (iota): Fix outdated comment.
2545 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
2546 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
2547 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
2548 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
2549 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
2550 Likewise.
2551 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
2552 (allocator, __true_type, __false_type): Likewise.
2553
2554 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
2555
2556 PR libstdc++/71579
2557 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
2558 New helpers for checking preconditions in traits.
2559 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
2560 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
2561 (is_destructible, is_nothrow_destructible, is_constructible)
2562 (is_default_constructible, is_copy_constructible)
2563 (is_move_constructible, is_nothrow_default_constructible)
2564 (is_nothrow_constructible, is_nothrow_copy_constructible)
2565 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
2566 (is_nothrow_assignable, is_nothrow_copy_assignable)
2567 (is_nothrow_move_assignable, is_trivially_constructible)
2568 (is_trivially_copy_constructible, is_trivially_move_constructible)
2569 is_trivially_assignable, is_trivially_copy_assignable)
2570 (is_trivially_move_assignable, is_trivially_destructible)
2571 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
2572 (is_invocable_r, is_nothrow_invocable)
2573 (has_unique_object_representations, is_aggregate): Add static_asserts
2574 to make sure that type traits are not misused with incomplete types.
2575 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
2576 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
2577 base characteristics without assertions that can be reused in other
2578 traits.
2579 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
2580 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
2581 test.
2582 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
2583 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
2584 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
2585 * testsuite/20_util/is_class/value.cc: Check incomplete type.
2586 * testsuite/20_util/is_function/value.cc: Likewise.
2587 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
2588 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
2589 test.
2590 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
2591 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
2592 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2593 * testsuite/20_util/is_union/value.cc: Likewise.
2594 * testsuite/20_util/is_void/value.cc: Likewise.
2595 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
2596
2597 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2598
2599 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
2600 Add new private member function.
2601 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
2602 (random_device::_M_init_pretr1(const string&)): Call new private
2603 member with string data.
2604 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
2605 Define.
2606 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
2607 test using COW strings.
2608 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
2609 a value from the device.
2610 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
2611 Fix typo in token string.
2612
2613 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
2614
2615 LWG2788 basic_string spurious use of a default constructible allocator
2616 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
2617 (basic_string::_M_replace_dispatch): Construct temporary string with
2618 the current allocator.
2619 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
2620 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
2621
2622 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
2623
2624 * doc/xml/manual/diagnostics.xml: Update list of headers that define
2625 exception classes.
2626 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
2627 section about new/delete overloads. Improve section on verbose
2628 terminate handler.
2629 * doc/html/*: Regenerate.
2630
2631 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
2632 P0811R3. Change status of P1353R0.
2633 * doc/html/*: Regenerate.
2634
2635 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
2636 documentation of implementation-defined types for [thread.req.native].
2637 * doc/xml/manual/status_cxx2017.xml: Update documentation of
2638 implementation-defined strings for [variant.bad.access]. Fix typo in
2639 documentation of implementation-defined support for [fs.conform.9945].
2640 * doc/html/*: Regenerate.
2641
2642 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
2643
2644 PR libstdc++/85494
2645 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
2646 that fails on mingw-w64.
2647
2648 PR libstdc++/88881
2649 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2650 (status(const path&, error_code&)): Use parent_path() to remove
2651 trailing slash.
2652 (symlink_status(const path&, error_code&)): Duplicate workaround for
2653 bug in _wstat for paths with trailing slash.
2654 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
2655 with trailing slash.
2656 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2657 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2658
2659 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
2660 once instead of building it iteratively.
2661
2662 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
2663
2664 PR libstdc++/85494 use rdseed and rand_s in std::random_device
2665 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
2666 the assembler supports rdseed.
2667 * config.h.in: Regenerate.
2668 * configure: Regenerate.
2669 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
2670 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
2671 * doc/html/*: Regenerate.
2672 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
2673 * include/bits/random.h (random_device::random_device()): Always call
2674 _M_init rather than _M_init_pretr1.
2675 (random_device::random_device(const string&)): Likewise.
2676 (random_device::operator()()): Always call _M_getval().
2677 (random_device::_M_file): Replace first member of union with an
2678 anonymous struct, with _M_file as its first member.
2679 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
2680 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
2681 (USE_MT19937): Define if none of the above are defined.
2682 (USE_POSIX_FILE_IO): Define.
2683 (_M_strtoul): Remove.
2684 [USE_RDSEED] (__x86_rdseed): Define new function.
2685 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
2686 (random_device::_M_init(const string&)): Initialize new union members.
2687 Add support for "rdseed" and "rand_s" tokens. Decide what the
2688 "default" token does according to which USE_* macros are defined.
2689 [USE_POSIX_FILE_IO]: Store a file descriptor.
2690 [USE_MT19937]: Forward to _M_init_pretr1 instead.
2691 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
2692 code from _M_strtoul.
2693 [!USE_MT19937]: Call _M_init, transforming the old default token or
2694 numeric tokens to "default".
2695 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
2696 (random_device::_M_getval()): Use new union members to obtain a
2697 random number from the stored function pointer or file descriptor.
2698 [USE_MT19937]: Obtain a value from the mt19937 engine.
2699 (random_device::_M_getval_pretr1()): Call _M_getval().
2700 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
2701 instead of fileno.
2702 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
2703 * testsuite/26_numerics/random/random_device/85494.cc: New test.
2704
2705 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
2706
2707 PR libstdc++/90634
2708 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
2709 _M_split_cmpts() for a path with multiple components.
2710 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
2711 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
2712 components and reserve space in vector. Return early when there is
2713 only one component.
2714 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
2715 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
2716
2717 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
2718 form of std::equals for C++11 compatibility.
2719
2720 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
2721
2722 * doc/xml/manual/appendix_contributing.xml: Update pointer to
2723 C++ standard at ansi.org.
2724
2725 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
2726
2727 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
2728 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
2729 to "run".
2730
2731 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
2732 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
2733
2734 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2735
2736 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
2737 tests to ...
2738 * testsuite/20_util/function_objects/invoke/3.cc: New test.
2739 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2740 "compile" test to "run".
2741
2742 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
2743 * doc/html/*: Regenerate.
2744 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
2745 rvalue aliasing constructor.
2746 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
2747 (reinterpret_pointer_cast): Add overloads taking rvalues.
2748 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
2749 Add rvalue aliasing constructor.
2750 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
2751 "run" and check return values as well as types.
2752 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
2753 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
2754 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
2755 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
2756 values.
2757
2758 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
2759 * doc/xml/manual/intro.xml: Likewise.
2760 * include/std/future (__create_task_state): Add default arguments
2761 to make providing an allocator optional.
2762 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
2763 instead of delegating to another constructor.
2764 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
2765 define allocator-extended constructors for C++17 and later.
2766 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
2767 C++11 and C++14.
2768 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
2769 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
2770 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
2771
2772 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
2773
2774 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
2775 Don't run the libstdc++/83237 part on simulator targets.
2776
2777 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2778
2779 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
2780 P0040R3.
2781 * doc/html/*: Regenerate.
2782
2783 * include/experimental/any (__any_caster): Use RTTI if comparing
2784 addresses fails, to support non-unique addresses in shared libraries.
2785 * include/std/any (__any_caster): Likewise.
2786
2787 PR libstdc++/90220
2788 * include/experimental/any (__any_caster): Constrain to only be
2789 callable for object types. Use remove_cv_t instead of decay_t.
2790 If the type decays or isn't copy constructible, compare the manager
2791 function to a dummy specialization.
2792 (__any_caster): Add overload constrained for non-object types.
2793 (any::_Manager_internal<_Op>): Add dummy specialization.
2794 * testsuite/experimental/any/misc/any_cast.cc: Test function types
2795 and array types.
2796
2797 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
2798
2799 PR libstdc++/90557
2800 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
2801 reversed arguments to uninitialized_copy_n.
2802 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
2803 is unchanged by copy assignment.
2804 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
2805 compare path components.
2806
2807 PR libstdc++/77691
2808 * include/experimental/memory_resource: Add system header pragma and
2809 do not define anything unless compiled as C++14 or later.
2810 (__resource_adaptor_common::__guaranteed_alignment): Remove.
2811 (__resource_adaptor_imp::do_allocate): If the requested alignment
2812 is a fundamental alignment then either allocate directly from _M_alloc
2813 or call the new _M_allocate function.
2814 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
2815 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
2816 of the allocator rebound to a POD type with the specified alignment.
2817 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
2818 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2819 Adjust expected allocation sizes.
2820 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
2821 xfail for Solaris x86.
2822
2823 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
2824
2825 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
2826 * include/pstl/execution_defs.h (__enable_if_execution_policy):
2827 Use std::__remove_cvref_t when building with GCC.
2828
2829 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
2830
2831 PR libstdc++/90252
2832 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2833 Use "additional_flags" to pass -ltbb to v3_target_compile command.
2834 Use check_v3_target_prop_cached to cache the result of the test.
2835
2836 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
2837
2838 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2839
2840 PR libstdc++/90252
2841 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2842 Changed v3_target_compile check from preprocess to executable.
2843 Added "-ltbb" to v3_target_compile flags.
2844
2845 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2846
2847 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2848 Add check for Thread Building Blocks 2018 or later.
2849
2850 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2851
2852 * testsuite/experimental/names.cc: Only include Networking TS headers
2853 on targets with the necessary Gthreads support.
2854
2855 2019-05-20 Marek Polacek <polacek@redhat.com>
2856
2857 CWG 2094 - volatile scalars are trivially copyable.
2858 PR c++/85679
2859 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
2860 result for volatile int.
2861
2862 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2863
2864 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
2865 * testsuite/experimental/names.cc: Include <experimental/filesystem>
2866 conditionally.
2867
2868 PR c++/90532 Ensure __is_constructible(T[]) is false
2869 * include/std/type_traits (__do_is_default_constructible_impl)
2870 (__is_default_constructible_atom, __is_default_constructible_safe):
2871 Remove.
2872 (is_default_constructible): Use is_constructible.
2873 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
2874 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
2875 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
2876 * testsuite/20_util/is_trivially_default_constructible/value.cc:
2877 Likewise.
2878
2879 2019-05-20 Pádraig Brady <pbrady@fb.com>
2880
2881 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
2882 to the deallocator with -fsized-deallocation.
2883
2884 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2885
2886 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
2887 test by passing correct alignment to deallocate function.
2888
2889 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
2890
2891 PR libstdc++/90520
2892 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2893 Raise exception if unique_ptr tuple member has unknown structure.
2894 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
2895 Adjust worker to support new __uniq_ptr_data base class. Do not
2896 assume field called _M_head_impl is the first tuple element.
2897
2898 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2899
2900 * include/bits/stl_deque.h
2901 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
2902 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
2903 (_Deque_base::_Deque_impl_data): New.
2904 (_Deque_base::_Deque_impl): Inherit latter.
2905 (_Deque_base::_Deque_impl::_M_swap_data): Move...
2906 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
2907 (_Deque_base::_Deque_impl()): Add noexcept qualification.
2908 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
2909 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
2910 (deque<>::deque()): Default.
2911 (deque<>::deque(deque&&)): Default.
2912 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
2913 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
2914 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
2915 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
2916 _M_range_initialize.
2917 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
2918 (deque<>::resize(size_type, const value_type&)): Share a single
2919 implementation.
2920 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
2921 _M_range_insert_aux.
2922 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
2923 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
2924 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
2925 * testsuite/23_containers/deque/allocator/default_init.cc: New.
2926
2927 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
2928
2929 PR libstdc++/90246
2930 * include/std/variant (holds_alternative, get, get_if): Improve
2931 static assertion messages.
2932 (bad_variant_access::bad_variant_access()): Change default message.
2933 (__throw_bad_variant_access(bool)): New overload.
2934 (get): Use new overload.
2935 (visit, visit<R>): Improve exception message.
2936
2937 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
2938 targets. Add more cases from P0608R3.
2939 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
2940
2941 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
2942 * include/experimental/type_traits (is_detected_exact)
2943 (is_detected_exact_v): Likewise.
2944 * include/pstl/execution_defs.h (is_execution_policy)
2945 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
2946 * include/pstl/execution_impl.h (__policy_traits): Likewise.
2947 * testsuite/17_intro/names.cc: Check for more non-reserved names.
2948 * testsuite/experimental/names.cc: New test.
2949
2950 PR libstdc++/85965
2951 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
2952 assertions from the destructor.
2953 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
2954 Move static_assert for hash function to here.
2955 (_Hash_table_base::_M_equals): Move static_assert for equality
2956 predicate to here.
2957 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
2958 Remove.
2959 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
2960 the value directly instead of calling _S_value.
2961 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
2962 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
2963 _S_key(_Const_Link_type).
2964 * testsuite/23_containers/set/85965.cc: Check construction,
2965 destruction, assignment and size() do not trigger the assertions.
2966 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
2967 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
2968 expected errors.
2969 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2970 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
2971 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2972 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2973 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2974 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2975 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2976
2977 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
2978 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
2979 in C++11.
2980
2981 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
2982 P1165R1 entries.
2983 * doc/html/*: Regenerate.
2984 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
2985 of decay_t (P0777R1).
2986
2987 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2988
2989 Move from state of allocators (LWG2593)
2990 * include/bits/stl_deque.h
2991 (_Deque_base(_Deque_base&&, false_type)): Remove.
2992 (_Deque_base(_Deque_base&&, true_type)): Remove.
2993 (_Deque_base(_Deque_base&&)): Adapt.
2994 (_Deque_base::_M_move_impl()): Remove.
2995 * testsuite/util/testsuite_allocator.h
2996 (propagating_allocator(propagating_allocator&&)): Preserve move from
2997 state.
2998 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
2999 Adapt.
3000 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
3001 Adapt.
3002 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
3003 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
3004 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
3005 Adapt.
3006 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
3007 Adapt.
3008 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
3009 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
3010 (test02): Adapt.
3011 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
3012 (test02): Adapt.
3013 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
3014 (test02): Adapt.
3015 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
3016 (test02): Adapt.
3017 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
3018 Adapt.
3019 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
3020 Adapt.
3021 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
3022 (test02): Adapt.
3023 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
3024 (test02): Adapt.
3025
3026 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
3027
3028 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
3029 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
3030
3031 * include/std/variant (__overload_set): Remove.
3032 (_Arr): New helper.
3033 (_Build_FUN): New class template to define a single FUN overload,
3034 with specializations to prevent unwanted conversions, as per P0608R3.
3035 (_Build_FUNs): New class template to build an overload set of FUN.
3036 (_FUN_type): New alias template to perform overload resolution.
3037 (__accepted_type): Use integer_constant base for failure case. Use
3038 _FUN_type for successful case.
3039 (variant::__accepted_index): Use _Tp instead of _Tp&&.
3040 (variant::variant(_Tp&&)): Likewise.
3041 (variant::operator=(_Tp&&)): Likewise.
3042
3043 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
3044 Replace raw visitation with a runtime check for the valueless state
3045 and a non-raw visitor.
3046 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
3047 (variant::index()): Remove branch.
3048 (variant::swap(variant&)): Use valueless_by_exception() instead of
3049 comparing the index to variant_npos, and add likelihood attribute.
3050
3051 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
3052 (_Hashtable_base::_Equal_hash_code): Define new class template.
3053 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
3054 _Equal_helper.
3055
3056 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
3057 Replace with _M_get non-static member function.
3058 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
3059 member function.
3060 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
3061 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
3062
3063 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
3064 _S_get accessors for members in EBO helpers.
3065 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
3066 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
3067 overloads.
3068 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
3069 helpers.
3070 (_Hashtable_base::_M_eq()): Remove non-const overload.
3071
3072 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
3073
3074 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
3075
3076 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3077
3078 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
3079 Fix return value.
3080
3081 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3082
3083 * config/os/solaris/solaris2.10: Move to ...
3084 * config/os/solaris: ... this.
3085 * configure.host (os_include_dir): Adapt.
3086 (abi_baseline_pair): Remove Solaris 10 handling.
3087 * config/abi/post/i386-solaris2.10: Remove.
3088 * config/abi/post/sparc-solaris2.10: Remove.
3089 * config/abi/post/i386-solaris2.11: Rename to ...
3090 * config/abi/post/i386-solaris: ... this.
3091 * config/abi/post/sparc-solaris2.11: Rename to ...
3092 * config/abi/post/sparc-solaris: ... this.
3093
3094 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
3095 workaround.
3096
3097 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
3098 xfail.
3099
3100 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3101
3102 * include/std/variant (__visit_with_index): Remove typedef.
3103 (__deduce_visit_result): New tag type.
3104 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
3105 visitation of possibly-valueless variants, forwarding to __do_visit
3106 with the relevant tag type.
3107 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
3108 and make lambda return void.
3109 (__variant_construct): Likewise.
3110 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
3111 __raw_idx_visit and make lambda return void.
3112 (_Multi_array::__untag_result): Add metafunction to check the function
3113 pointer type for a tag type that dictates the kind of visitation.
3114 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
3115 Use decltype(auto) instead of tagged function pointer type.
3116 (__gen_vtable_impl): Remove bool non-type parameter and unused
3117 _Variant_tuple parameter.
3118 (__gen_vtable_impl::__visit_invoke_impl): Remove.
3119 (__gen_vtable_impl::__do_visit_invoke): Remove.
3120 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
3121 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
3122 for the visit<R> case, rather than dispatching to separate functions.
3123 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
3124 lambda return void.
3125 (variant::swap): Likewise.
3126 (__do_visit): Replace two non-type template parameters with a single
3127 type parameter, so that the caller must specify the visitor's return
3128 type (or one of the tag types).
3129 (visit): Deduce a return type from the visitor and use the
3130 __deduce_visit_result tag to enforce that all overloads return the
3131 same type.
3132 (visit<R>): Call __do_visit<R> with explicit result type.
3133 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
3134 lambda return void.
3135
3136 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
3137
3138 nonesuch is insufficiently useless (lwg2996)
3139 * include/std/type_traits (struct __nonesuch): Added private base
3140 class to make __nonesuch not an aggregate and removed deleted default
3141 constructor.
3142 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
3143 (operator=(const pair&)): Use __nonesuch instead of
3144 __nonesuch_no_braces.
3145 (operator=(pair&&)): Likewise
3146 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
3147 of __nonesuch_no_braces.
3148 (operator=(tuple&&)): Likewise
3149 * include/experimental/type_traits (struct nonesuch): Added private
3150 base class to make nonesuch not an aggregate and removed deleted
3151 default constructor.
3152 * testsuite/20_util/nonesuch/nonesuch.cc: New.
3153 * testsuite/experimental/type_traits/nonesuch.cc: New.
3154
3155 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3156
3157 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
3158 (_Function_handler): Remove partial specializations for void return
3159 types and pointers to member.
3160 (_Function_handler::_M_manager): Adapt to removal of
3161 _Simple_type_wrapper.
3162 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
3163 * include/std/functional (_Bind_result::__enable_if_void)
3164 (_Bind_result::__disable_if_void): Remove sfinae helpers.
3165 (_Bind_result::__call): Use __invoke_r and remove overloads for void
3166 return types.
3167 * include/std/future (__future_base::_Task_state::_M_run)
3168 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
3169 change return type of lambda expressions.
3170
3171 * include/bits/invoke.h (__invoke_r): Define new function implementing
3172 the INVOKE<R> pseudo-function.
3173 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
3174 * testsuite/20_util/function_objects/invoke/2.cc: New test.
3175
3176 * include/std/type_traits (__is_nt_convertible_helper): Define it
3177 unconditionally, not only for C++20.
3178 (__is_nothrow_convertible): Define internal trait for use in C++11.
3179 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
3180 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
3181 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
3182 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
3183 that has nothrow explicit conversion but potentially-throwing implicit
3184 conversion.
3185 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
3186 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
3187 function to only consider implicit conversions.
3188 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
3189
3190 * include/std/iterator: Include <iosfwd> instead of <istream> and
3191 <ostream>.
3192
3193 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
3194 Remove unused, non-standard function.
3195
3196 * include/bits/regex.h (match_results::max_size()): Adjust return
3197 value to account for prefix/suffix/unmatched subs.
3198 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
3199 reset the contained sub matches.
3200 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
3201 function to set result state following a failed match.
3202 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
3203 sub_match states after _M_resize. Use _M_establish_failed_match.
3204
3205 PR libstdc++/69724
3206 * include/std/thread (thread::_State_impl, thread::_S_make_state):
3207 Replace single _Callable parameter with variadic _Args pack, to
3208 forward them directly to the tuple of decayed copies.
3209 * testsuite/30_threads/thread/cons/69724.cc: New test.
3210
3211 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
3212
3213 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
3214 * include/bits/basic_string.h: (operator=(const basic_string&):
3215 Move allocator decision to assign.
3216 (assign(const basic_string&)): Move allocator decision here.
3217 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
3218 Add tests.
3219 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
3220 Add tests.
3221
3222 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3223
3224 * testsuite/util/testsuite_allocator.h (memory_resource)
3225 (default_resource_mgr): Fix indentation.
3226
3227 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
3228 Use operator-> to access raw pointer member.
3229 * testsuite/23_containers/vector/59829.cc: Likewise.
3230 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
3231 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
3232 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
3233 for tests.
3234 (PointerBase, PointerBase_void): Derive from NullablePointer and use
3235 its constructors and equality operators. Change converting
3236 constructors to use operator-> to access private member of the other
3237 pointer type.
3238 (PointerBase_void::operator->()): Add, for access to private member.
3239 (operator-(PointerBase, PointerBase)): Change to hidden friend.
3240 (operator==(PointerBase, PointerBase)): Remove.
3241 (operator!=(PointerBase, PointerBase)): Remove.
3242
3243 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
3244 not assume field called _M_head_impl is the first tuple element.
3245 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
3246 implementation more accurate.
3247 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
3248 empty pointer type and non-empty deleter.
3249
3250 LWG 2899 - Make is_move_constructible correct for unique_ptr
3251 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
3252 move assignment operator.
3253 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
3254 (__uniq_ptr_data): New class template with conditionally deleted
3255 special members.
3256 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
3257 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
3258 constructor and move assignment operator as defaulted.
3259 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
3260 __uniq_ptr_impl::release().
3261 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
3262 to __uniq_ptr_impl::reset(pointer).
3263 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
3264 Check for new __uniq_ptr_data type.
3265 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
3266
3267 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
3268
3269 PR libstdc++/90454.cc path construction from void*
3270 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
3271 pointers to void are rejected as well as void.
3272 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
3273 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
3274 pointers to void.
3275 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
3276
3277 * doc/xml/manual/policy_data_structures.xml: Comment out stray
3278 <remark> elements. Fix formatting of bibliography references.
3279
3280 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
3281
3282 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
3283
3284 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
3285
3286 Remove Profile Mode, deprecated since 7.1.0
3287 * doc/Makefile.am: Remove XML file for profile mode docs.
3288 * doc/Makefile.in: Regenerate.
3289 * doc/xml/authors.xml: Remove authors of profile mode docs.
3290 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
3291 mode.
3292 * doc/xml/manual/debug.xml: Likewise.
3293 * doc/xml/manual/evolution.xml: Document removal of profile mode.
3294 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
3295 * doc/xml/manual/spine.xml: Remove profile mode author credit.
3296 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
3297 directive.
3298 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
3299 macro.
3300 * doc/html/*: Regenerate.
3301 * include/Makefile.am: Remove profile mode headers.
3302 * include/Makefile.in: Regenerate.
3303 * include/bits/c++config (std::__profile): Remove namespace.
3304 [_GLIBCXX_PROFILE]: Remove checks for macro.
3305 * include/profile/array: Remove.
3306 * include/profile/base.h: Remove.
3307 * include/profile/bitset: Remove.
3308 * include/profile/deque: Remove.
3309 * include/profile/forward_list: Remove.
3310 * include/profile/impl/profiler.h: Remove.
3311 * include/profile/impl/profiler_algos.h: Remove.
3312 * include/profile/impl/profiler_container_size.h: Remove.
3313 * include/profile/impl/profiler_hash_func.h: Remove.
3314 * include/profile/impl/profiler_hashtable_size.h: Remove.
3315 * include/profile/impl/profiler_list_to_slist.h: Remove.
3316 * include/profile/impl/profiler_list_to_vector.h: Remove.
3317 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
3318 * include/profile/impl/profiler_node.h: Remove.
3319 * include/profile/impl/profiler_state.h: Remove.
3320 * include/profile/impl/profiler_trace.h: Remove.
3321 * include/profile/impl/profiler_vector_size.h: Remove.
3322 * include/profile/impl/profiler_vector_to_list.h: Remove.
3323 * include/profile/iterator_tracker.h: Remove.
3324 * include/profile/list: Remove.
3325 * include/profile/map: Remove.
3326 * include/profile/map.h: Remove.
3327 * include/profile/multimap.h: Remove.
3328 * include/profile/multiset.h: Remove.
3329 * include/profile/ordered_base.h: Remove.
3330 * include/profile/set: Remove.
3331 * include/profile/set.h: Remove.
3332 * include/profile/unordered_base.h: Remove.
3333 * include/profile/unordered_map: Remove.
3334 * include/profile/unordered_set: Remove.
3335 * include/profile/vector: Remove.
3336 * scripts/run_doxygen: Do not process profile mode headers.
3337 * testsuite/23_containers/array/element_access/60497.cc: Don't use
3338 profile mode type.
3339 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
3340 Remove dg-skip-if for profile mode.
3341 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
3342 preprocessor check for profile mode.
3343 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
3344 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
3345 for profile mode.
3346 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
3347 Likewise.
3348 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
3349 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
3350 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
3351 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
3352 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
3353 Likewise.
3354 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
3355 Likewise.
3356 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
3357 Likewise.
3358 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
3359 Likewise.
3360 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
3361 preprocessor check for profile mode.
3362 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
3363 Likewise.
3364 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
3365 Remove dg-skip-if for profile mode.
3366 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
3367 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
3368 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
3369 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
3370 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
3371 * testsuite/Makefile.am: Remove profile_flags variable and
3372 * testsuite/Makefile.am: Remove profile_flags variable and
3373 check-profile target.
3374 * testsuite/Makefile.in: Regenerate.
3375 * testsuite/ext/profile/all.cc: Remove.
3376 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
3377 * testsuite/ext/profile/profiler_algos.cc: Remove.
3378 * testsuite/ext/profile/replace_new.cc: Remove.
3379 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
3380 preprocessor check for profile mode.
3381 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
3382 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
3383 (check_v3_target_normal_mode): Do not check for profile mode macro.
3384 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
3385 profile mode.
3386 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
3387 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3388 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
3389 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
3390 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
3391 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3392 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3393 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3394 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3395 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3396
3397 Remove array_allocator extension, deprecated since 4.9.0
3398 * doc/xml/manual/allocator.xml: Remove documentation for
3399 array_allocator.
3400 * doc/xml/manual/evolution.xml: Document array_allocator removal.
3401 * doc/xml/manual/using.xml: Remove header from documentation.
3402 * include/Makefile.am: Remove <ext/array_allocator.h> header.
3403 * include/Makefile.in: Regenerate.
3404 * include/ext/array_allocator.h: Remove.
3405 * include/precompiled/extc++.h: Do not include removed header.
3406 * testsuite/ext/array_allocator/1.cc: Remove.
3407 * testsuite/ext/array_allocator/2.cc: Remove.
3408 * testsuite/ext/array_allocator/26875.cc: Remove.
3409 * testsuite/ext/array_allocator/3.cc: Remove.
3410 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
3411 * testsuite/ext/array_allocator/check_delete.cc: Remove.
3412 * testsuite/ext/array_allocator/check_new.cc: Remove.
3413 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
3414 * testsuite/ext/headers.cc: Do not include removed header.
3415
3416 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
3417
3418 * include/bits/stl_bvector.h
3419 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3420 Make hidden friend.
3421 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3422 Likewise.
3423 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3424 Likewise.
3425 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3426 Likewise.
3427 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3428 Likewise.
3429 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3430 Likewise.
3431 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3432 Likewise.
3433 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
3434 copy elision.
3435 (_Bit_iterator::operator-(difference_type)): Likewise.
3436 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
3437 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
3438 NRVO copy elision.
3439 (_Bit_const_iterator::operator-(difference_type)): Likewise.
3440 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
3441
3442 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
3443
3444 PR libstdc++/81266
3445 * testsuite/util/thread/all.h: Do not use remove_pointer for
3446 std::thread::native_handle_type.
3447
3448 PR libstdc++/90397
3449 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
3450 (_Variant_storage<true, Types...>::_M_reset()))
3451 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
3452 (__get_storage): Likewise.
3453 (variant): Add noexcept to friend declarations for __get and
3454 __get_storage.
3455
3456 PR libstdc++/90388
3457 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
3458 Use _Require for constraints.
3459 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
3460 per the standard.
3461 (__uniq_ptr_hash): New base class with conditionally-disabled call
3462 operator.
3463 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
3464 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
3465 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
3466
3467 * include/bits/shared_ptr.h: Improve docs.
3468 * include/bits/shared_ptr_base.h: Likewise.
3469 * include/bits/stl_uninitialized.h: Likewise.
3470 * include/bits/unique_ptr.h: Likewise.
3471 * libsupc++/new: Likewise.
3472
3473 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
3474
3475 * include/bits/stl_deque.h
3476 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3477 Make hidden friend.
3478 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3479 Likewise.
3480 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3481 Likewise.
3482 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3483 Likewise.
3484 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3485 Likewise.
3486 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3487 Likewise.
3488 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
3489 copy elision.
3490 (_Deque_iterator<>::operator-(difference_type)): Likewise.
3491
3492 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
3493
3494 PR libstdc++/90277
3495 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
3496 (test01): Reserve for number of insertions to avoid rehash during test.
3497 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3498 (test01): Likewise.
3499 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3500 (test01): Likewise.
3501 (test02): Likewise.
3502 (test03): Likewise.
3503
3504 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
3505
3506 * include/experimental/bits/fs_path.h: Improve docs.
3507 * include/experimental/bits/net.h: Fix wrong header name in comment.
3508 Do not document implementation details.
3509 * include/experimental/netfwd: Fix doxygen grouping.
3510
3511 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3512
3513 * include/bits/stl_pair.h: Improve docs.
3514 * include/std/tuple: Likewise.
3515
3516 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
3517 inline namespace.
3518 * include/std/chrono: Improve docs.
3519 * include/std/ratio: Do not document implementation details.
3520 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
3521 line numbers.
3522 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
3523
3524 PR libstdc++/89102
3525 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
3526 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
3527 (__duration_common_type): New helper.
3528 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
3529 __duration_common_type.
3530 (__timepoint_common_type_wrapper): Replace with ...
3531 (__timepoint_common_type): New helper.
3532 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
3533 Use __time_point_common_type.
3534 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
3535 (__common_type_impl): If either argument is transformed by decay,
3536 use the common_type of the decayed types.
3537 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
3538 decayed, use __do_common_type_impl to get the common_type.
3539 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
3540 (__do_member_type_wrapper, __member_type_wrapper)
3541 (__expanded_common_type_wrapper): Remove.
3542 (__common_type_pack, __common_type_fold): New helpers.
3543 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
3544 __member_type_wrapper and __expanded_common_type_wrapper.
3545 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3546 Test zero-length template argument list.
3547 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3548 Test single argument cases and argument types that should decay.
3549 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3550 Adjust expected error.
3551 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
3552 dg-error lineno.
3553 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
3554 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
3555 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
3556
3557 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
3558
3559 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
3560
3561 Make allocator propagation more consistent for
3562 operator+(basic_string) (P1165R1)
3563 * include/bits/basic_string.h
3564 (operator+(basic_string&&, basic_string&&): Changed resulting
3565 allocator to always be the one from the first parameter.
3566 * include/bits/basic_string.tcc
3567 (operator+(const _CharT*, const basic_string&)): Changed
3568 resulting allocator to be SOCCC on the second parameter's allocator.
3569 (operator+(_CharT, const basic_string&)): Likewise.
3570 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
3571 New.
3572 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
3573 New.
3574
3575 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3576
3577 * include/bits/regex.h: Improve docs.
3578 * include/bits/regex.tcc: Do not document implementation details.
3579
3580 * testsuite/19_diagnostics/error_code/hash.cc: New test.
3581
3582 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
3583
3584 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
3585 Add type printer for container types in std::__debug namespace.
3586 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
3587 (gdb-tests): Use distinct parameters for the type of test and use of
3588 regex.
3589 (gdb-test): Check for regex test even if 'whatis' test.
3590 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
3591 mode.
3592 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3593 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
3594 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3595 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3596 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3597 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3598 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3599
3600 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
3601
3602 * include/std/system_error (error_category): Fix comment.
3603
3604 PR libstdc++/90299
3605 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
3606 argument is an empty path.
3607 (absolute(const path&, error_code&)): Use invalid_argument as error
3608 code instead of no_such_file_or_directory.
3609 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
3610 of non-existent paths and empty paths with both overloads of absolute.
3611
3612 * include/std/system_error (error_category, error_code)
3613 (error_condition): Improve docs.
3614 * libsupc++/exception: Add missing @addtogroup Doxygen command.
3615 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
3616 to class documentation. Suppress documentation for implementation
3617 details.
3618 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
3619 Suppress documentation for implementation details.
3620
3621 * include/std/system_error (error_code): Remove friend declaration
3622 for hash<error_code>.
3623 (hash<error_code>::operator()): Use public member functions to access
3624 value and category.
3625 (hash<error_condition>::operator()): Use address of category, not
3626 its object representation.
3627 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
3628 Use public member functions to access value and category.
3629 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
3630
3631 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
3632
3633 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
3634 * include/bits/hashtable_policy.h
3635 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
3636 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
3637 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
3638 smaller than input value rather than always greater. Preserve
3639 _M_next_resize if called with 0 input. Use __builtin_floorl.
3640 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
3641 elements + number of insertions is greater than _M_next_resize. Start
3642 with 11 buckets if not told otherwise. Use __builtin_floorl.
3643 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
3644 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
3645 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
3646 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
3647 told otherwise. Use __builtin_floorl.
3648 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
3649 to also validate _Power2_rehash_policy.
3650 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
3651 Adapt.
3652
3653 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
3654
3655 PR libstdc++/61761
3656 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
3657 std::copysign.
3658
3659 PR libstdc++/52119
3660 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
3661 overflow warning with -Wpedantic -Wsystem-headers.
3662
3663 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
3664
3665 PR libstdc++/90314
3666 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
3667 * include/bits/move.h (swap): Remove extra parentheses.
3668
3669 * include/experimental/bits/lfts_config.h: Improve doc markup.
3670 * include/experimental/optional: Improve docs.
3671 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
3672 (__constexpr_addressof): Remove.
3673 (optional::operator->()): Use std::__addressof().
3674 * include/std/optional (optional::operator->()): Adjust whitespace.
3675 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
3676 that operator-> is still constexpr with overloaded operator&. Change
3677 to compile-only test.
3678 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
3679 compile-only test.
3680
3681 * include/bits/shared_ptr.h: Improve docs.
3682 * include/bits/shared_ptr_atomic.h: Likewise.
3683 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
3684
3685 * include/bits/basic_string.h: Fix iterator/index confusion in
3686 Doxygen comments.
3687 * include/bits/range_access.h: Fix Doxygen warnings.
3688 * include/bits/refwrap.h: Do not document implementation details.
3689 (ref, cref): Group docs with reference_wrapper.
3690 * include/std/fstream: Fix Doxygen markup.
3691 * libsupc++/initializer_list (begin, end): Group docs with
3692 initializer_list.
3693
3694 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
3695
3696 * include/bits/unique_lock.h: Fix/improve doxygen markup.
3697 * include/std/mutex: Likewise.
3698 * include/std/shared_mutex: Likewise.
3699
3700 * include/bits/fs_dir.h: Fix/improve doxygen markup.
3701 * include/bits/fs_fwd.h: Likewise.
3702 * include/bits/fs_ops.h: Likewise.
3703 * include/bits/fs_path.h: Likewise.
3704 * include/std/filesystem: Likewise.
3705
3706 * include/experimental/bits/net.h: Fix/improve doxygen markup.
3707 * include/experimental/buffer: Likewise.
3708 * include/experimental/executor: Likewise.
3709 * include/experimental/internet: Likewise.
3710 * include/experimental/io_context: Likewise.
3711 * include/experimental/net: Likewise.
3712 * include/experimental/netfwd: Likewise.
3713 * include/experimental/socket: Likewise.
3714 * include/experimental/timer: Likewise.
3715
3716 * doc/doxygen/doxygroups.cc: Move description of experimental group
3717 here.
3718 * include/experimental/algorithm: Add to libfund-ts doc group.
3719 * include/experimental/any: Likewise. Do not document implementation
3720 details.
3721 * include/experimental/array: Add to libfund-ts doc group.
3722 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
3723 for Library Fundamentals.
3724 * include/experimental/chrono: Add to libfund-ts doc group.
3725 * include/experimental/deque: Likewise.
3726 * include/experimental/forward_list: Likewise.
3727 * include/experimental/functional: Likewise.
3728 * include/experimental/iterator: Likewise.
3729 * include/experimental/list: Likewise.
3730 * include/experimental/map: Likewise.
3731 * include/experimental/memory: Likewise.
3732 * include/experimental/memory_resource: Likewise. Improve docs.
3733 details.
3734 * include/experimental/numeric: Add to libfund-ts doc group.
3735 * include/experimental/optional: Likewise.
3736 * include/experimental/propagate_const: Likewise.
3737 * include/experimental/random: Likewise.
3738 * include/experimental/ratio: Likewise.
3739 * include/experimental/regex: Likewise.
3740 * include/experimental/set: Likewise.
3741 * include/experimental/source_location: Likewise.
3742 * include/experimental/string: Likewise.
3743 * include/experimental/string_view: Likewise.
3744 * include/experimental/system_error: Likewise.
3745 * include/experimental/tuple: Likewise.
3746 * include/experimental/type_traits: Likewise.
3747 * include/experimental/unordered_map: Likewise.
3748 * include/experimental/unordered_set: Likewise.
3749 * include/experimental/utility: Likewise.
3750 * include/experimental/vector: Likewise.
3751 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
3752 * testsuite/experimental/array/neg.cc: Adjust dg-error.
3753 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
3754 Likewise.
3755 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
3756 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
3757 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
3758 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
3759 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
3760
3761 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
3762 * include/experimental/bits/fs_fwd.h: Improve docs.
3763 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
3764 * include/experimental/bits/fs_path.h: Likewise.
3765 (path, filesystem_error, u8path): Improve docs.
3766 * include/experimental/filesystem: Link to docs for TS.
3767
3768 * config/allocator/new_allocator_base.h (__allocator_base): Add
3769 workaround for Doxygen bug #6945.
3770 * include/std/memory: Improve docs. Define group for pointer safety.
3771 * include/std/scoped_allocator: Improve docs. Use "undocumented"
3772 conditional to suppress documentation for implementation details.
3773
3774 * include/bits/specfun.h: Improve docs.
3775 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
3776 and namespaces.
3777
3778 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
3779 (std::experimental): Add docs.
3780 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
3781 namespace to nothing when generating docs.
3782 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
3783 * include/std/chrono (std::chrono): Likewise.
3784 * include/std/functional (std::placeholders): Likewise.
3785 * include/std/thread (std::this_thread): Likewise.
3786
3787 * include/parallel/settings.h: Fix Doxygen markup.
3788
3789 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
3790 anything unless PB_DS_CLASS_C_DEC is defined.
3791 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
3792 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
3793 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
3794 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
3795 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
3796 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
3797 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
3798 Likewise.
3799 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
3800 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
3801 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
3802 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
3803 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
3804 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
3805 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
3806 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
3807 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
3808 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
3809 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
3810 Likewise.
3811 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
3812 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
3813 Likewise.
3814 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
3815 Likewise.
3816
3817 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
3818 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
3819 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
3820 Doxygen expands.
3821
3822 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3823
3824 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
3825 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
3826 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
3827 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
3828 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
3829 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
3830 Likewise.
3831 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
3832 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
3833 Likewise.
3834
3835 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
3836
3837 PR libstdc++/61761
3838 * include/std/complex (__complex_proj): Return parameter unchanged.
3839 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
3840 floating-point types to take std::complex arguments.
3841 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
3842 floating-point types.
3843 * testsuite/26_numerics/complex/proj.cc: New test.
3844
3845 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3846
3847 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
3848 to _Lock_policyE[012].
3849 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3850
3851 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
3852
3853 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
3854 macros accidentally left in.
3855 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
3856 unnecessary -lstdc++fs option. Fix test for mingw.
3857 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3858 Fix test for mingw.
3859
3860 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3861
3862 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3863
3864 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
3865
3866 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
3867
3868 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
3869 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
3870
3871 PR libstdc++/71312
3872 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
3873
3874 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
3875 attribute.
3876
3877 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
3878 class template and partial specialization.
3879
3880 PR libstdc++/87982
3881 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
3882 an integral type.
3883 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
3884 functions to convert a value to an integral type.
3885 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
3886 (fill_n): Convert _Size parameter to an integral type.
3887 * testsuite/25_algorithms/fill_n/87982.cc: New test.
3888 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
3889 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
3890 * testsuite/25_algorithms/generate_n/87982.cc: New test.
3891 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
3892 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
3893
3894 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
3895
3896 Adding noexcept-specification on tuple constructors (LWG 2899)
3897 * libstdc++-v3/include/std/tuple:
3898 (tuple()): Add noexcept-specification.
3899 (tuple(const _Elements&...)): Likewise
3900 (tuple(_UElements&&...)): Likewise
3901 (tuple(const tuple<_UElements...>&)): Likewise
3902 (tuple(tuple<_UElements...>&&)): Likewise
3903 (tuple(const _T1&, const _T2&)): Likewise
3904 (tuple(_U1&&, _U2&&)): Likewise
3905 (tuple(const tuple<_U1, _U2>&): Likewise
3906 (tuple(tuple<_U1, _U2>&&): Likewise
3907 (tuple(const pair<_U1, _U2>&): Likewise
3908 (tuple(pair<_U1, _U2>&&): Likewise
3909 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
3910
3911 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
3912
3913 PR libstdc++/87106
3914 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
3915 arguments with __restrict.
3916
3917 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
3918
3919 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3920
3921 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
3922
3923 * include/experimental/bits/fs_path.h
3924 (path::_S_convert_loc<_InputIterator>): Create const std::string to
3925 avoid redundant call to _S_convert_loc with non-const pointers.
3926
3927 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
3928 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
3929 * testsuite/21_strings/basic_string/hash/hash.cc
3930 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
3931 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
3932 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
3933
3934 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
3935 wstring::_M_replace_dispatch with more specific patterns.
3936 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
3937 Create const std::string to avoid redundant call to _S_convert_loc
3938 with non-const pointers.
3939 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
3940 avoid unnecessary basic_string::assign instantiations.
3941
3942 * include/std/memory (__uses_alloc_args): Add string-literal to
3943 static_assert, to match the one in __uses_alloc.
3944 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
3945 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
3946 for recursive uses-allocator construction of nested pairs.
3947 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
3948 comment.
3949
3950 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3951
3952 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
3953 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
3954 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
3955 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
3956
3957 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3958 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3959 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
3960 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3961 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3962 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3963 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3964
3965 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
3966
3967 PR libstdc++/90239
3968 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
3969 * include/std/scoped_allocator [__cplusplus > 201703L]
3970 (scoped_allocator_adaptor::construct): Define in terms of
3971 uses_allocator_construction_args, as per P0591R4.
3972 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
3973 * testsuite/util/testsuite_allocator.h: Remove name of unused
3974 parameter.
3975
3976 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
3977
3978 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
3979 * doc/html/*: Regenerate.
3980
3981 * include/bits/fs_path.h (operator<, operator<=, operator>)
3982 (operator>=, operator==, operator!=): Make hidden friends, as per
3983 LWG 3065.
3984 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
3985 string type in test.
3986 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3987
3988 * include/std/any (any::any(ValueType&&)): Use __and_v.
3989 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
3990 Likewise.
3991
3992 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
3993 as per P0777R1.
3994 * include/std/type_traits (__result_of_memfun): Use remove_reference
3995 instead of __remove_cvref_t and remove redundant is_same check.
3996 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
3997
3998 * include/experimental/string_view (basic_string_view::pointer)
3999 (basic_string_view::reference): Fix to refer to non-const value_type.
4000 * include/bits/basic_string.h (basic_string): Use __sv_check and
4001 __sv_limit instead of basic_string_view::_M_check and
4002 basic_string_view::_M_limit.
4003 * include/std/string_view (__sv_check, __sv_limit): New
4004 helper functions to replace basic_string_view::_M_check and
4005 basic_string_view::_M_limit.
4006 (basic_string_view): Add static assertions to enforce ill-formed
4007 requirement for traits_type::char_type from P1148R0, and to enforce
4008 required properties of char-like types.
4009 (basic_string_view::pointer, basic_string_view::reference): Fix to
4010 refer to non-const value_type.
4011 (basic_string_view::operator[], basic_string_view::at)
4012 (basic_string_view::front, basic_string_view::back)
4013 (basic_string_view::data): Use const_reference and const_pointer
4014 typedefs for return types.
4015 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
4016 (hash<wstring_view>): Fix argument_type typedef.
4017 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
4018 char/1.cc: Fix expected return type of basic_string_view::data().
4019 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
4020 wchar_t/1.cc: Likewise.
4021 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
4022 char/1.cc: Likewise.
4023 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
4024 wchar_t/1.cc: Likewise.
4025 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
4026 New test.
4027 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
4028 Check reference and pointer typedefs.
4029 * testsuite/experimental/string_view/requirements/typedefs.cc:
4030 Likewise.
4031 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
4032 Fix expected return type of basic_string_view::data().
4033 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
4034 1.cc: Likewise.
4035 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
4036 Likewise.
4037 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
4038 1.cc: Likewise.
4039
4040 PR libstdc++/90220
4041 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
4042 Avoid a runtime check for types that can never be stored in std::any.
4043 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
4044 array types.
4045
4046 PR libstdc++/90220 (partial)
4047 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
4048 not attempt ill-formed static_cast to pointers to non-object types.
4049 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
4050 function types.
4051
4052 * testsuite/20_util/variant/run.cc: Catch exception by reference to
4053 prevent -Wcatch-value warning.
4054
4055 * include/std/variant (__variant_construct): Use template parameter
4056 type instead of equivalent decltype-specifier.
4057 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
4058 Replace forward with move.
4059 (_Move_ctor_base<false, Types...>::_M_destructive_move)
4060 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
4061 (_Move_ctor_base<true, Types...>::_M_destructive_move)
4062 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
4063 index after construction succeeds.
4064 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
4065 if-constexpr checks that are always true. Use __remove_cvref_t instead
4066 of remove_reference so that is_nothrow_move_constructible check
4067 doesn't use a const rvalue parameter. In the potentially-throwing case
4068 construct a temporary and move assign it, as per LWG 2904.
4069 (_Move_assign_base<false, Types...>::operator=): Remove redundant
4070 if-constexpr checks that are always true. Use emplace as per LWG 2904.
4071 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
4072 construct a temporary and move assign from it, as per LWG 2904.
4073 * testsuite/20_util/variant/exception_safety.cc: Check that
4074 assignment operators have strong exception safety guarantee.
4075
4076 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
4077
4078 Document PSTL linker flags
4079
4080 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
4081
4082 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
4083
4084 * include/std/variant (__detail::__variant::_Traits): Make
4085 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
4086 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
4087 P0602R4.
4088 (__detail::__variant::_Copy_assign_alias): Only depend on
4089 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
4090 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
4091 move assignment operators.
4092
4093 PR libstdc++/90165
4094 * include/std/variant (variant::__not_self): New helper for the
4095 is_same_v<remove_cvref_t<T>, variant>==false constraints.
4096 (variant::__to_type_impl): Remove.
4097 (variant::__to_type): Add default argument to check pack size, instead
4098 of using __to_type_impl.
4099 (variant::__accepted_type): Add default argument using __not_self.
4100 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
4101 for variant(T&&) constructor constraint.
4102 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
4103 Extract __accepted_type into a named template parameter for reuse in
4104 other constraints and in the exception specification.
4105 (variant::variant(in_place_type_t<T>, Args&&...))
4106 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
4107 (variant::variant(in_place_index_t<T>, Args&&...))
4108 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
4109 (variant::operator=T&&)): Remove redundant && from trait arguments.
4110 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
4111 isn't used for in_place_type or in_place_index arguments.
4112
4113 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
4114 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
4115 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
4116
4117 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4118 Bernd Edlinger <bernd.edlinger@hotmail.de>
4119 Jakub Jelinek <jakub@redhat.com>
4120
4121 PR target/89093
4122 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
4123 general-regs-only target attribute for ARM.
4124
4125 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
4126
4127 PR libstdc++/87431
4128 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
4129 specialization also depend on is_nothrow_move_constructible.
4130 * include/std/variant (__detail::__variant::__never_valueless()):
4131 Only true if the variant would have a move assignment operator.
4132 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
4133 Check __never_valueless<T...>().
4134 (variant::emplace): Only perform non-throwing move assignments
4135 for never-valueless alternatives if the variant has a move assignment
4136 operator.
4137 * testsuite/20_util/variant/compile.cc: Check that never-valueless
4138 types can be emplaced into non-assignable variants.
4139 * testsuite/20_util/variant/run.cc: Check that never-valueless types
4140 don't get copied when emplaced into non-assignable variants.
4141
4142 * include/std/variant (__detail::__variant::__ref_cast): Remove
4143 unused function.
4144 (__detail::__variant::_Uninitialized::_M_get)
4145 (__detail::__variant::__get)
4146 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
4147
4148 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
4149
4150 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
4151 to Darwin10.
4152 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
4153 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
4154 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
4155 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
4156
4157 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
4158
4159 Delegate PSTL configuration to pstl/pstl_config.h
4160
4161 * include/bits/c++config: Remove explicit PSTL configuration
4162 macros and use definitions from <pstl/pstl_config.h>.
4163
4164 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
4165
4166 Cleanup algorithm implementations
4167 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
4168 execution policy.
4169 (mismatch): Forward execution policy.
4170 (equal): Qualify call to std::equal().
4171 (partial_sort): Forward execution policy.
4172 (inplace_merge): Forward execution policy.
4173
4174 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
4175
4176 Improve implementation of parallel equal()
4177 * include/pstl/algorithm_impl.h
4178 (__internal::__brick_equal): use "4 iterator" version of
4179 std::equal().
4180 (__internal::__brick_equal): use simd for random access
4181 iterators on unsequenced execution policies.
4182 (__internal::__pattern_equal): add "4 iterator" version
4183 (__internal::__pattern_equal): dispatch to simd __brick_equal
4184 for vector-only execution policies.
4185 (__internal::__pattern_equal): dispatch to __parallel_or for
4186 parallel execution policies.
4187 * include/pstl/glue_algorithm_impl.h
4188 (std::equal): dispatch to "4 iterator" version of
4189 __internal::__pattern_equal().
4190
4191 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
4192
4193 PR libstdc++/90105
4194 * include/bits/forward_list.h (operator==): Do not use operator!= to
4195 compare elements.
4196 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
4197 earlier in the list, so that sort is stable.
4198 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
4199 * testsuite/23_containers/forward_list/comparable.cc: Test with
4200 types that meet the minimum EqualityComparable and LessThanComparable
4201 requirements. Remove irrelevant comment.
4202
4203 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
4204 Do not depend on whether all alternative types are move constructible.
4205 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
4206 from the operand when deciding whether to perform the assignment.
4207 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
4208 with deleted move constructor and deleted move assignment operator.
4209 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
4210 behaviour of variants with DeletedMoves as an alternative.
4211 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
4212 (move_ctor, move_assign): Check that moving a variant with a
4213 DeletedMoves alternative falls back to copying instead of moving.
4214
4215 * testsuite/20_util/variant/compile.cc: Remove empty string literals
4216 from static_assert declarations.
4217
4218 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
4219 actually match its name.
4220 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
4221 (test_swap()): Fix result for MoveCtorOnly and check
4222 MoveCtorAndSwapOnly.
4223
4224 * include/std/optional (optional::value_or(U&&) &&): Add missing
4225 constexpr specifier.
4226 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
4227 for disengaged optionals and rvalue optionals.
4228 * testsuite/20_util/optional/observers/4.cc: Likewise.
4229
4230 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
4231
4232 * include/pstl/algorithm_impl.h: Uglify identfiers.
4233 * include/pstl/numeric_impl.h: Uglify identfiers.
4234 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
4235
4236 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
4237
4238 * include/bits/c++config:
4239 Add definition for __PSTL_ASSERT.
4240 Add definition for __PSTL_ASSERT_MSG.
4241 * include/pstl/algorithm_impl.h: Replace use of assert().
4242 * include/pstl/numeric_impl.h: Replace use of assert().
4243 * include/pstl/parallel_backend_tbb.h:
4244 Replace use of assert().
4245 Replace use of __TBB_ASSERT().
4246 * include/pstl/parallel_backend_utils.h: Replace use of assert().
4247
4248 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
4249
4250 PR libstdc++/90046
4251 * src/c++17/memory_resource.cc
4252 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
4253 needed to allow placing a _Chunk at the end of the buffer.
4254 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
4255
4256 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
4257
4258 * doc/xml/faq.xml: Add information about emergency EH pool.
4259 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
4260 Move outdated information on mt_allocator to a separate section.
4261 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
4262 doesn't affect the default allocator.
4263
4264 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
4265 typo.
4266
4267 PR libstdc++/89851
4268 * testsuite/20_util/variant/89851.cc: New test.
4269
4270 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
4271
4272 * include/std/variant: Adjust whitespace. Add comments.
4273 (_Multi_array): Leave primary template undefined.
4274 (_Multi_array<_Tp>): Define partial specialization for base case of
4275 recursion.
4276 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
4277 which is always a reference.
4278 (__gen_vtable::_S_apply()): Remove function, inline body into
4279 default member initializer.
4280 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
4281
4282 * include/std/variant (__variant_idx_cookie): Add member type.
4283 (__visitor_result_type): Remove.
4284 (__do_visit): Use invoke_result instead of __visitor_result_type.
4285 * testsuite/20_util/variant/visit.cc: New test.
4286
4287 PR libstdc++/90008
4288 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
4289 unused capture.
4290 * testsuite/20_util/variant/90008.cc: New test.
4291
4292 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
4293
4294 * include/pstl/algorithm_impl.h: Add namespace qualification.
4295 * include/pstl/execution_defs.h: Add namespace qualification.
4296 * include/pstl/execution_impl.h: Add namespace qualification.
4297 * include/pstl/numeric_impl.h: Add namespace qualification.
4298 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
4299 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
4300 * include/pstl/parallel_backend_utils.h: Include <cassert>.
4301
4302 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
4303
4304 Fix visit<R> for variant.
4305 * include/std/variant (__do_visit): Add a template parameter
4306 for enforcing same return types for visit.
4307 (__gen_vtable_impl): Likewise.
4308 (_S_apply_single_alt): Adjust.
4309 (__visit_invoke_impl): New. Handle casting to void.
4310 (__do_visit_invoke): New. Enforces same return types.
4311 (__do_visit_invoke_r): New. Converts return types.
4312 (__visit_invoke): Adjust.
4313 (__gen_vtable): Add a template parameter for enforcing
4314 same return types for visit.
4315 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
4316 different return types.
4317 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
4318 visitors with different return types don't accidentally
4319 compile with regular visitation.
4320
4321 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
4322
4323 * testsuite/27_io/filesystem/iterators/caching.cc: Add
4324 dg-require-filesystem-ts.
4325
4326 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
4327
4328 * doc/xml/manual/status_cxx2020.xml: Update status.
4329 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
4330 * testsuite/20_util/variant/visit_r.cc: New test.
4331
4332 * include/bits/fs_dir.h (directory_iterator::operator*)
4333 (directory_iterator::operator->): Add noexcept.
4334 (operator==, operator!=): Replace namespace-scope equality operators
4335 for directory iterators with hidden friends.
4336
4337 PR libstdc++/89986
4338 * config/abi/pre/gnu.ver: Add missing exports.
4339 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
4340 increment member.
4341
4342 * config/abi/pre/gnu.ver: Export new symbols.
4343 * include/bits/fs_dir.h (recursive_directory_iterator::options())
4344 (recursive_directory_iterator::recursion_pending())
4345 (recursive_directory_iterator::disable_recursion_pending()): Remove
4346 inline definitions. Make noexcept.
4347 (recursive_directory_iterator::depth())
4348 (recursive_directory_iterator::operator*())
4349 (recursive_directory_iterator::operator->()): Make noexcept.
4350 (recursive_directory_iterator::_M_options)
4351 (recursive_directory_iterator::_M_pending): Remove data members.
4352 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
4353 (recursive_directory_iterator::recursive_directory_iterator): Remove
4354 ctor-initializer. Use new constructor for _Dir_stack.
4355 (recursive_directory_iterator::options())
4356 (recursive_directory_iterator::recursion_pending())
4357 (recursive_directory_iterator::disable_recursion_pending()): Add
4358 non-inline definitions.
4359 (recursive_directory_iterator::depth()): Make noexcept.
4360 (recursive_directory_iterator::increment(error_code&))
4361 (recursive_directory_iterator::pop(error_code&)): Adjust to new
4362 location of options and recursion_pending members.
4363 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
4364 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
4365 user-declared move constructor and assignment operator, to make the
4366 type move-only.
4367
4368 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
4369 d_type == DT_UNKNOWN immediately.
4370 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
4371 handling here.
4372 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
4373
4374 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
4375 assignment.
4376 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
4377 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
4378 assignment.
4379
4380 PR libstdc++/87431 (again)
4381 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
4382 Define partial specialization for basic_string.
4383 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
4384 shared_ptr and weak_ptr.
4385 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
4386 function.
4387 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
4388 vector.
4389 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
4390 unique_ptr.
4391 * include/debug/vector (_Never_valueless_alt): Likewise for debug
4392 vector.
4393 * include/std/any (_Never_valueless_alt): Define explicit
4394 specialization for any.
4395 * include/std/variant (_Never_valueless_alt): Define primary template.
4396 (__never_valueless): Use _Never_valueless_alt instead of
4397 is_trivially_copyable.
4398 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
4399 initializations to avoid try-catch overhead. Add special case for
4400 scalars produced by potentially-throwing conversions. Use
4401 _Never_valueless_alt instead of is_trivially_copyable for the
4402 remaining strong exception-safety cases.
4403 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
4404 * testsuite/20_util/variant/87431.cc: Run both test functions.
4405 * testsuite/20_util/variant/exception_safety.cc: New test.
4406 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
4407 so the variant becomes valueless.
4408
4409 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
4410
4411 PR libstdc++/85184
4412 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
4413 Remove assertions.
4414 (variant::emplace<_Tp>): Return result of emplace<N> directly.
4415
4416 * include/std/string (__hash_string_base): New class template defining
4417 operator() for hashing strings.
4418 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
4419 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
4420 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
4421 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
4422
4423 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
4424
4425 Use single-visitation in variant assignment and swap and relops.
4426 Also use indices instead of types when checking whether
4427 variants hold the same thing.
4428 * include/std/variant (__do_visit): Add a template parameter
4429 for index visitation, invoke with indices if index visitation
4430 is used.
4431 (__variant_idx_cookie): New.
4432 (__visit_with_index): Likewise.
4433 (_Copy_assign_base::operator=): Do single-visitation with
4434 an index visitor.
4435 (_Move_assign_base::operator=): Likewise.
4436 (_Extra_visit_slot_needed): Adjust.
4437 (__visit_invoke): Call with indices if it's an index visitor.
4438 (relops): Do single-visitation with an index visitor.
4439 (swap): Likewise.
4440 (__visitor_result_type): New.
4441
4442 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
4443
4444 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
4445
4446 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4447
4448 Don't revisit a variant we are already visiting.
4449 * include/std/variant (__variant_construct_single): New.
4450 (__variant_construct): Use it.
4451 (_M_destructive_move): Likewise.
4452 (_M_destructive_copy): Likewise.
4453 (_Copy_assign_base::operator=): Adjust.
4454 (_Move_assign_base::operator=): Likewise.
4455 (swap): Likewise.
4456
4457 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
4458
4459 PR libstdc++/85965
4460 * include/bits/hashtable.h (_Hashtable): Move static assertions to
4461 destructor so they are not evaluated until the _Key type is complete.
4462 * include/bits/stl_tree.h (_Rb_tree): Likewise.
4463 * testsuite/23_containers/set/85965.cc: New test.
4464 * testsuite/23_containers/unordered_set/85965.cc: New test.
4465 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
4466 with regexp matching the corresponding _Rb_tree specialization.
4467 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
4468 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
4469 * testsuite/23_containers/set/48101_neg.cc: Likewise.
4470 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
4471 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
4472 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
4473 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
4474
4475 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4476
4477 PR libstdc++/89825
4478 Fix based on a suggestion by Antony Polukhin.
4479 * include/std/variant (__never_valueless): New.
4480 (_M_valid): Use it.
4481 (_Extra_visit_slot_needed): New.
4482 (_Multi_array): Use it.
4483 (_S_apply_all_alts): Likewise.
4484
4485 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4486
4487 PR libstdc++/89824
4488 Fix based on a suggestion by Antony Polukhin.
4489 * include/std/variant (__gen_vtable): Don't reserve an
4490 additional table slot, _Multi_array already does that.
4491
4492 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4493
4494 PR libstdc++/89816
4495 Fix based on a suggestion by Antony Polukhin.
4496 * include/std/variant (__variant_construct): Capture a pointer
4497 to the storage and visit just one variant.
4498
4499 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
4500
4501 * doc/xml/manual/backwards_compatibility.xml: Remove link to
4502 Doxygen-generated pages with unstable URL.
4503 * doc/xml/manual/concurrency_extensions.xml: Likewise.
4504 * doc/xml/manual/extensions.xml: Likewise.
4505 * doc/xml/manual/parallel_mode.xml: Likewise.
4506 * doc/xml/manual/support.xml: Likewise.
4507
4508 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
4509 avoid -Wconversion warnings.
4510
4511 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
4512
4513 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
4514 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
4515 (allstamped): Add stamp-pstl.
4516 (install-headers): Add ptsl_builddir.
4517 * include/Makefile.in: Regenerate.
4518 * include/bits/c++config: Add pstl configuration.
4519 * include/pstl/LICENSE.txt: New file.
4520 * include/pstl/algorithm_fwd.h: New file.
4521 * include/pstl/algorithm_impl.h: New file.
4522 * include/pstl/execution_defs.h: New file.
4523 * include/pstl/execution_impl.h: New file.
4524 * include/pstl/glue_algorithm_defs.h: New file.
4525 * include/pstl/glue_algorithm_impl.h: New file.
4526 * include/pstl/glue_execution_defs.h: New file.
4527 * include/pstl/glue_memory_defs.h: New file.
4528 * include/pstl/glue_memory_impl.h: New file.
4529 * include/pstl/glue_numeric_defs.h: New file.
4530 * include/pstl/glue_numeric_impl.h: New file.
4531 * include/pstl/memory_impl.h: New file.
4532 * include/pstl/numeric_fwd.h: New file.
4533 * include/pstl/numeric_impl.h: New file.
4534 * include/pstl/parallel_backend.h: New file.
4535 * include/pstl/parallel_backend_tbb.h: New file.
4536 * include/pstl/parallel_backend_utils.h: New file.
4537 * include/pstl/parallel_impl.h: New file.
4538 * include/pstl/pstl_config.h: New file.
4539 * include/pstl/unseq_backend_simd.h: New file.
4540 * include/pstl/utils.h: New file.
4541 * include/std/algorithm: Include parallel algorithm implementations.
4542 * include/std/execution: New file.
4543 * include/std/memory: Include parallel algorithm implementations.
4544 * include/std/numeric: Include parallel algorithm implementations.
4545 * include/std/version: Add parallel algorithms feature test macro.
4546 * testsuite/util/pstl/pstl_test_config.h: New file.
4547 * testsuite/util/pstl/test_utils.h: New file.
4548 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4549 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4550 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4551 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4552 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4553 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4554 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4555 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4556 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4557 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4558 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4559 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4560 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4561 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4562 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4563 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4564 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4565 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4566 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4567 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4568 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4569 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4570 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4571 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4572 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4573 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4574 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4575 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4576 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4577 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4578 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4579 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4580 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4581 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4582 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4583 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4584 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4585 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4586 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4587 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4588 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4589 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4590 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4591 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4592 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4593 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4594 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4595 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4596 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4597 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4598 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4599 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4600 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4601 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4602 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4603 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4604 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4605 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4606 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4607 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4608 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4609 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4610 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4611 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4612 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4613 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4614 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4615 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4616 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4617 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4618 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4619 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4620 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4621 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4622 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4623 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4624 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4625 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4626 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4627 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4628 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4629 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4630 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4631 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4632 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4633 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4634 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4635 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4636 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4637 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4638 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4639 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4640 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4641 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4642 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4643 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4644 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4645 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4646 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4647 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4648 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4649 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4650 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4651 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4652 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4653 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4654
4655 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
4656
4657 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
4658 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
4659 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
4660 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
4661 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
4662 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
4663 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
4664 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
4665 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
4666 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
4667 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
4668 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
4669 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
4670 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
4671 when the special functions IS is enabled, not for C++17.
4672 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
4673 Replace with ...
4674 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
4675 without checks for special functions in C++17.
4676 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4677 New test.
4678
4679 PR libstdc++/88066
4680 * include/backward/hash_map: Use <> for includes not "".
4681 * include/backward/hash_set: Likewise.
4682 * include/backward/strstream: Likewise.
4683 * include/tr1/bessel_function.tcc: Likewise.
4684 * include/tr1/exp_integral.tcc: Likewise.
4685 * include/tr1/legendre_function.tcc: Likewise.
4686 * include/tr1/modified_bessel_func.tcc: Likewise.
4687 * include/tr1/riemann_zeta.tcc: Likewise.
4688
4689 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
4690
4691 * doc/xml/manual/allocator.xml: Link to table documenting evolution
4692 of extension allocators.
4693 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
4694 Document new headers in 7.2, 8.1 and 9.1 releases.
4695 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
4696 * doc/html/*: Regenerate.
4697
4698 2019-03-12 John David Anglin <dave.anglin@bell.net>
4699
4700 PR libstdc++/89461
4701 * testsuite/lib/libstdc++.exp: Locate libatomic.
4702 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
4703 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
4704 libatomic options.
4705 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
4706 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
4707 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
4708 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
4709
4710 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
4711
4712 PR libstdc++/89460
4713 * configure.ac: Check for sockatmark.
4714 * crossconfig.m4: Check for sockatmark.
4715 * config.h.in: Regenerate.
4716 * configure: Regenerate.
4717 * include/experimental/internet (address_v4::_S_hton): Rename
4718 overloaded functions to _S_hton_16 and _S_ntoh_16.
4719 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
4720 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
4721 * include/experimental/socket (basic_socket::at_mark): Check
4722 _GLIBCXX_HAVE_SOCKATMARK.
4723
4724 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
4725 const variables instead of macros.
4726
4727 PR libstdc++/89629
4728 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
4729 Use correct type for len_aligned.
4730 * testsuite/20_util/hash/89629.cc: New test.
4731
4732 2019-03-11 Jakub Jelinek <jakub@redhat.com>
4733
4734 PR libstdc++/89641
4735 * include/std/atomic (atomic<T>::store, atomic<T>::load,
4736 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
4737 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
4738 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
4739 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
4740 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
4741 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
4742 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
4743 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
4744 memory_order_seq_cst to int.
4745
4746 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
4747
4748 * doc/xml/manual/using.xml: Use link element instead of xref.
4749 * doc/html/*: Regenerate.
4750
4751 * include/bits/fs_path.h (path::format): Add fixed underlying type.
4752
4753 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
4754
4755 PR libstdc++/89477
4756 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
4757 parameters in deduction guides.
4758 * include/debug/multimap.h (multimap): Likewise.
4759 * include/debug/set.h (multimap): Likewise.
4760 * include/debug/multiset.h (multimap): Likewise.
4761 * include/debug/unordered_map (unordered_map): Likewise.
4762 (unordered_multimap): Likewise.
4763 * include/debug/unordered_set (unordered_set): Likewise.
4764 (unordered_multiset): Likewise.
4765
4766 PR libstdc++/89608
4767 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
4768 Invalidate all iterators in case of rehash.
4769 (unordered_multimap<>::_M_check_rehashed): Likewise.
4770 * include/debug/unordered_set
4771 (unordered_set<>::_M_check_rehashed): Likewise.
4772 (unordered_multiset<>::_M_check_rehashed): Likewise.
4773 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
4774
4775 2019-03-07 Andreas Schwab <schwab@suse.de>
4776
4777 * config/abi/post/riscv64-linux-gnu: New directory.
4778 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
4779
4780 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
4781
4782 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
4783 compile test to run. Fix typo.
4784
4785 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
4786 * doc/html/*: Regenerate.
4787
4788 P0356R5 Simplified partial function application
4789 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
4790 helpers for bind_front.
4791 (bind_front, __cpp_lib_bind_front): Define.
4792 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
4793
4794 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4795
4796 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
4797 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
4798 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
4799 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
4800
4801 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
4802
4803 PR libstdc++/86655 - std::assoc_legendre should not constrain
4804 the value of m (or x).
4805 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
4806 __sph_legendre): If degree > order Don't throw, return 0.
4807 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
4808 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
4809 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
4810 * testsuite/tr1/5_numerical_facilities/special_functions/
4811 02_assoc_legendre/pr86655.cc: New test.
4812 * testsuite/tr1/5_numerical_facilities/special_functions/
4813 22_sph_legendre/pr86655.cc: New test.
4814
4815 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
4816
4817 Rewrite variant.
4818 Also PR libstdc++/85517
4819 * include/std/variant (__do_visit): New.
4820 (__variant_cast): Likewise.
4821 (__variant_cookie): Likewise.
4822 (__erased_*): Remove.
4823 (_Variant_storage::_S_vtable): Likewise.
4824 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
4825 (_Variant_storage::__M_reset): Adjust.
4826 (__variant_construct): New.
4827 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
4828 __variant_construct.
4829 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
4830 (_Move_ctor_base::__M_destructive_copy): New.
4831 (_Move_ctor_base::__M_destructive_move): Adjust to use
4832 __variant_construct.
4833 (_Copy_assign_base::operator=): Adjust to use __do_visit.
4834 (_Copy_assign_alias): Adjust to check both copy assignment
4835 and copy construction for triviality.
4836 (_Move_assign_base::operator=): Adjust to use __do_visit.
4837 (_Multi_array): Add support for visitors that accept and return
4838 a __variant_cookie.
4839 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
4840 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
4841 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
4842 a __variant_cookie temporary for a variant that is valueless and..
4843 (__gen_vtable_impl::__visit_invoke): ..adjust here.
4844 (__gen_vtable::_Array_type): Conditionally make space for
4845 the __variant_cookie visitor case.
4846 (__variant_construct_by_index): New.
4847 (get_if): Adjust to use std::addressof.
4848 (relops): Adjust to use __do_visit.
4849 (variant): Add __variant_cast and __variant_construct_by_index
4850 as friends.
4851 (variant::emplace): Use _M_reset() and __variant_construct_by_index
4852 instead of self-destruction.
4853 (variant::swap): Adjust to use __do_visit.
4854 (visit): Reimplement in terms of __do_visit.
4855 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
4856 * testsuite/20_util/variant/compile.cc: Adjust.
4857 * testsuite/20_util/variant/run.cc: Likewise.
4858
4859 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4860
4861 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
4862 constant.
4863 * testsuite/experimental/feat-char8_t.cc: Likewise.
4864
4865 * include/std/type_traits [C++20] (is_bounded_array)
4866 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
4867 Define.
4868 * testsuite/20_util/is_bounded_array/requirements/
4869 explicit_instantiation.cc: New test.
4870 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
4871 test.
4872 * testsuite/20_util/is_bounded_array/value.cc: New test.
4873 * testsuite/20_util/is_unbounded_array/requirements/
4874 explicit_instantiation.cc: New test.
4875 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
4876 * test.
4877 * testsuite/20_util/is_unbounded_array/value.cc: New test.
4878
4879 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
4880 Add constexpr.
4881 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
4882
4883 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
4884
4885 * include/c_compatibility/math.h [C++20] (lerp): Add using
4886 declaration.
4887 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
4888 (__lerp): Define function template to implement lerp.
4889 (lerp(float, float, float), lerp(double, double, double))
4890 (lerp(long double, long double, long double)): Define for C++20.
4891 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
4892 (midpoint(T, T), midpoint(T*, T*)): Define.
4893 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
4894 * testsuite/26_numerics/lerp.cc: New test.
4895 * testsuite/26_numerics/midpoint/floating.cc: New test.
4896 * testsuite/26_numerics/midpoint/integral.cc: New test.
4897 * testsuite/26_numerics/midpoint/pointer.cc: New test.
4898
4899 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
4900
4901 PR libstdc++/88996 Implement P0439R0
4902 Make std::memory_order a scoped enumeration.
4903 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
4904 add variables for the old enumerators. Adjust calls.
4905 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
4906 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
4907
4908 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
4909
4910 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
4911 directive.
4912
4913 * include/std/memory_resource (polymorphic_allocator): Add default
4914 template argument for C++20.
4915 (polymorphic_allocator::allocate_bytes)
4916 (polymorphic_allocator::deallocate_bytes)
4917 (polymorphic_allocator::allocate_object)
4918 (polymorphic_allocator::deallocate_object)
4919 (polymorphic_allocator::new_object)
4920 (polymorphic_allocator::delete_object): New member functions for
4921 C++20.
4922 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
4923 test.
4924
4925 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
4926
4927 PR libstdc++/89562
4928 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
4929 mode for mingw.
4930
4931 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
4932
4933 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
4934 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
4935
4936 * include/std/memory (uses_allocator_construction_args): New set of
4937 overloaded functions.
4938 (make_obj_using_allocator, uninitialized_construct_using_allocator):
4939 New functions.
4940 * include/std/memory_resource (polymorphic_allocator::construct)
4941 [__cplusplus > 201703l]: Replace all overloads with a single function
4942 using uses_allocator_construction_args.
4943 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
4944 test.
4945 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
4946
4947 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
4948
4949 PR libstdc++/89466
4950 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
4951 stylesheet directories before check for xsltproc. Try to use
4952 xmlcatalog to find local stylesheet directory before trying hardcoded
4953 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
4954 check to look for the same stylesheet as doc/Makefile.am uses. Don't
4955 use xsltproc if xmlcatalog fails to find a local stylesheet.
4956 * configure.ac: Check for xmlcatalog.
4957 * Makefile.in: Regenerate.
4958 * configure: Likewise.
4959 * doc/Makefile.in: Likewise.
4960 * include/Makefile.in: Likewise.
4961 * libsupc++/Makefile.in: Likewise.
4962 * po/Makefile.in: Likewise.
4963 * python/Makefile.in: Likewise.
4964 * src/Makefile.in: Likewise.
4965 * src/c++11/Makefile.in: Likewise.
4966 * src/c++17/Makefile.in: Likewise.
4967 * src/c++98/Makefile.in: Likewise.
4968 * src/filesystem/Makefile.in: Likewise.
4969 * testsuite/Makefile.in: Likewise.
4970
4971 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
4972
4973 PR libstdc++/89477
4974 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
4975 container deduction guides.
4976 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
4977 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
4978 parameters in deduction guides.
4979 * include/bits/stl_multimap.h (multimap): Likewise.
4980 * include/bits/stl_multiset.h (multiset): Likewise.
4981 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
4982 * include/bits/stl_set.h (set): Likewise.
4983 * include/bits/stl_stack.h (stack): Likewise.
4984 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4985 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
4986 constrain parameters in deduction guides.
4987 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4988 Likewise.
4989 * testsuite/23_containers/map/cons/deduction.cc: Test additional
4990 deduction cases.
4991 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4992 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4993 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
4994 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4995 Likewise.
4996 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4997 Likewise.
4998 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4999
5000 PR libstdc++/89416
5001 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
5002 to class template and partial specialization using void_t.
5003 (__is_copy_insertable, __is_move_insertable): Adjust base class.
5004
5005 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
5006
5007 PR libstdc++/89416
5008 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
5009 copy and move members public.
5010
5011 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
5012
5013 * include/std/type_traits (__underlying_type_impl): New helper to
5014 make underlying_type SFINAE-friendly.
5015 (underlying_type): Derive from __underlying_type_impl.
5016 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
5017 test.
5018
5019 PR libstdc++/89446
5020 * include/bits/char_traits.h (__constant_char_array): Check index is
5021 in range before dereferencing.
5022 (char_traits<char>::compare, char_traits<char>::find)
5023 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
5024 immediately if n is zero.
5025 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
5026 Remove workarounds for PR 67026.
5027 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
5028 New test.
5029 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
5030 New test.
5031
5032 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
5033
5034 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
5035 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
5036
5037 2019-02-22 Jakub Jelinek <jakub@redhat.com>
5038
5039 PR libstdc++/89402
5040 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
5041 type to std::size_t and argument to type to long double.
5042
5043 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
5044
5045 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
5046 * config/abi/post/sparc64-linux-gnu: New directory.
5047 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
5048 * config/abi/post/sparc64-linux-gnu/32: New directory.
5049 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
5050
5051 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
5052
5053 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
5054 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
5055 test.
5056
5057 2019-02-22 Tom Honermann <tom@honermann.net>
5058
5059 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
5060 printers for u8string and u8string_view.
5061
5062 2019-02-22 Tom Honermann <tom@honermann.net>
5063
5064 * testsuite/18_support/byte/ops.cc: Validate
5065 std::to_integer<char8_t>, std::to_integer<char16_t>, and
5066 std::to_integer<char32_t>.
5067 * testsuite/18_support/numeric_limits/dr559.cc: Validate
5068 std::numeric_limits<char8_t>.
5069 * testsuite/18_support/numeric_limits/lowest.cc: Validate
5070 std::numeric_limits<char8_t>::lowest().
5071 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
5072 std::numeric_limits<char8_t>::max_digits10.
5073 * testsuite/18_support/type_info/fundamental.cc: Validate
5074 typeinfo for char8_t.
5075 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
5076 std::from_chars with char8_t.
5077 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
5078 Validate explicit instantiation of std::hash<char8_t>.
5079 * testsuite/20_util/is_integral/value.cc: Validate
5080 std::is_integral<char8_t>.
5081 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
5082 Validate std::make_signed<char8_t>.
5083 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
5084 Validate u8string construction from char8_t sources.
5085 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
5086 std::pmr::u8string.
5087 * testsuite/21_strings/basic_string_view/operations/compare/
5088 char/70483.cc: Validate substr operations on u8string_view.
5089 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
5090 the u8string_view typedef is defined.
5091 * testsuite/21_strings/char_traits/requirements/
5092 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
5093 member functions.
5094 * testsuite/21_strings/char_traits/requirements/
5095 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
5096 constexpr member functions.
5097 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
5098 that the u8string typedef is defined.
5099 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
5100 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
5101 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
5102 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
5103 numbers.
5104 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
5105 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
5106 Likewise.
5107 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
5108 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
5109 Validate std::atomic<char8_t>::is_always_lock_free
5110 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
5111 Update line numbers.
5112 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
5113 Likewise.
5114 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
5115 Likewise.
5116 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
5117 Validate std::experimental::pmr::u8string.
5118 * testsuite/experimental/string_view/typedefs.cc: Validate that the
5119 u8string_view typedef is defined.
5120 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
5121 char32_t to the typelists.
5122
5123 2019-02-22 Tom Honermann <tom@honermann.net>
5124
5125 * include/ext/typelist.h: Constrain a partial specialization of
5126 typelist::detail::append_ to only match chain<T1,T2>.
5127
5128 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
5129
5130 PR libstdc++/89416
5131 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
5132 class template with class. Replace move and copy member types with
5133 member alias templates, so they are only instantiated when needed.
5134 (__is_copy_insertable, __is_move_insertable): Adjust base class.
5135 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
5136 test for C++11/14/17 as well.
5137 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
5138 test.
5139
5140 2019-02-20 Jakub Jelinek <jakub@redhat.com>
5141
5142 PR libstdc++/89402
5143 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
5144 _GLIBCXX_PURE to the alias declaration.
5145
5146 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
5147
5148 * testsuite/21_strings/basic_string/literals/types.cc
5149 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
5150 * testsuite/21_strings/basic_string/literals/values.cc
5151 [_GLIBCXX_USE_CHAR8_T]: Likewise.
5152 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
5153 potentially having different type.
5154 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
5155 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
5156 to char.
5157 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
5158 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
5159 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
5160 string literals only using basic character set.
5161 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
5162 u8 literals to char.
5163 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
5164 Test ATOMIC_CHAR8_T_LOCK_FREE.
5165 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
5166 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
5167 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
5168 * testsuite/experimental/string_view/literals/types.cc
5169 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
5170 literal.
5171 * testsuite/experimental/string_view/literals/values.cc
5172 [_GLIBCXX_USE_CHAR8_T]: Likewise.
5173
5174 2019-02-19 Tom Honermann <tom@honermann.net>
5175
5176 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
5177 from char16_32_t.cc; validates numeric_limits<char8_t>.
5178 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
5179 test cloned from types.cc; validates operator""s for char8_t
5180 returns u8string.
5181 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
5182 test cloned from values.cc; validates construction and comparison
5183 of u8string values.
5184 * testsuite/21_strings/basic_string/requirements/
5185 /explicit_instantiation/char8_t/1.cc: New test cloned from
5186 char16_t/1.cc; validates explicit instantiation of
5187 basic_string<char8_t>.
5188 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
5189 New test cloned from types.cc; validates operator""sv for char8_t
5190 returns u8string_view.
5191 * testsuite/21_strings/basic_string_view/literals/
5192 values-char8_t.cc: New test cloned from values.cc; validates
5193 construction and comparison of u8string_view values.
5194 * testsuite/21_strings/basic_string_view/requirements/
5195 explicit_instantiation/char8_t/1.cc: New test cloned from
5196 char16_t/1.cc; validates explicit instantiation of
5197 basic_string_view<char8_t>.
5198 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
5199 New test cloned from char16_t/65049.cc; validates that
5200 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
5201 * testsuite/21_strings/char_traits/requirements/char8_t/
5202 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
5203 that char_traits<char8_t> member typedefs are present and correct.
5204 * testsuite/21_strings/char_traits/requirements/
5205 explicit_instantiation/char8_t/1.cc: New test cloned from
5206 char16_t/1.cc; validates explicit instantiation of
5207 char_traits<char8_t>.
5208 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
5209 from char16_t.cc: validates
5210 codecvt<char16_t, char8_t, mbstate_t>.
5211 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
5212 from char32_t.cc: validates
5213 codecvt<char32_t, char8_t, mbstate_t>.
5214 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
5215 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
5216 codecvt<char32_t, char8_t, std::mbstate_t>.
5217 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
5218 test cloned from string.cc; validates filesystem::path construction
5219 from char8_t input.
5220 * testsuite/experimental/feat-char8_t.cc: New test; validates that
5221 the __cpp_lib_char8_t feature test macro is defined with the
5222 correct value.
5223 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
5224 New test cloned from string.cc; validates filesystem::path
5225 construction from char8_t input.
5226 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
5227 test cloned from types.cc; validates operator""sv for char8_t
5228 returns u8string_view.
5229 * testsuite/experimental/string_view/literals/values-char8_t.cc:
5230 New test cloned from values.cc; validates construction and
5231 comparison of u8string_view values.
5232 * testsuite/experimental/string_view/requirements/
5233 explicit_instantiation/char8_t/1.cc: New test cloned from
5234 char16_t/1.cc; validates explicit instantiation of
5235 basic_string_view<char8_t>.
5236 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
5237 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
5238 enabled.
5239
5240 2019-02-19 Tom Honermann <tom@honermann.net>
5241
5242 P0482R5 char8_t: Standard library support
5243 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
5244 typeinfo symbols for char8_t.
5245 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
5246 (GLIBCXX_3.4.26): Add symbols for specializations of
5247 numeric_limits and codecvt that involve char8_t.
5248 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
5249 * include/bits/atomic_base.h: Add atomic_char8_t.
5250 * include/bits/basic_string.h: Add std::hash<u8string> and
5251 operator""s(const char8_t*, size_t).
5252 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
5253 __cpp_lib_char8_t.
5254 * include/bits/char_traits.h: Add char_traits<char8_t>.
5255 * include/bits/codecvt.h: Add
5256 codecvt<char16_t, char8_t, mbstate_t>,
5257 codecvt<char32_t, char8_t, mbstate_t>,
5258 codecvt_byname<char16_t, char8_t, mbstate_t>, and
5259 codecvt_byname<char32_t, char8_t, mbstate_t>.
5260 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
5261 recognize char8_t as an integral type.
5262 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
5263 char8_t.
5264 (path::u8string): Return std::u8string when char8_t support is
5265 enabled.
5266 (path::generic_u8string): Likewise.
5267 (path::_S_convert): Handle conversion from char8_t input.
5268 (path::_S_str_convert): Likewise.
5269 * include/bits/functional_hash.h: Add hash<char8_t>.
5270 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
5271 char8_t.
5272 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
5273 for new char8_t specializations.
5274 * include/bits/localefwd.h: Add missing declarations of
5275 codecvt<char16_t, char, mbstate_t> and
5276 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
5277 codecvt<char16_t, char8_t, mbstate_t> and
5278 codecvt<char32_t, char8_t, mbstate_t>.
5279 * include/bits/postypes.h: Add u8streampos
5280 * include/bits/stringfwd.h: Add declarations of
5281 char_traits<char8_t> and u8string.
5282 * include/c_global/cstddef: Add __byte_operand<char8_t>.
5283 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
5284 Recognize char8_t.
5285 (path::u8string): Return std::u8string when char8_t support is
5286 enabled.
5287 (path::generic_u8string): Likewise.
5288 (path::_S_convert): Handle conversion from char8_t input.
5289 (path::_S_str_convert): Likewise.
5290 * include/experimental/string: Add u8string.
5291 * include/experimental/string_view: Add u8string_view,
5292 hash<experimental::u8string_view>, and
5293 operator""sv(const char8_t*, size_t).
5294 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
5295 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
5296 as a character type.
5297 * include/std/limits: Add numeric_limits<char8_t>.
5298 * include/std/string_view: Add u8string_view,
5299 hash<experimental::u8string_view>, and
5300 operator""sv(const char8_t*, size_t).
5301 * include/std/type_traits: Add __is_integral_helper<char8_t>,
5302 __make_unsigned<char8_t>, and __make_signed<char8_t>.
5303 * libsupc++/atomic_lockfree_defines.h: Define
5304 ATOMIC_CHAR8_T_LOCK_FREE.
5305 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
5306 codecvt.cc and limits.cc so that char8_t specializations of
5307 numeric_limits and codecvt and emitted.
5308 * src/c++11/Makefile.in: Likewise.
5309 * src/c++11/codecvt.cc: Define members of
5310 codecvt<char16_t, char8_t, mbstate_t>,
5311 codecvt<char32_t, char8_t, mbstate_t>,
5312 codecvt_byname<char16_t, char8_t, mbstate_t>, and
5313 codecvt_byname<char32_t, char8_t, mbstate_t>.
5314 * src/c++11/limits.cc: Define members of
5315 numeric_limits<char8_t>.
5316 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
5317 locale_init.cc and localename.cc.
5318 * src/c++98/Makefile.in: Likewise.
5319 * src/c++98/locale_init.cc: Add initialization for the
5320 codecvt<char16_t, char8_t, mbstate_t> and
5321 codecvt<char32_t, char8_t, mbstate_t> facets.
5322 * src/c++98/localename.cc: Likewise.
5323 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
5324
5325 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
5326
5327 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
5328 * 27_io/filesystem/operations/resize_file.cc: Likewise.
5329 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
5330
5331 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
5332
5333 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
5334 * doc/html/*: Regenerate.
5335
5336 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
5337 * doc/html/*: Regenerate.
5338
5339 * doc/xml/manual/intro.xml: Document LWG 2586 status.
5340 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
5341 allocator type in is_constructible checks.
5342 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
5343 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
5344 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
5345 problematic type from LWG 2586 discussion.
5346 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
5347 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
5348
5349 * configure.ac: Check for C11 timespec_get function.
5350 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
5351 (openbsd): Likewise
5352 * config.h.in: Regenerate.
5353 * configure: Regenerate.
5354 * include/c_global/ctime (timespec, timespec_get): Add to namespace
5355 std for C++17 and up.
5356
5357 * doc/xml/manual/intro.xml: Document LWG 2537 status.
5358 * include/bits/stl_queue.h
5359 (priority_queue(const Compare&, const Container&, const Alloc&))
5360 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
5361 make_heap.
5362 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
5363
5364 * doc/xml/manual/intro.xml: Document LWG 2566 status.
5365 * include/bits/stl_queue.h (queue, priority_queue): Add static
5366 assertions to enforce LWG 2566 requirement on value_type.
5367 * include/bits/stl_stack.h (stack): Likewise.
5368
5369 PR middle-end/89303
5370 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
5371
5372 * doc/xml/manual/intro.xml: Document LWG 2735 status.
5373 * include/bits/std_abs.h: Add comment about LWG 2735.
5374 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
5375
5376 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
5377
5378 PR libstdc++/89345
5379 * include/std/version [__cpp_impl_destroying_delete]
5380 (__cpp_lib_destroying_delete): Only define for C++2a and later.
5381 * libsupc++/new [__cpp_impl_destroying_delete]
5382 (__cpp_lib_destroying_delete): Likewise.
5383 (destroying_delete_t, destroying_delete): Likewise, but define even
5384 when __cpp_impl_destroying_delete is not defined.
5385 * testsuite/18_support/destroying_delete.cc: New test.
5386
5387 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
5388
5389 PR libstdc++/89023
5390 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
5391 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
5392 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
5393 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
5394
5395 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
5396
5397 PR libstdc++/71044
5398 * include/bits/fs_path.h (path::has_root_name)
5399 (path::has_root_directory, path::has_root_path)
5400 (path::has_relative_path, path::has_parent_path)
5401 (path::has_filename, path::has_stem, path::has_extension)
5402 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
5403 noexcept.
5404 * src/c++17/fs_path.cc (path::has_root_name)
5405 (path::has_root_directory, path::has_root_path)
5406 (path::has_relative_path, path::has_parent_path)
5407 (path::has_filename, path::_M_find_extension): Add noexcept.
5408
5409 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
5410
5411 PR libstdc++/89102 (partial)
5412 * include/std/type_traits (common_type<>): Define.
5413 (common_type<T>): Derive from common_type<T, T>.
5414 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
5415 Test zero-length template argument list.
5416 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
5417 Test additional single argument cases.
5418 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
5419 Adjust expected error.
5420
5421 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
5422
5423 PR libstdc++/89128
5424 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
5425 guides.
5426 * include/bits/stl_stack.h (stack): Likewise.
5427 * testsuite/23_containers/priority_queue/deduction.cc: New test.
5428 * testsuite/23_containers/queue/deduction.cc: New test.
5429 * testsuite/23_containers/stack/deduction.cc: New test.
5430
5431 PR libstdc++/89194
5432 * include/std/type_traits (__is_convertible_helper)
5433 (__is_convertible_helper<_From, _To, false>): Revert changes to
5434 support is_nothrow_convertible.
5435 (__is_nt_convertible_helper): New helper.
5436 (is_nothrow_convertible): Use __is_nt_convertible_helper.
5437
5438 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
5439 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
5440
5441 PR libstdc++/89130
5442 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
5443 __is_alloc_insertable_impl. Replace single type member with two
5444 members, one for each of copy and move insertable.
5445 (__is_move_insertable): New trait for internal use.
5446 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
5447 (vector::_S_nothrow_relocate(true_type)): New functions to
5448 conditionally check if __relocate_a can throw.
5449 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
5450 on __is_move_insertable.
5451 (vector::_S_do_relocate): New overloaded functions to conditionally
5452 call __relocate_a.
5453 (vector::_S_relocate): New function that dispatches to _S_do_relocate
5454 based on _S_use_relocate.
5455 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5456 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
5457 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
5458
5459 PR libstdc++/89090
5460 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
5461 parameter unnamed. Add message to static assertion.
5462 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5463 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
5464 in C++11 code.
5465
5466 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
5467
5468 PR libstdc++/87106
5469 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
5470 Rename...
5471 (__is_bitwise_relocatable): ... to this.
5472 (__relocate_a_1): Adapt.
5473 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
5474 (__is_bitwise_relocatable): ... to this.
5475
5476 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
5477
5478 PR libstdc++/89117
5479 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
5480 final component as well as from _M_pathname. Append the dot using
5481 operator+= instead of only to _M_pathname.
5482 (path::_M_find_extension): Reformat slightly.
5483 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5484 Add more test cases.
5485
5486 2019-01-30 Ulrich Drepper <drepper@redhat.com>
5487
5488 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
5489
5490 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
5491
5492 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
5493 constexpr specifiers from arg and proj.
5494
5495 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
5496 __shared_ptr instantiations used by gcc4-compatible ABI.
5497
5498 * include/experimental/forward_list (experimental::erase): Qualify
5499 call to erase_if.
5500 * include/experimental/list (experimental::erase): Likewise.
5501 * include/std/forward_list (std::erase): Likewise.
5502 * include/std/list (std::erase): Likewise.
5503
5504 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
5505 C++2a.
5506 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
5507 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
5508 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
5509 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
5510 * testsuite/ext/array_allocator/26875.cc: Likewise.
5511 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
5512 * testsuite/util/replacement_memory_operators.h: Likewise.
5513 * testsuite/util/testsuite_allocator.h: Likewise.
5514
5515 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
5516 normal mode vector, even for debug mode.
5517 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
5518 Define alias template for normal mode vector.
5519
5520 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
5521
5522 PR libstdc++/68737
5523 * config/locale/generic/c_locale.h (__convert_from_v)
5524 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5525 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5526 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
5527 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5528
5529 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
5530
5531 PR libstdc++/88840
5532 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
5533 data member with static member function _S_use_relocate().
5534 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5535 (vector::_M_default_append): Use _S_use_relocate() instead of
5536 __use_relocate.
5537
5538 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
5539 sign of results.
5540
5541 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
5542
5543 PR libstdc++/88740
5544 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
5545 write to stderr instead of using printf.
5546
5547 2019-01-21 Jakub Jelinek <jakub@redhat.com>
5548
5549 PR libstdc++/86590
5550 * include/bits/char_traits.h (__constant_string_p,
5551 __constant_char_array_p): Use __builtin_is_constant_evaluated if
5552 available.
5553
5554 2019-01-20 Ulrich Drepper <drepper@redhat.com>
5555
5556 Implement C++20 P0600r1.
5557 * include/backward/hash_map: Add nodiscard attribute to empty.
5558 * include/backward/hash_set: Likewise.
5559 * backward/hashtable.h: Likewise.
5560 * include/bits/basic_string.h: Likewise.
5561 * include/bits/forward_list.h: Likewise.
5562 * include/bits/hashtable.h: Likewise.
5563 * include/bits/regex.h: Likewise.
5564 * include/bits/stl_deque.h: Likewise.
5565 * include/bits/stl_list.h: Likewise.
5566 * include/bits/stl_map.h: Likewise.
5567 * include/bits/stl_multimap.h: Likewise.
5568 * include/bits/stl_multiset.h: Likewise.
5569 * include/bits/stl_queue.h: Likewise.
5570 * include/bits/stl_set.h: Likewise.
5571 * include/bits/stl_stack.h: Likewise.
5572 * include/bits/stl_tree.h: Likewise.
5573 * include/bits/stl_vector.h: Likewise.
5574 * include/bits/unordered_map.h: Likewise.
5575 * include/bits/unordered_set.h: Likewise.
5576 * include/debug/array: Likewise.
5577 * include/experimental/any: Likewise.
5578 * include/experimental/bits/fs_path.h: Likewise.
5579 * include/experimental/internet: Likewise.
5580 * include/experimental/string_view: Likewise.
5581 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
5582 Likewise.
5583 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
5584 Likewise.
5585 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
5586 Likewise.
5587 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
5588 Likewise.
5589 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
5590 Likewise.
5591 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
5592 Likewise.
5593 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
5594 Likewise.
5595 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
5596 Likewise.
5597 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5598 info_fn_imps.hpp: Likewise.
5599 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5600 left_child_next_sibling_heap_.hpp: Likewise.
5601 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
5602 Likewise.
5603 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
5604 Likewise.
5605 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
5606 Likewise.
5607 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
5608 Likewise.
5609 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
5610 Likewise.
5611 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
5612 Likewise.
5613 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
5614 Likewise.
5615 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
5616 * include/ext/pb_ds/trie_policy.hpp: Likewise.
5617 * include/ext/rope: Likewise.
5618 * include/ext/slist: Likewise.
5619 * include/ext/vstring.h: Likewise.
5620 * include/profile/array: Likewise.
5621 * include/std/array: Likewise.
5622 * include/tr1/array: Likewise.
5623 * include/tr1/hashtable.h: Likewise.
5624 * include/tr1/regex: Likewise.
5625 * include/tr2/dynamic_bitset: Likewise.
5626 * include/bits/alloc_traits.h: Add nodiscard attribute to
5627 allocate.
5628 * include/experimental/memory_resource: Likewise.
5629 * include/ext/alloc_traits.h: Likewise.
5630 * include/ext/array_allocator.h: Likewise.
5631 * include/ext/bitmap_allocator.h: Likewise.
5632 * include/ext/debug_allocator.h: Likewise.
5633 * include/ext/extptr_allocator.h: Likewise.
5634 * include/ext/mt_allocator.h: Likewise.
5635 * include/ext/new_allocator.h: Likewise.
5636 * include/ext/pool_allocator.h: Likewise.
5637 * include/ext/throw_allocator.h: Likewise.
5638 * include/std/scoped_allocator: Likewise.
5639 * libsupc++/eh_alloc.cc: Likewise.
5640 * include/std/future: Add nodiscard attribute to async.
5641 * libsupc++/new: Add nodiscard attribute to new.
5642
5643 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
5644
5645 PR libstdc++/87514
5646 PR libstdc++/87520
5647 PR libstdc++/88782
5648 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
5649 * include/bits/shared_ptr.h
5650 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
5651 (allocate_shared): Change to use new tag type.
5652 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
5653 Declare new member function.
5654 (_Sp_alloc_shared_tag): Define new type.
5655 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
5656 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
5657 _Sp_make_shared_tag::_S_eq to check type_info.
5658 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
5659 Constrain to prevent being called with _Sp_alloc_shared_tag.
5660 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
5661 Replace constructor with ...
5662 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
5663 reference parameter so address of the new object can be returned to
5664 the caller. Obtain the allocator from the tag type.
5665 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
5666 constructor with ...
5667 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
5668 to the __shared_count constructor.
5669 (__allocate_shared): Change to use new tag type.
5670 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
5671
5672 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
5673
5674 * src/c++17/fs_ops.cc
5675 (equivalent(const path&, const path&, error_code&))
5676 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
5677 compare files instead of relying on incomplete info returned by stat.
5678
5679 PR libstdc++/88884
5680 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
5681 if the path is already absolute.
5682 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
5683 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
5684
5685 PR libstdc++/88881
5686 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
5687 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
5688 of filesystem::exists.
5689 (create_directories(const path&, error_code&)): Add assertions.
5690 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
5691 Add workaround for bug in _wstat for paths with trailing slash.
5692 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
5693 for expected behaviour on mingw.
5694 * testsuite/experimental/filesystem/operations/create_directories.cc:
5695 Likewise.
5696 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
5697 "TMP" instead of "TMPDIR" and clean environment before each test. Do
5698 not test permissions on mingw targets.
5699
5700 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
5701
5702 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
5703 constructors and open members taking wide strings. Fix patterns for
5704 filesystem::path members to match wstring_view parameters. Add
5705 exports for shared_ptr members used by directory iterators.
5706 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
5707 error code parameter if the file doesn't exist.
5708 * src/filesystem/ops.cc (remove(const path&, error_code&)):
5709 Likewise.
5710 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
5711 values for mingw targets, where "/" is not an absolute path. Do not
5712 test symlinks on mingw targets.
5713 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
5714 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
5715 on mingw targets.
5716 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5717 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
5718 that each component of the path is created.
5719 * testsuite/experimental/filesystem/operations/create_directories.cc:
5720 Likewise.
5721 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
5722 permissions on mingw targets.
5723 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
5724 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5725 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
5726 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
5727 mingw targets.
5728 * testsuite/experimental/filesystem/operations/permissions.cc:
5729 Likewise.
5730 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
5731 symlinks or permissions on mingw targets.
5732 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
5733 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
5734 symlinks on mingw targets.
5735 * testsuite/experimental/filesystem/operations/remove_all.cc:
5736 Likewise.
5737 * testsuite/27_io/filesystem/operations/status.cc: Do not test
5738 permissions on mingw targets.
5739 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
5740 test symlinks on mingw targets.
5741 * testsuite/experimental/filesystem/operations/space.cc: Fix test
5742 for mingw targets.
5743
5744 2019-02-14 Ulrich Drepper <drepper@redhat.com>
5745
5746 PR libstdc++/88738
5747 Warn about unused comparisons of shared_ptr/unique_ptr
5748 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
5749 * include/bits/shared_ptr.h: Use it for operator ==, !=,
5750 <, <=, >, >= for shared_ptr.
5751 * include/bits/unique_ptr.h: Likewise for unique_ptr.
5752
5753 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
5754
5755 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
5756 as 201611L, because P0497R0 changes are supported.
5757 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
5758
5759 * include/bits/erase_if.h [__cplusplus > 201703L]
5760 (__cpp_lib_erase_if): Only define for C++2a.
5761 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5762 (__cpp_lib_null_iterators): Define.
5763 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5764 (__cpp_lib_null_iterators): Define.
5765 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
5766
5767 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
5768 status.
5769 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
5770 Define.
5771 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
5772 changes are supported.
5773 * include/std/optional (__cpp_lib_optional): Likewise.
5774 * include/std/variant (__cpp_lib_variant): Likewise.
5775 * include/std/version [!__STRICT_ANSI__]
5776 (__cpp_lib_uncaught_exceptions): Define as long integer.
5777 [__cplusplus >= 201703L] (__cpp_lib_any)
5778 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
5779 (__cpp_lib_variant): Define for C++17.
5780 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
5781 as long integer.
5782 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
5783 integer.
5784
5785 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
5786
5787 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
5788
5789 PR libstdc++/88811
5790 PR libstdc++/83306
5791 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
5792 before second path.
5793 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
5794 test.
5795
5796 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5797
5798 * doc/xml/manual/intro.xml: Include new section.
5799 * doc/xml/manual/status_cxx2017.xml: Document more
5800 implementation-defined properties of the library.
5801 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
5802 * doc/html/*: Regenerate.
5803
5804 * include/bits/refwrap.h [__cplusplus > 201703L]
5805 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
5806 (_Reference_wrapper_base_memfun): Do not define for C++2a.
5807 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
5808 for C++2a.
5809 (reference_wrapper::operator()): Add static assertion.
5810 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
5811
5812 * include/std/chrono (duration_values::zero(), duration_values::min())
5813 (duration_values::max()): Add noexcept.
5814 (duration::zero(), duration::min(), duration::max()): Likewise.
5815 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
5816 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
5817 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
5818
5819 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
5820
5821 2019-01-11 Jakub Jelinek <jakub@redhat.com>
5822
5823 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
5824 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
5825
5826 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5827
5828 PR libstdc++/88802
5829 * include/bits/functional_hash.h (hash<nullptr_t>): Define
5830 specialization for C++17 (P0513R0, LWG 2817).
5831 * testsuite/20_util/hash/nullptr.cc: New test.
5832
5833 PR libstdc++/88125
5834 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
5835 pattern for std::basic_stringbuf::str().
5836
5837 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
5838 basic_ostream::operator<< patterns.
5839
5840 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5841
5842 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
5843 test failures on targets with 32-bit time_t.
5844
5845 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
5846 * include/std/deque: Likewise.
5847 * include/std/forward_list: Likewise.
5848 * include/std/list: Likewise.
5849 * include/std/string: Likewise.
5850 * include/std/vector: Likewise.
5851 * include/std/version: Likewise.
5852 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
5853 * testsuite/23_containers/deque/erasure.cc: Likewise.
5854 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5855 * testsuite/23_containers/list/erasure.cc: Likewise.
5856 * testsuite/23_containers/map/erasure.cc: Likewise.
5857 * testsuite/23_containers/set/erasure.cc: Likewise.
5858 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5859 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5860 * testsuite/23_containers/vector/erasure.cc: Likewise.
5861
5862 * include/experimental/internet [AI_NUMERICSERV]
5863 (resolver_base::numeric_service): Define conditionally.
5864 * testsuite/experimental/net/internet/resolver/base.cc: Test it
5865 conditionally.
5866 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
5867 Likewise.
5868
5869 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
5870 Jonathan Wakely <jwakely@redhat.com>
5871
5872 Implement LWG 2221
5873 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
5874 (GLIBCXX_3.4.26): Add new exports.
5875 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
5876 correct list of sources.
5877 * include/Makefile.in: Regenerate.
5878 * include/std/ostream (operator<<(nullptr_t)): New member function.
5879 * src/c++17/ostream-inst.cc: New file.
5880 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
5881 test.
5882
5883 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5884
5885 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
5886 of the source file containing the caller.
5887 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
5888 directories created by test.
5889 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5890 Likewise.
5891 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
5892 Likewise.
5893 * testsuite/experimental/filesystem/iterators/
5894 recursive_directory_iterator.cc: Likewise.
5895
5896 2019-01-10 Jakub Jelinek <jakub@redhat.com>
5897
5898 PR tree-optimization/88775
5899 * include/bits/stl_function.h (greater<_Tp*>::operator(),
5900 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
5901 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
5902 instead of __builtin_constant_p if available. Don't bother with
5903 the pointer comparison in C++11 and earlier.
5904
5905 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
5906
5907 PR other/16615
5908
5909 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
5910 with "cannot".
5911
5912 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
5913
5914 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
5915 for filesystem::path. Give variables more distinctive names.
5916
5917 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
5918 member function to perform non-trivial assignment.
5919 (_Optional_payload_base::_M_move_assign): Likewise.
5920 (_Optional_payload<T, true, false, true>::operator=)
5921 (_Optional_payload<T, true, true, false>::operator=)
5922 (_Optional_payload<T, true, false, false>::operator=): Call
5923 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
5924
5925 PR libstdc++/88204
5926 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
5927 test std::complex<long double> if long double format is IBM128.
5928 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
5929 Likewise.
5930
5931 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5932
5933 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
5934 for old std::unique_ptr layout.
5935 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
5936 to become valueless. Add filesystem::path tests.
5937
5938 PR libstdc++/87855
5939 * include/std/optional (_Optional_payload_base): New class template
5940 for common code hoisted from _Optional_payload specializations. Use
5941 a template for the union, to allow a partial specialization for
5942 types with non-trivial destructors. Add constructors for in-place
5943 initialization to the union.
5944 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
5945 to perform non-trivial copy construction, instead of relying on
5946 non-standard copy elision in a delegating constructor.
5947 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
5948 non-trivial move construction.
5949 (_Optional_payload): Derive from _Optional_payload_base and use it
5950 for everything except the non-trivial assignment operators, which are
5951 defined as needed.
5952 (_Optional_payload<false, C, M>): Derive from the specialization
5953 _Optional_payload<true, false, false> and add a destructor.
5954 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
5955 Forward to corresponding members of _Optional_payload.
5956 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
5957 Hoist common members from _Optional_base.
5958 (_Optional_base): Make all members and base class public.
5959 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
5960 _Optional_base_impl.
5961 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
5962 support for new std::optional layout.
5963 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
5964
5965 PR libstdc++/88066
5966 * include/bits/locale_conv.h: Use <> for includes not "".
5967 * include/ext/random: Likewise.
5968 * include/ext/vstring.h: Likewise.
5969
5970 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5971
5972 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
5973 (GLIBCXX_3.4.21): Likewise.
5974
5975 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5976
5977 PR libstdc++/88749
5978 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
5979 to match the one that controls whether utimbuf and utime are declared.
5980
5981 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
5982
5983 PR libstdc++/87787
5984 * include/bits/char_traits.h (char_traits::move): Do not pass null
5985 pointers to memmove.
5986 * include/bits/locale_facets.h
5987 (ctype<char>::widen(const char*, const char*, char*)): Do not
5988 pass null pointers to memcpy.
5989 (ctype<char>::narrow(const char*, const char*, char, char*)):
5990 Likewise.
5991 (ctype<char>::do_widen(const char*, const char*, char*)):
5992 Likewise.
5993 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
5994 Likewise.
5995
5996 * doc/xml/manual/spine.xml: Update copyright years.
5997 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
5998 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
5999 for C++17 filesystem library.
6000 * doc/html/*: Regenerate.
6001
6002 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
6003 * config.h.in: Regenerate.
6004 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
6005 alphabetically and add missing entries for copy_symlink,
6006 hard_link_count, rename, and resize_file.
6007 * configure: Regenerate.
6008 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
6009 used unconditionally.
6010 * src/filesystem/ops-common.h (__gnu_posix::truncate)
6011 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
6012 supports truncating to zero length.
6013 * testsuite/27_io/filesystem/operations/all.cc: New test.
6014 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
6015
6016 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
6017
6018 PR libstdc++/86756
6019 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
6020 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
6021 * config.h.in: Regenerate.
6022 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
6023 remaining std::filesystem types and functions.
6024 * configure: Regenerate.
6025 * src/c++17/Makefile.am: Add C++17 filesystem sources.
6026 * src/c++17/Makefile.in: Regenerate.
6027 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
6028 here, and change name of included file.
6029 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
6030 here, and change name of included file.
6031 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
6032 path to dir-common.h.
6033 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
6034 path to ops-common.h. Disable -Wunused-parameter warnings.
6035 (internal_file_clock): Define unconditionally.
6036 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
6037 define.
6038 (do_copy_file, do_space): Move definitions to ops.common.h.
6039 (copy, file_size, hard_link_count, last_write_time, space): Only
6040 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
6041 report an error.
6042 (last_write_time, read_symlink): Remove unused attributes from
6043 parameters.
6044 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
6045 * src/filesystem/Makefile.in: Regenerate.
6046 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
6047 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
6048 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
6049 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
6050 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
6051 dummy types and functions instead of using #error.
6052 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
6053 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
6054 in terms of stat.
6055 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
6056 (do_copy_file, do_space): Move definitions here from std-ops.cc.
6057 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
6058 to account for new namespace.
6059 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
6060 -lstdc++fs from dg-options.
6061 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
6062 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
6063 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
6064 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
6065 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
6066 Likewise.
6067 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
6068 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
6069 Likewise.
6070 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
6071 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
6072 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
6073 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
6074 * testsuite/27_io/filesystem/operations/create_directories.cc:
6075 Likewise.
6076 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
6077 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
6078 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
6079 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
6080 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
6081 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
6082 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
6083 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
6084 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
6085 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
6086 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
6087 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
6088 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
6089 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
6090 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
6091 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
6092 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
6093 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
6094 Likewise.
6095 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
6096
6097
6098 PR libstdc++/86756
6099 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
6100 typeinfo and vtables less greedy.
6101 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
6102 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
6103 * src/c++17/Makefile.in: Regenerate.
6104 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
6105 here, and change name of included file.
6106 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
6107 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
6108 from sources.
6109 * src/filesystem/Makefile.in: Regenerate.
6110 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
6111 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
6112 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
6113 from dg-options and remove dg-require-filesystem-ts.
6114 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
6115 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
6116 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
6117 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
6118 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
6119 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
6120 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
6121 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
6122 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
6123 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
6124 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
6125 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
6126 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
6127 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
6128 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
6129 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
6130 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
6131 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
6132 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
6133 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
6134 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
6135 Likewise.
6136 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
6137 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
6138 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
6139 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
6140 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
6141 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
6142 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
6143 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
6144 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
6145 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
6146 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
6147 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
6148 Likewise.
6149 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
6150 Likewise.
6151 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
6152 Likewise.
6153 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
6154 Likewise.
6155 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
6156 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
6157 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
6158 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
6159 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
6160 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
6161 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
6162 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
6163 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
6164 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
6165 Likewise.
6166 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
6167 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
6168 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
6169 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
6170 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
6171
6172 PR libstdc++/87431
6173 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
6174 Check is_trivially_copyable instead of is_scalar.
6175 (variant::emplace<N, Args>(Args&&...)): If construction of the new
6176 contained value can throw and its type is trivially copyable then
6177 construct into a temporary variant and move from it, to provide the
6178 strong exception safety guarantee.
6179 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
6180 Likewise.
6181 * testsuite/20_util/variant/87431.cc: New test.
6182 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
6183 conversion causes valueless state.
6184
6185 PR libstdc++/88607
6186 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
6187 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
6188 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
6189 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
6190 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
6191
6192 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
6193
6194 * include/bits/fs_fwd.h (__file_clock): Define new clock.
6195 (file_time_type): Redefine in terms of __file_clock.
6196 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
6197 overflow.
6198 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
6199 internal linkage.
6200 (internal_file_lock): New helper type for accessing __file_clock.
6201 (do_copy_file): Use internal_file_lock to convert system time to
6202 file_time_type.
6203 (last_write_time(const path&, error_code&)): Likewise.
6204 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
6205
6206 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
6207
6208 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
6209 for const member functions of std::basic_string.
6210 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
6211 in C++17.
6212 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
6213 Make non-standard constructor private.
6214 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
6215 Likewise.
6216 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
6217 explicit instantiations for C++17 as well as earlier dialects.
6218 * src/c++17/Makefile.am: Add new source files.
6219 * src/c++17/Makefile.in: Regenerate.
6220 * src/c++17/cow-string-inst.cc: New file defining explicit
6221 instantiations for basic_string member functions added in C++17.
6222 * src/c++17/string-inst.cc: Likewise.
6223
6224 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
6225 copy/move constructors for old std::basic_string.
6226 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
6227 (basic_string::reference, basic_string::const_reference): Define
6228 as plain references for C++11 and later.
6229 (basic_string::basic_string()): Put constructor body outside
6230 preprocessor conditional groups.
6231 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
6232 instead of copying it.
6233 (basic_string::basic_string(const basic_string&, const _Alloc&)):
6234 Define.
6235 (basic_string::basic_string(basic_string&&, const _Alloc&)):
6236 Define.
6237 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
6238 cases for old basic_string.
6239 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
6240 allocator-extended constructors unconditionally. Add extra members to
6241 allocator type when using old string ABI.
6242 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
6243 for old string ABI.
6244 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
6245
6246 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
6247 -fno-inline added to test flags.
6248
6249 * testsuite/21_strings/basic_string/requirements/
6250 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
6251
6252 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
6253 assertion failures with old std::string ABI.
6254
6255 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
6256 with ...
6257 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
6258 functions that will only erase elements at the end.
6259 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
6260 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
6261 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
6262 of erase(p, end()).
6263 (path::_List::pop_back()): Define.
6264 (path::_List::_M_erase_from(const_iterator)): Define.
6265 (path::operator/=(const path&)): Use pop_back to remove last component
6266 and _M_erase_from to remove multiple components.
6267 (path::_M_append(basic_string_view<value_type>)): Likewise.
6268 (path::operator+=(const path&)): Likewise.
6269 (path::_M_concat(basic_string_view<value_type>)): Likewise.
6270 (path::remove_filename()): Likewise.
6271 (path::lexically_normal()): Use _List::_Impl iterators instead of
6272 path::iterator. Use pop_back to remove components from the end. Clear
6273 trailing filename, instead of using erase(const_iterator) to remove
6274 a non-final component.
6275 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
6276 additional cases.
6277 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
6278
6279 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
6280 incorrect treatment of empty filename after trailing slash.
6281 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
6282
6283 * testsuite/21_strings/basic_string/modifiers/assign/char/
6284 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
6285 to test flags.
6286 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
6287 move_assign_optim.cc: Likewise.
6288
6289 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
6290 Jakub Jelinek <jakub@redhat.com>
6291
6292 PR libstdc++/88607
6293 * include/experimental/memory: Replace UTF-8 quote characters.
6294 * include/std/future: Replace UTF-8 "em dash" characters.
6295
6296 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
6297
6298 PR libstdc++/88607
6299 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
6300 * include/debug/forward_list: Likewise.
6301 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
6302 character.
6303 * include/experimental/chrono: Likewise.
6304 * include/experimental/functional: Likewise.
6305 * include/experimental/ratio: Likewise.
6306 * include/experimental/system_error: Likewise.
6307 * include/experimental/tuple: Likewise.
6308 * include/experimental/type_traits: Likewise.
6309 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
6310 * include/parallel/multiseq_selection.h: Likewise.
6311
6312 PR libstdc++/88681
6313 * config/abi/pre/gnu.ver: Add missing exports.
6314 * testsuite/22_locale/collate_byname/88681.cc: New test.
6315 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
6316 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
6317
6318 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
6319
6320 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
6321 initializer_list<value_type> and from input iterator ranges.
6322 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
6323
6324 * testsuite/experimental/string_view/element_access/char/empty.cc:
6325 Fix year range in copyright header.
6326
6327 2019-01-02 Joel Brobecker <brobecker@adacore.com>
6328
6329 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
6330 Fix year range in copyright header.
6331
6332 2019-01-01 Jakub Jelinek <jakub@redhat.com>
6333
6334 Update copyright years.
6335 \f
6336 Copyright (C) 2019 Free Software Foundation, Inc.
6337
6338 Copying and distribution of this file, with or without modification,
6339 are permitted in any medium without royalty provided the copyright
6340 notice and this notice are preserved.