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