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