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