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