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