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