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