target-supports.exp (check_effective_target_weak_undefined): Return 0 on hppa*-*...
[official-gcc.git] / libstdc++-v3 / ChangeLog
blob7da25945a8c8adaabe4a5012968cfd3786551f51
1 2019-03-08  Jonathan Wakely  <jwakely@redhat.com>
3         * doc/xml/manual/using.xml: Use link element instead of xref.
4         * doc/html/*: Regenerate.
6         * include/bits/fs_path.h (path::format): Add fixed underlying type.
8 2019-03-08  François Dumont  <fdumont@gcc.gnu.org>
10         PR libstdc++/89477
11         * include/debug/map.h (map): Use _RequireNotAllocator to constrain
12         parameters in deduction guides.
13         * include/debug/multimap.h (multimap): Likewise.
14         * include/debug/set.h (multimap): Likewise.
15         * include/debug/multiset.h (multimap): Likewise.
16         * include/debug/unordered_map (unordered_map): Likewise.
17         (unordered_multimap): Likewise.
18         * include/debug/unordered_set (unordered_set): Likewise.
19         (unordered_multiset): Likewise.
21         PR libstdc++/89608
22         * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
23         Invalidate all iterators in case of rehash.
24         (unordered_multimap<>::_M_check_rehashed): Likewise.
25         * include/debug/unordered_set
26         (unordered_set<>::_M_check_rehashed): Likewise.
27         (unordered_multiset<>::_M_check_rehashed): Likewise.
28         * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
30 2019-03-07  Andreas Schwab  <schwab@suse.de>
32         * config/abi/post/riscv64-linux-gnu: New directory.
33         * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
35 2019-03-07  Jonathan Wakely  <jwakely@redhat.com>
37         * testsuite/20_util/function_objects/bind_front/1.cc: Change from
38         compile test to run. Fix typo.
40         * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
41         * doc/html/*: Regenerate.
43         P0356R5 Simplified partial function application
44         * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
45         helpers for bind_front.
46         (bind_front, __cpp_lib_bind_front): Define.
47         * testsuite/20_util/function_objects/bind_front/1.cc: New test.
49 2019-03-06  Jonathan Wakely  <jwakely@redhat.com>
51         * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
52         * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
53         * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
54         * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
56 2019-03-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
58         PR libstdc++/86655 - std::assoc_legendre should not constrain
59         the value of m (or x).
60         * include/tr1/legendre_function.tcc (__assoc_legendre_p,
61         __sph_legendre): If degree > order Don't throw, return 0.
62         (__legendre_p, __assoc_legendre_p): Don't constrain x either.
63         * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
64         * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
65         * testsuite/tr1/5_numerical_facilities/special_functions/
66         02_assoc_legendre/pr86655.cc: New test.
67         * testsuite/tr1/5_numerical_facilities/special_functions/
68         22_sph_legendre/pr86655.cc: New test.
70 2019-03-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
72         Rewrite variant.
73         Also PR libstdc++/85517
74         * include/std/variant (__do_visit): New.
75         (__variant_cast): Likewise.
76         (__variant_cookie): Likewise.
77         (__erased_*): Remove.
78         (_Variant_storage::_S_vtable): Likewise.
79         (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
80         (_Variant_storage::__M_reset): Adjust.
81         (__variant_construct): New.
82         (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
83         __variant_construct.
84         (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
85         (_Move_ctor_base::__M_destructive_copy): New.
86         (_Move_ctor_base::__M_destructive_move): Adjust to use
87         __variant_construct.
88         (_Copy_assign_base::operator=): Adjust to use __do_visit.
89         (_Copy_assign_alias): Adjust to check both copy assignment
90         and copy construction for triviality.
91         (_Move_assign_base::operator=): Adjust to use __do_visit.
92         (_Multi_array): Add support for visitors that accept and return
93         a __variant_cookie.
94         (__gen_vtable_impl::_S_apply_all_alts): Likewise.
95         (__gen_vtable_impl::_S_apply_single_alt): Likewise.
96         (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
97         a __variant_cookie temporary for a variant that is valueless and..
98         (__gen_vtable_impl::__visit_invoke): ..adjust here.
99         (__gen_vtable::_Array_type): Conditionally make space for
100         the __variant_cookie visitor case.
101         (__variant_construct_by_index): New.
102         (get_if): Adjust to use std::addressof.
103         (relops): Adjust to use __do_visit.
104         (variant): Add __variant_cast and __variant_construct_by_index
105         as friends.
106         (variant::emplace): Use _M_reset() and __variant_construct_by_index
107         instead of self-destruction.
108         (variant::swap): Adjust to use __do_visit.
109         (visit): Reimplement in terms of __do_visit.
110         (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
111         * testsuite/20_util/variant/compile.cc: Adjust.
112         * testsuite/20_util/variant/run.cc: Likewise.
114 2019-03-06  Jonathan Wakely  <jwakely@redhat.com>
116         * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
117         constant.
118         * testsuite/experimental/feat-char8_t.cc: Likewise.
120          * include/std/type_traits [C++20] (is_bounded_array)
121          (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
122          Define.
123          * testsuite/20_util/is_bounded_array/requirements/
124          explicit_instantiation.cc: New test.
125          * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
126          test.
127          * testsuite/20_util/is_bounded_array/value.cc: New test.
128          * testsuite/20_util/is_unbounded_array/requirements/
129          explicit_instantiation.cc: New test.
130          * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
131          * test.
132          * testsuite/20_util/is_unbounded_array/value.cc: New test.
134         * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
135         Add constexpr.
136         * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
138 2019-03-05  Jonathan Wakely  <jwakely@redhat.com>
140         * include/c_compatibility/math.h [C++20] (lerp): Add using
141         declaration.
142         * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
143         (__lerp): Define function template to implement lerp.
144         (lerp(float, float, float), lerp(double, double, double))
145         (lerp(long double, long double, long double)): Define for C++20.
146         * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
147         (midpoint(T, T), midpoint(T*, T*)): Define.
148         * include/std::version [C++20] (__cpp_lib_interpolate): Define.
149         * testsuite/26_numerics/lerp.cc: New test.
150         * testsuite/26_numerics/midpoint/floating.cc: New test.
151         * testsuite/26_numerics/midpoint/integral.cc: New test.
152         * testsuite/26_numerics/midpoint/pointer.cc: New test.
154 2019-03-04  Edward Smith-Rowland  <3dw4rd@verizon.net>
156         PR libstdc++/88996 Implement P0439R0
157         Make std::memory_order a scoped enumeration.
158         * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
159         add variables for the old enumerators.  Adjust calls.
160         * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
161         * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
163 2019-03-04  Jonathan Wakely  <jwakely@redhat.com>
165         * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
166         directive.
168         * include/std/memory_resource (polymorphic_allocator): Add default
169         template argument for C++20.
170         (polymorphic_allocator::allocate_bytes)
171         (polymorphic_allocator::deallocate_bytes)
172         (polymorphic_allocator::allocate_object)
173         (polymorphic_allocator::deallocate_object)
174         (polymorphic_allocator::new_object)
175         (polymorphic_allocator::delete_object): New member functions for
176         C++20.
177         * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
178         test.
180 2019-03-03  Jonathan Wakely  <jwakely@redhat.com>
182         PR libstdc++/89562
183         * src/filesystem/ops-common.h (do_copy_file): Open files in binary
184         mode for mingw.
186 2019-03-01  Jonathan Wakely  <jwakely@redhat.com>
188         * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
189         [!__cpp_sized_deallocation]: Do not pass size to operator delete.
191         * include/std/memory (uses_allocator_construction_args): New set of
192         overloaded functions.
193         (make_obj_using_allocator, uninitialized_construct_using_allocator):
194         New functions.
195         * include/std/memory_resource (polymorphic_allocator::construct)
196         [__cplusplus > 201703l]: Replace all overloads with a single function
197         using uses_allocator_construction_args.
198         * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
199         test.
200         * testsuite/20_util/uses_allocator/make_obj.cc: New test.
202 2019-02-27  Jonathan Wakely  <jwakely@redhat.com>
204         PR libstdc++/89466
205         * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
206         stylesheet directories before check for xsltproc. Try to use
207         xmlcatalog to find local stylesheet directory before trying hardcoded
208         paths. Add path used by suse to hardcoded paths. Adjust xsltproc
209         check to look for the same stylesheet as doc/Makefile.am uses. Don't
210         use xsltproc if xmlcatalog fails to find a local stylesheet.
211         * configure.ac: Check for xmlcatalog.
212         * Makefile.in: Regenerate.
213         * configure: Likewise.
214         * doc/Makefile.in: Likewise.
215         * include/Makefile.in: Likewise.
216         * libsupc++/Makefile.in: Likewise.
217         * po/Makefile.in: Likewise.
218         * python/Makefile.in: Likewise.
219         * src/Makefile.in: Likewise.
220         * src/c++11/Makefile.in: Likewise.
221         * src/c++17/Makefile.in: Likewise.
222         * src/c++98/Makefile.in: Likewise.
223         * src/filesystem/Makefile.in: Likewise.
224         * testsuite/Makefile.in: Likewise.
226 2019-02-26  Jonathan Wakely  <jwakely@redhat.com>
228         PR libstdc++/89477
229         * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
230         container deduction guides.
231         * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
232         * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
233         parameters in deduction guides.
234         * include/bits/stl_multimap.h (multimap): Likewise.
235         * include/bits/stl_multiset.h (multiset): Likewise.
236         * include/bits/stl_queue.h (queue, priority_queue): Likewise.
237         * include/bits/stl_set.h (set): Likewise.
238         * include/bits/stl_stack.h (stack): Likewise.
239         * include/bits/unordered_map.h (unordered_map, unordered_multimap):
240         use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
241         constrain parameters in deduction guides.
242         * include/bits/unordered_set.h (unordered_set, unordered_multiset):
243         Likewise.
244         * testsuite/23_containers/map/cons/deduction.cc: Test additional
245         deduction cases.
246         * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
247         * testsuite/23_containers/set/cons/deduction.cc: Likewise.
248         * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
249         * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
250         Likewise.
251         * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
252         Likewise.
253         * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
255         PR libstdc++/89416
256         * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
257         to class template and partial specialization using void_t.
258         (__is_copy_insertable, __is_move_insertable): Adjust base class.
260 2019-02-24  Jonathan Wakely  <jwakely@redhat.com>
262         PR libstdc++/89416
263         * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
264         copy and move members public.
266 2019-02-23  Jonathan Wakely  <jwakely@redhat.com>
268         * include/std/type_traits (__underlying_type_impl): New helper to
269         make underlying_type SFINAE-friendly.
270         (underlying_type): Derive from __underlying_type_impl.
271         * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
272         test.
274         PR libstdc++/89446
275         * include/bits/char_traits.h (__constant_char_array): Check index is
276         in range before dereferencing.
277         (char_traits<char>::compare, char_traits<char>::find)
278         (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
279         immediately if n is zero.
280         (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
281         Remove workarounds for PR 67026.
282         * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
283         New test.
284         * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
285         New test.
287 2019-02-22  Eric Botcazou  <ebotcazou@adacore.com>
289         * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
290         * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
292 2019-02-22  Jakub Jelinek  <jakub@redhat.com>
294         PR libstdc++/89402
295         * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
296         type to std::size_t and argument to type to long double.
298 2019-02-22  Eric Botcazou  <ebotcazou@adacore.com>
300         * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
301         * config/abi/post/sparc64-linux-gnu: New directory.
302         * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
303         * config/abi/post/sparc64-linux-gnu/32: New directory.
304         * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
306 2019-02-21  Jonathan Wakely  <jwakely@redhat.com>
308         * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
309         * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
310         test.
312 2019-02-22  Tom Honermann  <tom@honermann.net>
314         * python/libstdcxx/v6/printers.py (register_type_printers): Add type
315         printers for u8string and u8string_view.
317 2019-02-22  Tom Honermann  <tom@honermann.net>
319         * testsuite/18_support/byte/ops.cc: Validate
320         std::to_integer<char8_t>, std::to_integer<char16_t>, and
321         std::to_integer<char32_t>.
322         * testsuite/18_support/numeric_limits/dr559.cc: Validate
323         std::numeric_limits<char8_t>.
324         * testsuite/18_support/numeric_limits/lowest.cc: Validate
325         std::numeric_limits<char8_t>::lowest().
326         * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
327         std::numeric_limits<char8_t>::max_digits10.
328         * testsuite/18_support/type_info/fundamental.cc: Validate
329         typeinfo for char8_t.
330         * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
331         std::from_chars with char8_t.
332         * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
333         Validate explicit instantiation of std::hash<char8_t>.
334         * testsuite/20_util/is_integral/value.cc: Validate
335         std::is_integral<char8_t>.
336         * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
337         Validate std::make_signed<char8_t>.
338         * testsuite/21_strings/basic_string/cons/char/deduction.cc:
339         Validate u8string construction from char8_t sources.
340         * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
341         std::pmr::u8string.
342         * testsuite/21_strings/basic_string_view/operations/compare/
343         char/70483.cc: Validate substr operations on u8string_view.
344         * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
345         the u8string_view typedef is defined.
346         * testsuite/21_strings/char_traits/requirements/
347         constexpr_functions.cc: Validate char_traits<char8_t> constexpr
348         member functions.
349         * testsuite/21_strings/char_traits/requirements/
350         constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
351         constexpr member functions.
352         * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
353         that the u8string typedef is defined.
354         * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
355         of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
356         std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
357         * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
358         numbers.
359         * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
360         * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
361         Likewise.
362         * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
363         * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
364         Validate std::atomic<char8_t>::is_always_lock_free
365         * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
366         Update line numbers.
367         * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
368         Likewise.
369         * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
370         Likewise.
371         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
372         Validate std::experimental::pmr::u8string.
373         * testsuite/experimental/string_view/typedefs.cc: Validate that the
374         u8string_view typedef is defined.
375         * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
376         char32_t to the typelists.
378 2019-02-22  Tom Honermann  <tom@honermann.net>
380         * include/ext/typelist.h: Constrain a partial specialization of
381         typelist::detail::append_ to only match chain<T1,T2>.
383 2019-02-21  Jonathan Wakely  <jwakely@redhat.com>
385         PR libstdc++/89416
386         * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
387         class template with class. Replace move and copy member types with
388         member alias templates, so they are only instantiated when needed.
389         (__is_copy_insertable, __is_move_insertable): Adjust base class.
390         * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
391         test for C++11/14/17 as well.
392         * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
393         test.
395 2019-02-20  Jakub Jelinek  <jakub@redhat.com>
397         PR libstdc++/89402
398         * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
399         _GLIBCXX_PURE to the alias declaration.
401 2019-02-19  Jonathan Wakely  <jwakely@redhat.com>
403         * testsuite/21_strings/basic_string/literals/types.cc
404         [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
405         * testsuite/21_strings/basic_string/literals/values.cc
406         [_GLIBCXX_USE_CHAR8_T]: Likewise.
407         * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
408         potentially having different type.
409         * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
410         * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
411         to char.
412         * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
413         * testsuite/22_locale/codecvt/utf8.cc: Likewise.
414         * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
415         string literals only using basic character set.
416         * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
417         u8 literals to char.
418         * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
419         Test ATOMIC_CHAR8_T_LOCK_FREE.
420         Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
421         * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
422         [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
423         * testsuite/experimental/string_view/literals/types.cc
424         [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
425         literal.
426         * testsuite/experimental/string_view/literals/values.cc
427         [_GLIBCXX_USE_CHAR8_T]: Likewise.
429 2019-02-19  Tom Honermann  <tom@honermann.net>
431         * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
432         from char16_32_t.cc; validates numeric_limits<char8_t>.
433         * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
434         test cloned from types.cc; validates operator""s for char8_t
435         returns u8string.
436         * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
437         test cloned from values.cc; validates construction and comparison
438         of u8string values.
439         * testsuite/21_strings/basic_string/requirements/
440         /explicit_instantiation/char8_t/1.cc: New test cloned from
441         char16_t/1.cc; validates explicit instantiation of
442         basic_string<char8_t>.
443         * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
444         New test cloned from types.cc; validates operator""sv for char8_t
445         returns u8string_view.
446         * testsuite/21_strings/basic_string_view/literals/
447         values-char8_t.cc: New test cloned from values.cc; validates
448         construction and comparison of u8string_view values.
449         * testsuite/21_strings/basic_string_view/requirements/
450         explicit_instantiation/char8_t/1.cc: New test cloned from
451         char16_t/1.cc; validates explicit instantiation of
452         basic_string_view<char8_t>.
453         * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
454         New test cloned from char16_t/65049.cc; validates that
455         char_traits<char8_t> is not vulnerable to the concerns in PR65049.
456         * testsuite/21_strings/char_traits/requirements/char8_t/
457         typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
458         that char_traits<char8_t> member typedefs are present and correct.
459         * testsuite/21_strings/char_traits/requirements/
460         explicit_instantiation/char8_t/1.cc: New test cloned from
461         char16_t/1.cc; validates explicit instantiation of
462         char_traits<char8_t>.
463         * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
464         from char16_t.cc: validates
465         codecvt<char16_t, char8_t, mbstate_t>.
466         * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
467         from char32_t.cc: validates
468         codecvt<char32_t, char8_t, mbstate_t>.
469         * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
470         utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
471         codecvt<char32_t, char8_t, std::mbstate_t>.
472         * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
473         test cloned from string.cc; validates filesystem::path construction
474         from char8_t input.
475         * testsuite/experimental/feat-char8_t.cc: New test; validates that
476         the __cpp_lib_char8_t feature test macro is defined with the
477         correct value.
478         * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
479         New test cloned from string.cc; validates filesystem::path
480         construction from char8_t input.
481         * testsuite/experimental/string_view/literals/types-char8_t.cc: New
482         test cloned from types.cc; validates operator""sv for char8_t
483         returns u8string_view.
484         * testsuite/experimental/string_view/literals/values-char8_t.cc:
485         New test cloned from values.cc; validates construction and
486         comparison of u8string_view values.
487         * testsuite/experimental/string_view/requirements/
488         explicit_instantiation/char8_t/1.cc: New test cloned from
489         char16_t/1.cc; validates explicit instantiation of
490         basic_string_view<char8_t>.
491         * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
492         ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
493         enabled.
495 2019-02-19  Tom Honermann  <tom@honermann.net>
497         P0482R5 char8_t: Standard library support
498         * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
499         typeinfo symbols for char8_t.
500         * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
501         (GLIBCXX_3.4.26): Add symbols for specializations of
502         numeric_limits and codecvt that involve char8_t.
503         (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
504         * include/bits/atomic_base.h: Add atomic_char8_t.
505         * include/bits/basic_string.h: Add std::hash<u8string> and
506         operator""s(const char8_t*, size_t).
507         * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
508         __cpp_lib_char8_t.
509         * include/bits/char_traits.h: Add char_traits<char8_t>.
510         * include/bits/codecvt.h: Add
511         codecvt<char16_t, char8_t, mbstate_t>,
512         codecvt<char32_t, char8_t, mbstate_t>,
513         codecvt_byname<char16_t, char8_t, mbstate_t>, and
514         codecvt_byname<char32_t, char8_t, mbstate_t>.
515         * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
516         recognize char8_t as an integral type.
517         * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
518         char8_t.
519         (path::u8string): Return std::u8string when char8_t support is
520         enabled.
521         (path::generic_u8string): Likewise.
522         (path::_S_convert): Handle conversion from char8_t input.
523         (path::_S_str_convert): Likewise.
524         * include/bits/functional_hash.h: Add hash<char8_t>.
525         * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
526         char8_t.
527         * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
528         for new char8_t specializations.
529         * include/bits/localefwd.h: Add missing declarations of
530         codecvt<char16_t, char, mbstate_t> and
531         codecvt<char32_t, char, mbstate_t>.  Add char8_t declarations
532         codecvt<char16_t, char8_t, mbstate_t> and
533         codecvt<char32_t, char8_t, mbstate_t>.
534         * include/bits/postypes.h: Add u8streampos
535         * include/bits/stringfwd.h: Add declarations of
536         char_traits<char8_t> and u8string.
537         * include/c_global/cstddef: Add __byte_operand<char8_t>.
538         * include/experimental/bits/fs_path.h (path::__is_encoded_char):
539         Recognize char8_t.
540         (path::u8string): Return std::u8string when char8_t support is
541         enabled.
542         (path::generic_u8string): Likewise.
543         (path::_S_convert): Handle conversion from char8_t input.
544         (path::_S_str_convert): Likewise.
545         * include/experimental/string: Add u8string.
546         * include/experimental/string_view: Add u8string_view,
547         hash<experimental::u8string_view>, and
548         operator""sv(const char8_t*, size_t).
549         * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
550         * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
551         as a character type.
552         * include/std/limits: Add numeric_limits<char8_t>.
553         * include/std/string_view: Add u8string_view,
554         hash<experimental::u8string_view>, and
555         operator""sv(const char8_t*, size_t).
556         * include/std/type_traits: Add __is_integral_helper<char8_t>,
557         __make_unsigned<char8_t>, and __make_signed<char8_t>.
558         * libsupc++/atomic_lockfree_defines.h: Define
559         ATOMIC_CHAR8_T_LOCK_FREE.
560         * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
561         codecvt.cc and limits.cc so that char8_t specializations of
562         numeric_limits and codecvt and emitted.
563         * src/c++11/Makefile.in: Likewise.
564         * src/c++11/codecvt.cc: Define members of
565         codecvt<char16_t, char8_t, mbstate_t>,
566         codecvt<char32_t, char8_t, mbstate_t>,
567         codecvt_byname<char16_t, char8_t, mbstate_t>, and
568         codecvt_byname<char32_t, char8_t, mbstate_t>.
569         * src/c++11/limits.cc: Define members of
570         numeric_limits<char8_t>.
571         * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
572         locale_init.cc and localename.cc.
573         * src/c++98/Makefile.in: Likewise.
574         * src/c++98/locale_init.cc: Add initialization for the
575         codecvt<char16_t, char8_t, mbstate_t> and
576         codecvt<char32_t, char8_t, mbstate_t> facets.
577         * src/c++98/localename.cc: Likewise.
578         * testsuite/util/testsuite_abi.cc: Validate ABI bump.
580 2019-02-18  Wilco Dijkstra  <wdijkstr@arm.com>
582         * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
583         * 27_io/filesystem/operations/resize_file.cc: Likewise.
584         * 27_io/filesystem/path/generation/normal2.cc: Likewise.
586 2019-02-14  Jonathan Wakely  <jwakely@redhat.com>
588         * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
589         * doc/html/*: Regenerate.
591         * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
592         * doc/html/*: Regenerate.
594         * doc/xml/manual/intro.xml: Document LWG 2586 status.
595         * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
596         allocator type in is_constructible checks.
597         * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
598         * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
599         * testsuite/20_util/tuple/cons/allocators.cc: Add test using
600         problematic type from LWG 2586 discussion.
601         * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
602         * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
604         * configure.ac: Check for C11 timespec_get function.
605         * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
606         (openbsd): Likewise
607         * config.h.in: Regenerate.
608         * configure: Regenerate.
609         * include/c_global/ctime (timespec, timespec_get): Add to namespace
610         std for C++17 and up.
612         * doc/xml/manual/intro.xml: Document LWG 2537 status.
613         * include/bits/stl_queue.h
614         (priority_queue(const Compare&, const Container&, const Alloc&))
615         (priority_queue(const Compare&, Container&&, const Alloc&)): Call
616         make_heap.
617         * testsuite/23_containers/priority_queue/dr2537.cc: New test.
619         * doc/xml/manual/intro.xml: Document LWG 2566 status.
620         * include/bits/stl_queue.h (queue, priority_queue): Add static
621         assertions to enforce LWG 2566 requirement on value_type.
622         * include/bits/stl_stack.h (stack): Likewise.
624         PR middle-end/89303
625         * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
627         * doc/xml/manual/intro.xml: Document LWG 2735 status.
628         * include/bits/std_abs.h: Add comment about LWG 2735.
629         * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
631 2019-02-13  Jonathan Wakely  <jwakely@redhat.com>
633         PR libstdc++/89345
634         * include/std/version [__cpp_impl_destroying_delete]
635         (__cpp_lib_destroying_delete): Only define for C++2a and later.
636         * libsupc++/new [__cpp_impl_destroying_delete]
637         (__cpp_lib_destroying_delete): Likewise.
638         (destroying_delete_t, destroying_delete): Likewise, but define even
639         when __cpp_impl_destroying_delete is not defined.
640         * testsuite/18_support/destroying_delete.cc: New test.
642 2019-02-11  Jonathan Wakely  <jwakely@redhat.com>
644         PR libstdc++/89023
645         * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
646         * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
647         * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
648         * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
650 2019-02-09  Jonathan Wakely  <jwakely@redhat.com>
652         PR libstdc++/71044
653         * include/bits/fs_path.h (path::has_root_name)
654         (path::has_root_directory, path::has_root_path)
655         (path::has_relative_path, path::has_parent_path)
656         (path::has_filename, path::has_stem, path::has_extension)
657         (path::is_absolute, path::is_relative, path::_M_find_extension): Add
658         noexcept.
659         * src/c++17/fs_path.cc (path::has_root_name)
660         (path::has_root_directory, path::has_root_path)
661         (path::has_relative_path, path::has_parent_path)
662         (path::has_filename, path::_M_find_extension): Add noexcept.
664 2019-02-06  Jonathan Wakely  <jwakely@redhat.com>
666         PR libstdc++/89102 (partial)
667         * include/std/type_traits (common_type<>): Define.
668         (common_type<T>): Derive from common_type<T, T>.
669         * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
670         Test zero-length template argument list.
671         * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
672         Test additional single argument cases.
673         * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
674         Adjust expected error.
676 2019-02-05  Jonathan Wakely  <jwakely@redhat.com>
678         PR libstdc++/89128
679         * include/bits/stl_queue.h (queue, priority_queue): Add deduction
680         guides.
681         * include/bits/stl_stack.h (stack): Likewise.
682         * testsuite/23_containers/priority_queue/deduction.cc: New test.
683         * testsuite/23_containers/queue/deduction.cc: New test.
684         * testsuite/23_containers/stack/deduction.cc: New test.
686         PR libstdc++/89194
687         * include/std/type_traits (__is_convertible_helper)
688         (__is_convertible_helper<_From, _To, false>): Revert changes to
689         support is_nothrow_convertible.
690         (__is_nt_convertible_helper): New helper.
691         (is_nothrow_convertible): Use __is_nt_convertible_helper.
693         * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
694         use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
696         PR libstdc++/89130
697         * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
698         __is_alloc_insertable_impl. Replace single type member with two
699         members, one for each of copy and move insertable.
700         (__is_move_insertable): New trait for internal use.
701         * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
702         (vector::_S_nothrow_relocate(true_type)): New functions to
703         conditionally check if __relocate_a can throw.
704         (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
705         on __is_move_insertable.
706         (vector::_S_do_relocate): New overloaded functions to conditionally
707         call __relocate_a.
708         (vector::_S_relocate): New function that dispatches to _S_do_relocate
709         based on _S_use_relocate.
710         * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
711         (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
712         * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
714         PR libstdc++/89090
715         * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
716         parameter unnamed. Add message to static assertion.
717         * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
718         (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
719         in C++11 code.
721 2019-02-05  Marc Glisse  <marc.glisse@inria.fr>
723         PR libstdc++/87106
724         * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
725         Rename...
726         (__is_bitwise_relocatable): ... to this.
727         (__relocate_a_1): Adapt.
728         * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
729         (__is_bitwise_relocatable): ... to this.
731 2019-01-30  Jonathan Wakely  <jwakely@redhat.com>
733         PR libstdc++/89117
734         * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
735         final component as well as from _M_pathname. Append the dot using
736         operator+= instead of only to _M_pathname.
737         (path::_M_find_extension): Reformat slightly.
738         * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
739         Add more test cases.
741 2019-01-30  Ulrich Drepper  <drepper@redhat.com>
743         * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
745 2019-01-29  Jonathan Wakely  <jwakely@redhat.com>
747         * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
748         constexpr specifiers from arg and proj.
750         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
751         __shared_ptr instantiations used by gcc4-compatible ABI.
753         * include/experimental/forward_list (experimental::erase): Qualify
754         call to erase_if.
755         * include/experimental/list (experimental::erase): Likewise.
756         * include/std/forward_list (std::erase): Likewise.
757         * include/std/list (std::erase): Likewise.
759         * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
760         C++2a.
761         * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
762         * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
763         * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
764         * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
765         * testsuite/ext/array_allocator/26875.cc: Likewise.
766         * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
767         * testsuite/util/replacement_memory_operators.h: Likewise.
768         * testsuite/util/testsuite_allocator.h: Likewise.
770         * include/std/memory_resource (__pool_resource::_M_unpooled): Use
771         normal mode vector, even for debug mode.
772         * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
773         Define alias template for normal mode vector.
775 2019-01-28  Jonathan Wakely  <jwakely@redhat.com>
777         PR libstdc++/68737
778         * config/locale/generic/c_locale.h (__convert_from_v)
779         [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
780         * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
781         * include/bits/locale_facets.tcc (num_put::_M_insert_float)
782         [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
784 2019-01-24  Jonathan Wakely  <jwakely@redhat.com>
786         PR libstdc++/88840
787         * include/bits/stl_vector.h (vector::__use_relocate): Replace static
788         data member with static member function _S_use_relocate().
789         * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
790         (vector::_M_default_append): Use _S_use_relocate() instead of
791         __use_relocate.
793         * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
794         sign of results.
796 2019-01-22  Jonathan Wakely  <jwakely@redhat.com>
798         PR libstdc++/88740
799         * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
800         write to stderr instead of using printf.
802 2019-01-21  Jakub Jelinek  <jakub@redhat.com>
804         PR libstdc++/86590
805         * include/bits/char_traits.h (__constant_string_p,
806         __constant_char_array_p): Use __builtin_is_constant_evaluated if
807         available.
809 2019-01-20  Ulrich Drepper  <drepper@redhat.com>
811         Implement C++20 P0600r1.
812         * include/backward/hash_map: Add nodiscard attribute to empty.
813         * include/backward/hash_set: Likewise.
814         * backward/hashtable.h: Likewise.
815         * include/bits/basic_string.h: Likewise.
816         * include/bits/forward_list.h: Likewise.
817         * include/bits/hashtable.h: Likewise.
818         * include/bits/regex.h: Likewise.
819         * include/bits/stl_deque.h: Likewise.
820         * include/bits/stl_list.h: Likewise.
821         * include/bits/stl_map.h: Likewise.
822         * include/bits/stl_multimap.h: Likewise.
823         * include/bits/stl_multiset.h: Likewise.
824         * include/bits/stl_queue.h: Likewise.
825         * include/bits/stl_set.h: Likewise.
826         * include/bits/stl_stack.h: Likewise.
827         * include/bits/stl_tree.h: Likewise.
828         * include/bits/stl_vector.h: Likewise.
829         * include/bits/unordered_map.h: Likewise.
830         * include/bits/unordered_set.h: Likewise.
831         * include/debug/array: Likewise.
832         * include/experimental/any: Likewise.
833         * include/experimental/bits/fs_path.h: Likewise.
834         * include/experimental/internet: Likewise.
835         * include/experimental/string_view: Likewise.
836         * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
837         Likewise.
838         * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
839         Likewise.
840         * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
841         Likewise.
842         * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
843         Likewise.
844         * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
845         Likewise.
846         * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
847         Likewise.
848         * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
849         Likewise.
850         * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
851         Likewise.
852         * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
853         info_fn_imps.hpp: Likewise.
854         * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
855         left_child_next_sibling_heap_.hpp: Likewise.
856         * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
857         Likewise.
858         * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
859         Likewise.
860         * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
861         Likewise.
862         * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
863         Likewise.
864         * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
865         Likewise.
866         * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
867         Likewise.
868         * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
869         Likewise.
870         * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
871         * include/ext/pb_ds/trie_policy.hpp: Likewise.
872         * include/ext/rope: Likewise.
873         * include/ext/slist: Likewise.
874         * include/ext/vstring.h: Likewise.
875         * include/profile/array: Likewise.
876         * include/std/array: Likewise.
877         * include/tr1/array: Likewise.
878         * include/tr1/hashtable.h: Likewise.
879         * include/tr1/regex: Likewise.
880         * include/tr2/dynamic_bitset: Likewise.
881         * include/bits/alloc_traits.h: Add nodiscard attribute to
882         allocate.
883         * include/experimental/memory_resource: Likewise.
884         * include/ext/alloc_traits.h: Likewise.
885         * include/ext/array_allocator.h: Likewise.
886         * include/ext/bitmap_allocator.h: Likewise.
887         * include/ext/debug_allocator.h: Likewise.
888         * include/ext/extptr_allocator.h: Likewise.
889         * include/ext/mt_allocator.h: Likewise.
890         * include/ext/new_allocator.h: Likewise.
891         * include/ext/pool_allocator.h: Likewise.
892         * include/ext/throw_allocator.h: Likewise.
893         * include/std/scoped_allocator: Likewise.
894         * libsupc++/eh_alloc.cc: Likewise.
895         * include/std/future: Add nodiscard attribute to async.
896         * libsupc++/new: Add nodiscard attribute to new.
898 2019-01-18  Jonathan Wakely  <jwakely@redhat.com>
900         PR libstdc++/87514
901         PR libstdc++/87520
902         PR libstdc++/88782
903         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
904         * include/bits/shared_ptr.h
905         (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
906         (allocate_shared): Change to use new tag type.
907         * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
908         Declare new member function.
909         (_Sp_alloc_shared_tag): Define new type.
910         (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
911         (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
912         _Sp_make_shared_tag::_S_eq to check type_info.
913         (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
914         Constrain to prevent being called with _Sp_alloc_shared_tag.
915         (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
916         Replace constructor with ...
917         (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
918         reference parameter so address of the new object can be returned to
919         the caller. Obtain the allocator from the tag type.
920         (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
921         constructor with ...
922         (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
923         to the __shared_count constructor.
924         (__allocate_shared): Change to use new tag type.
925         * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
927 2019-01-17  Jonathan Wakely  <jwakely@redhat.com>
929         * src/c++17/fs_ops.cc
930         (equivalent(const path&, const path&, error_code&))
931         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
932         compare files instead of relying on incomplete info returned by stat.
934         PR libstdc++/88884
935         * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
936         if the path is already absolute.
937         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
938         [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
940         PR libstdc++/88881
941         * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
942         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
943         of filesystem::exists.
944         (create_directories(const path&, error_code&)): Add assertions.
945         (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
946         Add workaround for bug in _wstat for paths with trailing slash.
947         * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
948         for expected behaviour on mingw.
949         * testsuite/experimental/filesystem/operations/create_directories.cc:
950         Likewise.
951         * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
952         "TMP" instead of "TMPDIR" and clean environment before each test. Do
953         not test permissions on mingw targets.
955 2019-01-16  Jonathan Wakely  <jwakely@redhat.com>
957         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
958         constructors and open members taking wide strings. Fix patterns for
959         filesystem::path members to match wstring_view parameters. Add
960         exports for shared_ptr members used by directory iterators.
961         * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
962         error code parameter if the file doesn't exist.
963         * src/filesystem/ops.cc (remove(const path&, error_code&)):
964         Likewise.
965         * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
966         values for mingw targets, where "/" is not an absolute path. Do not
967         test symlinks on mingw targets.
968         * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
969         * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
970         on mingw targets.
971         * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
972         * testsuite/27_io/filesystem/operations/create_directories.cc: Check
973         that each component of the path is created.
974         * testsuite/experimental/filesystem/operations/create_directories.cc:
975         Likewise.
976         * testsuite/27_io/filesystem/operations/exists.cc: Do not test
977         permissions on mingw targets.
978         * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
979         * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
980         * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
981         * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
982         mingw targets.
983         * testsuite/experimental/filesystem/operations/permissions.cc:
984         Likewise.
985         * testsuite/27_io/filesystem/operations/remove.cc: Do not test
986         symlinks or permissions on mingw targets.
987         * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
988         * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
989         symlinks on mingw targets.
990         * testsuite/experimental/filesystem/operations/remove_all.cc:
991         Likewise.
992         * testsuite/27_io/filesystem/operations/status.cc: Do not test
993         permissions on mingw targets.
994         * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
995         test symlinks on mingw targets.
996         * testsuite/experimental/filesystem/operations/space.cc: Fix test
997         for mingw targets.
999 2019-02-14  Ulrich Drepper  <drepper@redhat.com>
1001         PR libstdc++/88738
1002         Warn about unused comparisons of shared_ptr/unique_ptr
1003         * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
1004         * include/bits/shared_ptr.h: Use it for operator ==, !=,
1005         <, <=, >, >= for shared_ptr.
1006         * include/bits/unique_ptr.h: Likewise for unique_ptr.
1008 2019-01-15  Jonathan Wakely  <jwakely@redhat.com>
1010         * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
1011         as 201611L, because P0497R0 changes are supported.
1012         * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
1014         * include/bits/erase_if.h [__cplusplus > 201703L]
1015         (__cpp_lib_erase_if): Only define for C++2a.
1016         * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1017         (__cpp_lib_null_iterators): Define.
1018         * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
1019         (__cpp_lib_null_iterators): Define.
1020         [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
1022         * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
1023         status.
1024         * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
1025         Define.
1026         * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
1027         changes are supported.
1028         * include/std/optional (__cpp_lib_optional): Likewise.
1029         * include/std/variant (__cpp_lib_variant): Likewise.
1030         * include/std/version [!__STRICT_ANSI__]
1031         (__cpp_lib_uncaught_exceptions): Define as long integer.
1032         [__cplusplus >= 201703L] (__cpp_lib_any)
1033         (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
1034         (__cpp_lib_variant): Define for C++17.
1035         [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
1036         as long integer.
1037         * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
1038         integer.
1040         * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
1042 2019-01-12  Jonathan Wakely  <jwakely@redhat.com>
1044         PR libstdc++/88811
1045         PR libstdc++/83306
1046         * src/filesystem/path.cc: Fix typo. If first path is empty, show []
1047         before second path.
1048         * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
1049         test.
1051 2019-01-11  Jonathan Wakely  <jwakely@redhat.com>
1053         * doc/xml/manual/intro.xml: Include new section.
1054         * doc/xml/manual/status_cxx2017.xml: Document more
1055         implementation-defined properties of the library.
1056         * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
1057         * doc/html/*: Regenerate.
1059         * include/bits/refwrap.h [__cplusplus > 201703L]
1060         (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
1061         (_Reference_wrapper_base_memfun): Do not define for C++2a.
1062         (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
1063         for C++2a.
1064         (reference_wrapper::operator()): Add static assertion.
1065         * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
1067         * include/std/chrono (duration_values::zero(), duration_values::min())
1068         (duration_values::max()): Add noexcept.
1069         (duration::zero(), duration::min(), duration::max()): Likewise.
1070         (time_point::zero(), time_point::min(), time_point::max()): Likewise.
1071         * testsuite/20_util/duration/requirements/noexcept.cc: New test.
1072         * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
1074         * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
1076 2019-01-11  Jakub Jelinek  <jakub@redhat.com>
1078         * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
1079         * include/std/version (__cpp_lib_is_constant_evaluated): Define.
1081 2019-01-11  Jonathan Wakely  <jwakely@redhat.com>
1083         PR libstdc++/88802
1084         * include/bits/functional_hash.h (hash<nullptr_t>): Define
1085         specialization for C++17 (P0513R0, LWG 2817).
1086         * testsuite/20_util/hash/nullptr.cc: New test.
1088         PR libstdc++/88125
1089         * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
1090         pattern for std::basic_stringbuf::str().
1092         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
1093         basic_ostream::operator<< patterns.
1095 2019-01-10  Jonathan Wakely  <jwakely@redhat.com>
1097         * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
1098         test failures on targets with 32-bit time_t.
1100         * include/bits/erase_if.h: Define __cpp_lib_erase_if.
1101         * include/std/deque: Likewise.
1102         * include/std/forward_list: Likewise.
1103         * include/std/list: Likewise.
1104         * include/std/string: Likewise.
1105         * include/std/vector: Likewise.
1106         * include/std/version: Likewise.
1107         * testsuite/21_strings/basic_string/erasure.cc: Test macro.
1108         * testsuite/23_containers/deque/erasure.cc: Likewise.
1109         * testsuite/23_containers/forward_list/erasure.cc: Likewise.
1110         * testsuite/23_containers/list/erasure.cc: Likewise.
1111         * testsuite/23_containers/map/erasure.cc: Likewise.
1112         * testsuite/23_containers/set/erasure.cc: Likewise.
1113         * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1114         * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
1115         * testsuite/23_containers/vector/erasure.cc: Likewise.
1117         * include/experimental/internet [AI_NUMERICSERV]
1118         (resolver_base::numeric_service): Define conditionally.
1119         * testsuite/experimental/net/internet/resolver/base.cc: Test it
1120         conditionally.
1121         * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
1122         Likewise.
1124 2019-01-10  Ville Voutilainen  <ville.voutilainen@gmail.com>
1125             Jonathan Wakely  <jwakely@redhat.com>
1127         Implement LWG 2221
1128         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
1129         (GLIBCXX_3.4.26): Add new exports.
1130         * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
1131         correct list of sources.
1132         * include/Makefile.in: Regenerate.
1133         * include/std/ostream (operator<<(nullptr_t)): New member function.
1134         * src/c++17/ostream-inst.cc: New file.
1135         * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
1136         test.
1138 2019-01-10  Jonathan Wakely  <jwakely@redhat.com>
1140         * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
1141         of the source file containing the caller.
1142         * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
1143         directories created by test.
1144         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1145         Likewise.
1146         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1147         Likewise.
1148         * testsuite/experimental/filesystem/iterators/
1149         recursive_directory_iterator.cc: Likewise.
1151 2019-01-10  Jakub Jelinek  <jakub@redhat.com>
1153         PR tree-optimization/88775
1154         * include/bits/stl_function.h (greater<_Tp*>::operator(),
1155         less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
1156         less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
1157         instead of __builtin_constant_p if available.  Don't bother with
1158         the pointer comparison in C++11 and earlier.
1160 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
1162         PR other/16615
1164         * include/ext/bitmap_allocator.h: Mechanically replace "can not"
1165         with "cannot".
1167 2019-01-09  Jonathan Wakely  <jwakely@redhat.com>
1169         * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
1170         for filesystem::path. Give variables more distinctive names.
1172         * include/std/optional (_Optional_payload_base::_M_copy_assign): New
1173         member function to perform non-trivial assignment.
1174         (_Optional_payload_base::_M_move_assign): Likewise.
1175         (_Optional_payload<T, true, false, true>::operator=)
1176         (_Optional_payload<T, true, true, false>::operator=)
1177         (_Optional_payload<T, true, false, false>::operator=): Call
1178         _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
1180         PR libstdc++/88204
1181         * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
1182         test std::complex<long double> if long double format is IBM128.
1183         * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
1184         Likewise.
1186 2019-01-08  Jonathan Wakely  <jwakely@redhat.com>
1188         * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
1189         for old std::unique_ptr layout.
1190         * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
1191         to become valueless. Add filesystem::path tests.
1193         PR libstdc++/87855
1194         * include/std/optional (_Optional_payload_base): New class template
1195         for common code hoisted from _Optional_payload specializations. Use
1196         a template for the union, to allow a partial specialization for
1197         types with non-trivial destructors. Add constructors for in-place
1198         initialization to the union.
1199         (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
1200         to perform non-trivial copy construction, instead of relying on
1201         non-standard copy elision in a delegating constructor.
1202         (_Optional_payload(bool, _Optional_payload&&)): Likewise for
1203         non-trivial move construction.
1204         (_Optional_payload): Derive from _Optional_payload_base and use it
1205         for everything except the non-trivial assignment operators, which are
1206         defined as needed.
1207         (_Optional_payload<false, C, M>): Derive from the specialization
1208         _Optional_payload<true, false, false> and add a destructor.
1209         (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
1210         Forward to corresponding members of _Optional_payload.
1211         (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
1212         Hoist common members from _Optional_base.
1213         (_Optional_base): Make all members and base class public.
1214         (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
1215         _Optional_base_impl.
1216         * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
1217         support for new std::optional layout.
1218         * testsuite/libstdc++-prettyprinters/compat.cc: New test.
1220         PR libstdc++/88066
1221         * include/bits/locale_conv.h: Use <> for includes not "".
1222         * include/ext/random: Likewise.
1223         * include/ext/vstring.h: Likewise.
1225 2019-01-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1227         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
1228         (GLIBCXX_3.4.21): Likewise.
1230 2019-01-08  Jonathan Wakely  <jwakely@redhat.com>
1232         PR libstdc++/88749
1233         * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
1234         to match the one that controls whether utimbuf and utime are declared.
1236 2019-01-07  Jonathan Wakely  <jwakely@redhat.com>
1238         PR libstdc++/87787
1239         * include/bits/char_traits.h (char_traits::move): Do not pass null
1240         pointers to memmove.
1241         * include/bits/locale_facets.h
1242         (ctype<char>::widen(const char*, const char*, char*)): Do not
1243         pass null pointers to memcpy.
1244         (ctype<char>::narrow(const char*, const char*, char, char*)):
1245         Likewise.
1246         (ctype<char>::do_widen(const char*, const char*, char*)):
1247         Likewise.
1248         (ctype<char>::do_narrow(const char*, const char*, char, char*)):
1249         Likewise.
1251         * doc/xml/manual/spine.xml: Update copyright years.
1252         * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
1253         * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
1254         for C++17 filesystem library.
1255         * doc/html/*: Regenerate.
1257         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
1258         * config.h.in: Regenerate.
1259         * config/abi/pre/gnu.ver: Order patterns for filesystem operations
1260         alphabetically and add missing entries for copy_symlink,
1261         hard_link_count, rename, and resize_file.
1262         * configure: Regenerate.
1263         * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
1264         used unconditionally.
1265         * src/filesystem/ops-common.h (__gnu_posix::truncate)
1266         [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
1267         supports truncating to zero length.
1268         * testsuite/27_io/filesystem/operations/all.cc: New test.
1269         * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
1271 2019-01-06  Jonathan Wakely  <jwakely@redhat.com>
1273         PR libstdc++/86756
1274         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
1275         lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
1276         * config.h.in: Regenerate.
1277         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
1278         remaining std::filesystem types and functions.
1279         * configure: Regenerate.
1280         * src/c++17/Makefile.am: Add C++17 filesystem sources.
1281         * src/c++17/Makefile.in: Regenerate.
1282         * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
1283         here, and change name of included file.
1284         * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
1285         here, and change name of included file.
1286         * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
1287         path to dir-common.h.
1288         * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
1289         path to ops-common.h. Disable -Wunused-parameter warnings.
1290         (internal_file_clock): Define unconditionally.
1291         [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
1292         define.
1293         (do_copy_file, do_space): Move definitions to ops.common.h.
1294         (copy, file_size, hard_link_count, last_write_time, space): Only
1295         perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
1296         report an error.
1297         (last_write_time, read_symlink): Remove unused attributes from
1298         parameters.
1299         * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
1300         * src/filesystem/Makefile.in: Regenerate.
1301         * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
1302         * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
1303         * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
1304         * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
1305         * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
1306         dummy types and functions instead of using #error.
1307         * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
1308         * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
1309         in terms of stat.
1310         [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
1311         (do_copy_file, do_space): Move definitions here from std-ops.cc.
1312         * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
1313         to account for new namespace.
1314         * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
1315         -lstdc++fs from dg-options.
1316         * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
1317         * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
1318         * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
1319         * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
1320         * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
1321         Likewise.
1322         * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
1323         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1324         Likewise.
1325         * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
1326         * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
1327         * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
1328         * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
1329         * testsuite/27_io/filesystem/operations/create_directories.cc:
1330         Likewise.
1331         * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
1332         * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
1333         * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
1334         * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
1335         * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
1336         * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
1337         * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1338         * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
1339         * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
1340         * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
1341         * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
1342         * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
1343         * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
1344         * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
1345         * testsuite/27_io/filesystem/operations/space.cc: Likewise.
1346         * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1347         * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1348         * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
1349         Likewise.
1350         * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
1353         PR libstdc++/86756
1354         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
1355         typeinfo and vtables less greedy.
1356         (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
1357         * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
1358         * src/c++17/Makefile.in: Regenerate.
1359         * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
1360         here, and change name of included file.
1361         * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
1362         * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
1363         from sources.
1364         * src/filesystem/Makefile.in: Regenerate.
1365         * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
1366         * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
1367         * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
1368         from dg-options and remove dg-require-filesystem-ts.
1369         * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
1370         * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
1371         * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
1372         * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
1373         * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
1374         * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
1375         * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
1376         * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
1377         * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
1378         * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
1379         * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
1380         * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
1381         * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
1382         * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
1383         * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
1384         * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
1385         * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
1386         * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
1387         * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
1388         * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
1389         * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
1390         Likewise.
1391         * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
1392         * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
1393         * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
1394         * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
1395         * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
1396         * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
1397         * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
1398         * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
1399         * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
1400         * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
1401         * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
1402         * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
1403         Likewise.
1404         * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
1405         Likewise.
1406         * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1407         Likewise.
1408         * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
1409         Likewise.
1410         * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
1411         * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1412         * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
1413         * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
1414         * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1415         * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1416         * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1417         * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1418         * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
1419         * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1420         Likewise.
1421         * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1422         * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1423         * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1424         * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
1425         * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1427         PR libstdc++/87431
1428         * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
1429         Check is_trivially_copyable instead of is_scalar.
1430         (variant::emplace<N, Args>(Args&&...)): If construction of the new
1431         contained value can throw and its type is trivially copyable then
1432         construct into a temporary variant and move from it, to provide the
1433         strong exception safety guarantee.
1434         (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
1435         Likewise.
1436         * testsuite/20_util/variant/87431.cc: New test.
1437         * testsuite/20_util/variant/run.cc: Adjust test so that throwing
1438         conversion causes valueless state.
1440         PR libstdc++/88607
1441         * testsuite/17_intro/headers/c++1998/charset.cc: New test.
1442         * testsuite/17_intro/headers/c++2011/charset.cc: New test.
1443         * testsuite/17_intro/headers/c++2014/charset.cc: New test.
1444         * testsuite/17_intro/headers/c++2017/charset.cc: New test.
1445         * testsuite/17_intro/headers/c++2020/charset.cc: New test.
1447 2019-01-05  Jonathan Wakely  <jwakely@redhat.com>
1449         * include/bits/fs_fwd.h (__file_clock): Define new clock.
1450         (file_time_type): Redefine in terms of __file_clock.
1451         * src/filesystem/ops-common.h (file_time): Add FIXME comment about
1452         overflow.
1453         * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
1454         internal linkage.
1455         (internal_file_lock): New helper type for accessing __file_clock.
1456         (do_copy_file): Use internal_file_lock to convert system time to
1457         file_time_type.
1458         (last_write_time(const path&, error_code&)): Likewise.
1459         (last_write_time(const path&, file_time_type, error_code&)): Likewise.
1461 2019-01-04  Jonathan Wakely  <jwakely@redhat.com>
1463         * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
1464         for const member functions of std::basic_string.
1465         (GLIBCXX_3.4.26): Export member functions of std::basic_string added
1466         in C++17.
1467         * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
1468         Make non-standard constructor private.
1469         [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
1470         Likewise.
1471         * include/bits/basic_string.tcc (std::string, std::wstring): Declare
1472         explicit instantiations for C++17 as well as earlier dialects.
1473         * src/c++17/Makefile.am: Add new source files.
1474         * src/c++17/Makefile.in: Regenerate.
1475         * src/c++17/cow-string-inst.cc: New file defining explicit
1476         instantiations for basic_string member functions added in C++17.
1477         * src/c++17/string-inst.cc: Likewise.
1479         * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
1480         copy/move constructors for old std::basic_string.
1481         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
1482         (basic_string::reference, basic_string::const_reference): Define
1483         as plain references for C++11 and later.
1484         (basic_string::basic_string()): Put constructor body outside
1485         preprocessor conditional groups.
1486         (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
1487         instead of copying it.
1488         (basic_string::basic_string(const basic_string&, const _Alloc&)):
1489         Define.
1490         (basic_string::basic_string(basic_string&&, const _Alloc&)):
1491         Define.
1492         * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
1493         cases for old basic_string.
1494         * testsuite/21_strings/basic_string/cons/char/8.cc: Test
1495         allocator-extended constructors unconditionally. Add extra members to
1496         allocator type when using old string ABI.
1497         * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
1498         for old string ABI.
1499         * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
1501         * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
1502         -fno-inline added to test flags.
1504         * testsuite/21_strings/basic_string/requirements/
1505         explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
1507         * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
1508         assertion failures with old std::string ABI.
1510         * include/bits/fs_path.h (path::_List::erase): Replace both overloads
1511         with ...
1512         (path::pop_back(), path::_M_erase_from(const_iterator)): New member
1513         functions that will only erase elements at the end.
1514         * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
1515         (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
1516         (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
1517         of erase(p, end()).
1518         (path::_List::pop_back()): Define.
1519         (path::_List::_M_erase_from(const_iterator)): Define.
1520         (path::operator/=(const path&)): Use pop_back to remove last component
1521         and _M_erase_from to remove multiple components.
1522         (path::_M_append(basic_string_view<value_type>)): Likewise.
1523         (path::operator+=(const path&)): Likewise.
1524         (path::_M_concat(basic_string_view<value_type>)): Likewise.
1525         (path::remove_filename()): Likewise.
1526         (path::lexically_normal()): Use _List::_Impl iterators instead of
1527         path::iterator. Use pop_back to remove components from the end. Clear
1528         trailing filename, instead of using erase(const_iterator) to remove
1529         a non-final component.
1530         * testsuite/27_io/filesystem/path/generation/normal.cc: Test
1531         additional cases.
1532         * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
1534         * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
1535         incorrect treatment of empty filename after trailing slash.
1536         * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
1538         * testsuite/21_strings/basic_string/modifiers/assign/char/
1539         move_assign_optim.cc: Avoid spurious failure when -fno-inline added
1540         to test flags.
1541         * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
1542         move_assign_optim.cc: Likewise.
1544 2019-01-03  Jonathan Wakely  <jwakely@redhat.com>
1545             Jakub Jelinek  <jakub@redhat.com>
1547         PR libstdc++/88607
1548         * include/experimental/memory: Replace UTF-8 quote characters.
1549         * include/std/future: Replace UTF-8 "em dash" characters.
1551 2019-01-03  Jonathan Wakely  <jwakely@redhat.com>
1553         PR libstdc++/88607
1554         * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
1555         * include/debug/forward_list: Likewise.
1556         * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
1557         character.
1558         * include/experimental/chrono: Likewise.
1559         * include/experimental/functional: Likewise.
1560         * include/experimental/ratio: Likewise.
1561         * include/experimental/system_error: Likewise.
1562         * include/experimental/tuple: Likewise.
1563         * include/experimental/type_traits: Likewise.
1564         * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
1565         * include/parallel/multiseq_selection.h: Likewise.
1567         PR libstdc++/88681
1568         * config/abi/pre/gnu.ver: Add missing exports.
1569         * testsuite/22_locale/collate_byname/88681.cc: New test.
1570         * testsuite/22_locale/time_get/get/char/88681.cc: New test.
1571         * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
1573 2019-01-02  Jonathan Wakely  <jwakely@redhat.com>
1575         * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
1576         initializer_list<value_type> and from input iterator ranges.
1577         * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
1579         * testsuite/experimental/string_view/element_access/char/empty.cc:
1580         Fix year range in copyright header.
1582 2019-01-02  Joel Brobecker  <brobecker@adacore.com>
1584         * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
1585         Fix year range in copyright header.
1587 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
1589         Update copyright years.
1591 Copyright (C) 2019 Free Software Foundation, Inc.
1593 Copying and distribution of this file, with or without modification,
1594 are permitted in any medium without royalty provided the copyright
1595 notice and this notice are preserved.