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