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