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