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