Use __restrict for __relocate_object_a
[official-gcc.git] / libstdc++-v3 / ChangeLog
blob606244f331c633d98790837bdd72888e417ff1ca
1 2019-04-27  Marc Glisse  <marc.glisse@inria.fr>
3         PR libstdc++/87106
4         * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
5         arguments with __restrict.
7 2019-04-26  H.J. Lu  <hongjiu.lu@intel.com>
9         * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
11 2019-04-26  Jonathan Wakely  <jwakely@redhat.com>
13         * include/experimental/bits/fs_path.h
14         (path::_S_convert_loc<_InputIterator>): Create const std::string to
15         avoid redundant call to _S_convert_loc with non-const pointers.
17         * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
18         hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
19         * testsuite/21_strings/basic_string/hash/hash.cc
20         [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
21         * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
22         [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
24         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
25         wstring::_M_replace_dispatch with more specific patterns.
26         * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
27         Create const std::string to avoid redundant call to _S_convert_loc
28         with non-const pointers.
29         * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
30         avoid unnecessary basic_string::assign instantiations.
32         * include/std/memory (__uses_alloc_args): Add string-literal to
33         static_assert, to match the one in __uses_alloc.
34         [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
35         * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
36         for recursive uses-allocator construction of nested pairs.
37         * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
38         comment.
40 2019-04-26  Jakub Jelinek  <jakub@redhat.com>
42         * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
43         * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
44         * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
45         * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
47         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
48         * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
49         * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
50         * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
51         * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
52         * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
53         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
55 2019-04-25  Jonathan Wakely  <jwakely@redhat.com>
57         PR libstdc++/90239
58         * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
59         * include/std/scoped_allocator [__cplusplus > 201703L]
60         (scoped_allocator_adaptor::construct): Define in terms of
61         uses_allocator_construction_args, as per P0591R4.
62         * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
63         * testsuite/util/testsuite_allocator.h: Remove name of unused
64         parameter.
66 2019-04-24  Jonathan Wakely  <jwakely@redhat.com>
68         * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
69         * doc/html/*: Regenerate.
71         * include/bits/fs_path.h (operator<, operator<=, operator>)
72         (operator>=, operator==, operator!=): Make hidden friends, as per
73         LWG 3065.
74         * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
75         string type in test.
76         * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
78         * include/std/any (any::any(ValueType&&)): Use __and_v.
79         * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
80         Likewise.
82         * include/std/tuple (apply): Use remove_reference_t instead of decay_t
83         as per P0777R1.
84         * include/std/type_traits (__result_of_memfun): Use remove_reference
85         instead of __remove_cvref_t and remove redundant is_same check.
86         (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
88         * include/experimental/string_view (basic_string_view::pointer)
89         (basic_string_view::reference): Fix to refer to non-const value_type.
90         * include/bits/basic_string.h (basic_string): Use __sv_check and
91         __sv_limit instead of basic_string_view::_M_check and
92         basic_string_view::_M_limit.
93         * include/std/string_view (__sv_check, __sv_limit): New
94         helper functions to replace basic_string_view::_M_check and
95         basic_string_view::_M_limit.
96         (basic_string_view): Add static assertions to enforce ill-formed
97         requirement for traits_type::char_type from P1148R0, and to enforce
98         required properties of char-like types.
99         (basic_string_view::pointer, basic_string_view::reference): Fix to
100         refer to non-const value_type.
101         (basic_string_view::operator[], basic_string_view::at)
102         (basic_string_view::front, basic_string_view::back)
103         (basic_string_view::data): Use const_reference and const_pointer
104         typedefs for return types.
105         (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
106         (hash<wstring_view>): Fix argument_type typedef.
107         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
108         char/1.cc: Fix expected return type of basic_string_view::data().
109         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
110         wchar_t/1.cc: Likewise.
111         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
112         char/1.cc: Likewise.
113         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
114         wchar_t/1.cc: Likewise.
115         * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
116         New test.
117         * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
118         Check reference and pointer typedefs.
119         * testsuite/experimental/string_view/requirements/typedefs.cc:
120         Likewise.
121         * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
122         Fix expected return type of basic_string_view::data().
123         * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
124         1.cc: Likewise.
125         * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
126         Likewise.
127         * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
128         1.cc: Likewise.
130         PR libstdc++/90220
131         * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
132         Avoid a runtime check for types that can never be stored in std::any.
133         * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
134         array types.
136         PR libstdc++/90220 (partial)
137         * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
138         not attempt ill-formed static_cast to pointers to non-object types.
139         * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
140         function types.
142         * testsuite/20_util/variant/run.cc: Catch exception by reference to
143         prevent -Wcatch-value warning.
145         * include/std/variant (__variant_construct): Use template parameter
146         type instead of equivalent decltype-specifier.
147         (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
148         Replace forward with move.
149         (_Move_ctor_base<false, Types...>::_M_destructive_move)
150         (_Move_ctor_base<false, Types...>::_M_destructive_copy)
151         (_Move_ctor_base<true, Types...>::_M_destructive_move)
152         (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
153         index after construction succeeds.
154         (_Copy_assign_base<false, Types...>::operator=): Remove redundant
155         if-constexpr checks that are always true. Use __remove_cvref_t instead
156         of remove_reference so that is_nothrow_move_constructible check
157         doesn't use a const rvalue parameter. In the potentially-throwing case
158         construct a temporary and move assign it, as per LWG 2904.
159         (_Move_assign_base<false, Types...>::operator=): Remove redundant
160         if-constexpr checks that are always true. Use emplace as per LWG 2904.
161         (variant::operator=(T&&)): Only use emplace conditionally, otherwise
162         construct a temporary and move assign from it, as per LWG 2904.
163         * testsuite/20_util/variant/exception_safety.cc: Check that
164         assignment operators have strong exception safety guarantee.
166 2019-04-23  Thomas Rodgers <trodgers@redhat.com>
168         Document PSTL linker flags
170         * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
171         
172 2019-04-23  Jonathan Wakely  <jwakely@redhat.com>
174         * include/std/variant (__detail::__variant::_Traits): Make
175         _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
176         _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
177         P0602R4.
178         (__detail::__variant::_Copy_assign_alias): Only depend on
179         _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
180         * testsuite/20_util/variant/compile.cc: Correct checks for trivial
181         move assignment operators.
183         PR libstdc++/90165
184         * include/std/variant (variant::__not_self): New helper for the
185         is_same_v<remove_cvref_t<T>, variant>==false constraints.
186         (variant::__to_type_impl): Remove.
187         (variant::__to_type): Add default argument to check pack size, instead
188         of using __to_type_impl.
189         (variant::__accepted_type): Add default argument using __not_self.
190         (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
191         for variant(T&&) constructor constraint.
192         (variant::variant(T&&)): Use __not_in_place_tag in constraints.
193         Extract __accepted_type into a named template parameter for reuse in
194         other constraints and in the exception specification.
195         (variant::variant(in_place_type_t<T>, Args&&...))
196         (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
197         (variant::variant(in_place_index_t<T>, Args&&...))
198         (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
199         (variant::operator=T&&)): Remove redundant && from trait arguments.
200         * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
201         isn't used for in_place_type or in_place_index arguments.
203         * include/std/type_traits (unwrap_reference_t): Define for C++2a.
204         (unwrap_ref_decay): Remove inheritance from unwrap_reference.
205         * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
207 2019-04-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
208             Bernd Edlinger  <bernd.edlinger@hotmail.de>
209             Jakub Jelinek  <jakub@redhat.com>
211         PR target/89093
212         * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
213         general-regs-only target attribute for ARM.
215 2019-04-23  Jonathan Wakely  <jwakely@redhat.com>
217         PR libstdc++/87431
218         * include/bits/basic_string.h (_Never_valueless_alt): Make partial
219         specialization also depend on is_nothrow_move_constructible.
220         * include/std/variant (__detail::__variant::__never_valueless()):
221         Only true if the variant would have a move assignment operator.
222         (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
223         Check __never_valueless<T...>().
224         (variant::emplace): Only perform non-throwing move assignments
225         for never-valueless alternatives if the variant has a move assignment
226         operator.
227         * testsuite/20_util/variant/compile.cc: Check that never-valueless
228         types can be emplaced into non-assignable variants.
229         * testsuite/20_util/variant/run.cc: Check that never-valueless types
230         don't get copied when emplaced into non-assignable variants.
232         * include/std/variant (__detail::__variant::__ref_cast): Remove
233         unused function.
234         (__detail::__variant::_Uninitialized::_M_get)
235         (__detail::__variant::__get)
236         (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
238 2019-04-21  Iain Sandoe  <iain@sandoe.co.uk>
240         * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
241         to Darwin10.
242         * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
243         * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
244         * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
245         * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
247 2019-04-20  Thomas Rodgers <trodgers@redhat.com>
249         Delegate PSTL configuration to pstl/pstl_config.h
251         * include/bits/c++config: Remove explicit PSTL configuration
252         macros and use definitions from <pstl/pstl_config.h>.
253         
254 2019-04-20  Thomas Rodgers <trodgers@redhat.com>
256         Cleanup algorithm implementations
257         * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
258         execution policy.
259         (mismatch): Forward execution policy.
260         (equal): Qualify call to std::equal().
261         (partial_sort): Forward execution policy.
262         (inplace_merge): Forward execution policy.
263         
264 2019-04-19  Thomas Rodgers <trodgers@redhat.com>
265         
266         Improve implementation of parallel equal()
267         * include/pstl/algorithm_impl.h
268         (__internal::__brick_equal): use "4 iterator" version of
269         std::equal().
270         (__internal::__brick_equal): use simd for random access
271         iterators on unsequenced execution policies.
272         (__internal::__pattern_equal): add "4 iterator" version
273         (__internal::__pattern_equal): dispatch to simd __brick_equal
274         for vector-only execution policies.
275         (__internal::__pattern_equal): dispatch to __parallel_or for
276         parallel execution policies.
277         * include/pstl/glue_algorithm_impl.h
278         (std::equal): dispatch to "4 iterator" version of
279         __internal::__pattern_equal().
280         
281 2019-04-17  Jonathan Wakely  <jwakely@redhat.com>
283         PR libstdc++/90105
284         * include/bits/forward_list.h (operator==): Do not use operator!= to
285         compare elements.
286         (forward_list<T, A>::sort(Comp)): When elements are equal take the one
287         earlier in the list, so that sort is stable.
288         * testsuite/23_containers/forward_list/operations/90105.cc: New test.
289         * testsuite/23_containers/forward_list/comparable.cc: Test with
290         types that meet the minimum EqualityComparable and LessThanComparable
291         requirements. Remove irrelevant comment.
293         * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
294         Do not depend on whether all alternative types are move constructible.
295         (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
296         from the operand when deciding whether to perform the assignment.
297         * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
298         with deleted move constructor and deleted move assignment operator.
299         (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
300         behaviour of variants with DeletedMoves as an alternative.
301         * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
302         (move_ctor, move_assign): Check that moving a variant with a
303         DeletedMoves alternative falls back to copying instead of moving.
305         * testsuite/20_util/variant/compile.cc: Remove empty string literals
306         from static_assert declarations.
308         * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
309         actually match its name.
310         (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
311         (test_swap()): Fix result for MoveCtorOnly and check
312         MoveCtorAndSwapOnly.
314         * include/std/optional (optional::value_or(U&&) &&): Add missing
315         constexpr specifier.
316         * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
317         for disengaged optionals and rvalue optionals.
318         * testsuite/20_util/optional/observers/4.cc: Likewise.
320 2019-04-12  Thomas Rodgers  <trodgers@redhat.com>
321         
322         * include/pstl/algorithm_impl.h: Uglify identfiers.
323         * include/pstl/numeric_impl.h:  Uglify identfiers.
324         * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
326 2019-04-11  Thomas Rodgers  <trodgers@redhat.com>
328         * include/bits/c++config:
329         Add definition for __PSTL_ASSERT.
330         Add definition for __PSTL_ASSERT_MSG.
331         * include/pstl/algorithm_impl.h: Replace use of assert().
332         * include/pstl/numeric_impl.h: Replace use of assert().
333         * include/pstl/parallel_backend_tbb.h:
334         Replace use of assert().
335         Replace use of __TBB_ASSERT().
336         * include/pstl/parallel_backend_utils.h: Replace use of assert().
338 2019-04-11  Jonathan Wakely  <jwakely@redhat.com>
340         PR libstdc++/90046
341         * src/c++17/memory_resource.cc
342         (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
343         needed to allow placing a _Chunk at the end of the buffer.
344         (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
346 2019-04-10  Jonathan Wakely  <jwakely@redhat.com>
348         * doc/xml/faq.xml: Add information about emergency EH pool.
349         * doc/xml/manual/debug.xml: Update list of memory debugging tools.
350         Move outdated information on mt_allocator to a separate section.
351         * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
352         doesn't affect the default allocator.
354         * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
355         typo.
357         PR libstdc++/89851
358         * testsuite/20_util/variant/89851.cc: New test.
360 2019-04-09  Jonathan Wakely  <jwakely@redhat.com>
362         * include/std/variant: Adjust whitespace. Add comments.
363         (_Multi_array): Leave primary template undefined.
364         (_Multi_array<_Tp>): Define partial specialization for base case of
365         recursion.
366         (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
367         which is always a reference.
368         (__gen_vtable::_S_apply()): Remove function, inline body into
369         default member initializer.
370         * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
372         * include/std/variant (__variant_idx_cookie): Add member type.
373         (__visitor_result_type): Remove.
374         (__do_visit): Use invoke_result instead of __visitor_result_type.
375         * testsuite/20_util/variant/visit.cc: New test.
377         PR libstdc++/90008
378         * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
379         unused capture.
380         * testsuite/20_util/variant/90008.cc: New test.
382 2019-04-09  Thomas Rodgers  <trodgers@redhat.com>
384         * include/pstl/algorithm_impl.h: Add namespace qualification.
385         * include/pstl/execution_defs.h: Add namespace qualification.
386         * include/pstl/execution_impl.h: Add namespace qualification.
387         * include/pstl/numeric_impl.h: Add namespace qualification.
388         * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
389         * include/pstl/unseq_backend_simd.h: Add namespace qualification.
390         * include/pstl/parallel_backend_utils.h: Include <cassert>.
392 2019-04-08  Ville Voutilainen  <ville.voutilainen@gmail.com>
394         Fix visit<R> for variant.
395         * include/std/variant (__do_visit): Add a template parameter
396         for enforcing same return types for visit.
397         (__gen_vtable_impl): Likewise.
398         (_S_apply_single_alt): Adjust.
399         (__visit_invoke_impl): New. Handle casting to void.
400         (__do_visit_invoke): New. Enforces same return types.
401         (__do_visit_invoke_r): New. Converts return types.
402         (__visit_invoke): Adjust.
403         (__gen_vtable):  Add a template parameter for enforcing
404         same return types for visit.
405         * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
406         different return types.
407         * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
408         visitors with different return types don't accidentally
409         compile with regular visitation.
411 2019-04-08  Christophe Lyon  <christophe.lyon@linaro.org>
413         * testsuite/27_io/filesystem/iterators/caching.cc: Add
414         dg-require-filesystem-ts.
416 2019-04-05  Jonathan Wakely  <jwakely@redhat.com>
418         * doc/xml/manual/status_cxx2020.xml: Update status.
419         * include/std/variant (visit<R>): Define for C++2a (P0655R1).
420         * testsuite/20_util/variant/visit_r.cc: New test.
422         * include/bits/fs_dir.h (directory_iterator::operator*)
423         (directory_iterator::operator->): Add noexcept.
424         (operator==, operator!=): Replace namespace-scope equality operators
425         for directory iterators with hidden friends.
427         PR libstdc++/89986
428         * config/abi/pre/gnu.ver: Add missing exports.
429         * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
430         increment member.
432         * config/abi/pre/gnu.ver: Export new symbols.
433         * include/bits/fs_dir.h (recursive_directory_iterator::options())
434         (recursive_directory_iterator::recursion_pending())
435         (recursive_directory_iterator::disable_recursion_pending()): Remove
436         inline definitions. Make noexcept.
437         (recursive_directory_iterator::depth())
438         (recursive_directory_iterator::operator*())
439         (recursive_directory_iterator::operator->()): Make noexcept.
440         (recursive_directory_iterator::_M_options)
441         (recursive_directory_iterator::_M_pending): Remove data members.
442         * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
443         (recursive_directory_iterator::recursive_directory_iterator): Remove
444         ctor-initializer. Use new constructor for _Dir_stack.
445         (recursive_directory_iterator::options())
446         (recursive_directory_iterator::recursion_pending())
447         (recursive_directory_iterator::disable_recursion_pending()): Add
448         non-inline definitions.
449         (recursive_directory_iterator::depth()): Make noexcept.
450         (recursive_directory_iterator::increment(error_code&))
451         (recursive_directory_iterator::pop(error_code&)): Adjust to new
452         location of options and recursion_pending members.
453         * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
454         * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
455         user-declared move constructor and assignment operator, to make the
456         type move-only.
458         * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
459         d_type == DT_UNKNOWN immediately.
460         (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
461         handling here.
462         * testsuite/27_io/filesystem/iterators/caching.cc: New test.
464         * include/bits/fs_path.h (path::operator=(path&&)): Check for self
465         assignment.
466         * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
467         * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
468         assignment.
470         PR libstdc++/87431 (again)
471         * include/bits/basic_string.h (__variant::_Never_valueless_alt):
472         Define partial specialization for basic_string.
473         * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
474         shared_ptr and weak_ptr.
475         * include/bits/std_function.h (_Never_valueless_alt): Likewise for
476         function.
477         * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
478         vector.
479         * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
480         unique_ptr.
481         * include/debug/vector (_Never_valueless_alt): Likewise for debug
482         vector.
483         * include/std/any (_Never_valueless_alt): Define explicit
484         specialization for any.
485         * include/std/variant (_Never_valueless_alt): Define primary template.
486         (__never_valueless): Use _Never_valueless_alt instead of
487         is_trivially_copyable.
488         (variant::emplace<N>(Args&&...)): Add special case for non-throwing
489         initializations to avoid try-catch overhead. Add special case for
490         scalars produced by potentially-throwing conversions. Use
491         _Never_valueless_alt instead of is_trivially_copyable for the
492         remaining strong exception-safety cases.
493         (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
494         * testsuite/20_util/variant/87431.cc: Run both test functions.
495         * testsuite/20_util/variant/exception_safety.cc: New test.
496         * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
497         so the variant becomes valueless.
499 2019-04-03  Jonathan Wakely  <jwakely@redhat.com>
501         PR libstdc++/85184
502         * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
503         Remove assertions.
504         (variant::emplace<_Tp>): Return result of emplace<N> directly.
506         * include/std/string (__hash_string_base): New class template defining
507         operator() for hashing strings.
508         (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
509         (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
510         * testsuite/21_strings/basic_string/hash/hash.cc: New test.
511         * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
513 2019-04-01  Ville Voutilainen  <ville.voutilainen@gmail.com>
515         Use single-visitation in variant assignment and swap and relops.
516         Also use indices instead of types when checking whether
517         variants hold the same thing.
518         * include/std/variant (__do_visit): Add a template parameter
519         for index visitation, invoke with indices if index visitation
520         is used.
521         (__variant_idx_cookie): New.
522         (__visit_with_index): Likewise.
523         (_Copy_assign_base::operator=): Do single-visitation with
524         an index visitor.
525         (_Move_assign_base::operator=): Likewise.
526         (_Extra_visit_slot_needed): Adjust.
527         (__visit_invoke): Call with indices if it's an index visitor.
528         (relops): Do single-visitation with an index visitor.
529         (swap): Likewise.
530         (__visitor_result_type): New.
532 2019-03-30  Eric Botcazou  <ebotcazou@adacore.com>
534         * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
536 2019-03-28  Ville Voutilainen  <ville.voutilainen@gmail.com>
538         Don't revisit a variant we are already visiting.
539         * include/std/variant (__variant_construct_single): New.
540         (__variant_construct): Use it.
541         (_M_destructive_move): Likewise.
542         (_M_destructive_copy): Likewise.
543         (_Copy_assign_base::operator=): Adjust.
544         (_Move_assign_base::operator=): Likewise.
545         (swap): Likewise.
547 2019-03-26  Jonathan Wakely  <jwakely@redhat.com>
549         PR libstdc++/85965
550         * include/bits/hashtable.h (_Hashtable): Move static assertions to
551         destructor so they are not evaluated until the _Key type is complete.
552         * include/bits/stl_tree.h (_Rb_tree): Likewise.
553         * testsuite/23_containers/set/85965.cc: New test.
554         * testsuite/23_containers/unordered_set/85965.cc: New test.
555         * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
556         with regexp matching the corresponding _Rb_tree specialization.
557         * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
558         * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
559         * testsuite/23_containers/set/48101_neg.cc: Likewise.
560         * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
561         * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
562         * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
563         * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
565 2019-03-26  Ville Voutilainen  <ville.voutilainen@gmail.com>
567         PR libstdc++/89825
568         Fix based on a suggestion by Antony Polukhin.
569         * include/std/variant (__never_valueless): New.
570         (_M_valid): Use it.
571         (_Extra_visit_slot_needed): New.
572         (_Multi_array): Use it.
573         (_S_apply_all_alts): Likewise.
575 2019-03-26  Ville Voutilainen  <ville.voutilainen@gmail.com>
577         PR libstdc++/89824
578         Fix based on a suggestion by Antony Polukhin.
579         * include/std/variant (__gen_vtable): Don't reserve an
580         additional table slot, _Multi_array already does that.
582 2019-03-26  Ville Voutilainen  <ville.voutilainen@gmail.com>
584         PR libstdc++/89816
585         Fix based on a suggestion by Antony Polukhin.
586         * include/std/variant (__variant_construct): Capture a pointer
587         to the storage and visit just one variant.
589 2019-03-22  Jonathan Wakely  <jwakely@redhat.com>
591         * doc/xml/manual/backwards_compatibility.xml: Remove link to
592         Doxygen-generated pages with unstable URL.
593         * doc/xml/manual/concurrency_extensions.xml: Likewise.
594         * doc/xml/manual/extensions.xml: Likewise.
595         * doc/xml/manual/parallel_mode.xml: Likewise.
596         * doc/xml/manual/support.xml: Likewise.
598         * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
599         avoid -Wconversion warnings.
601 2019-03-21  Thomas Rodgers  <trodgers@redhat.com>
602         
603         * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
604         (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
605         (allstamped): Add stamp-pstl.
606         (install-headers): Add ptsl_builddir.
607         * include/Makefile.in: Regenerate.
608         * include/bits/c++config: Add pstl configuration.
609         * include/pstl/LICENSE.txt: New file.
610         * include/pstl/algorithm_fwd.h: New file.
611         * include/pstl/algorithm_impl.h: New file.
612         * include/pstl/execution_defs.h: New file.
613         * include/pstl/execution_impl.h: New file.
614         * include/pstl/glue_algorithm_defs.h: New file.
615         * include/pstl/glue_algorithm_impl.h: New file.
616         * include/pstl/glue_execution_defs.h: New file.
617         * include/pstl/glue_memory_defs.h: New file.
618         * include/pstl/glue_memory_impl.h: New file.
619         * include/pstl/glue_numeric_defs.h: New file.
620         * include/pstl/glue_numeric_impl.h: New file.
621         * include/pstl/memory_impl.h: New file.
622         * include/pstl/numeric_fwd.h: New file.
623         * include/pstl/numeric_impl.h: New file.
624         * include/pstl/parallel_backend.h: New file.
625         * include/pstl/parallel_backend_tbb.h: New file.
626         * include/pstl/parallel_backend_utils.h: New file.
627         * include/pstl/parallel_impl.h: New file.
628         * include/pstl/pstl_config.h: New file.
629         * include/pstl/unseq_backend_simd.h: New file.
630         * include/pstl/utils.h: New file.
631         * include/std/algorithm: Include parallel algorithm implementations.
632         * include/std/execution: New file.
633         * include/std/memory: Include parallel algorithm implementations.
634         * include/std/numeric: Include parallel algorithm implementations.
635         * include/std/version: Add parallel algorithms feature test macro.
636         * testsuite/util/pstl/pstl_test_config.h: New file.
637         * testsuite/util/pstl/test_utils.h: New file.
638         * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
639         * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
640         * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
641         * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
642         * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
643         * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
644         * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
645         * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
646         * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
647         * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
648         * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
649         * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
650         * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
651         * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
652         * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
653         * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
654         * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
655         * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
656         * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
657         * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
658         * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
659         * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
660         * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
661         * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
662         * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
663         * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
664         * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
665         * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
666         * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
667         * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
668         * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
669         * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
670         * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
671         * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
672         * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
673         * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
674         * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
675         * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
676         * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
677         * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
678         * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
679         * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
680         * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
681         * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
682         * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
683         * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
684         * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
685         * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
686         * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
687         * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
688         * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
689         * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
690         * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
691         * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
692         * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
693         * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
694         * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
695         * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
696         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
697         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
698         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
699         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
700         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
701         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
702         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
703         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
704         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
705         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
706         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
707         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
708         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
709         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
710         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
711         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
712         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
713         * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
714         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
715         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
716         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
717         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
718         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
719         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
720         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
721         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
722         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
723         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
724         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
725         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
726         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
727         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
728         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
729         * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
730         * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
731         * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
732         * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
733         * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
734         * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
735         * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
736         * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
737         * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
738         * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
739         * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
740         * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
741         * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
742         * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
743         * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
745 2019-03-21  Jonathan Wakely  <jwakely@redhat.com>
747         * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
748         (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
749         (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
750         (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
751         (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
752         (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
753         (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
754         (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
755         (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
756         (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
757         (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
758         (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
759         (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
760         (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
761         when the special functions IS is enabled, not for C++17.
762         * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
763         Replace with ...
764         * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
765         without checks for special functions in C++17.
766         * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
767         New test.
769         PR libstdc++/88066
770         * include/backward/hash_map: Use <> for includes not "".
771         * include/backward/hash_set: Likewise.
772         * include/backward/strstream: Likewise.
773         * include/tr1/bessel_function.tcc: Likewise.
774         * include/tr1/exp_integral.tcc: Likewise.
775         * include/tr1/legendre_function.tcc: Likewise.
776         * include/tr1/modified_bessel_func.tcc: Likewise.
777         * include/tr1/riemann_zeta.tcc: Likewise.
779 2019-03-19  Jonathan Wakely  <jwakely@redhat.com>
781         * doc/xml/manual/allocator.xml: Link to table documenting evolution
782         of extension allocators.
783         * doc/xml/manual/evolution.xml: Use angle brackets for header names.
784         Document new headers in 7.2, 8.1 and 9.1 releases.
785         * doc/xml/manual/using.xml: Adjust link target for new_allocator.
786         * doc/html/*: Regenerate.
788 2019-03-12  John David Anglin  <dave.anglin@bell.net>
790         PR libstdc++/89461
791         * testsuite/lib/libstdc++.exp: Locate libatomic.
792         * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
793         * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
794         libatomic options.
795         * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
796         * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
797         * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
798         * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
800 2019-03-11  Jonathan Wakely  <jwakely@redhat.com>
802         PR libstdc++/89460
803         * configure.ac: Check for sockatmark.
804         * crossconfig.m4: Check for sockatmark.
805         * config.h.in: Regenerate.
806         * configure: Regenerate.
807         * include/experimental/internet (address_v4::_S_hton): Rename
808         overloaded functions to _S_hton_16 and _S_ntoh_16.
809         (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
810         (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
811         * include/experimental/socket (basic_socket::at_mark): Check
812         _GLIBCXX_HAVE_SOCKATMARK.
814         * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
815         const variables instead of macros.
817         PR libstdc++/89629
818         * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
819         Use correct type for len_aligned.
820         * testsuite/20_util/hash/89629.cc: New test.
822 2019-03-11  Jakub Jelinek  <jakub@redhat.com>
824         PR libstdc++/89641
825         * include/std/atomic (atomic<T>::store, atomic<T>::load,
826         atomic<T>::exchange, atomic<T>::compare_exchange_weak,
827         atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
828         * include/bits/atomic_base.h (__atomic_base<T>::operator++,
829         __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
830         __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
831         __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
832         __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
833         __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
834         memory_order_seq_cst to int.
836 2019-03-08  Jonathan Wakely  <jwakely@redhat.com>
838         * doc/xml/manual/using.xml: Use link element instead of xref.
839         * doc/html/*: Regenerate.
841         * include/bits/fs_path.h (path::format): Add fixed underlying type.
843 2019-03-08  François Dumont  <fdumont@gcc.gnu.org>
845         PR libstdc++/89477
846         * include/debug/map.h (map): Use _RequireNotAllocator to constrain
847         parameters in deduction guides.
848         * include/debug/multimap.h (multimap): Likewise.
849         * include/debug/set.h (multimap): Likewise.
850         * include/debug/multiset.h (multimap): Likewise.
851         * include/debug/unordered_map (unordered_map): Likewise.
852         (unordered_multimap): Likewise.
853         * include/debug/unordered_set (unordered_set): Likewise.
854         (unordered_multiset): Likewise.
856         PR libstdc++/89608
857         * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
858         Invalidate all iterators in case of rehash.
859         (unordered_multimap<>::_M_check_rehashed): Likewise.
860         * include/debug/unordered_set
861         (unordered_set<>::_M_check_rehashed): Likewise.
862         (unordered_multiset<>::_M_check_rehashed): Likewise.
863         * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
865 2019-03-07  Andreas Schwab  <schwab@suse.de>
867         * config/abi/post/riscv64-linux-gnu: New directory.
868         * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
870 2019-03-07  Jonathan Wakely  <jwakely@redhat.com>
872         * testsuite/20_util/function_objects/bind_front/1.cc: Change from
873         compile test to run. Fix typo.
875         * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
876         * doc/html/*: Regenerate.
878         P0356R5 Simplified partial function application
879         * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
880         helpers for bind_front.
881         (bind_front, __cpp_lib_bind_front): Define.
882         * testsuite/20_util/function_objects/bind_front/1.cc: New test.
884 2019-03-06  Jonathan Wakely  <jwakely@redhat.com>
886         * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
887         * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
888         * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
889         * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
891 2019-03-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
893         PR libstdc++/86655 - std::assoc_legendre should not constrain
894         the value of m (or x).
895         * include/tr1/legendre_function.tcc (__assoc_legendre_p,
896         __sph_legendre): If degree > order Don't throw, return 0.
897         (__legendre_p, __assoc_legendre_p): Don't constrain x either.
898         * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
899         * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
900         * testsuite/tr1/5_numerical_facilities/special_functions/
901         02_assoc_legendre/pr86655.cc: New test.
902         * testsuite/tr1/5_numerical_facilities/special_functions/
903         22_sph_legendre/pr86655.cc: New test.
905 2019-03-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
907         Rewrite variant.
908         Also PR libstdc++/85517
909         * include/std/variant (__do_visit): New.
910         (__variant_cast): Likewise.
911         (__variant_cookie): Likewise.
912         (__erased_*): Remove.
913         (_Variant_storage::_S_vtable): Likewise.
914         (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
915         (_Variant_storage::__M_reset): Adjust.
916         (__variant_construct): New.
917         (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
918         __variant_construct.
919         (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
920         (_Move_ctor_base::__M_destructive_copy): New.
921         (_Move_ctor_base::__M_destructive_move): Adjust to use
922         __variant_construct.
923         (_Copy_assign_base::operator=): Adjust to use __do_visit.
924         (_Copy_assign_alias): Adjust to check both copy assignment
925         and copy construction for triviality.
926         (_Move_assign_base::operator=): Adjust to use __do_visit.
927         (_Multi_array): Add support for visitors that accept and return
928         a __variant_cookie.
929         (__gen_vtable_impl::_S_apply_all_alts): Likewise.
930         (__gen_vtable_impl::_S_apply_single_alt): Likewise.
931         (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
932         a __variant_cookie temporary for a variant that is valueless and..
933         (__gen_vtable_impl::__visit_invoke): ..adjust here.
934         (__gen_vtable::_Array_type): Conditionally make space for
935         the __variant_cookie visitor case.
936         (__variant_construct_by_index): New.
937         (get_if): Adjust to use std::addressof.
938         (relops): Adjust to use __do_visit.
939         (variant): Add __variant_cast and __variant_construct_by_index
940         as friends.
941         (variant::emplace): Use _M_reset() and __variant_construct_by_index
942         instead of self-destruction.
943         (variant::swap): Adjust to use __do_visit.
944         (visit): Reimplement in terms of __do_visit.
945         (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
946         * testsuite/20_util/variant/compile.cc: Adjust.
947         * testsuite/20_util/variant/run.cc: Likewise.
949 2019-03-06  Jonathan Wakely  <jwakely@redhat.com>
951         * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
952         constant.
953         * testsuite/experimental/feat-char8_t.cc: Likewise.
955          * include/std/type_traits [C++20] (is_bounded_array)
956          (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
957          Define.
958          * testsuite/20_util/is_bounded_array/requirements/
959          explicit_instantiation.cc: New test.
960          * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
961          test.
962          * testsuite/20_util/is_bounded_array/value.cc: New test.
963          * testsuite/20_util/is_unbounded_array/requirements/
964          explicit_instantiation.cc: New test.
965          * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
966          * test.
967          * testsuite/20_util/is_unbounded_array/value.cc: New test.
969         * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
970         Add constexpr.
971         * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
973 2019-03-05  Jonathan Wakely  <jwakely@redhat.com>
975         * include/c_compatibility/math.h [C++20] (lerp): Add using
976         declaration.
977         * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
978         (__lerp): Define function template to implement lerp.
979         (lerp(float, float, float), lerp(double, double, double))
980         (lerp(long double, long double, long double)): Define for C++20.
981         * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
982         (midpoint(T, T), midpoint(T*, T*)): Define.
983         * include/std::version [C++20] (__cpp_lib_interpolate): Define.
984         * testsuite/26_numerics/lerp.cc: New test.
985         * testsuite/26_numerics/midpoint/floating.cc: New test.
986         * testsuite/26_numerics/midpoint/integral.cc: New test.
987         * testsuite/26_numerics/midpoint/pointer.cc: New test.
989 2019-03-04  Edward Smith-Rowland  <3dw4rd@verizon.net>
991         PR libstdc++/88996 Implement P0439R0
992         Make std::memory_order a scoped enumeration.
993         * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
994         add variables for the old enumerators.  Adjust calls.
995         * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
996         * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
998 2019-03-04  Jonathan Wakely  <jwakely@redhat.com>
1000         * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
1001         directive.
1003         * include/std/memory_resource (polymorphic_allocator): Add default
1004         template argument for C++20.
1005         (polymorphic_allocator::allocate_bytes)
1006         (polymorphic_allocator::deallocate_bytes)
1007         (polymorphic_allocator::allocate_object)
1008         (polymorphic_allocator::deallocate_object)
1009         (polymorphic_allocator::new_object)
1010         (polymorphic_allocator::delete_object): New member functions for
1011         C++20.
1012         * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
1013         test.
1015 2019-03-03  Jonathan Wakely  <jwakely@redhat.com>
1017         PR libstdc++/89562
1018         * src/filesystem/ops-common.h (do_copy_file): Open files in binary
1019         mode for mingw.
1021 2019-03-01  Jonathan Wakely  <jwakely@redhat.com>
1023         * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
1024         [!__cpp_sized_deallocation]: Do not pass size to operator delete.
1026         * include/std/memory (uses_allocator_construction_args): New set of
1027         overloaded functions.
1028         (make_obj_using_allocator, uninitialized_construct_using_allocator):
1029         New functions.
1030         * include/std/memory_resource (polymorphic_allocator::construct)
1031         [__cplusplus > 201703l]: Replace all overloads with a single function
1032         using uses_allocator_construction_args.
1033         * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
1034         test.
1035         * testsuite/20_util/uses_allocator/make_obj.cc: New test.
1037 2019-02-27  Jonathan Wakely  <jwakely@redhat.com>
1039         PR libstdc++/89466
1040         * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
1041         stylesheet directories before check for xsltproc. Try to use
1042         xmlcatalog to find local stylesheet directory before trying hardcoded
1043         paths. Add path used by suse to hardcoded paths. Adjust xsltproc
1044         check to look for the same stylesheet as doc/Makefile.am uses. Don't
1045         use xsltproc if xmlcatalog fails to find a local stylesheet.
1046         * configure.ac: Check for xmlcatalog.
1047         * Makefile.in: Regenerate.
1048         * configure: Likewise.
1049         * doc/Makefile.in: Likewise.
1050         * include/Makefile.in: Likewise.
1051         * libsupc++/Makefile.in: Likewise.
1052         * po/Makefile.in: Likewise.
1053         * python/Makefile.in: Likewise.
1054         * src/Makefile.in: Likewise.
1055         * src/c++11/Makefile.in: Likewise.
1056         * src/c++17/Makefile.in: Likewise.
1057         * src/c++98/Makefile.in: Likewise.
1058         * src/filesystem/Makefile.in: Likewise.
1059         * testsuite/Makefile.in: Likewise.
1061 2019-02-26  Jonathan Wakely  <jwakely@redhat.com>
1063         PR libstdc++/89477
1064         * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
1065         container deduction guides.
1066         * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
1067         * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
1068         parameters in deduction guides.
1069         * include/bits/stl_multimap.h (multimap): Likewise.
1070         * include/bits/stl_multiset.h (multiset): Likewise.
1071         * include/bits/stl_queue.h (queue, priority_queue): Likewise.
1072         * include/bits/stl_set.h (set): Likewise.
1073         * include/bits/stl_stack.h (stack): Likewise.
1074         * include/bits/unordered_map.h (unordered_map, unordered_multimap):
1075         use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
1076         constrain parameters in deduction guides.
1077         * include/bits/unordered_set.h (unordered_set, unordered_multiset):
1078         Likewise.
1079         * testsuite/23_containers/map/cons/deduction.cc: Test additional
1080         deduction cases.
1081         * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
1082         * testsuite/23_containers/set/cons/deduction.cc: Likewise.
1083         * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
1084         * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
1085         Likewise.
1086         * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
1087         Likewise.
1088         * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
1090         PR libstdc++/89416
1091         * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
1092         to class template and partial specialization using void_t.
1093         (__is_copy_insertable, __is_move_insertable): Adjust base class.
1095 2019-02-24  Jonathan Wakely  <jwakely@redhat.com>
1097         PR libstdc++/89416
1098         * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
1099         copy and move members public.
1101 2019-02-23  Jonathan Wakely  <jwakely@redhat.com>
1103         * include/std/type_traits (__underlying_type_impl): New helper to
1104         make underlying_type SFINAE-friendly.
1105         (underlying_type): Derive from __underlying_type_impl.
1106         * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
1107         test.
1109         PR libstdc++/89446
1110         * include/bits/char_traits.h (__constant_char_array): Check index is
1111         in range before dereferencing.
1112         (char_traits<char>::compare, char_traits<char>::find)
1113         (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
1114         immediately if n is zero.
1115         (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
1116         Remove workarounds for PR 67026.
1117         * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
1118         New test.
1119         * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
1120         New test.
1122 2019-02-22  Eric Botcazou  <ebotcazou@adacore.com>
1124         * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
1125         * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
1127 2019-02-22  Jakub Jelinek  <jakub@redhat.com>
1129         PR libstdc++/89402
1130         * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
1131         type to std::size_t and argument to type to long double.
1133 2019-02-22  Eric Botcazou  <ebotcazou@adacore.com>
1135         * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
1136         * config/abi/post/sparc64-linux-gnu: New directory.
1137         * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
1138         * config/abi/post/sparc64-linux-gnu/32: New directory.
1139         * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
1141 2019-02-21  Jonathan Wakely  <jwakely@redhat.com>
1143         * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
1144         * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
1145         test.
1147 2019-02-22  Tom Honermann  <tom@honermann.net>
1149         * python/libstdcxx/v6/printers.py (register_type_printers): Add type
1150         printers for u8string and u8string_view.
1152 2019-02-22  Tom Honermann  <tom@honermann.net>
1154         * testsuite/18_support/byte/ops.cc: Validate
1155         std::to_integer<char8_t>, std::to_integer<char16_t>, and
1156         std::to_integer<char32_t>.
1157         * testsuite/18_support/numeric_limits/dr559.cc: Validate
1158         std::numeric_limits<char8_t>.
1159         * testsuite/18_support/numeric_limits/lowest.cc: Validate
1160         std::numeric_limits<char8_t>::lowest().
1161         * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
1162         std::numeric_limits<char8_t>::max_digits10.
1163         * testsuite/18_support/type_info/fundamental.cc: Validate
1164         typeinfo for char8_t.
1165         * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
1166         std::from_chars with char8_t.
1167         * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
1168         Validate explicit instantiation of std::hash<char8_t>.
1169         * testsuite/20_util/is_integral/value.cc: Validate
1170         std::is_integral<char8_t>.
1171         * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
1172         Validate std::make_signed<char8_t>.
1173         * testsuite/21_strings/basic_string/cons/char/deduction.cc:
1174         Validate u8string construction from char8_t sources.
1175         * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
1176         std::pmr::u8string.
1177         * testsuite/21_strings/basic_string_view/operations/compare/
1178         char/70483.cc: Validate substr operations on u8string_view.
1179         * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
1180         the u8string_view typedef is defined.
1181         * testsuite/21_strings/char_traits/requirements/
1182         constexpr_functions.cc: Validate char_traits<char8_t> constexpr
1183         member functions.
1184         * testsuite/21_strings/char_traits/requirements/
1185         constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
1186         constexpr member functions.
1187         * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
1188         that the u8string typedef is defined.
1189         * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
1190         of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
1191         std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
1192         * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
1193         numbers.
1194         * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1195         * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
1196         Likewise.
1197         * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1198         * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
1199         Validate std::atomic<char8_t>::is_always_lock_free
1200         * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
1201         Update line numbers.
1202         * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
1203         Likewise.
1204         * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
1205         Likewise.
1206         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1207         Validate std::experimental::pmr::u8string.
1208         * testsuite/experimental/string_view/typedefs.cc: Validate that the
1209         u8string_view typedef is defined.
1210         * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
1211         char32_t to the typelists.
1213 2019-02-22  Tom Honermann  <tom@honermann.net>
1215         * include/ext/typelist.h: Constrain a partial specialization of
1216         typelist::detail::append_ to only match chain<T1,T2>.
1218 2019-02-21  Jonathan Wakely  <jwakely@redhat.com>
1220         PR libstdc++/89416
1221         * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
1222         class template with class. Replace move and copy member types with
1223         member alias templates, so they are only instantiated when needed.
1224         (__is_copy_insertable, __is_move_insertable): Adjust base class.
1225         * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
1226         test for C++11/14/17 as well.
1227         * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
1228         test.
1230 2019-02-20  Jakub Jelinek  <jakub@redhat.com>
1232         PR libstdc++/89402
1233         * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
1234         _GLIBCXX_PURE to the alias declaration.
1236 2019-02-19  Jonathan Wakely  <jwakely@redhat.com>
1238         * testsuite/21_strings/basic_string/literals/types.cc
1239         [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
1240         * testsuite/21_strings/basic_string/literals/values.cc
1241         [_GLIBCXX_USE_CHAR8_T]: Likewise.
1242         * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
1243         potentially having different type.
1244         * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
1245         * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
1246         to char.
1247         * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
1248         * testsuite/22_locale/codecvt/utf8.cc: Likewise.
1249         * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
1250         string literals only using basic character set.
1251         * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
1252         u8 literals to char.
1253         * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
1254         Test ATOMIC_CHAR8_T_LOCK_FREE.
1255         Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
1256         * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
1257         [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
1258         * testsuite/experimental/string_view/literals/types.cc
1259         [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
1260         literal.
1261         * testsuite/experimental/string_view/literals/values.cc
1262         [_GLIBCXX_USE_CHAR8_T]: Likewise.
1264 2019-02-19  Tom Honermann  <tom@honermann.net>
1266         * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
1267         from char16_32_t.cc; validates numeric_limits<char8_t>.
1268         * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
1269         test cloned from types.cc; validates operator""s for char8_t
1270         returns u8string.
1271         * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
1272         test cloned from values.cc; validates construction and comparison
1273         of u8string values.
1274         * testsuite/21_strings/basic_string/requirements/
1275         /explicit_instantiation/char8_t/1.cc: New test cloned from
1276         char16_t/1.cc; validates explicit instantiation of
1277         basic_string<char8_t>.
1278         * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1279         New test cloned from types.cc; validates operator""sv for char8_t
1280         returns u8string_view.
1281         * testsuite/21_strings/basic_string_view/literals/
1282         values-char8_t.cc: New test cloned from values.cc; validates
1283         construction and comparison of u8string_view values.
1284         * testsuite/21_strings/basic_string_view/requirements/
1285         explicit_instantiation/char8_t/1.cc: New test cloned from
1286         char16_t/1.cc; validates explicit instantiation of
1287         basic_string_view<char8_t>.
1288         * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
1289         New test cloned from char16_t/65049.cc; validates that
1290         char_traits<char8_t> is not vulnerable to the concerns in PR65049.
1291         * testsuite/21_strings/char_traits/requirements/char8_t/
1292         typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
1293         that char_traits<char8_t> member typedefs are present and correct.
1294         * testsuite/21_strings/char_traits/requirements/
1295         explicit_instantiation/char8_t/1.cc: New test cloned from
1296         char16_t/1.cc; validates explicit instantiation of
1297         char_traits<char8_t>.
1298         * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
1299         from char16_t.cc: validates
1300         codecvt<char16_t, char8_t, mbstate_t>.
1301         * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
1302         from char32_t.cc: validates
1303         codecvt<char32_t, char8_t, mbstate_t>.
1304         * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
1305         utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
1306         codecvt<char32_t, char8_t, std::mbstate_t>.
1307         * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
1308         test cloned from string.cc; validates filesystem::path construction
1309         from char8_t input.
1310         * testsuite/experimental/feat-char8_t.cc: New test; validates that
1311         the __cpp_lib_char8_t feature test macro is defined with the
1312         correct value.
1313         * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1314         New test cloned from string.cc; validates filesystem::path
1315         construction from char8_t input.
1316         * testsuite/experimental/string_view/literals/types-char8_t.cc: New
1317         test cloned from types.cc; validates operator""sv for char8_t
1318         returns u8string_view.
1319         * testsuite/experimental/string_view/literals/values-char8_t.cc:
1320         New test cloned from values.cc; validates construction and
1321         comparison of u8string_view values.
1322         * testsuite/experimental/string_view/requirements/
1323         explicit_instantiation/char8_t/1.cc: New test cloned from
1324         char16_t/1.cc; validates explicit instantiation of
1325         basic_string_view<char8_t>.
1326         * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
1327         ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
1328         enabled.
1330 2019-02-19  Tom Honermann  <tom@honermann.net>
1332         P0482R5 char8_t: Standard library support
1333         * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
1334         typeinfo symbols for char8_t.
1335         * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
1336         (GLIBCXX_3.4.26): Add symbols for specializations of
1337         numeric_limits and codecvt that involve char8_t.
1338         (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
1339         * include/bits/atomic_base.h: Add atomic_char8_t.
1340         * include/bits/basic_string.h: Add std::hash<u8string> and
1341         operator""s(const char8_t*, size_t).
1342         * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
1343         __cpp_lib_char8_t.
1344         * include/bits/char_traits.h: Add char_traits<char8_t>.
1345         * include/bits/codecvt.h: Add
1346         codecvt<char16_t, char8_t, mbstate_t>,
1347         codecvt<char32_t, char8_t, mbstate_t>,
1348         codecvt_byname<char16_t, char8_t, mbstate_t>, and
1349         codecvt_byname<char32_t, char8_t, mbstate_t>.
1350         * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
1351         recognize char8_t as an integral type.
1352         * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
1353         char8_t.
1354         (path::u8string): Return std::u8string when char8_t support is
1355         enabled.
1356         (path::generic_u8string): Likewise.
1357         (path::_S_convert): Handle conversion from char8_t input.
1358         (path::_S_str_convert): Likewise.
1359         * include/bits/functional_hash.h: Add hash<char8_t>.
1360         * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
1361         char8_t.
1362         * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
1363         for new char8_t specializations.
1364         * include/bits/localefwd.h: Add missing declarations of
1365         codecvt<char16_t, char, mbstate_t> and
1366         codecvt<char32_t, char, mbstate_t>.  Add char8_t declarations
1367         codecvt<char16_t, char8_t, mbstate_t> and
1368         codecvt<char32_t, char8_t, mbstate_t>.
1369         * include/bits/postypes.h: Add u8streampos
1370         * include/bits/stringfwd.h: Add declarations of
1371         char_traits<char8_t> and u8string.
1372         * include/c_global/cstddef: Add __byte_operand<char8_t>.
1373         * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1374         Recognize char8_t.
1375         (path::u8string): Return std::u8string when char8_t support is
1376         enabled.
1377         (path::generic_u8string): Likewise.
1378         (path::_S_convert): Handle conversion from char8_t input.
1379         (path::_S_str_convert): Likewise.
1380         * include/experimental/string: Add u8string.
1381         * include/experimental/string_view: Add u8string_view,
1382         hash<experimental::u8string_view>, and
1383         operator""sv(const char8_t*, size_t).
1384         * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
1385         * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
1386         as a character type.
1387         * include/std/limits: Add numeric_limits<char8_t>.
1388         * include/std/string_view: Add u8string_view,
1389         hash<experimental::u8string_view>, and
1390         operator""sv(const char8_t*, size_t).
1391         * include/std/type_traits: Add __is_integral_helper<char8_t>,
1392         __make_unsigned<char8_t>, and __make_signed<char8_t>.
1393         * libsupc++/atomic_lockfree_defines.h: Define
1394         ATOMIC_CHAR8_T_LOCK_FREE.
1395         * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
1396         codecvt.cc and limits.cc so that char8_t specializations of
1397         numeric_limits and codecvt and emitted.
1398         * src/c++11/Makefile.in: Likewise.
1399         * src/c++11/codecvt.cc: Define members of
1400         codecvt<char16_t, char8_t, mbstate_t>,
1401         codecvt<char32_t, char8_t, mbstate_t>,
1402         codecvt_byname<char16_t, char8_t, mbstate_t>, and
1403         codecvt_byname<char32_t, char8_t, mbstate_t>.
1404         * src/c++11/limits.cc: Define members of
1405         numeric_limits<char8_t>.
1406         * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
1407         locale_init.cc and localename.cc.
1408         * src/c++98/Makefile.in: Likewise.
1409         * src/c++98/locale_init.cc: Add initialization for the
1410         codecvt<char16_t, char8_t, mbstate_t> and
1411         codecvt<char32_t, char8_t, mbstate_t> facets.
1412         * src/c++98/localename.cc: Likewise.
1413         * testsuite/util/testsuite_abi.cc: Validate ABI bump.
1415 2019-02-18  Wilco Dijkstra  <wdijkstr@arm.com>
1417         * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
1418         * 27_io/filesystem/operations/resize_file.cc: Likewise.
1419         * 27_io/filesystem/path/generation/normal2.cc: Likewise.
1421 2019-02-14  Jonathan Wakely  <jwakely@redhat.com>
1423         * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
1424         * doc/html/*: Regenerate.
1426         * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
1427         * doc/html/*: Regenerate.
1429         * doc/xml/manual/intro.xml: Document LWG 2586 status.
1430         * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
1431         allocator type in is_constructible checks.
1432         * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
1433         * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
1434         * testsuite/20_util/tuple/cons/allocators.cc: Add test using
1435         problematic type from LWG 2586 discussion.
1436         * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
1437         * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
1439         * configure.ac: Check for C11 timespec_get function.
1440         * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
1441         (openbsd): Likewise
1442         * config.h.in: Regenerate.
1443         * configure: Regenerate.
1444         * include/c_global/ctime (timespec, timespec_get): Add to namespace
1445         std for C++17 and up.
1447         * doc/xml/manual/intro.xml: Document LWG 2537 status.
1448         * include/bits/stl_queue.h
1449         (priority_queue(const Compare&, const Container&, const Alloc&))
1450         (priority_queue(const Compare&, Container&&, const Alloc&)): Call
1451         make_heap.
1452         * testsuite/23_containers/priority_queue/dr2537.cc: New test.
1454         * doc/xml/manual/intro.xml: Document LWG 2566 status.
1455         * include/bits/stl_queue.h (queue, priority_queue): Add static
1456         assertions to enforce LWG 2566 requirement on value_type.
1457         * include/bits/stl_stack.h (stack): Likewise.
1459         PR middle-end/89303
1460         * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
1462         * doc/xml/manual/intro.xml: Document LWG 2735 status.
1463         * include/bits/std_abs.h: Add comment about LWG 2735.
1464         * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
1466 2019-02-13  Jonathan Wakely  <jwakely@redhat.com>
1468         PR libstdc++/89345
1469         * include/std/version [__cpp_impl_destroying_delete]
1470         (__cpp_lib_destroying_delete): Only define for C++2a and later.
1471         * libsupc++/new [__cpp_impl_destroying_delete]
1472         (__cpp_lib_destroying_delete): Likewise.
1473         (destroying_delete_t, destroying_delete): Likewise, but define even
1474         when __cpp_impl_destroying_delete is not defined.
1475         * testsuite/18_support/destroying_delete.cc: New test.
1477 2019-02-11  Jonathan Wakely  <jwakely@redhat.com>
1479         PR libstdc++/89023
1480         * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
1481         * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
1482         * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
1483         * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
1485 2019-02-09  Jonathan Wakely  <jwakely@redhat.com>
1487         PR libstdc++/71044
1488         * include/bits/fs_path.h (path::has_root_name)
1489         (path::has_root_directory, path::has_root_path)
1490         (path::has_relative_path, path::has_parent_path)
1491         (path::has_filename, path::has_stem, path::has_extension)
1492         (path::is_absolute, path::is_relative, path::_M_find_extension): Add
1493         noexcept.
1494         * src/c++17/fs_path.cc (path::has_root_name)
1495         (path::has_root_directory, path::has_root_path)
1496         (path::has_relative_path, path::has_parent_path)
1497         (path::has_filename, path::_M_find_extension): Add noexcept.
1499 2019-02-06  Jonathan Wakely  <jwakely@redhat.com>
1501         PR libstdc++/89102 (partial)
1502         * include/std/type_traits (common_type<>): Define.
1503         (common_type<T>): Derive from common_type<T, T>.
1504         * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
1505         Test zero-length template argument list.
1506         * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
1507         Test additional single argument cases.
1508         * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
1509         Adjust expected error.
1511 2019-02-05  Jonathan Wakely  <jwakely@redhat.com>
1513         PR libstdc++/89128
1514         * include/bits/stl_queue.h (queue, priority_queue): Add deduction
1515         guides.
1516         * include/bits/stl_stack.h (stack): Likewise.
1517         * testsuite/23_containers/priority_queue/deduction.cc: New test.
1518         * testsuite/23_containers/queue/deduction.cc: New test.
1519         * testsuite/23_containers/stack/deduction.cc: New test.
1521         PR libstdc++/89194
1522         * include/std/type_traits (__is_convertible_helper)
1523         (__is_convertible_helper<_From, _To, false>): Revert changes to
1524         support is_nothrow_convertible.
1525         (__is_nt_convertible_helper): New helper.
1526         (is_nothrow_convertible): Use __is_nt_convertible_helper.
1528         * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
1529         use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
1531         PR libstdc++/89130
1532         * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
1533         __is_alloc_insertable_impl. Replace single type member with two
1534         members, one for each of copy and move insertable.
1535         (__is_move_insertable): New trait for internal use.
1536         * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
1537         (vector::_S_nothrow_relocate(true_type)): New functions to
1538         conditionally check if __relocate_a can throw.
1539         (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
1540         on __is_move_insertable.
1541         (vector::_S_do_relocate): New overloaded functions to conditionally
1542         call __relocate_a.
1543         (vector::_S_relocate): New function that dispatches to _S_do_relocate
1544         based on _S_use_relocate.
1545         * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1546         (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
1547         * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
1549         PR libstdc++/89090
1550         * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
1551         parameter unnamed. Add message to static assertion.
1552         * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1553         (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
1554         in C++11 code.
1556 2019-02-05  Marc Glisse  <marc.glisse@inria.fr>
1558         PR libstdc++/87106
1559         * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
1560         Rename...
1561         (__is_bitwise_relocatable): ... to this.
1562         (__relocate_a_1): Adapt.
1563         * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
1564         (__is_bitwise_relocatable): ... to this.
1566 2019-01-30  Jonathan Wakely  <jwakely@redhat.com>
1568         PR libstdc++/89117
1569         * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
1570         final component as well as from _M_pathname. Append the dot using
1571         operator+= instead of only to _M_pathname.
1572         (path::_M_find_extension): Reformat slightly.
1573         * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1574         Add more test cases.
1576 2019-01-30  Ulrich Drepper  <drepper@redhat.com>
1578         * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
1580 2019-01-29  Jonathan Wakely  <jwakely@redhat.com>
1582         * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
1583         constexpr specifiers from arg and proj.
1585         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
1586         __shared_ptr instantiations used by gcc4-compatible ABI.
1588         * include/experimental/forward_list (experimental::erase): Qualify
1589         call to erase_if.
1590         * include/experimental/list (experimental::erase): Likewise.
1591         * include/std/forward_list (std::erase): Likewise.
1592         * include/std/list (std::erase): Likewise.
1594         * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
1595         C++2a.
1596         * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
1597         * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
1598         * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
1599         * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
1600         * testsuite/ext/array_allocator/26875.cc: Likewise.
1601         * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
1602         * testsuite/util/replacement_memory_operators.h: Likewise.
1603         * testsuite/util/testsuite_allocator.h: Likewise.
1605         * include/std/memory_resource (__pool_resource::_M_unpooled): Use
1606         normal mode vector, even for debug mode.
1607         * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
1608         Define alias template for normal mode vector.
1610 2019-01-28  Jonathan Wakely  <jwakely@redhat.com>
1612         PR libstdc++/68737
1613         * config/locale/generic/c_locale.h (__convert_from_v)
1614         [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1615         * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1616         * include/bits/locale_facets.tcc (num_put::_M_insert_float)
1617         [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
1619 2019-01-24  Jonathan Wakely  <jwakely@redhat.com>
1621         PR libstdc++/88840
1622         * include/bits/stl_vector.h (vector::__use_relocate): Replace static
1623         data member with static member function _S_use_relocate().
1624         * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
1625         (vector::_M_default_append): Use _S_use_relocate() instead of
1626         __use_relocate.
1628         * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
1629         sign of results.
1631 2019-01-22  Jonathan Wakely  <jwakely@redhat.com>
1633         PR libstdc++/88740
1634         * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
1635         write to stderr instead of using printf.
1637 2019-01-21  Jakub Jelinek  <jakub@redhat.com>
1639         PR libstdc++/86590
1640         * include/bits/char_traits.h (__constant_string_p,
1641         __constant_char_array_p): Use __builtin_is_constant_evaluated if
1642         available.
1644 2019-01-20  Ulrich Drepper  <drepper@redhat.com>
1646         Implement C++20 P0600r1.
1647         * include/backward/hash_map: Add nodiscard attribute to empty.
1648         * include/backward/hash_set: Likewise.
1649         * backward/hashtable.h: Likewise.
1650         * include/bits/basic_string.h: Likewise.
1651         * include/bits/forward_list.h: Likewise.
1652         * include/bits/hashtable.h: Likewise.
1653         * include/bits/regex.h: Likewise.
1654         * include/bits/stl_deque.h: Likewise.
1655         * include/bits/stl_list.h: Likewise.
1656         * include/bits/stl_map.h: Likewise.
1657         * include/bits/stl_multimap.h: Likewise.
1658         * include/bits/stl_multiset.h: Likewise.
1659         * include/bits/stl_queue.h: Likewise.
1660         * include/bits/stl_set.h: Likewise.
1661         * include/bits/stl_stack.h: Likewise.
1662         * include/bits/stl_tree.h: Likewise.
1663         * include/bits/stl_vector.h: Likewise.
1664         * include/bits/unordered_map.h: Likewise.
1665         * include/bits/unordered_set.h: Likewise.
1666         * include/debug/array: Likewise.
1667         * include/experimental/any: Likewise.
1668         * include/experimental/bits/fs_path.h: Likewise.
1669         * include/experimental/internet: Likewise.
1670         * include/experimental/string_view: Likewise.
1671         * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
1672         Likewise.
1673         * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
1674         Likewise.
1675         * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
1676         Likewise.
1677         * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
1678         Likewise.
1679         * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
1680         Likewise.
1681         * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
1682         Likewise.
1683         * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
1684         Likewise.
1685         * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
1686         Likewise.
1687         * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1688         info_fn_imps.hpp: Likewise.
1689         * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1690         left_child_next_sibling_heap_.hpp: Likewise.
1691         * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
1692         Likewise.
1693         * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
1694         Likewise.
1695         * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
1696         Likewise.
1697         * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
1698         Likewise.
1699         * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
1700         Likewise.
1701         * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
1702         Likewise.
1703         * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
1704         Likewise.
1705         * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
1706         * include/ext/pb_ds/trie_policy.hpp: Likewise.
1707         * include/ext/rope: Likewise.
1708         * include/ext/slist: Likewise.
1709         * include/ext/vstring.h: Likewise.
1710         * include/profile/array: Likewise.
1711         * include/std/array: Likewise.
1712         * include/tr1/array: Likewise.
1713         * include/tr1/hashtable.h: Likewise.
1714         * include/tr1/regex: Likewise.
1715         * include/tr2/dynamic_bitset: Likewise.
1716         * include/bits/alloc_traits.h: Add nodiscard attribute to
1717         allocate.
1718         * include/experimental/memory_resource: Likewise.
1719         * include/ext/alloc_traits.h: Likewise.
1720         * include/ext/array_allocator.h: Likewise.
1721         * include/ext/bitmap_allocator.h: Likewise.
1722         * include/ext/debug_allocator.h: Likewise.
1723         * include/ext/extptr_allocator.h: Likewise.
1724         * include/ext/mt_allocator.h: Likewise.
1725         * include/ext/new_allocator.h: Likewise.
1726         * include/ext/pool_allocator.h: Likewise.
1727         * include/ext/throw_allocator.h: Likewise.
1728         * include/std/scoped_allocator: Likewise.
1729         * libsupc++/eh_alloc.cc: Likewise.
1730         * include/std/future: Add nodiscard attribute to async.
1731         * libsupc++/new: Add nodiscard attribute to new.
1733 2019-01-18  Jonathan Wakely  <jwakely@redhat.com>
1735         PR libstdc++/87514
1736         PR libstdc++/87520
1737         PR libstdc++/88782
1738         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
1739         * include/bits/shared_ptr.h
1740         (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
1741         (allocate_shared): Change to use new tag type.
1742         * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
1743         Declare new member function.
1744         (_Sp_alloc_shared_tag): Define new type.
1745         (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
1746         (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
1747         _Sp_make_shared_tag::_S_eq to check type_info.
1748         (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
1749         Constrain to prevent being called with _Sp_alloc_shared_tag.
1750         (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
1751         Replace constructor with ...
1752         (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
1753         reference parameter so address of the new object can be returned to
1754         the caller. Obtain the allocator from the tag type.
1755         (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
1756         constructor with ...
1757         (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
1758         to the __shared_count constructor.
1759         (__allocate_shared): Change to use new tag type.
1760         * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
1762 2019-01-17  Jonathan Wakely  <jwakely@redhat.com>
1764         * src/c++17/fs_ops.cc
1765         (equivalent(const path&, const path&, error_code&))
1766         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
1767         compare files instead of relying on incomplete info returned by stat.
1769         PR libstdc++/88884
1770         * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
1771         if the path is already absolute.
1772         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
1773         [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
1775         PR libstdc++/88881
1776         * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
1777         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
1778         of filesystem::exists.
1779         (create_directories(const path&, error_code&)): Add assertions.
1780         (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1781         Add workaround for bug in _wstat for paths with trailing slash.
1782         * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
1783         for expected behaviour on mingw.
1784         * testsuite/experimental/filesystem/operations/create_directories.cc:
1785         Likewise.
1786         * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
1787         "TMP" instead of "TMPDIR" and clean environment before each test. Do
1788         not test permissions on mingw targets.
1790 2019-01-16  Jonathan Wakely  <jwakely@redhat.com>
1792         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
1793         constructors and open members taking wide strings. Fix patterns for
1794         filesystem::path members to match wstring_view parameters. Add
1795         exports for shared_ptr members used by directory iterators.
1796         * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
1797         error code parameter if the file doesn't exist.
1798         * src/filesystem/ops.cc (remove(const path&, error_code&)):
1799         Likewise.
1800         * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
1801         values for mingw targets, where "/" is not an absolute path. Do not
1802         test symlinks on mingw targets.
1803         * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1804         * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
1805         on mingw targets.
1806         * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1807         * testsuite/27_io/filesystem/operations/create_directories.cc: Check
1808         that each component of the path is created.
1809         * testsuite/experimental/filesystem/operations/create_directories.cc:
1810         Likewise.
1811         * testsuite/27_io/filesystem/operations/exists.cc: Do not test
1812         permissions on mingw targets.
1813         * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1814         * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1815         * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1816         * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
1817         mingw targets.
1818         * testsuite/experimental/filesystem/operations/permissions.cc:
1819         Likewise.
1820         * testsuite/27_io/filesystem/operations/remove.cc: Do not test
1821         symlinks or permissions on mingw targets.
1822         * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1823         * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
1824         symlinks on mingw targets.
1825         * testsuite/experimental/filesystem/operations/remove_all.cc:
1826         Likewise.
1827         * testsuite/27_io/filesystem/operations/status.cc: Do not test
1828         permissions on mingw targets.
1829         * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
1830         test symlinks on mingw targets.
1831         * testsuite/experimental/filesystem/operations/space.cc: Fix test
1832         for mingw targets.
1834 2019-02-14  Ulrich Drepper  <drepper@redhat.com>
1836         PR libstdc++/88738
1837         Warn about unused comparisons of shared_ptr/unique_ptr
1838         * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
1839         * include/bits/shared_ptr.h: Use it for operator ==, !=,
1840         <, <=, >, >= for shared_ptr.
1841         * include/bits/unique_ptr.h: Likewise for unique_ptr.
1843 2019-01-15  Jonathan Wakely  <jwakely@redhat.com>
1845         * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
1846         as 201611L, because P0497R0 changes are supported.
1847         * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
1849         * include/bits/erase_if.h [__cplusplus > 201703L]
1850         (__cpp_lib_erase_if): Only define for C++2a.
1851         * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1852         (__cpp_lib_null_iterators): Define.
1853         * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1854         (__cpp_lib_null_iterators): Define.
1855         [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
1857         * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
1858         status.
1859         * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
1860         Define.
1861         * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
1862         changes are supported.
1863         * include/std/optional (__cpp_lib_optional): Likewise.
1864         * include/std/variant (__cpp_lib_variant): Likewise.
1865         * include/std/version [!__STRICT_ANSI__]
1866         (__cpp_lib_uncaught_exceptions): Define as long integer.
1867         [__cplusplus >= 201703L] (__cpp_lib_any)
1868         (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
1869         (__cpp_lib_variant): Define for C++17.
1870         [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
1871         as long integer.
1872         * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
1873         integer.
1875         * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
1877 2019-01-12  Jonathan Wakely  <jwakely@redhat.com>
1879         PR libstdc++/88811
1880         PR libstdc++/83306
1881         * src/filesystem/path.cc: Fix typo. If first path is empty, show []
1882         before second path.
1883         * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
1884         test.
1886 2019-01-11  Jonathan Wakely  <jwakely@redhat.com>
1888         * doc/xml/manual/intro.xml: Include new section.
1889         * doc/xml/manual/status_cxx2017.xml: Document more
1890         implementation-defined properties of the library.
1891         * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
1892         * doc/html/*: Regenerate.
1894         * include/bits/refwrap.h [__cplusplus > 201703L]
1895         (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
1896         (_Reference_wrapper_base_memfun): Do not define for C++2a.
1897         (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
1898         for C++2a.
1899         (reference_wrapper::operator()): Add static assertion.
1900         * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
1902         * include/std/chrono (duration_values::zero(), duration_values::min())
1903         (duration_values::max()): Add noexcept.
1904         (duration::zero(), duration::min(), duration::max()): Likewise.
1905         (time_point::zero(), time_point::min(), time_point::max()): Likewise.
1906         * testsuite/20_util/duration/requirements/noexcept.cc: New test.
1907         * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
1909         * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
1911 2019-01-11  Jakub Jelinek  <jakub@redhat.com>
1913         * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
1914         * include/std/version (__cpp_lib_is_constant_evaluated): Define.
1916 2019-01-11  Jonathan Wakely  <jwakely@redhat.com>
1918         PR libstdc++/88802
1919         * include/bits/functional_hash.h (hash<nullptr_t>): Define
1920         specialization for C++17 (P0513R0, LWG 2817).
1921         * testsuite/20_util/hash/nullptr.cc: New test.
1923         PR libstdc++/88125
1924         * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
1925         pattern for std::basic_stringbuf::str().
1927         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
1928         basic_ostream::operator<< patterns.
1930 2019-01-10  Jonathan Wakely  <jwakely@redhat.com>
1932         * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
1933         test failures on targets with 32-bit time_t.
1935         * include/bits/erase_if.h: Define __cpp_lib_erase_if.
1936         * include/std/deque: Likewise.
1937         * include/std/forward_list: Likewise.
1938         * include/std/list: Likewise.
1939         * include/std/string: Likewise.
1940         * include/std/vector: Likewise.
1941         * include/std/version: Likewise.
1942         * testsuite/21_strings/basic_string/erasure.cc: Test macro.
1943         * testsuite/23_containers/deque/erasure.cc: Likewise.
1944         * testsuite/23_containers/forward_list/erasure.cc: Likewise.
1945         * testsuite/23_containers/list/erasure.cc: Likewise.
1946         * testsuite/23_containers/map/erasure.cc: Likewise.
1947         * testsuite/23_containers/set/erasure.cc: Likewise.
1948         * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1949         * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
1950         * testsuite/23_containers/vector/erasure.cc: Likewise.
1952         * include/experimental/internet [AI_NUMERICSERV]
1953         (resolver_base::numeric_service): Define conditionally.
1954         * testsuite/experimental/net/internet/resolver/base.cc: Test it
1955         conditionally.
1956         * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
1957         Likewise.
1959 2019-01-10  Ville Voutilainen  <ville.voutilainen@gmail.com>
1960             Jonathan Wakely  <jwakely@redhat.com>
1962         Implement LWG 2221
1963         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
1964         (GLIBCXX_3.4.26): Add new exports.
1965         * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
1966         correct list of sources.
1967         * include/Makefile.in: Regenerate.
1968         * include/std/ostream (operator<<(nullptr_t)): New member function.
1969         * src/c++17/ostream-inst.cc: New file.
1970         * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
1971         test.
1973 2019-01-10  Jonathan Wakely  <jwakely@redhat.com>
1975         * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
1976         of the source file containing the caller.
1977         * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
1978         directories created by test.
1979         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1980         Likewise.
1981         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1982         Likewise.
1983         * testsuite/experimental/filesystem/iterators/
1984         recursive_directory_iterator.cc: Likewise.
1986 2019-01-10  Jakub Jelinek  <jakub@redhat.com>
1988         PR tree-optimization/88775
1989         * include/bits/stl_function.h (greater<_Tp*>::operator(),
1990         less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
1991         less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
1992         instead of __builtin_constant_p if available.  Don't bother with
1993         the pointer comparison in C++11 and earlier.
1995 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
1997         PR other/16615
1999         * include/ext/bitmap_allocator.h: Mechanically replace "can not"
2000         with "cannot".
2002 2019-01-09  Jonathan Wakely  <jwakely@redhat.com>
2004         * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
2005         for filesystem::path. Give variables more distinctive names.
2007         * include/std/optional (_Optional_payload_base::_M_copy_assign): New
2008         member function to perform non-trivial assignment.
2009         (_Optional_payload_base::_M_move_assign): Likewise.
2010         (_Optional_payload<T, true, false, true>::operator=)
2011         (_Optional_payload<T, true, true, false>::operator=)
2012         (_Optional_payload<T, true, false, false>::operator=): Call
2013         _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
2015         PR libstdc++/88204
2016         * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
2017         test std::complex<long double> if long double format is IBM128.
2018         * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
2019         Likewise.
2021 2019-01-08  Jonathan Wakely  <jwakely@redhat.com>
2023         * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
2024         for old std::unique_ptr layout.
2025         * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
2026         to become valueless. Add filesystem::path tests.
2028         PR libstdc++/87855
2029         * include/std/optional (_Optional_payload_base): New class template
2030         for common code hoisted from _Optional_payload specializations. Use
2031         a template for the union, to allow a partial specialization for
2032         types with non-trivial destructors. Add constructors for in-place
2033         initialization to the union.
2034         (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
2035         to perform non-trivial copy construction, instead of relying on
2036         non-standard copy elision in a delegating constructor.
2037         (_Optional_payload(bool, _Optional_payload&&)): Likewise for
2038         non-trivial move construction.
2039         (_Optional_payload): Derive from _Optional_payload_base and use it
2040         for everything except the non-trivial assignment operators, which are
2041         defined as needed.
2042         (_Optional_payload<false, C, M>): Derive from the specialization
2043         _Optional_payload<true, false, false> and add a destructor.
2044         (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
2045         Forward to corresponding members of _Optional_payload.
2046         (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
2047         Hoist common members from _Optional_base.
2048         (_Optional_base): Make all members and base class public.
2049         (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
2050         _Optional_base_impl.
2051         * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
2052         support for new std::optional layout.
2053         * testsuite/libstdc++-prettyprinters/compat.cc: New test.
2055         PR libstdc++/88066
2056         * include/bits/locale_conv.h: Use <> for includes not "".
2057         * include/ext/random: Likewise.
2058         * include/ext/vstring.h: Likewise.
2060 2019-01-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2062         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
2063         (GLIBCXX_3.4.21): Likewise.
2065 2019-01-08  Jonathan Wakely  <jwakely@redhat.com>
2067         PR libstdc++/88749
2068         * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
2069         to match the one that controls whether utimbuf and utime are declared.
2071 2019-01-07  Jonathan Wakely  <jwakely@redhat.com>
2073         PR libstdc++/87787
2074         * include/bits/char_traits.h (char_traits::move): Do not pass null
2075         pointers to memmove.
2076         * include/bits/locale_facets.h
2077         (ctype<char>::widen(const char*, const char*, char*)): Do not
2078         pass null pointers to memcpy.
2079         (ctype<char>::narrow(const char*, const char*, char, char*)):
2080         Likewise.
2081         (ctype<char>::do_widen(const char*, const char*, char*)):
2082         Likewise.
2083         (ctype<char>::do_narrow(const char*, const char*, char, char*)):
2084         Likewise.
2086         * doc/xml/manual/spine.xml: Update copyright years.
2087         * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
2088         * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
2089         for C++17 filesystem library.
2090         * doc/html/*: Regenerate.
2092         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
2093         * config.h.in: Regenerate.
2094         * config/abi/pre/gnu.ver: Order patterns for filesystem operations
2095         alphabetically and add missing entries for copy_symlink,
2096         hard_link_count, rename, and resize_file.
2097         * configure: Regenerate.
2098         * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
2099         used unconditionally.
2100         * src/filesystem/ops-common.h (__gnu_posix::truncate)
2101         [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
2102         supports truncating to zero length.
2103         * testsuite/27_io/filesystem/operations/all.cc: New test.
2104         * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
2106 2019-01-06  Jonathan Wakely  <jwakely@redhat.com>
2108         PR libstdc++/86756
2109         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
2110         lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
2111         * config.h.in: Regenerate.
2112         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
2113         remaining std::filesystem types and functions.
2114         * configure: Regenerate.
2115         * src/c++17/Makefile.am: Add C++17 filesystem sources.
2116         * src/c++17/Makefile.in: Regenerate.
2117         * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
2118         here, and change name of included file.
2119         * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
2120         here, and change name of included file.
2121         * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
2122         path to dir-common.h.
2123         * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
2124         path to ops-common.h. Disable -Wunused-parameter warnings.
2125         (internal_file_clock): Define unconditionally.
2126         [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
2127         define.
2128         (do_copy_file, do_space): Move definitions to ops.common.h.
2129         (copy, file_size, hard_link_count, last_write_time, space): Only
2130         perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
2131         report an error.
2132         (last_write_time, read_symlink): Remove unused attributes from
2133         parameters.
2134         * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
2135         * src/filesystem/Makefile.in: Regenerate.
2136         * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
2137         * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
2138         * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
2139         * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
2140         * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
2141         dummy types and functions instead of using #error.
2142         * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
2143         * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
2144         in terms of stat.
2145         [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
2146         (do_copy_file, do_space): Move definitions here from std-ops.cc.
2147         * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
2148         to account for new namespace.
2149         * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
2150         -lstdc++fs from dg-options.
2151         * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
2152         * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
2153         * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
2154         * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
2155         * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
2156         Likewise.
2157         * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
2158         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2159         Likewise.
2160         * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
2161         * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
2162         * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
2163         * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
2164         * testsuite/27_io/filesystem/operations/create_directories.cc:
2165         Likewise.
2166         * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
2167         * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
2168         * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
2169         * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
2170         * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
2171         * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
2172         * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2173         * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
2174         * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
2175         * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
2176         * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
2177         * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
2178         * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
2179         * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
2180         * testsuite/27_io/filesystem/operations/space.cc: Likewise.
2181         * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2182         * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2183         * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
2184         Likewise.
2185         * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
2188         PR libstdc++/86756
2189         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
2190         typeinfo and vtables less greedy.
2191         (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
2192         * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
2193         * src/c++17/Makefile.in: Regenerate.
2194         * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
2195         here, and change name of included file.
2196         * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
2197         * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
2198         from sources.
2199         * src/filesystem/Makefile.in: Regenerate.
2200         * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
2201         * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
2202         * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
2203         from dg-options and remove dg-require-filesystem-ts.
2204         * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
2205         * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
2206         * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
2207         * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
2208         * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
2209         * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
2210         * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
2211         * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
2212         * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
2213         * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
2214         * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
2215         * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
2216         * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
2217         * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
2218         * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
2219         * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
2220         * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
2221         * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
2222         * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
2223         * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
2224         * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
2225         Likewise.
2226         * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
2227         * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
2228         * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
2229         * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
2230         * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
2231         * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
2232         * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
2233         * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
2234         * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
2235         * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
2236         * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
2237         * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
2238         Likewise.
2239         * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
2240         Likewise.
2241         * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
2242         Likewise.
2243         * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
2244         Likewise.
2245         * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
2246         * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2247         * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
2248         * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
2249         * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2250         * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2251         * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2252         * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2253         * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
2254         * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2255         Likewise.
2256         * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2257         * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2258         * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2259         * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
2260         * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2262         PR libstdc++/87431
2263         * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
2264         Check is_trivially_copyable instead of is_scalar.
2265         (variant::emplace<N, Args>(Args&&...)): If construction of the new
2266         contained value can throw and its type is trivially copyable then
2267         construct into a temporary variant and move from it, to provide the
2268         strong exception safety guarantee.
2269         (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
2270         Likewise.
2271         * testsuite/20_util/variant/87431.cc: New test.
2272         * testsuite/20_util/variant/run.cc: Adjust test so that throwing
2273         conversion causes valueless state.
2275         PR libstdc++/88607
2276         * testsuite/17_intro/headers/c++1998/charset.cc: New test.
2277         * testsuite/17_intro/headers/c++2011/charset.cc: New test.
2278         * testsuite/17_intro/headers/c++2014/charset.cc: New test.
2279         * testsuite/17_intro/headers/c++2017/charset.cc: New test.
2280         * testsuite/17_intro/headers/c++2020/charset.cc: New test.
2282 2019-01-05  Jonathan Wakely  <jwakely@redhat.com>
2284         * include/bits/fs_fwd.h (__file_clock): Define new clock.
2285         (file_time_type): Redefine in terms of __file_clock.
2286         * src/filesystem/ops-common.h (file_time): Add FIXME comment about
2287         overflow.
2288         * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
2289         internal linkage.
2290         (internal_file_lock): New helper type for accessing __file_clock.
2291         (do_copy_file): Use internal_file_lock to convert system time to
2292         file_time_type.
2293         (last_write_time(const path&, error_code&)): Likewise.
2294         (last_write_time(const path&, file_time_type, error_code&)): Likewise.
2296 2019-01-04  Jonathan Wakely  <jwakely@redhat.com>
2298         * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
2299         for const member functions of std::basic_string.
2300         (GLIBCXX_3.4.26): Export member functions of std::basic_string added
2301         in C++17.
2302         * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
2303         Make non-standard constructor private.
2304         [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
2305         Likewise.
2306         * include/bits/basic_string.tcc (std::string, std::wstring): Declare
2307         explicit instantiations for C++17 as well as earlier dialects.
2308         * src/c++17/Makefile.am: Add new source files.
2309         * src/c++17/Makefile.in: Regenerate.
2310         * src/c++17/cow-string-inst.cc: New file defining explicit
2311         instantiations for basic_string member functions added in C++17.
2312         * src/c++17/string-inst.cc: Likewise.
2314         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
2315         copy/move constructors for old std::basic_string.
2316         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2317         (basic_string::reference, basic_string::const_reference): Define
2318         as plain references for C++11 and later.
2319         (basic_string::basic_string()): Put constructor body outside
2320         preprocessor conditional groups.
2321         (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
2322         instead of copying it.
2323         (basic_string::basic_string(const basic_string&, const _Alloc&)):
2324         Define.
2325         (basic_string::basic_string(basic_string&&, const _Alloc&)):
2326         Define.
2327         * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
2328         cases for old basic_string.
2329         * testsuite/21_strings/basic_string/cons/char/8.cc: Test
2330         allocator-extended constructors unconditionally. Add extra members to
2331         allocator type when using old string ABI.
2332         * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
2333         for old string ABI.
2334         * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
2336         * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
2337         -fno-inline added to test flags.
2339         * testsuite/21_strings/basic_string/requirements/
2340         explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
2342         * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
2343         assertion failures with old std::string ABI.
2345         * include/bits/fs_path.h (path::_List::erase): Replace both overloads
2346         with ...
2347         (path::pop_back(), path::_M_erase_from(const_iterator)): New member
2348         functions that will only erase elements at the end.
2349         * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
2350         (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
2351         (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
2352         of erase(p, end()).
2353         (path::_List::pop_back()): Define.
2354         (path::_List::_M_erase_from(const_iterator)): Define.
2355         (path::operator/=(const path&)): Use pop_back to remove last component
2356         and _M_erase_from to remove multiple components.
2357         (path::_M_append(basic_string_view<value_type>)): Likewise.
2358         (path::operator+=(const path&)): Likewise.
2359         (path::_M_concat(basic_string_view<value_type>)): Likewise.
2360         (path::remove_filename()): Likewise.
2361         (path::lexically_normal()): Use _List::_Impl iterators instead of
2362         path::iterator. Use pop_back to remove components from the end. Clear
2363         trailing filename, instead of using erase(const_iterator) to remove
2364         a non-final component.
2365         * testsuite/27_io/filesystem/path/generation/normal.cc: Test
2366         additional cases.
2367         * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
2369         * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
2370         incorrect treatment of empty filename after trailing slash.
2371         * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
2373         * testsuite/21_strings/basic_string/modifiers/assign/char/
2374         move_assign_optim.cc: Avoid spurious failure when -fno-inline added
2375         to test flags.
2376         * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
2377         move_assign_optim.cc: Likewise.
2379 2019-01-03  Jonathan Wakely  <jwakely@redhat.com>
2380             Jakub Jelinek  <jakub@redhat.com>
2382         PR libstdc++/88607
2383         * include/experimental/memory: Replace UTF-8 quote characters.
2384         * include/std/future: Replace UTF-8 "em dash" characters.
2386 2019-01-03  Jonathan Wakely  <jwakely@redhat.com>
2388         PR libstdc++/88607
2389         * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
2390         * include/debug/forward_list: Likewise.
2391         * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
2392         character.
2393         * include/experimental/chrono: Likewise.
2394         * include/experimental/functional: Likewise.
2395         * include/experimental/ratio: Likewise.
2396         * include/experimental/system_error: Likewise.
2397         * include/experimental/tuple: Likewise.
2398         * include/experimental/type_traits: Likewise.
2399         * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
2400         * include/parallel/multiseq_selection.h: Likewise.
2402         PR libstdc++/88681
2403         * config/abi/pre/gnu.ver: Add missing exports.
2404         * testsuite/22_locale/collate_byname/88681.cc: New test.
2405         * testsuite/22_locale/time_get/get/char/88681.cc: New test.
2406         * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
2408 2019-01-02  Jonathan Wakely  <jwakely@redhat.com>
2410         * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
2411         initializer_list<value_type> and from input iterator ranges.
2412         * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
2414         * testsuite/experimental/string_view/element_access/char/empty.cc:
2415         Fix year range in copyright header.
2417 2019-01-02  Joel Brobecker  <brobecker@adacore.com>
2419         * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2420         Fix year range in copyright header.
2422 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
2424         Update copyright years.
2426 Copyright (C) 2019 Free Software Foundation, Inc.
2428 Copying and distribution of this file, with or without modification,
2429 are permitted in any medium without royalty provided the copyright
2430 notice and this notice are preserved.