1 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
4 const variables instead of macros.
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.
11 2019-03-11 Jakub Jelinek <jakub@redhat.com>
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.
25 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
27 * doc/xml/manual/using.xml: Use link element instead of xref.
28 * doc/html/*: Regenerate.
30 * include/bits/fs_path.h (path::format): Add fixed underlying type.
32 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
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.
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.
54 2019-03-07 Andreas Schwab <schwab@suse.de>
56 * config/abi/post/riscv64-linux-gnu: New directory.
57 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
59 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
61 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
62 compile test to run. Fix typo.
64 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
65 * doc/html/*: Regenerate.
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.
73 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
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.
80 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
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.
94 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
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
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
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
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
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.
138 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
140 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
142 * testsuite/experimental/feat-char8_t.cc: Likewise.
144 * include/std/type_traits [C++20] (is_bounded_array)
145 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
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
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
156 * testsuite/20_util/is_unbounded_array/value.cc: New test.
158 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
160 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
162 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
164 * include/c_compatibility/math.h [C++20] (lerp): Add using
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.
178 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
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.
187 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
189 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
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
201 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
204 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
207 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
210 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
212 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
213 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
215 * include/std/memory (uses_allocator_construction_args): New set of
216 overloaded functions.
217 (make_obj_using_allocator, uninitialized_construct_using_allocator):
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
224 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
226 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
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.
250 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
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):
268 * testsuite/23_containers/map/cons/deduction.cc: Test additional
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:
275 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
277 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
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.
284 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
287 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
288 copy and move members public.
290 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
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
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:
308 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
311 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
313 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
314 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
316 2019-02-22 Jakub Jelinek <jakub@redhat.com>
319 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
320 type to std::size_t and argument to type to long double.
322 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
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.
330 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
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
336 2019-02-22 Tom Honermann <tom@honermann.net>
338 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
339 printers for u8string and u8string_view.
341 2019-02-22 Tom Honermann <tom@honermann.net>
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
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
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
383 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
384 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
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:
391 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
393 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
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.
402 2019-02-22 Tom Honermann <tom@honermann.net>
404 * include/ext/typelist.h: Constrain a partial specialization of
405 typelist::detail::append_ to only match chain<T1,T2>.
407 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
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
419 2019-02-20 Jakub Jelinek <jakub@redhat.com>
422 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
423 _GLIBCXX_PURE to the alias declaration.
425 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
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
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
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
450 * testsuite/experimental/string_view/literals/values.cc
451 [_GLIBCXX_USE_CHAR8_T]: Likewise.
453 2019-02-19 Tom Honermann <tom@honermann.net>
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
460 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
461 test cloned from values.cc; validates construction and comparison
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
499 * testsuite/experimental/feat-char8_t.cc: New test; validates that
500 the __cpp_lib_char8_t feature test macro is defined with the
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
519 2019-02-19 Tom Honermann <tom@honermann.net>
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
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
543 (path::u8string): Return std::u8string when char8_t support is
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
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):
564 (path::u8string): Return std::u8string when char8_t support is
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
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.
604 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
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.
610 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
612 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
613 * doc/html/*: Regenerate.
615 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
616 * doc/html/*: Regenerate.
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.
628 * configure.ac: Check for C11 timespec_get function.
629 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
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.
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
641 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
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.
649 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
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.
655 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
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.
666 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
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.
674 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
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
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.
688 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
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.
700 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
703 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
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.
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.
717 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
718 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
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
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.
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
745 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
748 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
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.
755 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
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:
765 2019-01-30 Ulrich Drepper <drepper@redhat.com>
767 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
769 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
771 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
772 constexpr specifiers from arg and proj.
774 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
775 __shared_ptr instantiations used by gcc4-compatible ABI.
777 * include/experimental/forward_list (experimental::erase): Qualify
779 * include/experimental/list (experimental::erase): Likewise.
780 * include/std/forward_list (std::erase): Likewise.
781 * include/std/list (std::erase): Likewise.
783 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
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.
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.
799 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
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.
808 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
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
817 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
820 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
823 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
824 write to stderr instead of using printf.
826 2019-01-21 Jakub Jelinek <jakub@redhat.com>
829 * include/bits/char_traits.h (__constant_string_p,
830 __constant_char_array_p): Use __builtin_is_constant_evaluated if
833 2019-01-20 Ulrich Drepper <drepper@redhat.com>
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:
862 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
864 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
866 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
868 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
870 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
872 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
874 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
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:
882 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
884 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
886 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
888 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
890 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
892 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
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
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.
922 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
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
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.
951 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
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.
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.
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:
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.
979 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
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&)):
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
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:
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
1007 * testsuite/experimental/filesystem/operations/permissions.cc:
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:
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
1023 2019-02-14 Ulrich Drepper <drepper@redhat.com>
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.
1032 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
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.
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.
1046 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
1048 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
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
1061 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
1064 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
1066 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
1070 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
1072 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
1075 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
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.
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
1088 (reference_wrapper::operator()): Add static assertion.
1089 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
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.
1098 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
1100 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1102 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
1103 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
1105 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
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.
1113 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
1114 pattern for std::basic_stringbuf::str().
1116 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
1117 basic_ostream::operator<< patterns.
1119 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
1121 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
1122 test failures on targets with 32-bit time_t.
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.
1141 * include/experimental/internet [AI_NUMERICSERV]
1142 (resolver_base::numeric_service): Define conditionally.
1143 * testsuite/experimental/net/internet/resolver/base.cc: Test it
1145 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
1148 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
1149 Jonathan Wakely <jwakely@redhat.com>
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
1162 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
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:
1170 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1172 * testsuite/experimental/filesystem/iterators/
1173 recursive_directory_iterator.cc: Likewise.
1175 2019-01-10 Jakub Jelinek <jakub@redhat.com>
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.
1184 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
1188 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
1191 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
1193 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
1194 for filesystem::path. Give variables more distinctive names.
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.
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:
1210 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
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.
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
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.
1245 * include/bits/locale_conv.h: Use <> for includes not "".
1246 * include/ext/random: Likewise.
1247 * include/ext/vstring.h: Likewise.
1249 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1251 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
1252 (GLIBCXX_3.4.21): Likewise.
1254 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
1257 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
1258 to match the one that controls whether utimbuf and utime are declared.
1260 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
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*)):
1270 (ctype<char>::do_widen(const char*, const char*, char*)):
1272 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
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.
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.
1295 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
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
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
1321 (last_write_time, read_symlink): Remove unused attributes from
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
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:
1346 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
1347 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
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:
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:
1374 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
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
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:
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:
1428 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
1430 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
1432 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
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:
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.
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&&...)):
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.
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.
1471 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
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
1477 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
1479 (internal_file_lock): New helper type for accessing __file_clock.
1480 (do_copy_file): Use internal_file_lock to convert system time to
1482 (last_write_time(const path&, error_code&)): Likewise.
1483 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
1485 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
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
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&)):
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.
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&)):
1514 (basic_string::basic_string(basic_string&&, const _Alloc&)):
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
1523 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
1525 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
1526 -fno-inline added to test flags.
1528 * testsuite/21_strings/basic_string/requirements/
1529 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
1531 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
1532 assertion failures with old std::string ABI.
1534 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
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
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
1556 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
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.
1562 * testsuite/21_strings/basic_string/modifiers/assign/char/
1563 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
1565 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
1566 move_assign_optim.cc: Likewise.
1568 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
1569 Jakub Jelinek <jakub@redhat.com>
1572 * include/experimental/memory: Replace UTF-8 quote characters.
1573 * include/std/future: Replace UTF-8 "em dash" characters.
1575 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
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"
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.
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.
1597 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
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.
1603 * testsuite/experimental/string_view/element_access/char/empty.cc:
1604 Fix year range in copyright header.
1606 2019-01-02 Joel Brobecker <brobecker@adacore.com>
1608 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
1609 Fix year range in copyright header.
1611 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1613 Update copyright years.
1615 Copyright (C) 2019 Free Software Foundation, Inc.
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.