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