1 2019-10-09 Jonathan Wakely <jwakely@redhat.com>
4 * src/c++98/locale_init.cc (locale::classic()): Do not construct a new
5 locale object for every call.
6 (locale::_S_initialize_once()): Construct C locale here.
8 2019-10-08 Jonathan Wakely <jwakely@redhat.com>
10 * doc/Makefile.am (doc-html-docbook-regenerate): New target.
11 (${docbook_outdir}/html): Do not create unused 'html/ext' directory.
12 * doc/Makefile.in: Regenerate.
13 * doc/xml/manual/documentation_hacking.xml: Document new target.
14 * doc/html/*: Regenerate.
16 * doc/xml/manual/allocator.xml: Use archived copy of CUJ article.
17 * doc/html/*: Regenerate.
19 2019-10-06 François Dumont <fdumont@gcc.gnu.org>
21 * include/bits/stl_algo.h
22 (__copy_n_a(_IIte, _Size, _OIte)): New.
23 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
24 (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
26 * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
27 std::__copy_n_a friend.
28 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
29 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
30 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
31 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.
33 * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define
35 (_RequireInputIte): Likewise and use __enable_if_t.
37 (__is_random_access_iter): Use __iterator_category_t.
39 * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment
41 * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New.
42 * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New.
44 2019-10-04 François Dumont <fdumont@gcc.gnu.org>
46 * include/debug/forward_list
47 (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign
48 distance when not empty.
49 * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size):
51 * include/debug/helper_functions.h (__dp_sign_max_size): New
52 _Distance_precision enum entry.
53 (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type,
54 __false_type)): Adapt.
55 * include/debug/safe_iterator.tcc
56 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review
59 2019-10-04 Jonathan Wakely <jwakely@redhat.com>
63 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
64 * config.h.in: Regenerate:
65 * configure: Regenerate:
66 * include/Makefile.am (${host_builddir}/largefile-config.h): New
67 target to generate config header for filesystem library.
68 (${host_builddir}/c++config.h): Rename macros for large file support.
69 * include/Makefile.in: Regenerate.
70 * src/c++17/fs_dir.cc: Include new config header.
71 * src/c++17/fs_ops.cc: Likewise.
72 (filesystem::file_size): Use uintmax_t for size.
73 * src/filesystem/dir.cc: Include new config header.
74 * src/filesystem/ops.cc: Likewise.
75 (experimental::filesystem::file_size): Use uintmax_t for size.
77 * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
78 std::tr1::unordered_map.
79 * testsuite/util/testsuite_allocator.h: Likewise.
81 * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.
83 * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
84 __gnu_cxx::__alloc_traits for allocator construct function.
85 (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function.
87 * include/precompiled/stdc++.h: Include <span> for C++20.
88 * testsuite/17_intro/names.cc: Do not define 'e' for C++20.
90 2019-10-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
92 * include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp.
94 2019-10-02 Jonathan Wakely <jwakely@redhat.com>
96 * config/abi/pre/gnu.ver: Tighten up greedy wildcards.
98 * doc/xml/manual/parallel_mode.xml: Add caveat about support for
100 * doc/html/*: Regenerate.
102 2019-10-01 Jonathan Wakely <jwakely@redhat.com>
104 * include/experimental/algorithm (experimental::sample): Qualify call
105 to __sample correctly.
106 * include/parallel/algo.h (sample, for_each_n): Add using-declarations
107 for algorithms that don't have parallel implementations.
109 * include/parallel/algobase.h (equal, lexicographical_compare): Add
110 _GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
112 * include/parallel/algorithmfwd.h (equal, lexicographical_compare):
113 Add _GLIBCXX20_CONSTEXPR.
115 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for
117 * testsuite/20_util/hash/84998.cc: Likewise.
118 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise.
119 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise.
120 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
121 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
122 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
123 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
124 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
125 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
127 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
129 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
131 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
133 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
135 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise.
136 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
137 * testsuite/25_algorithms/copy/86658.cc: Likewise.
138 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
139 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
140 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
141 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
143 * include/parallel/algo.h: Replace non-reserved names.
144 * include/parallel/multiway_merge.h: Likewise.
145 * include/parallel/multiway_mergesort.h: Likewise.
146 * include/parallel/numericfwd.h: Likewise.
147 * testsuite/17_intro/names.cc: Add RAI to test macros.
149 2019-09-30 François Dumont <fdumont@gcc.gnu.org>
151 * include/debug/array: Add C++20 constexpr to comparison operators.
152 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt
153 dg-error line numbers.
154 * testsuite/23_containers/array/tuple_interface/
155 tuple_element_debug_neg.cc: Likewise.
157 2019-09-30 Andreas Tobler <andreast@gcc.gnu.org>
159 * include/experimental/internet: Include netinet/in.h if we have
160 _GLIBCXX_HAVE_NETINET_IN_H defined.
162 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
163 FreeBSD warning about lower advertised precision of tgammal.
164 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
165 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
166 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
167 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
168 * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
169 * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
170 * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
171 * testsuite/tr1/5_numerical_facilities/special_functions/
172 08_cyl_bessel_i/check_nan.cc: Likewise.
173 * testsuite/tr1/5_numerical_facilities/special_functions/
174 09_cyl_bessel_j/check_nan.cc: Likewise.
175 * testuite/tr1/5_numerical_facilities/special_functions/
176 10_cyl_bessel_k/check_nan.cc: Likewise.
177 * testsuite/tr1/5_numerical_facilities/special_functions/
178 11_cyl_neumann/check_nan.cc: Likewise.
179 * testsuite/tr1/5_numerical_facilities/special_functions/
180 21_sph_bessel/check_nan.cc: Likewise.
181 * testsuite/tr1/5_numerical_facilities/special_functions/
182 23_sph_neumann/check_nan.cc: Likewise.
184 2019-09-30 Jonathan Wakely <jwakely@redhat.com>
186 * include/std/span (span(element_type(&)[N]))
187 (span(array<value_type, N>&), span(const array<value_type, N>&)):
188 Deduce array element type to allow safe const conversions (LWG 3255).
189 [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use
190 remove_cv_t on arguments to __is_std_span and __is_std_array.
191 * testsuite/23_containers/span/lwg3255.cc: New test.
194 * include/parallel/checkers.h (__is_sorted): Remove unused variable.
196 2019-09-28 François Dumont <fdumont@gcc.gnu.org>
198 * include/bits/stl_algo.h (merge): Fix documentation.
199 * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr.
200 (__check_sorted): Likewise and remove nested irreflexive check.
201 (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr.
202 (__check_partitioned_lower, __check_partitioned_upper): Likewise.
203 (_Irreflexive_checker::_S_is_valid): Likewise.
204 (__is_irreflexive, __is_irreflexive_pred): Likewise.
205 * include/debug/helper_functions.h (__get_distance): Add constexpr.
206 (__valid_range_aux): Add C++20 constexpr.
207 (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)):
208 Likewise and add std::is_constant_evaluated check.
209 (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New.
210 (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New.
211 (__valid_range_aux(_Integral, _Integral, std::__true_type)): New,
213 (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and
214 __builtin_is_contant_evaludated check..
215 (__can_advance, __base): Add constexpr.
216 * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED]
217 (_GLIBCXX_DEBUG_VERIFY_COND_AT): New.
218 (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive.
219 (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred.
220 * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive
222 * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
223 * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix
224 lambda to be irreflexive.
226 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
228 * configure: Regenerate.
230 2019-09-27 Jonathan Wakely <jwakely@redhat.com>
233 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer
234 atomically and lock the mutex before accessing the sequence.
235 (_Safe_local_iterator_base::_M_detach()): Likewise.
236 (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
238 2019-09-26 Jonathan Wakely <jwakely@redhat.com>
240 * include/debug/array (to_array): Define for debug mode.
242 * include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to
243 piecewise construction constructor, assignment operators, and swap.
244 * include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)):
245 Add _GLIBCXX20_CONSTEXPR.
246 (pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise.
247 * testsuite/20_util/pair/constexpr_assign.cc: New test.
248 * testsuite/20_util/pair/constexpr_swap.cc: New test.
250 * include/experimental/internet (operator==, operator<): Fix loop
251 condition to avoid reading past the end of the array.
253 * include/std/array: Remove references to profile mode.
254 * include/std/bitset: Likewise.
255 * include/std/deque: Likewise.
256 * include/std/forward_list: Likewise.
257 * include/std/list: Likewise.
258 * include/std/map: Likewise.
259 * include/std/set: Likewise.
260 * include/std/unordered_map: Likewise.
261 * include/std/unordered_set: Likewise.
262 * include/std/vector: Likewise.
263 * testsuite/17_intro/headers/c++1998/profile_mode.cc: New test.
264 * testsuite/17_intro/headers/c++2011/profile_mode.cc: New test.
266 2019-09-25 Jonathan Wakely <jwakely@redhat.com>
268 * include/bits/regex.h
269 (basic_regex::assign(const C*, size_t, flag_type)): Add default
271 * testsuite/28_regex/basic_regex/assign/char/lwg3296.cc: New test.
272 * testsuite/28_regex/basic_regex/assign/wchar_t/lwg3296.cc: New test.
274 2019-09-24 Jonathan Wakely <jwakely@redhat.com>
276 * include/std/variant (variant::index()): Remove impossible case.
279 * testsuite/util/testsuite_hooks.h
280 (conversion::iterator_to_const_iterator()): Do not return an invalid
281 iterator. Test direct-initialization and direct-list-initialization
282 as well as implicit conversion.
284 2019-09-23 Jonathan Wakely <jwakely@redhat.com>
286 PR libstdc++/91788 (partial)
287 * include/std/variant (variant::index()): Improve codegen for cases
288 where conversion to size_t already works correctly.
290 2019-09-23 Andreas Schwab <schwab@suse.de>
292 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
294 2019-09-12 Jonathan Wakely <jwakely@redhat.com>
297 * include/bits/stl_algo.h (for_each_n): Fix random access iterator
299 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
302 2019-09-11 Jonathan Wakely <jwakely@redhat.com>
304 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
307 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
308 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
309 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile
312 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
314 * include/std/type_traits (__do_common_type_impl): Implement
315 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20.
316 (basic_common_reference, common_reference, common_reference_t): Define
318 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New
320 * testsuite/20_util/common_reference/requirements/
321 explicit_instantiation.cc: New test.
322 * testsuite/20_util/common_reference/requirements/typedefs.cc: New
325 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
326 non-template overloads for each signed and unsigned integer type and
327 char. Define deleted overload for bool (LWG 3266).
328 * testsuite/20_util/to_chars/1_neg.cc: Remove.
329 * testsuite/20_util/to_chars/3.cc: New test.
330 * testsuite/20_util/to_chars/lwg3266.cc: New test.
332 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
334 * acinclude.m4: Handle uclinux*.
335 * configure: Regenerate.
336 * configure.host: Handle uclinux*
338 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
339 Mickaël Guêné <mickael.guene@st.com>
341 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
344 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
347 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
348 0ul being a valid null pointer constant.
350 * include/std/type_traits (__remove_cv_t): New alias template.
351 (is_void, is_integral, is_floating_point, is_pointer)
352 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
353 (is_member_point), __is_signed_integer, __is_unsigned_integer)
354 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
355 (__decay_selector): Use __remove_cv_t.
356 (remove_cv): Add partial specializations for cv-qualified types.
357 (__decay_t): New alias template.
358 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
360 (__enable_if_t): Move earlier in the file.
361 (_Require): Use __enable_if_t.
362 (swap(T&, T&)): Use _Require.
363 (swap(T(&)[N])): Use __enable_if_t.
365 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
367 Implement C++20 p1424 - 'constexpr' feature macro concerns,
368 Issue 3256 - Feature testing macro for constexpr algorithms,
369 and Issue 3257 - Missing feature testing macro update from P0858.
370 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
371 * include/bits/algorithmfwd.h: Ditto.
372 * include/std/utility: Ditto.
373 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
374 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
375 __cpp_lib_constexpr macro in <algorith>.
376 * testsuite/20_util/exchange/constexpr.cc: Add check for
377 __cpp_lib_constexpr macro in <utility>.
378 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
379 __cpp_lib_constexpr_algorithms.
380 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
381 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
382 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
383 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
384 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
385 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
386 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
387 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
388 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
389 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
390 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
391 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
392 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
393 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
394 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
395 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
396 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
397 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
398 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
399 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
400 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
401 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
402 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
403 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
404 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
405 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
406 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
407 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
408 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
409 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
410 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
411 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
412 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
413 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
414 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
415 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
416 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
417 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
418 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
419 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
420 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
421 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
422 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
423 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
424 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
425 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
426 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
427 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
428 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
429 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
430 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
431 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
432 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
434 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
436 Update docs for recent <span> and constexpr lib changes.
437 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
438 p1023r0, p1085r2 status.
439 * doc/html/manual/status.html: Regenerate.
441 2019-09-09 Antony Polukhin <antoshkka@gmail.com>
443 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
444 final offsets with constants.
446 2019-09-09 Jonathan Wakely <jwakely@redhat.com>
448 * include/bits/range_access.h (__adl_to_address): Remove.
449 * include/std/span (__is_base_derived_safe_convertible_v): Replace
450 with span::__is_compatible.
451 (__is_std_array_v): Replace with __is_std_array class template and
452 partial specializations.
453 (__is_std_array, __is_std_span): New class templates and partial
455 (span::__is_compatible): New alias template for SFINAE constraints.
456 (span::span(element_type (&)[N])): Remove redundant constraints. Do
457 not use __adl_data to obtain a pointer.
458 (span::span(array<value_type, N>&)): Likewise.
459 (span::span(const array<value_type, N>&)): Likewise.
460 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
461 (span::iter_value_t, span::derived_from): New alias templates for
462 SFINAE constraints, until the equivalents are supported in <concepts>
464 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
465 for SFINAE constraints.
466 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
468 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
469 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
470 Use std::to_address instead of __adl_to_address.
471 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
472 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
473 template for SFINAE constraints.
474 [!_GLIBCXX_P1394] (span::span(Container&))
475 (span::span(const Container&)): Improve constraints.
476 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
477 (span::span(pointer, pointer)): Remove redundant cast of pointer.
478 (span(const span<OType, OExtent>&)): New constructor.
480 2019-09-06 Jonathan Wakely <jwakely@redhat.com>
482 * include/bits/range_access.h (ssize): Define for C++20.
483 * testsuite/24_iterators/range_access_cpp20.cc: New test.
484 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
485 * doc/html/*: Regenerate.
487 2019-09-06 Florian Weimer <fweimer@redhat.com>
489 * configure: Regenerate.
491 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
493 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
494 P1024R3. Remove entry for P0920R2.
495 * include/std/span (__cpp_lib_span): Change value.
496 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
498 (span): Replace __extent_storage base class with data member.
499 (span::_S_subspan_extent): New function.
500 (span::empty()): Add nodiscard attribute.
501 (span::front, span::back, span::operator[]): Check preconditions.
502 (span::first, span::last, span::subspan): Add noexcept. Improve
503 precondition checks (LWG 3103).
504 (get): Remove redundant condition from static_assert.
505 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
506 (as_writable_bytes): Add inline specifier.
507 * include/std/version (__cpp_lib_span): Change value.
508 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
509 * testsuite/23_containers/span/front_neg.cc: Likewise.
510 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
511 * testsuite/23_containers/span/last_neg.cc: Improve test.
512 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
513 * testsuite/23_containers/span/1.cc: New test.
514 * testsuite/23_containers/span/2.cc: New test.
515 * testsuite/23_containers/span/back_assert_neg.cc: New test.
516 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
517 * testsuite/23_containers/span/first_assert_neg.cc: New test.
518 * testsuite/23_containers/span/first_neg.cc: New test.
519 * testsuite/23_containers/span/front_assert_neg.cc: New test.
520 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
521 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
522 * testsuite/23_containers/span/last_assert_neg.cc: New test.
523 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
524 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
525 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
526 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
527 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
528 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
530 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
532 * include/Makefile.am: Add <span> header.
533 * include/Makefile.in: Regenerate.
534 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
535 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
536 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
537 New functions for performing argument-dependent lookup of range
538 customization points.
539 * include/bits/stl_iterator.h (__normal_iterator): Add
540 _GLIBCXX20_CONSTEXPR to all functions.
541 * include/std/span: New header.
542 * include/std/version (__cpp_lib_span): Define feature test macro.
543 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
544 * testsuite/23_containers/span/everything.cc: New test.
545 * testsuite/23_containers/span/get_neg.cc: New test.
546 * testsuite/23_containers/span/last_neg.cc: New test.
547 * testsuite/23_containers/span/subspan_neg.cc: New test.
548 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
549 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
550 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
552 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
554 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
555 * doc/html/*: Regenerate.
557 2019-09-04 Mike Crowe <mac@mcrowe.com>
560 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
561 pthread_cond_clockwait function.
562 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
563 * configure: Regenerate.
564 * config.h.in: Regenerate.
565 * include/std/condition_variable: (condition_variable): Rename
566 __steady_clock_t typedef and add system_clock. Change __clock_t to be
567 a typedef for the preferred clock to convert arbitrary other clocks to.
568 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
570 (wait_until): Change __clock_t overload to use system_clock.
571 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
572 steady_clock overload that calls pthread_cond_clockwait.
573 (__wait_until_impl): Change __clock_t overload to use system_clock.
574 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
575 steady_clock for __clock_t if pthread_cond_clockwait is available.
577 2019-09-04 Mike Crowe <mac@mcrowe.com>
579 * testsuite/30_threads/condition_variable/members/2.cc (test01):
580 Parameterise so that test can be run against an arbitrary clock.
581 (main): Test using std::chrono::steady_clock and a user-defined
582 clock in addition to the previous std::chrono::system_clock.
583 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
585 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
587 * crossconfig.m4: Remove references to spu.
588 * configure: Regenerate.
589 * doc/xml/manual/appendix_contributing.xml: Remove references
590 to __ea as "badword" for spu.
591 * doc/html/manual/source_code_style.html: Regenerate.
592 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
593 to avoid __ea (as "badword" for spu).
594 (__ellint_rj): Likewise.
596 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
599 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
600 scanning to conform to the GNU Coding Standards.
601 * configure: Regenerate.
603 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
605 * src/c++17/memory_resource.cc: Use __constinit keyword.
607 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
609 * doc/xml/manual/abi.xml: Document 9.x library versions.
610 * doc/html/*: Regenerate.
612 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
614 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
615 (__detail::__to_chars_8_len): Remove.
616 (__detail::__to_chars_8): Inline length calculation here.
617 (__detail::__from_chars_binary): Use numeric_limits instead of
620 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
622 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
623 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
624 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
625 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
628 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
630 * testsuite_files/util/testsuite_performance.h
631 (resource_counter::start): Ignore unused malloc(0) result.
633 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
635 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
636 Model Object Technologies): Adjust name and link.
638 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
640 * include/std/charconv (__detail::__to_chars_8)
641 __detail::__to_chars_16): Replace array of precomputed digits with
642 arithmetic operations to avoid CPU cache misses. Remove zero
643 termination from array of digits to allow symbol merge with generic
644 implementation of __detail::__to_chars. Replace final offsets with
645 constants. Use __detail::__to_chars_len_2 instead of a generic
646 __detail::__to_chars_len.
647 (__detail::__to_chars): Remove zero termination from array of digits.
648 (__detail::__to_chars_2): Leading digit is always '1'.
650 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
652 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
654 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
656 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
658 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
661 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
662 to template parameters.
663 * include/bits/stl_uninitialized.h (uninitialized_copy)
664 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
665 diagnose invalid uses.
666 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
667 Adjust expected error.
668 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
670 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
672 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
674 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
676 * testsuite/23_containers/vector/cons/89164.cc: New test.
677 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
679 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
682 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
683 * configure: Regenerate.
684 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
686 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
688 * testsuite/util/testsuite_abi.cc: Add new symbol version.
690 2019-08-29 Jakub Jelinek <jakub@redhat.com>
692 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
693 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
695 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
697 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
698 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
699 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
700 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
701 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
702 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
703 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
705 2019-08-23 Joseph Myers <joseph@codesourcery.com>
707 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
708 (std::filesystem::__gnu_posix::lstat): Add return type.
710 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
712 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
714 * include/std/numeric (reduce): Fix Doxygen markup.
717 * include/std/type_traits (is_function): Simplify definition. Remove
718 partial specializations for function types.
719 (__is_referenceable): Simplify definition.
720 * testsuite/20_util/bind/91371.cc: New test.
721 * testsuite/20_util/is_function/91371.cc: New test.
722 * testsuite/20_util/is_function/value.cc: Check more pointer types.
723 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
724 * testsuite/20_util/is_object/91371.cc: New test.
726 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
728 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
730 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
733 * include/bits/std_function.h (__check_func_return_type): Remove.
734 (function::_Callable): Use std::__is_invocable_impl instead of
735 __check_func_return_type.
736 * include/std/type_traits (__is_invocable_impl): Add another defaulted
737 template parameter. Define a separate partial specialization for
738 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
739 with a check that models delayed temporary materialization.
740 * testsuite/20_util/function/91456.cc: New test.
741 * testsuite/20_util/is_invocable/91456.cc: New test.
743 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
745 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
747 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
749 Implement C++20 p0879 - Constexpr for swap and swap related functions.
750 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
751 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
753 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
754 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
755 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
756 * include/bits/move.h (swap): Add constexpr.
757 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
758 (__gcd, __rotate, rotate, __partition, __heap_select)
759 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
760 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
761 (__introselect, __chunk_insertion_sort, next_permutation)
762 (prev_permutation, partition, partial_sort, nth_element, sort)
763 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
764 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
765 (swap_ranges): Add constexpr.
766 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
767 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
769 * include/std/type_traits (swap): Add constexpr.
770 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
771 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
772 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
773 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
774 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
775 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
776 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
777 * testsuite/25_algorithms/partition/constexpr.cc: New test.
778 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
779 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
780 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
781 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
782 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
783 * testsuite/25_algorithms/sort/constexpr.cc: New test.
784 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
785 * testsuite/25_algorithms/swap/constexpr.cc: New test.
786 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
788 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
791 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
793 * include/std/tuple (__unpack_std_tuple): New variable template and
794 partial specializations.
795 (apply, make_from_tuple): Add noexcept-specifier.
796 * testsuite/20_util/tuple/apply/2.cc: New test.
797 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
799 2019-08-09 Corentin Gay <gay@adacore.com>
801 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
802 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
803 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
804 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
805 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
806 Add call to `VERIFY`.
808 2019-08-09 Alexandre Oliva <oliva@adacore.com>
811 (normal_mv_distribution::param_type::param_type): New private
812 ctor taking a decomposed varcov matrix, for use by...
813 (operator>>): ... this, befriended.
814 * include/ext/random.tcc (operator>>): Use it.
815 (normal_mv_distribution::param_type::_M_init_lower): Adjust
816 member function name in exception message.
818 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
820 P0325R4 to_array from LFTS with updates
821 * include/experimental/array (to_array): Qualify call to __to_array.
822 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
823 * include/std/version (__cpp_lib_to_array): Likewise.
824 * testsuite/23_containers/array/creation/1.cc: New test.
825 * testsuite/23_containers/array/creation/2.cc: New test.
826 * testsuite/23_containers/array/creation/3_neg.cc: New test.
827 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
828 Use zero for dg-error line number.
830 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
832 P1651R0 bind_front should not unwrap reference_wrapper
833 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
834 * include/std/version (__cpp_lib_bind_front): Update value.
835 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
837 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
839 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
840 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
841 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
842 specializations for __float128.
843 * testsuite/26_numerics/numbers/float128.cc: New test.
845 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
847 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
850 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
852 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
853 in <algorithm> and <utility> Headers.
854 Implement C++20 p1023 - constexpr comparison operators for std::array.
855 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
856 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
857 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
858 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
859 none_of, partition_copy, partition_point, remove, remove_if,
860 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
861 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
862 count_if, equal, find, find_first_of, find_if, for_each, generate,
863 generate_n, lexicographical_compare, merge, mismatch, replace,
864 replace_if, search, search_n, set_difference, set_intersection,
865 set_symmetric_difference, set_union, transform, unique_copy):
867 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
868 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
869 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
870 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
871 Use const ref instead of ref arg;
872 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
873 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
874 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
875 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
876 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
877 __iter_comp_iter): Mark constexpr.
878 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
879 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
880 none_of, any_of, find_if_not, is_partitioned, partition_point,
881 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
882 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
883 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
884 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
885 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
886 __equal_range, equal_range, binary_search, __includes, includes,
887 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
888 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
889 is_sorted_until, __is_permutation, is_permutation, for_each, find,
890 find_if, find_first_of, adjacent_find, count, count_if, search,
891 search_n, transform, replace, replace_if, generate, generate_n,
892 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
893 set_intersection, __set_difference, set_difference,
894 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
895 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
896 wrappers around __builtin_memmove and __builtin_memcmp
898 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
899 copy, move, __copy_move_b, __copy_move_backward_a,
900 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
901 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
902 __lexicographical_compare_impl, __lexicographical_compare,
903 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
904 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
905 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
906 is_heap): Mark constexpr.
907 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
908 is_heap): Mark constexpr.
909 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
910 * include/std/array: Make comparison ops constexpr.
911 * include/std/utility: Make exchange constexpr.
912 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
913 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
914 * testsuite/23_containers/array/tuple_interface/
915 tuple_element_neg.cc: Adjust.
916 * testsuite/20_util/exchange/constexpr.cc: New.
917 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
918 * testsuite/25_algorithms/constexpr_macro.cc: New.
919 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
920 * testsuite/25_algorithms/all_of/constexpr.cc: New.
921 * testsuite/25_algorithms/any_of/constexpr.cc: New.
922 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
923 * testsuite/25_algorithms/copy/constexpr.cc: New.
924 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
925 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
926 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
927 * testsuite/25_algorithms/count/constexpr.cc: New.
928 * testsuite/25_algorithms/count_if/constexpr.cc: New.
929 * testsuite/25_algorithms/equal/constexpr.cc: New.
930 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
931 * testsuite/25_algorithms/fill/constexpr.cc: New.
932 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
933 * testsuite/25_algorithms/find/constexpr.cc: New.
934 * testsuite/25_algorithms/find_end/constexpr.cc: New.
935 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
936 * testsuite/25_algorithms/find_if/constexpr.cc: New.
937 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
938 * testsuite/25_algorithms/for_each/constexpr.cc: New.
939 * testsuite/25_algorithms/generate/constexpr.cc: New.
940 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
941 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
942 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
943 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
944 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
945 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
946 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
947 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
948 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
949 * testsuite/25_algorithms/merge/constexpr.cc: New.
950 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
951 * testsuite/25_algorithms/none_of/constexpr.cc: New.
952 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
953 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
954 * testsuite/25_algorithms/remove/constexpr.cc: New.
955 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
956 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
957 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
958 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
959 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
960 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
961 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
962 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
963 * testsuite/25_algorithms/search/constexpr.cc: New.
964 * testsuite/25_algorithms/search_n/constexpr.cc: New.
965 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
966 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
967 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
968 * testsuite/25_algorithms/set_union/constexpr.cc: New.
969 * testsuite/25_algorithms/transform/constexpr.cc: New.
970 * testsuite/25_algorithms/unique/constexpr.cc: New.
971 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
972 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
974 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
976 * include/std/memory (make_obj_using_allocator): Qualify call to
977 uses_allocator_construction_args.
979 P0631R4 Math Constants
980 * include/Makefile.am: Add new header.
981 * include/Makefile.in: Regenerate.
982 * include/precompiled/stdc++.h: Include new header.
983 * include/std/numbers: New header.
984 * include/std/version (__cpp_lib_math_constants): Define.
985 * testsuite/26_numerics/numbers/1.cc: New test.
986 * testsuite/26_numerics/numbers/2.cc: New test.
987 * testsuite/26_numerics/numbers/3.cc: New test.
988 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
990 * include/std/bit: Add Doxygen comments.
993 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
994 constraints on deleter that should only apply to the constructor.
995 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
996 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
997 constraints on deleter here.
998 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
1000 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
1003 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
1005 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
1007 * testsuite/18_support/51333.cc: New test.
1009 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
1011 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
1012 to the Doxygen manual. Avoid a "here" link on the way.
1013 Fix another broken link to Doxygen docblocks.
1015 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
1017 * include/std/bit (__cpp_lib_endian): Define.
1018 * include/std/version (__cpp_lib_endian): Define.
1019 * testsuite/26_numerics/endian/2.cc: New.
1020 * testsuite/26_numerics/endian/3.cc: New.
1021 * testsuite/26_numerics/endian/4.cc: New.
1023 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
1025 * testsuite/util/testsuite_iterators.h
1026 (bidirectional_iterator_wrapper): Fix type comment.
1027 (random_access_iterator_wrapper): Likewise.
1029 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
1031 * include/std/bit (endian): Move definition here as per P1612R1.
1032 * include/std/type_traits (endian): Remove definition from here.
1033 * testsuite/20_util/endian/1.cc: Rename to ...
1034 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
1036 2019-07-25 Martin Liska <mliska@suse.cz>
1037 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1040 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
1041 -fno-allocation-dce.
1042 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
1043 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
1044 * testsuite/ext/new_allocator/check_new.cc: Likewise.
1046 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
1048 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
1049 * testsuite/26_numerics/bit/bit.count/*: Here.
1051 * include/std/bit (__rotl, __rotr): Change second parameter from
1052 unsigned int to int and handle negative values.
1053 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
1054 parameter from unsigned int to int. Add nodiscard attribute.
1055 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
1056 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
1058 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
1059 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
1062 * include/std/bit (__ceil2): Make unrepresentable results undefined,
1063 as per P1355R2. Add debug assertion. Perform one left shift, not two,
1064 so that out of range values cause undefined behaviour. Ensure that
1065 shift will still be undefined if left operand is promoted.
1066 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
1067 unrepresentable values with checks that they are not core constant
1069 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
1071 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
1073 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
1074 sized deallocation size computation.
1076 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
1078 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
1080 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
1082 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
1083 (~_Temporary_buffer()): Use latter.
1084 (_Temporary_buffer(_FIterator, size_type)): Likewise.
1086 2019-07-17 Andreas Schwab <schwab@suse.de>
1088 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1090 2019-07-16 Jason Merrill <jason@redhat.com>
1092 * include/std/memory (uses_allocator_construction_args): Add parens
1095 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
1097 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
1099 * include/experimental/string_view (__detail::__idt): Remove.
1100 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1101 Use __type_identity_t instead of __detail::__idt;
1102 * include/std/string_view (__detail::__idt): Remove.
1103 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1104 Use __type_identity_t instead of __detail::__idt;
1105 * include/std/type_traits (__type_identity_t): New alias template.
1107 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
1108 and floating point atomics.
1110 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
1112 * doc/xml/manual/configure.xml: Improve documentation of
1113 --enable-libstdcxx-time option.
1115 * include/bits/atomic_base.h (__atomic_impl): New namespace for
1116 wrappers around atomic built-ins.
1117 (__atomic_float, __atomic_ref): New class templates for use as base
1119 * include/std/atomic (atomic<float>, atomic<double>)
1120 (atomic<long double>): New explicit specializations.
1121 (atomic_ref): New class template.
1122 (__cpp_lib_atomic_ref): Define.
1123 * include/std/version (__cpp_lib_atomic_ref): Define.
1124 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
1125 * testsuite/29_atomics/atomic_float/1.cc: New test.
1126 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
1127 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
1128 * testsuite/29_atomics/atomic_ref/float.cc: New test.
1129 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
1130 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
1131 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
1132 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
1134 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
1136 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
1137 throw() with _GLIBCXX_NOTHROW.
1138 (__atomic_add_dispatch): Return after performing atomic increment.
1140 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
1142 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
1143 (__exchange_and_add): Replace static specifier with always_inline
1145 (__exchange_and_add_single, __atomic_add_single): Likewise.
1146 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
1147 combine !__gthread_active_p() and !__GTHREADS branches.
1149 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
1152 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
1153 * configure: Regenerate.
1154 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
1156 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
1157 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1159 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
1161 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
1162 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
1163 instead of __is_identifier to detect Clang support.
1165 2019-07-02 Jim Wilson <jimw@sifive.com>
1167 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
1169 * configure: Regenerate.
1171 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
1174 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
1175 for the what_arg parameters.
1176 (filesystem_error::filesystem_error): Pass system_error::what() to
1177 the _Impl constructor.
1178 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
1179 filesystem_error::what() contains system_error::what().
1181 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
1183 * include/std/charconv (chars_format): Define bitmask type.
1184 * testsuite/20_util/to_chars/chars_format.cc: New test.
1186 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
1187 * include/std/bit (_If_is_unsigned_integer_type): Remove.
1188 (_If_is_unsigned_integer): Use __is_unsigned_integer.
1189 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
1190 (countl_one(byte), countr_zero(byte), countr_one(byte))
1191 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
1192 (log2p1(byte)): Remove.
1193 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
1194 (__detail::__is_int_to_chars_type): Remove.
1195 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
1196 and __is_unsigned_integer.
1197 * include/std/type_traits (__is_one_of): Move here from <charconv>.
1198 (__is_signed_integer, __is_unsigned_integer): New helpers.
1199 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
1201 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
1202 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
1203 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
1204 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
1205 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
1206 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
1207 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
1208 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
1209 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
1210 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
1212 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
1214 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
1217 2019-06-25 Jakub Jelinek <jakub@redhat.com>
1219 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
1220 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
1221 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
1222 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
1224 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
1226 * include/std/numeric (midpoint(T, T)): Change implementation for
1227 floating-point types to avoid incorrect rounding of denormals.
1228 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
1229 rounding with denormals.
1230 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
1231 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1233 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
1235 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
1237 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
1239 * configure: Regenerate.
1241 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
1242 Qualify calls to __never_valueless.
1244 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
1245 C++17 working draft.
1247 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
1248 vector<bool> for test.
1249 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1251 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1253 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
1255 (istream_iterator::_M_read()): Do not check stream state before
1256 attempting extraction. Set stream pointer to null when extraction
1258 (operator==(const istream_iterator&, const istream_iterator&)): Change
1259 to be a hidden friend of istream_iterator.
1260 (operator!=(const istream_iterator&, const istream_iterator&)):
1262 (ostream_iterator::ostream_iterator()): Add default constructor.
1263 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
1265 * testsuite/24_iterators/istream_iterator/1.cc: New test.
1266 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
1267 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
1268 constructor taking a string.
1269 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
1272 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
1273 Jonathan Wakely <jwakely@redhat.com>
1276 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
1277 values of type bool for vector<bool> elements.
1278 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
1279 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1281 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1283 PR libstdc++/90920 partially revert r263433
1284 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
1285 (rotate): Remove checks.
1286 * testsuite/25_algorithms/rotate/90920.cc: New test.
1288 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
1289 category used in invocable check.
1290 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
1291 * testsuite/26_numerics/reduce/2.cc: New test.
1293 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
1295 * include/bits/algorithmfwd.h: Change title of doc group.
1296 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
1298 * include/bits/stl_numeric.h: Define doc group and add algos to it.
1299 * include/std/numeric (__is_random_access_iter): New internal trait.
1300 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
1301 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
1302 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
1303 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
1304 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
1305 * testsuite/26_numerics/reduce/1.cc: New test.
1306 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
1307 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
1308 * testsuite/26_numerics/transform_reduce/1.cc: New test.
1309 * testsuite/util/testsuite_iterators.h (test_container::size()): New
1312 * include/c_global/cstddef (std::byte): Perform arithmetic operations
1313 in unsigned int to avoid promotion (LWG 2950).
1315 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1317 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
1320 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
1322 PR libstdc++/90281 Fix string conversions for filesystem::path
1323 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1324 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
1325 __str_codecvt_in_all to fail for partial conversions and throw on
1327 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
1328 (path::_Cvt<char8_t>): Add explicit specialization.
1329 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
1331 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1332 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
1333 instead of codecvt_utf8. Use __str_codecvt_in_all and
1334 __str_codecvt_out_all.
1335 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1336 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1337 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1338 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1339 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
1340 after converting to UTF-8.
1341 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
1342 __str_codecvt_in_all.
1343 (path::string): Fix initialization of string types with different
1345 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1346 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1347 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
1349 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
1350 return false for partial conversions.
1351 * include/experimental/bits/fs_path.h (u8path):
1352 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
1353 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
1354 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
1355 instead of codecvt_utf8. Use __str_codecvt_in_all and
1356 __str_codecvt_out_all.
1357 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1358 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1359 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1360 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1361 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
1362 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1363 __str_codecvt_in_all.
1364 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1365 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1366 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
1367 __str_codecvt_in_all.
1368 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
1369 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
1370 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
1371 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
1372 strings and with Unicode characters outside the basic multilingual
1374 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
1375 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
1376 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
1377 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
1378 * testsuite/experimental/filesystem/path/native/string.cc: Test with
1379 empty strings and with Unicode characters outside the basic
1382 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
1383 Jonathan Wakely <jwakely@redhat.com>
1385 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
1386 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
1387 deallocate node if insertion fails.
1388 (_Hashtable::_M_insert_multi_node): Likewise.
1389 (_Hashtable::_M_reinsert_node): Pass additional key argument.
1390 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
1391 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
1392 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
1393 (_Hashtable::extract(const _Key&)): Likewise.
1394 (_Hashtable::_M_merge_unique): Pass additional key argument.
1395 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
1397 (_Hashtable::_M_insert): Likewise.
1398 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
1399 (_Hashtable_alloc): Add comments to functions with misleading names.
1401 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1403 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
1405 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
1406 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
1407 header for std::allocator.
1408 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
1409 using-declaration for std::size_t.
1410 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
1412 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
1414 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
1415 * testsuite/experimental/map/erasure.cc: Include <string> for
1417 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
1419 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
1421 * include/experimental/type_traits (experimental::nonesuch): Use
1422 pragma to disable -Wctor-dtor-privacy warnings.
1423 * include/std/type_traits (__is_convertible_helper<From, To, false>)
1424 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
1426 * include/std/version (__cpp_lib_bind_front): Add missing macro.
1428 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
1430 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
1431 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
1432 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
1433 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
1435 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
1436 (variant::emplace): Change static_assert messages from "should be"
1438 (hash<monostate>::operator()): Remove name of unused parameter.
1440 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
1443 * include/Makefile.am: Add new <bits/charconv.h> header.
1444 * include/Makefile.in: Regenerate.
1445 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
1446 (to_string(long), to_string(unsigned long), to_string(long long))
1447 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
1448 * include/bits/charconv.h: New header.
1449 (__detail::__to_chars_len): Move here from <charconv>.
1450 (__detail::__to_chars_10_impl): New function extracted from
1451 __detail::__to_chars_10.
1452 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
1453 (__to_chars_unsigned_type): New class template that reuses
1454 __make_unsigned_selector_base::__select to pick a type.
1455 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
1456 (__detail::__to_chars_len): Move to new header.
1457 (__detail::__to_chars_10): Add inline specifier. Move code doing the
1458 output to __detail::__to_chars_10_impl and call that.
1459 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
1460 * testsuite/21_strings/basic_string/numeric_conversions/char/
1461 to_string.cc: Fix reference in comment. Remove unused variable.
1462 * testsuite/21_strings/basic_string/numeric_conversions/char/
1463 to_string_int.cc: New test.
1465 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1467 Fix ConstexprIterator requirements tests - No constexpr algorithms!
1468 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1469 Replace copy with hand-rolled loop.
1470 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1473 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
1475 Test for C++20 p0858 - ConstexprIterator requirements.
1476 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1478 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1481 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
1483 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
1485 * include/bits/c++config: Rename all macros of the form __PSTL* to
1487 * include/std/algorithm: Likewise.
1488 * include/std/execution: Likewise.
1489 * include/std/numeric: Likewise.
1490 * include/std/memory: Likewise.
1491 * include/pstl/glue_memory_impl.h: Likewise.
1492 * include/pstl/numeric_impl.h: Likewise.
1493 * include/pstl/glue_memory_defs.h: Likewise.
1494 * include/pstl/execution_defs.h: Likewise.
1495 * include/pstl/utils.h: Likewise.
1496 * include/pstl/algorithm_fwd.h: Likewise.
1497 * include/pstl/unseq_backend_simd.h: Likewise.
1498 * include/pstl/glue_execution_defs.h: Likewise.
1499 * include/pstl/algorithm_impl.h: Likewise.
1500 * include/pstl/parallel_impl.h: Likewise.
1501 * include/pstl/memory_impl.h: Likewise.
1502 * include/pstl/glue_numeric_defs.h: Likewise.
1503 * include/pstl/parallel_backend_utils.h: Likewise.
1504 * include/pstl/glue_algorithm_defs.h: Likewise.
1505 * include/pstl/parallel_backend.h: Likewise.
1506 * include/pstl/glue_numeric_impl.h: Likewise.
1507 * include/pstl/parallel_backend_tbb.h: Likewise.
1508 * include/pstl/numeric_fwd.h: Likewise.
1509 * include/pstl/glue_algorithm_impl.h: Likewise.
1510 * include/pstl/execution_impl.h: Likewise.
1511 * include/pstl/pstl_config.h: Likewise.
1512 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1513 * testsuite/util/pstl/test_utils.h: Likewise.
1514 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
1516 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
1518 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
1520 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
1521 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
1522 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
1523 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
1524 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
1526 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
1527 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
1528 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
1529 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
1530 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
1532 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
1533 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
1534 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
1535 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
1536 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
1538 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
1539 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
1540 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
1542 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
1544 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
1545 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
1546 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
1548 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
1550 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
1552 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
1554 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
1556 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
1558 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
1560 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
1562 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
1564 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
1566 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
1568 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
1570 Rename header guards to be consistent with upstream project's
1572 * include/pstl/glue_memory_impl.h: Rename all macros of the form
1573 _PSTL_(.*)_H to _PSTL_\U\1_H.
1574 * include/pstl/numeric_impl.h: Likewise.
1575 * include/pstl/glue_memory_defs.h: Likewise.
1576 * include/pstl/execution_defs.h: Likewise.
1577 * include/pstl/utils.h: Likewise.
1578 * include/pstl/algorithm_fwd.h: Likewise.
1579 * include/pstl/unseq_backend_simd.h: Likewise.
1580 * include/pstl/glue_execution_defs.h: Likewise.
1581 * include/pstl/algorithm_impl.h: Likewise.
1582 * include/pstl/parallel_impl.h: Likewise.
1583 * include/pstl/memory_impl.h: Likewise.
1584 * include/pstl/glue_numeric_defs.h: Likewise.
1585 * include/pstl/parallel_backend_utils.h: Likewise.
1586 * include/pstl/glue_algorithm_defs.h: Likewise.
1587 * include/pstl/parallel_backend.h: Likewise.
1588 * include/pstl/glue_numeric_impl.h: Likewise.
1589 * include/pstl/parallel_backend_tbb.h: Likewise.
1590 * include/pstl/numeric_fwd.h: Likewise.
1591 * include/pstl/glue_algorithm_impl.h: Likewise.
1592 * include/pstl/execution_impl.h: Likewise.
1593 * include/pstl/pstl_config.h: Likewise.
1594 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1596 Synchronize libstdc++ parallel algorithms with upstream
1598 * include/pstl/algorithm_fwd.h: Synchronize with
1599 upstream PSTL project.
1600 * include/pstl/algorithm_impl.h: Likewise.
1601 * include/pstl/execution_defs.h: Likewise.
1602 * include/pstl/execution_impl.h: Likewise.
1603 * include/pstl/glue_algorithm_impl.h: Likewise.
1604 * include/pstl/glue_execution_defs.h: Likewise.
1605 * include/pstl/numeric_fwd.h: Likewise.
1606 * include/pstl/numeric_impl.h: Likewise.
1607 * include/pstl/parallel_backend.h: Likewise.
1608 * include/pstl/pstl_config.h: Likewise.
1609 * include/pstl/unseq_backend_simd.h: Likewise.
1610 * include/pstl/parallel_backend_serial.h: New file.
1611 * include/Makefile.am (pstl_headers): Add
1612 parallel_backend_serial.h.
1613 * include/Makefile.in: Regenerate.
1615 Clean up non-conforming names
1616 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1617 Uglfiy copy_range1 and copy_range2
1618 (__pattern_walk2_n): Rename local n to __n
1619 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1620 Rename parameter _T to _Tp.
1622 Integrate non-TBB serial backend support
1623 * include/bits/c++config: Adjust TBB detection logic to select serial
1624 PSTL backend if no TBB present.
1625 * testsuite/utils/pstl/test_utils.h: Remove check for
1626 _PSTL_USE_PAR_POLICIES
1628 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1630 * testsuite/24_iterators/container_access.cc: Move dg-options before
1631 dg-do directive so the target check uses the -std option.
1634 * configure: Regenerate.
1635 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1636 * src/Makefile.in: Regenerate.
1638 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1640 * include/std/array: Do not include <stdexcept>.
1641 * include/std/optional: Include <exception> and
1642 <bits/exception_defines.h> instead of <stdexcept>.
1643 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1645 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1647 * testsuite/23_containers/map/erasure.cc: Include <string>.
1648 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1650 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1651 dg-prune-output for different C++98 diagnostic.
1652 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1654 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1656 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1658 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1660 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1662 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1664 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1666 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1668 * testsuite/23_containers/vector/requirements/dr438/
1669 constructor_1_neg.cc: Likewise.
1670 * testsuite/23_containers/vector/requirements/dr438/
1671 constructor_2_neg.cc: Likewise.
1672 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1674 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1676 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1677 Do not test allocator rebinding extension for C++2a.
1678 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1679 dg-do directive for C++17 and C++2a.
1681 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1682 1_c++0x.cc: Remove redundant test.
1683 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1684 2.cc: Use target selector instead of preprocessor condition.
1685 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1686 3.cc: Do not run test for C++2a.
1687 * testsuite/23_containers/forward_list/requirements/
1688 explicit_instantiation/3.cc: Likewise.
1689 * testsuite/23_containers/forward_list/requirements/
1690 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1692 * testsuite/23_containers/list/requirements/explicit_instantiation/
1693 1_c++0x.cc: Remove redundant test.
1694 * testsuite/23_containers/list/requirements/explicit_instantiation/
1695 2.cc: Use target selector instead of preprocessor condition.
1696 * testsuite/23_containers/list/requirements/explicit_instantiation/
1697 3.cc: Do not run test for C++2a.
1698 * testsuite/23_containers/list/requirements/explicit_instantiation/
1699 5.cc: Do not test allocator rebinding extension for C++2a.
1700 * testsuite/23_containers/map/requirements/explicit_instantiation/
1701 1_c++0x.cc: Remove redundant test.
1702 * testsuite/23_containers/map/requirements/explicit_instantiation/
1703 2.cc: Adjust comment.
1704 * testsuite/23_containers/map/requirements/explicit_instantiation/
1705 3.cc: Do not run test for C++2a.
1706 * testsuite/23_containers/map/requirements/explicit_instantiation/
1707 5.cc: Do not test allocator rebinding extension for C++2a.
1708 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1709 1_c++0x.cc: Remove redundant test.
1710 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1711 3.cc: Do not run test for C++2a.
1712 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1713 5.cc: Do not test allocator rebinding extension for C++2a.
1714 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1715 3.cc: Do not run test for C++2a.
1716 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1717 5.cc: Do not test allocator rebinding extension for C++2a.
1718 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1719 Do not run test for C++2a.
1720 * testsuite/23_containers/set/requirements/explicit_instantiation/
1721 1_c++0x.cc: Remove redundant test.
1722 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1723 Do not test allocator rebinding extension for C++2a.
1724 * testsuite/23_containers/unordered_map/requirements/
1725 explicit_instantiation/3.cc: Likewise.
1726 * testsuite/23_containers/unordered_map/requirements/
1727 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1729 * testsuite/23_containers/unordered_multimap/requirements/
1730 explicit_instantiation/3.cc: Do not run test for C++2a.
1731 * testsuite/23_containers/unordered_multimap/requirements/
1732 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1734 * testsuite/23_containers/unordered_multiset/requirements/
1735 explicit_instantiation/3.cc: Do not run test for C++2a.
1736 * testsuite/23_containers/unordered_multiset/requirements/
1737 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1739 * testsuite/23_containers/unordered_set/requirements/
1740 explicit_instantiation/3.cc: Do not run test for C++2a.
1741 * testsuite/23_containers/unordered_set/requirements/
1742 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1744 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1745 2.cc: Remove redundant test.
1746 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1747 3.cc: Do not run test for C++2a.
1748 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1751 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1752 (is_abstract, is_aggregate): Remove static_assert.
1753 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1755 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1756 missing -std=gnu++17 option.
1757 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1758 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1759 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1762 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1763 * testsuite/18_support/set_unexpected.cc: Likewise.
1764 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1766 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1767 function to be valid in C++11.
1768 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1769 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1770 include Library Fundamentals or Networking headers in C++11 mode.
1771 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1773 * include/std/tuple (_TC): Replace with _TupleConstraints.
1774 (_TupleConstraints): New helper for SFINAE constraints, with more
1775 expressive member functions to reduce duplication when used.
1776 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1777 (tuple::_TCC): Replace dummy type parameter with bool non-type
1778 parameter that can be used to check the pack size.
1779 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1780 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1781 checking constraints in constructors.
1782 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1784 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1785 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1786 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1787 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1788 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1789 constraints in constructors.
1790 (tuple::__is_alloc_arg()): New SFINAE helpers.
1791 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1793 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1794 * testsuite/20_util/tuple/cons/90700.cc: New test.
1795 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1796 to meet new constraint on allocator-extended default constructor.
1798 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1800 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1801 * include/bits/stl_multimap.h (multimap): Likewise.
1803 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1805 Rename variables and cleanup comments.
1806 * include/bits/hashtable_policy.h
1807 * include/bits/hashtable.h
1809 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1811 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1812 Fix bgcolor for P0340R3.
1813 * doc/html/*: Regenerate.
1816 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1817 <experimental/memory_resource>.
1818 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1819 P0339R6, P0340R3, P1164R1 and P1357R1.
1820 * doc/html/*: Regenerate.
1822 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1823 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1824 allocator::value_type assertion for C++2a.
1825 * include/bits/hashtable.h: Likewise.
1826 * include/bits/stl_deque.h: Likewise.
1827 * include/bits/stl_list.h: Likewise.
1828 * include/bits/stl_map.h: Likewise.
1829 * include/bits/stl_multimap.h: Likewise.
1830 * include/bits/stl_multiset.h: Likewise.
1831 * include/bits/stl_set.h: Likewise.
1832 * include/bits/stl_vector.h: Likewise.
1833 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1834 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1835 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1836 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1837 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1838 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1839 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1840 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1841 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1842 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1843 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1844 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1846 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1848 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1850 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1852 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1854 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1856 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1858 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1860 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1863 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1864 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1865 * libsupc++/eh_term_handler.h: New header defining
1866 _GLIBCXX_DEFAULT_TERM_HANDLER.
1867 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1868 (set_terminate): Restore default handler when argument is null.
1869 (set_unexpected): Likewise.
1870 * testsuite/18_support/set_terminate.cc: New test.
1871 * testsuite/18_support/set_unexpected.cc: New test.
1873 * include/backward/hashtable.h (size_t, ptrdiff_t)
1874 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1875 (distance, vector, pair, __iterator_category): Remove
1876 using-declarations that add these names to namespace __gnu_cxx.
1877 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1878 * include/ext/debug_allocator.h (size_t): Likewise.
1879 * include/ext/functional (size_t, unary_function, binary_function)
1880 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1882 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1883 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1884 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1885 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1886 * include/ext/numeric (iota): Fix outdated comment.
1887 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1888 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1889 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1890 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1891 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1893 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1894 (allocator, __true_type, __false_type): Likewise.
1896 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1899 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1900 New helpers for checking preconditions in traits.
1901 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1902 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1903 (is_destructible, is_nothrow_destructible, is_constructible)
1904 (is_default_constructible, is_copy_constructible)
1905 (is_move_constructible, is_nothrow_default_constructible)
1906 (is_nothrow_constructible, is_nothrow_copy_constructible)
1907 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1908 (is_nothrow_assignable, is_nothrow_copy_assignable)
1909 (is_nothrow_move_assignable, is_trivially_constructible)
1910 (is_trivially_copy_constructible, is_trivially_move_constructible)
1911 is_trivially_assignable, is_trivially_copy_assignable)
1912 (is_trivially_move_assignable, is_trivially_destructible)
1913 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1914 (is_invocable_r, is_nothrow_invocable)
1915 (has_unique_object_representations, is_aggregate): Add static_asserts
1916 to make sure that type traits are not misused with incomplete types.
1917 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1918 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1919 base characteristics without assertions that can be reused in other
1921 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1922 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1924 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1925 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1926 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1927 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1928 * testsuite/20_util/is_function/value.cc: Likewise.
1929 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1930 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1932 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1933 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1934 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1935 * testsuite/20_util/is_union/value.cc: Likewise.
1936 * testsuite/20_util/is_void/value.cc: Likewise.
1937 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1939 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1941 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1942 Add new private member function.
1943 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1944 (random_device::_M_init_pretr1(const string&)): Call new private
1945 member with string data.
1946 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1948 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1949 test using COW strings.
1950 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1951 a value from the device.
1952 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1953 Fix typo in token string.
1955 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1957 LWG2788 basic_string spurious use of a default constructible allocator
1958 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1959 (basic_string::_M_replace_dispatch): Construct temporary string with
1960 the current allocator.
1961 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1962 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1964 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1966 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1968 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1969 section about new/delete overloads. Improve section on verbose
1971 * doc/html/*: Regenerate.
1973 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1974 P0811R3. Change status of P1353R0.
1975 * doc/html/*: Regenerate.
1977 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1978 documentation of implementation-defined types for [thread.req.native].
1979 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1980 implementation-defined strings for [variant.bad.access]. Fix typo in
1981 documentation of implementation-defined support for [fs.conform.9945].
1982 * doc/html/*: Regenerate.
1984 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1987 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1988 that fails on mingw-w64.
1991 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1992 (status(const path&, error_code&)): Use parent_path() to remove
1994 (symlink_status(const path&, error_code&)): Duplicate workaround for
1995 bug in _wstat for paths with trailing slash.
1996 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1997 with trailing slash.
1998 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1999 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2001 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
2002 once instead of building it iteratively.
2004 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
2006 PR libstdc++/85494 use rdseed and rand_s in std::random_device
2007 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
2008 the assembler supports rdseed.
2009 * config.h.in: Regenerate.
2010 * configure: Regenerate.
2011 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
2012 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
2013 * doc/html/*: Regenerate.
2014 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
2015 * include/bits/random.h (random_device::random_device()): Always call
2016 _M_init rather than _M_init_pretr1.
2017 (random_device::random_device(const string&)): Likewise.
2018 (random_device::operator()()): Always call _M_getval().
2019 (random_device::_M_file): Replace first member of union with an
2020 anonymous struct, with _M_file as its first member.
2021 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
2022 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
2023 (USE_MT19937): Define if none of the above are defined.
2024 (USE_POSIX_FILE_IO): Define.
2025 (_M_strtoul): Remove.
2026 [USE_RDSEED] (__x86_rdseed): Define new function.
2027 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
2028 (random_device::_M_init(const string&)): Initialize new union members.
2029 Add support for "rdseed" and "rand_s" tokens. Decide what the
2030 "default" token does according to which USE_* macros are defined.
2031 [USE_POSIX_FILE_IO]: Store a file descriptor.
2032 [USE_MT19937]: Forward to _M_init_pretr1 instead.
2033 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
2034 code from _M_strtoul.
2035 [!USE_MT19937]: Call _M_init, transforming the old default token or
2036 numeric tokens to "default".
2037 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
2038 (random_device::_M_getval()): Use new union members to obtain a
2039 random number from the stored function pointer or file descriptor.
2040 [USE_MT19937]: Obtain a value from the mt19937 engine.
2041 (random_device::_M_getval_pretr1()): Call _M_getval().
2042 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
2044 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
2045 * testsuite/26_numerics/random/random_device/85494.cc: New test.
2047 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
2050 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
2051 _M_split_cmpts() for a path with multiple components.
2052 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
2053 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
2054 components and reserve space in vector. Return early when there is
2056 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
2057 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
2059 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
2060 form of std::equals for C++11 compatibility.
2062 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
2064 * doc/xml/manual/appendix_contributing.xml: Update pointer to
2065 C++ standard at ansi.org.
2067 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
2069 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
2070 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
2073 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
2074 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
2076 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2078 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
2080 * testsuite/20_util/function_objects/invoke/3.cc: New test.
2081 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2082 "compile" test to "run".
2084 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
2085 * doc/html/*: Regenerate.
2086 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
2087 rvalue aliasing constructor.
2088 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
2089 (reinterpret_pointer_cast): Add overloads taking rvalues.
2090 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
2091 Add rvalue aliasing constructor.
2092 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
2093 "run" and check return values as well as types.
2094 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
2095 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
2096 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
2097 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
2100 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
2101 * doc/xml/manual/intro.xml: Likewise.
2102 * include/std/future (__create_task_state): Add default arguments
2103 to make providing an allocator optional.
2104 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
2105 instead of delegating to another constructor.
2106 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
2107 define allocator-extended constructors for C++17 and later.
2108 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
2110 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
2111 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
2112 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
2114 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
2116 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
2117 Don't run the libstdc++/83237 part on simulator targets.
2119 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2121 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
2123 * doc/html/*: Regenerate.
2125 * include/experimental/any (__any_caster): Use RTTI if comparing
2126 addresses fails, to support non-unique addresses in shared libraries.
2127 * include/std/any (__any_caster): Likewise.
2130 * include/experimental/any (__any_caster): Constrain to only be
2131 callable for object types. Use remove_cv_t instead of decay_t.
2132 If the type decays or isn't copy constructible, compare the manager
2133 function to a dummy specialization.
2134 (__any_caster): Add overload constrained for non-object types.
2135 (any::_Manager_internal<_Op>): Add dummy specialization.
2136 * testsuite/experimental/any/misc/any_cast.cc: Test function types
2139 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
2142 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
2143 reversed arguments to uninitialized_copy_n.
2144 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
2145 is unchanged by copy assignment.
2146 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
2147 compare path components.
2150 * include/experimental/memory_resource: Add system header pragma and
2151 do not define anything unless compiled as C++14 or later.
2152 (__resource_adaptor_common::__guaranteed_alignment): Remove.
2153 (__resource_adaptor_imp::do_allocate): If the requested alignment
2154 is a fundamental alignment then either allocate directly from _M_alloc
2155 or call the new _M_allocate function.
2156 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
2157 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
2158 of the allocator rebound to a POD type with the specified alignment.
2159 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
2160 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2161 Adjust expected allocation sizes.
2162 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
2163 xfail for Solaris x86.
2165 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
2167 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
2168 * include/pstl/execution_defs.h (__enable_if_execution_policy):
2169 Use std::__remove_cvref_t when building with GCC.
2171 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
2174 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2175 Use "additional_flags" to pass -ltbb to v3_target_compile command.
2176 Use check_v3_target_prop_cached to cache the result of the test.
2178 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
2180 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2183 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2184 Changed v3_target_compile check from preprocess to executable.
2185 Added "-ltbb" to v3_target_compile flags.
2187 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2189 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2190 Add check for Thread Building Blocks 2018 or later.
2192 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2194 * testsuite/experimental/names.cc: Only include Networking TS headers
2195 on targets with the necessary Gthreads support.
2197 2019-05-20 Marek Polacek <polacek@redhat.com>
2199 CWG 2094 - volatile scalars are trivially copyable.
2201 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
2202 result for volatile int.
2204 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2206 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
2207 * testsuite/experimental/names.cc: Include <experimental/filesystem>
2210 PR c++/90532 Ensure __is_constructible(T[]) is false
2211 * include/std/type_traits (__do_is_default_constructible_impl)
2212 (__is_default_constructible_atom, __is_default_constructible_safe):
2214 (is_default_constructible): Use is_constructible.
2215 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
2216 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
2217 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
2218 * testsuite/20_util/is_trivially_default_constructible/value.cc:
2221 2019-05-20 Pádraig Brady <pbrady@fb.com>
2223 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
2224 to the deallocator with -fsized-deallocation.
2226 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2228 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
2229 test by passing correct alignment to deallocate function.
2231 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
2234 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2235 Raise exception if unique_ptr tuple member has unknown structure.
2236 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
2237 Adjust worker to support new __uniq_ptr_data base class. Do not
2238 assume field called _M_head_impl is the first tuple element.
2240 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2242 * include/bits/stl_deque.h
2243 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
2244 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
2245 (_Deque_base::_Deque_impl_data): New.
2246 (_Deque_base::_Deque_impl): Inherit latter.
2247 (_Deque_base::_Deque_impl::_M_swap_data): Move...
2248 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
2249 (_Deque_base::_Deque_impl()): Add noexcept qualification.
2250 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
2251 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
2252 (deque<>::deque()): Default.
2253 (deque<>::deque(deque&&)): Default.
2254 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
2255 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
2256 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
2257 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
2258 _M_range_initialize.
2259 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
2260 (deque<>::resize(size_type, const value_type&)): Share a single
2262 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
2263 _M_range_insert_aux.
2264 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
2265 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
2266 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
2267 * testsuite/23_containers/deque/allocator/default_init.cc: New.
2269 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
2272 * include/std/variant (holds_alternative, get, get_if): Improve
2273 static assertion messages.
2274 (bad_variant_access::bad_variant_access()): Change default message.
2275 (__throw_bad_variant_access(bool)): New overload.
2276 (get): Use new overload.
2277 (visit, visit<R>): Improve exception message.
2279 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
2280 targets. Add more cases from P0608R3.
2281 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
2283 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
2284 * include/experimental/type_traits (is_detected_exact)
2285 (is_detected_exact_v): Likewise.
2286 * include/pstl/execution_defs.h (is_execution_policy)
2287 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
2288 * include/pstl/execution_impl.h (__policy_traits): Likewise.
2289 * testsuite/17_intro/names.cc: Check for more non-reserved names.
2290 * testsuite/experimental/names.cc: New test.
2293 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
2294 assertions from the destructor.
2295 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
2296 Move static_assert for hash function to here.
2297 (_Hash_table_base::_M_equals): Move static_assert for equality
2299 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
2301 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
2302 the value directly instead of calling _S_value.
2303 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
2304 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
2305 _S_key(_Const_Link_type).
2306 * testsuite/23_containers/set/85965.cc: Check construction,
2307 destruction, assignment and size() do not trigger the assertions.
2308 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
2309 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
2311 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2312 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
2313 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2314 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2315 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2316 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2317 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2319 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
2320 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
2323 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
2325 * doc/html/*: Regenerate.
2326 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
2327 of decay_t (P0777R1).
2329 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2331 Move from state of allocators (LWG2593)
2332 * include/bits/stl_deque.h
2333 (_Deque_base(_Deque_base&&, false_type)): Remove.
2334 (_Deque_base(_Deque_base&&, true_type)): Remove.
2335 (_Deque_base(_Deque_base&&)): Adapt.
2336 (_Deque_base::_M_move_impl()): Remove.
2337 * testsuite/util/testsuite_allocator.h
2338 (propagating_allocator(propagating_allocator&&)): Preserve move from
2340 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
2342 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
2344 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
2345 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
2346 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
2348 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
2350 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
2351 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
2353 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
2355 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
2357 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
2359 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
2361 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
2363 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
2365 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
2368 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
2370 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
2371 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
2373 * include/std/variant (__overload_set): Remove.
2375 (_Build_FUN): New class template to define a single FUN overload,
2376 with specializations to prevent unwanted conversions, as per P0608R3.
2377 (_Build_FUNs): New class template to build an overload set of FUN.
2378 (_FUN_type): New alias template to perform overload resolution.
2379 (__accepted_type): Use integer_constant base for failure case. Use
2380 _FUN_type for successful case.
2381 (variant::__accepted_index): Use _Tp instead of _Tp&&.
2382 (variant::variant(_Tp&&)): Likewise.
2383 (variant::operator=(_Tp&&)): Likewise.
2385 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
2386 Replace raw visitation with a runtime check for the valueless state
2387 and a non-raw visitor.
2388 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
2389 (variant::index()): Remove branch.
2390 (variant::swap(variant&)): Use valueless_by_exception() instead of
2391 comparing the index to variant_npos, and add likelihood attribute.
2393 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
2394 (_Hashtable_base::_Equal_hash_code): Define new class template.
2395 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
2398 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
2399 Replace with _M_get non-static member function.
2400 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
2402 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
2403 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
2405 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
2406 _S_get accessors for members in EBO helpers.
2407 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
2408 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
2410 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
2412 (_Hashtable_base::_M_eq()): Remove non-const overload.
2414 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
2416 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
2418 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2420 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
2423 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2425 * config/os/solaris/solaris2.10: Move to ...
2426 * config/os/solaris: ... this.
2427 * configure.host (os_include_dir): Adapt.
2428 (abi_baseline_pair): Remove Solaris 10 handling.
2429 * config/abi/post/i386-solaris2.10: Remove.
2430 * config/abi/post/sparc-solaris2.10: Remove.
2431 * config/abi/post/i386-solaris2.11: Rename to ...
2432 * config/abi/post/i386-solaris: ... this.
2433 * config/abi/post/sparc-solaris2.11: Rename to ...
2434 * config/abi/post/sparc-solaris: ... this.
2436 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
2439 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
2442 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2444 * include/std/variant (__visit_with_index): Remove typedef.
2445 (__deduce_visit_result): New tag type.
2446 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
2447 visitation of possibly-valueless variants, forwarding to __do_visit
2448 with the relevant tag type.
2449 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
2450 and make lambda return void.
2451 (__variant_construct): Likewise.
2452 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
2453 __raw_idx_visit and make lambda return void.
2454 (_Multi_array::__untag_result): Add metafunction to check the function
2455 pointer type for a tag type that dictates the kind of visitation.
2456 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
2457 Use decltype(auto) instead of tagged function pointer type.
2458 (__gen_vtable_impl): Remove bool non-type parameter and unused
2459 _Variant_tuple parameter.
2460 (__gen_vtable_impl::__visit_invoke_impl): Remove.
2461 (__gen_vtable_impl::__do_visit_invoke): Remove.
2462 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
2463 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
2464 for the visit<R> case, rather than dispatching to separate functions.
2465 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
2467 (variant::swap): Likewise.
2468 (__do_visit): Replace two non-type template parameters with a single
2469 type parameter, so that the caller must specify the visitor's return
2470 type (or one of the tag types).
2471 (visit): Deduce a return type from the visitor and use the
2472 __deduce_visit_result tag to enforce that all overloads return the
2474 (visit<R>): Call __do_visit<R> with explicit result type.
2475 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
2478 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2480 nonesuch is insufficiently useless (lwg2996)
2481 * include/std/type_traits (struct __nonesuch): Added private base
2482 class to make __nonesuch not an aggregate and removed deleted default
2484 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
2485 (operator=(const pair&)): Use __nonesuch instead of
2486 __nonesuch_no_braces.
2487 (operator=(pair&&)): Likewise
2488 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
2489 of __nonesuch_no_braces.
2490 (operator=(tuple&&)): Likewise
2491 * include/experimental/type_traits (struct nonesuch): Added private
2492 base class to make nonesuch not an aggregate and removed deleted
2493 default constructor.
2494 * testsuite/20_util/nonesuch/nonesuch.cc: New.
2495 * testsuite/experimental/type_traits/nonesuch.cc: New.
2497 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2499 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
2500 (_Function_handler): Remove partial specializations for void return
2501 types and pointers to member.
2502 (_Function_handler::_M_manager): Adapt to removal of
2503 _Simple_type_wrapper.
2504 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
2505 * include/std/functional (_Bind_result::__enable_if_void)
2506 (_Bind_result::__disable_if_void): Remove sfinae helpers.
2507 (_Bind_result::__call): Use __invoke_r and remove overloads for void
2509 * include/std/future (__future_base::_Task_state::_M_run)
2510 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
2511 change return type of lambda expressions.
2513 * include/bits/invoke.h (__invoke_r): Define new function implementing
2514 the INVOKE<R> pseudo-function.
2515 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
2516 * testsuite/20_util/function_objects/invoke/2.cc: New test.
2518 * include/std/type_traits (__is_nt_convertible_helper): Define it
2519 unconditionally, not only for C++20.
2520 (__is_nothrow_convertible): Define internal trait for use in C++11.
2521 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
2522 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
2523 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
2524 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
2525 that has nothrow explicit conversion but potentially-throwing implicit
2527 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
2528 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
2529 function to only consider implicit conversions.
2530 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
2532 * include/std/iterator: Include <iosfwd> instead of <istream> and
2535 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
2536 Remove unused, non-standard function.
2538 * include/bits/regex.h (match_results::max_size()): Adjust return
2539 value to account for prefix/suffix/unmatched subs.
2540 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
2541 reset the contained sub matches.
2542 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
2543 function to set result state following a failed match.
2544 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
2545 sub_match states after _M_resize. Use _M_establish_failed_match.
2548 * include/std/thread (thread::_State_impl, thread::_S_make_state):
2549 Replace single _Callable parameter with variadic _Args pack, to
2550 forward them directly to the tuple of decayed copies.
2551 * testsuite/30_threads/thread/cons/69724.cc: New test.
2553 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2555 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
2556 * include/bits/basic_string.h: (operator=(const basic_string&):
2557 Move allocator decision to assign.
2558 (assign(const basic_string&)): Move allocator decision here.
2559 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2561 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2564 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2566 * testsuite/util/testsuite_allocator.h (memory_resource)
2567 (default_resource_mgr): Fix indentation.
2569 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
2570 Use operator-> to access raw pointer member.
2571 * testsuite/23_containers/vector/59829.cc: Likewise.
2572 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
2573 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
2574 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
2576 (PointerBase, PointerBase_void): Derive from NullablePointer and use
2577 its constructors and equality operators. Change converting
2578 constructors to use operator-> to access private member of the other
2580 (PointerBase_void::operator->()): Add, for access to private member.
2581 (operator-(PointerBase, PointerBase)): Change to hidden friend.
2582 (operator==(PointerBase, PointerBase)): Remove.
2583 (operator!=(PointerBase, PointerBase)): Remove.
2585 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
2586 not assume field called _M_head_impl is the first tuple element.
2587 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
2588 implementation more accurate.
2589 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
2590 empty pointer type and non-empty deleter.
2592 LWG 2899 - Make is_move_constructible correct for unique_ptr
2593 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
2594 move assignment operator.
2595 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
2596 (__uniq_ptr_data): New class template with conditionally deleted
2598 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
2599 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
2600 constructor and move assignment operator as defaulted.
2601 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
2602 __uniq_ptr_impl::release().
2603 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
2604 to __uniq_ptr_impl::reset(pointer).
2605 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2606 Check for new __uniq_ptr_data type.
2607 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
2609 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2611 PR libstdc++/90454.cc path construction from void*
2612 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2613 pointers to void are rejected as well as void.
2614 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2615 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2617 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2619 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2620 <remark> elements. Fix formatting of bibliography references.
2622 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2624 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2626 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2628 Remove Profile Mode, deprecated since 7.1.0
2629 * doc/Makefile.am: Remove XML file for profile mode docs.
2630 * doc/Makefile.in: Regenerate.
2631 * doc/xml/authors.xml: Remove authors of profile mode docs.
2632 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2634 * doc/xml/manual/debug.xml: Likewise.
2635 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2636 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2637 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2638 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2640 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2642 * doc/html/*: Regenerate.
2643 * include/Makefile.am: Remove profile mode headers.
2644 * include/Makefile.in: Regenerate.
2645 * include/bits/c++config (std::__profile): Remove namespace.
2646 [_GLIBCXX_PROFILE]: Remove checks for macro.
2647 * include/profile/array: Remove.
2648 * include/profile/base.h: Remove.
2649 * include/profile/bitset: Remove.
2650 * include/profile/deque: Remove.
2651 * include/profile/forward_list: Remove.
2652 * include/profile/impl/profiler.h: Remove.
2653 * include/profile/impl/profiler_algos.h: Remove.
2654 * include/profile/impl/profiler_container_size.h: Remove.
2655 * include/profile/impl/profiler_hash_func.h: Remove.
2656 * include/profile/impl/profiler_hashtable_size.h: Remove.
2657 * include/profile/impl/profiler_list_to_slist.h: Remove.
2658 * include/profile/impl/profiler_list_to_vector.h: Remove.
2659 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2660 * include/profile/impl/profiler_node.h: Remove.
2661 * include/profile/impl/profiler_state.h: Remove.
2662 * include/profile/impl/profiler_trace.h: Remove.
2663 * include/profile/impl/profiler_vector_size.h: Remove.
2664 * include/profile/impl/profiler_vector_to_list.h: Remove.
2665 * include/profile/iterator_tracker.h: Remove.
2666 * include/profile/list: Remove.
2667 * include/profile/map: Remove.
2668 * include/profile/map.h: Remove.
2669 * include/profile/multimap.h: Remove.
2670 * include/profile/multiset.h: Remove.
2671 * include/profile/ordered_base.h: Remove.
2672 * include/profile/set: Remove.
2673 * include/profile/set.h: Remove.
2674 * include/profile/unordered_base.h: Remove.
2675 * include/profile/unordered_map: Remove.
2676 * include/profile/unordered_set: Remove.
2677 * include/profile/vector: Remove.
2678 * scripts/run_doxygen: Do not process profile mode headers.
2679 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2681 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2682 Remove dg-skip-if for profile mode.
2683 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2684 preprocessor check for profile mode.
2685 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2686 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2688 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2690 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2691 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2692 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2693 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2694 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2696 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2698 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2700 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2702 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2703 preprocessor check for profile mode.
2704 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2706 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2707 Remove dg-skip-if for profile mode.
2708 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2709 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2710 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2711 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2712 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2713 * testsuite/Makefile.am: Remove profile_flags variable and
2714 * testsuite/Makefile.am: Remove profile_flags variable and
2715 check-profile target.
2716 * testsuite/Makefile.in: Regenerate.
2717 * testsuite/ext/profile/all.cc: Remove.
2718 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2719 * testsuite/ext/profile/profiler_algos.cc: Remove.
2720 * testsuite/ext/profile/replace_new.cc: Remove.
2721 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2722 preprocessor check for profile mode.
2723 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2724 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2725 (check_v3_target_normal_mode): Do not check for profile mode macro.
2726 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2728 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2729 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2730 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2731 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2732 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2733 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2734 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2735 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2736 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2737 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2739 Remove array_allocator extension, deprecated since 4.9.0
2740 * doc/xml/manual/allocator.xml: Remove documentation for
2742 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2743 * doc/xml/manual/using.xml: Remove header from documentation.
2744 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2745 * include/Makefile.in: Regenerate.
2746 * include/ext/array_allocator.h: Remove.
2747 * include/precompiled/extc++.h: Do not include removed header.
2748 * testsuite/ext/array_allocator/1.cc: Remove.
2749 * testsuite/ext/array_allocator/2.cc: Remove.
2750 * testsuite/ext/array_allocator/26875.cc: Remove.
2751 * testsuite/ext/array_allocator/3.cc: Remove.
2752 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2753 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2754 * testsuite/ext/array_allocator/check_new.cc: Remove.
2755 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2756 * testsuite/ext/headers.cc: Do not include removed header.
2758 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2760 * include/bits/stl_bvector.h
2761 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2763 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2765 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2767 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2769 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2771 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2773 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2775 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2777 (_Bit_iterator::operator-(difference_type)): Likewise.
2778 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2779 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2781 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2782 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2784 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2787 * testsuite/util/thread/all.h: Do not use remove_pointer for
2788 std::thread::native_handle_type.
2791 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2792 (_Variant_storage<true, Types...>::_M_reset()))
2793 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2794 (__get_storage): Likewise.
2795 (variant): Add noexcept to friend declarations for __get and
2799 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2800 Use _Require for constraints.
2801 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2803 (__uniq_ptr_hash): New base class with conditionally-disabled call
2805 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2806 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2807 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2809 * include/bits/shared_ptr.h: Improve docs.
2810 * include/bits/shared_ptr_base.h: Likewise.
2811 * include/bits/stl_uninitialized.h: Likewise.
2812 * include/bits/unique_ptr.h: Likewise.
2813 * libsupc++/new: Likewise.
2815 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2817 * include/bits/stl_deque.h
2818 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2820 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2822 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2824 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2826 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2828 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2830 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2832 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2834 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2837 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2838 (test01): Reserve for number of insertions to avoid rehash during test.
2839 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2841 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2846 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2848 * include/experimental/bits/fs_path.h: Improve docs.
2849 * include/experimental/bits/net.h: Fix wrong header name in comment.
2850 Do not document implementation details.
2851 * include/experimental/netfwd: Fix doxygen grouping.
2853 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2855 * include/bits/stl_pair.h: Improve docs.
2856 * include/std/tuple: Likewise.
2858 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2860 * include/std/chrono: Improve docs.
2861 * include/std/ratio: Do not document implementation details.
2862 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2864 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2867 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2868 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2869 (__duration_common_type): New helper.
2870 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2871 __duration_common_type.
2872 (__timepoint_common_type_wrapper): Replace with ...
2873 (__timepoint_common_type): New helper.
2874 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2875 Use __time_point_common_type.
2876 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2877 (__common_type_impl): If either argument is transformed by decay,
2878 use the common_type of the decayed types.
2879 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2880 decayed, use __do_common_type_impl to get the common_type.
2881 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2882 (__do_member_type_wrapper, __member_type_wrapper)
2883 (__expanded_common_type_wrapper): Remove.
2884 (__common_type_pack, __common_type_fold): New helpers.
2885 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2886 __member_type_wrapper and __expanded_common_type_wrapper.
2887 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2888 Test zero-length template argument list.
2889 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2890 Test single argument cases and argument types that should decay.
2891 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2892 Adjust expected error.
2893 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2895 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2896 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2897 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2899 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2901 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2903 Make allocator propagation more consistent for
2904 operator+(basic_string) (P1165R1)
2905 * include/bits/basic_string.h
2906 (operator+(basic_string&&, basic_string&&): Changed resulting
2907 allocator to always be the one from the first parameter.
2908 * include/bits/basic_string.tcc
2909 (operator+(const _CharT*, const basic_string&)): Changed
2910 resulting allocator to be SOCCC on the second parameter's allocator.
2911 (operator+(_CharT, const basic_string&)): Likewise.
2912 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2914 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2917 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2919 * include/bits/regex.h: Improve docs.
2920 * include/bits/regex.tcc: Do not document implementation details.
2922 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2924 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2926 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2927 Add type printer for container types in std::__debug namespace.
2928 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2929 (gdb-tests): Use distinct parameters for the type of test and use of
2931 (gdb-test): Check for regex test even if 'whatis' test.
2932 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2934 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2935 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2936 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2937 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2938 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2939 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2940 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2942 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2944 * include/std/system_error (error_category): Fix comment.
2947 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2948 argument is an empty path.
2949 (absolute(const path&, error_code&)): Use invalid_argument as error
2950 code instead of no_such_file_or_directory.
2951 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2952 of non-existent paths and empty paths with both overloads of absolute.
2954 * include/std/system_error (error_category, error_code)
2955 (error_condition): Improve docs.
2956 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2957 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2958 to class documentation. Suppress documentation for implementation
2960 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2961 Suppress documentation for implementation details.
2963 * include/std/system_error (error_code): Remove friend declaration
2964 for hash<error_code>.
2965 (hash<error_code>::operator()): Use public member functions to access
2967 (hash<error_condition>::operator()): Use address of category, not
2968 its object representation.
2969 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2970 Use public member functions to access value and category.
2971 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2973 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2975 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2976 * include/bits/hashtable_policy.h
2977 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2978 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2979 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2980 smaller than input value rather than always greater. Preserve
2981 _M_next_resize if called with 0 input. Use __builtin_floorl.
2982 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2983 elements + number of insertions is greater than _M_next_resize. Start
2984 with 11 buckets if not told otherwise. Use __builtin_floorl.
2985 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2986 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2987 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2988 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2989 told otherwise. Use __builtin_floorl.
2990 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2991 to also validate _Power2_rehash_policy.
2992 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2995 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2998 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
3002 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
3003 overflow warning with -Wpedantic -Wsystem-headers.
3005 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
3008 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
3009 * include/bits/move.h (swap): Remove extra parentheses.
3011 * include/experimental/bits/lfts_config.h: Improve doc markup.
3012 * include/experimental/optional: Improve docs.
3013 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
3014 (__constexpr_addressof): Remove.
3015 (optional::operator->()): Use std::__addressof().
3016 * include/std/optional (optional::operator->()): Adjust whitespace.
3017 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
3018 that operator-> is still constexpr with overloaded operator&. Change
3019 to compile-only test.
3020 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
3023 * include/bits/shared_ptr.h: Improve docs.
3024 * include/bits/shared_ptr_atomic.h: Likewise.
3025 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
3027 * include/bits/basic_string.h: Fix iterator/index confusion in
3029 * include/bits/range_access.h: Fix Doxygen warnings.
3030 * include/bits/refwrap.h: Do not document implementation details.
3031 (ref, cref): Group docs with reference_wrapper.
3032 * include/std/fstream: Fix Doxygen markup.
3033 * libsupc++/initializer_list (begin, end): Group docs with
3036 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
3038 * include/bits/unique_lock.h: Fix/improve doxygen markup.
3039 * include/std/mutex: Likewise.
3040 * include/std/shared_mutex: Likewise.
3042 * include/bits/fs_dir.h: Fix/improve doxygen markup.
3043 * include/bits/fs_fwd.h: Likewise.
3044 * include/bits/fs_ops.h: Likewise.
3045 * include/bits/fs_path.h: Likewise.
3046 * include/std/filesystem: Likewise.
3048 * include/experimental/bits/net.h: Fix/improve doxygen markup.
3049 * include/experimental/buffer: Likewise.
3050 * include/experimental/executor: Likewise.
3051 * include/experimental/internet: Likewise.
3052 * include/experimental/io_context: Likewise.
3053 * include/experimental/net: Likewise.
3054 * include/experimental/netfwd: Likewise.
3055 * include/experimental/socket: Likewise.
3056 * include/experimental/timer: Likewise.
3058 * doc/doxygen/doxygroups.cc: Move description of experimental group
3060 * include/experimental/algorithm: Add to libfund-ts doc group.
3061 * include/experimental/any: Likewise. Do not document implementation
3063 * include/experimental/array: Add to libfund-ts doc group.
3064 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
3065 for Library Fundamentals.
3066 * include/experimental/chrono: Add to libfund-ts doc group.
3067 * include/experimental/deque: Likewise.
3068 * include/experimental/forward_list: Likewise.
3069 * include/experimental/functional: Likewise.
3070 * include/experimental/iterator: Likewise.
3071 * include/experimental/list: Likewise.
3072 * include/experimental/map: Likewise.
3073 * include/experimental/memory: Likewise.
3074 * include/experimental/memory_resource: Likewise. Improve docs.
3076 * include/experimental/numeric: Add to libfund-ts doc group.
3077 * include/experimental/optional: Likewise.
3078 * include/experimental/propagate_const: Likewise.
3079 * include/experimental/random: Likewise.
3080 * include/experimental/ratio: Likewise.
3081 * include/experimental/regex: Likewise.
3082 * include/experimental/set: Likewise.
3083 * include/experimental/source_location: Likewise.
3084 * include/experimental/string: Likewise.
3085 * include/experimental/string_view: Likewise.
3086 * include/experimental/system_error: Likewise.
3087 * include/experimental/tuple: Likewise.
3088 * include/experimental/type_traits: Likewise.
3089 * include/experimental/unordered_map: Likewise.
3090 * include/experimental/unordered_set: Likewise.
3091 * include/experimental/utility: Likewise.
3092 * include/experimental/vector: Likewise.
3093 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
3094 * testsuite/experimental/array/neg.cc: Adjust dg-error.
3095 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
3097 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
3098 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
3099 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
3100 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
3101 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
3103 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
3104 * include/experimental/bits/fs_fwd.h: Improve docs.
3105 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
3106 * include/experimental/bits/fs_path.h: Likewise.
3107 (path, filesystem_error, u8path): Improve docs.
3108 * include/experimental/filesystem: Link to docs for TS.
3110 * config/allocator/new_allocator_base.h (__allocator_base): Add
3111 workaround for Doxygen bug #6945.
3112 * include/std/memory: Improve docs. Define group for pointer safety.
3113 * include/std/scoped_allocator: Improve docs. Use "undocumented"
3114 conditional to suppress documentation for implementation details.
3116 * include/bits/specfun.h: Improve docs.
3117 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
3120 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
3121 (std::experimental): Add docs.
3122 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
3123 namespace to nothing when generating docs.
3124 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
3125 * include/std/chrono (std::chrono): Likewise.
3126 * include/std/functional (std::placeholders): Likewise.
3127 * include/std/thread (std::this_thread): Likewise.
3129 * include/parallel/settings.h: Fix Doxygen markup.
3131 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
3132 anything unless PB_DS_CLASS_C_DEC is defined.
3133 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
3134 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
3135 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
3136 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
3137 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
3138 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
3139 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
3141 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
3142 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
3143 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
3144 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
3145 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
3146 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
3147 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
3148 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
3149 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
3150 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
3151 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
3153 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
3154 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
3156 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
3159 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
3160 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
3161 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
3164 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3166 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
3167 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
3168 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
3169 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
3170 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
3171 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
3173 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
3174 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
3177 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
3180 * include/std/complex (__complex_proj): Return parameter unchanged.
3181 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
3182 floating-point types to take std::complex arguments.
3183 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
3184 floating-point types.
3185 * testsuite/26_numerics/complex/proj.cc: New test.
3187 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3189 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
3190 to _Lock_policyE[012].
3191 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3193 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
3195 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
3196 macros accidentally left in.
3197 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
3198 unnecessary -lstdc++fs option. Fix test for mingw.
3199 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3202 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3204 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3206 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
3208 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
3210 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
3211 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
3214 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
3216 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
3219 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
3220 class template and partial specialization.
3223 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
3225 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
3226 functions to convert a value to an integral type.
3227 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
3228 (fill_n): Convert _Size parameter to an integral type.
3229 * testsuite/25_algorithms/fill_n/87982.cc: New test.
3230 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
3231 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
3232 * testsuite/25_algorithms/generate_n/87982.cc: New test.
3233 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
3234 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
3236 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
3238 Adding noexcept-specification on tuple constructors (LWG 2899)
3239 * libstdc++-v3/include/std/tuple:
3240 (tuple()): Add noexcept-specification.
3241 (tuple(const _Elements&...)): Likewise
3242 (tuple(_UElements&&...)): Likewise
3243 (tuple(const tuple<_UElements...>&)): Likewise
3244 (tuple(tuple<_UElements...>&&)): Likewise
3245 (tuple(const _T1&, const _T2&)): Likewise
3246 (tuple(_U1&&, _U2&&)): Likewise
3247 (tuple(const tuple<_U1, _U2>&): Likewise
3248 (tuple(tuple<_U1, _U2>&&): Likewise
3249 (tuple(const pair<_U1, _U2>&): Likewise
3250 (tuple(pair<_U1, _U2>&&): Likewise
3251 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
3253 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
3256 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
3257 arguments with __restrict.
3259 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
3261 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3263 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
3265 * include/experimental/bits/fs_path.h
3266 (path::_S_convert_loc<_InputIterator>): Create const std::string to
3267 avoid redundant call to _S_convert_loc with non-const pointers.
3269 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
3270 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
3271 * testsuite/21_strings/basic_string/hash/hash.cc
3272 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
3273 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
3274 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
3276 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
3277 wstring::_M_replace_dispatch with more specific patterns.
3278 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
3279 Create const std::string to avoid redundant call to _S_convert_loc
3280 with non-const pointers.
3281 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
3282 avoid unnecessary basic_string::assign instantiations.
3284 * include/std/memory (__uses_alloc_args): Add string-literal to
3285 static_assert, to match the one in __uses_alloc.
3286 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
3287 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
3288 for recursive uses-allocator construction of nested pairs.
3289 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
3292 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3294 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
3295 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
3296 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
3297 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
3299 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3300 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3301 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
3302 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3303 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3304 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3305 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3307 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
3310 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
3311 * include/std/scoped_allocator [__cplusplus > 201703L]
3312 (scoped_allocator_adaptor::construct): Define in terms of
3313 uses_allocator_construction_args, as per P0591R4.
3314 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
3315 * testsuite/util/testsuite_allocator.h: Remove name of unused
3318 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
3320 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
3321 * doc/html/*: Regenerate.
3323 * include/bits/fs_path.h (operator<, operator<=, operator>)
3324 (operator>=, operator==, operator!=): Make hidden friends, as per
3326 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
3327 string type in test.
3328 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3330 * include/std/any (any::any(ValueType&&)): Use __and_v.
3331 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
3334 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
3336 * include/std/type_traits (__result_of_memfun): Use remove_reference
3337 instead of __remove_cvref_t and remove redundant is_same check.
3338 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
3340 * include/experimental/string_view (basic_string_view::pointer)
3341 (basic_string_view::reference): Fix to refer to non-const value_type.
3342 * include/bits/basic_string.h (basic_string): Use __sv_check and
3343 __sv_limit instead of basic_string_view::_M_check and
3344 basic_string_view::_M_limit.
3345 * include/std/string_view (__sv_check, __sv_limit): New
3346 helper functions to replace basic_string_view::_M_check and
3347 basic_string_view::_M_limit.
3348 (basic_string_view): Add static assertions to enforce ill-formed
3349 requirement for traits_type::char_type from P1148R0, and to enforce
3350 required properties of char-like types.
3351 (basic_string_view::pointer, basic_string_view::reference): Fix to
3352 refer to non-const value_type.
3353 (basic_string_view::operator[], basic_string_view::at)
3354 (basic_string_view::front, basic_string_view::back)
3355 (basic_string_view::data): Use const_reference and const_pointer
3356 typedefs for return types.
3357 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
3358 (hash<wstring_view>): Fix argument_type typedef.
3359 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3360 char/1.cc: Fix expected return type of basic_string_view::data().
3361 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3362 wchar_t/1.cc: Likewise.
3363 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3364 char/1.cc: Likewise.
3365 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3366 wchar_t/1.cc: Likewise.
3367 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
3369 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3370 Check reference and pointer typedefs.
3371 * testsuite/experimental/string_view/requirements/typedefs.cc:
3373 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
3374 Fix expected return type of basic_string_view::data().
3375 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
3377 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
3379 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
3383 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
3384 Avoid a runtime check for types that can never be stored in std::any.
3385 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3388 PR libstdc++/90220 (partial)
3389 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
3390 not attempt ill-formed static_cast to pointers to non-object types.
3391 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3394 * testsuite/20_util/variant/run.cc: Catch exception by reference to
3395 prevent -Wcatch-value warning.
3397 * include/std/variant (__variant_construct): Use template parameter
3398 type instead of equivalent decltype-specifier.
3399 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
3400 Replace forward with move.
3401 (_Move_ctor_base<false, Types...>::_M_destructive_move)
3402 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
3403 (_Move_ctor_base<true, Types...>::_M_destructive_move)
3404 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
3405 index after construction succeeds.
3406 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
3407 if-constexpr checks that are always true. Use __remove_cvref_t instead
3408 of remove_reference so that is_nothrow_move_constructible check
3409 doesn't use a const rvalue parameter. In the potentially-throwing case
3410 construct a temporary and move assign it, as per LWG 2904.
3411 (_Move_assign_base<false, Types...>::operator=): Remove redundant
3412 if-constexpr checks that are always true. Use emplace as per LWG 2904.
3413 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
3414 construct a temporary and move assign from it, as per LWG 2904.
3415 * testsuite/20_util/variant/exception_safety.cc: Check that
3416 assignment operators have strong exception safety guarantee.
3418 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
3420 Document PSTL linker flags
3422 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
3424 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3426 * include/std/variant (__detail::__variant::_Traits): Make
3427 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
3428 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
3430 (__detail::__variant::_Copy_assign_alias): Only depend on
3431 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
3432 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
3433 move assignment operators.
3436 * include/std/variant (variant::__not_self): New helper for the
3437 is_same_v<remove_cvref_t<T>, variant>==false constraints.
3438 (variant::__to_type_impl): Remove.
3439 (variant::__to_type): Add default argument to check pack size, instead
3440 of using __to_type_impl.
3441 (variant::__accepted_type): Add default argument using __not_self.
3442 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
3443 for variant(T&&) constructor constraint.
3444 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
3445 Extract __accepted_type into a named template parameter for reuse in
3446 other constraints and in the exception specification.
3447 (variant::variant(in_place_type_t<T>, Args&&...))
3448 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
3449 (variant::variant(in_place_index_t<T>, Args&&...))
3450 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
3451 (variant::operator=T&&)): Remove redundant && from trait arguments.
3452 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
3453 isn't used for in_place_type or in_place_index arguments.
3455 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
3456 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
3457 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
3459 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3460 Bernd Edlinger <bernd.edlinger@hotmail.de>
3461 Jakub Jelinek <jakub@redhat.com>
3464 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
3465 general-regs-only target attribute for ARM.
3467 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3470 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
3471 specialization also depend on is_nothrow_move_constructible.
3472 * include/std/variant (__detail::__variant::__never_valueless()):
3473 Only true if the variant would have a move assignment operator.
3474 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
3475 Check __never_valueless<T...>().
3476 (variant::emplace): Only perform non-throwing move assignments
3477 for never-valueless alternatives if the variant has a move assignment
3479 * testsuite/20_util/variant/compile.cc: Check that never-valueless
3480 types can be emplaced into non-assignable variants.
3481 * testsuite/20_util/variant/run.cc: Check that never-valueless types
3482 don't get copied when emplaced into non-assignable variants.
3484 * include/std/variant (__detail::__variant::__ref_cast): Remove
3486 (__detail::__variant::_Uninitialized::_M_get)
3487 (__detail::__variant::__get)
3488 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
3490 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
3492 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
3494 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3495 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3496 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3497 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3499 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3501 Delegate PSTL configuration to pstl/pstl_config.h
3503 * include/bits/c++config: Remove explicit PSTL configuration
3504 macros and use definitions from <pstl/pstl_config.h>.
3506 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3508 Cleanup algorithm implementations
3509 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
3511 (mismatch): Forward execution policy.
3512 (equal): Qualify call to std::equal().
3513 (partial_sort): Forward execution policy.
3514 (inplace_merge): Forward execution policy.
3516 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
3518 Improve implementation of parallel equal()
3519 * include/pstl/algorithm_impl.h
3520 (__internal::__brick_equal): use "4 iterator" version of
3522 (__internal::__brick_equal): use simd for random access
3523 iterators on unsequenced execution policies.
3524 (__internal::__pattern_equal): add "4 iterator" version
3525 (__internal::__pattern_equal): dispatch to simd __brick_equal
3526 for vector-only execution policies.
3527 (__internal::__pattern_equal): dispatch to __parallel_or for
3528 parallel execution policies.
3529 * include/pstl/glue_algorithm_impl.h
3530 (std::equal): dispatch to "4 iterator" version of
3531 __internal::__pattern_equal().
3533 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
3536 * include/bits/forward_list.h (operator==): Do not use operator!= to
3538 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
3539 earlier in the list, so that sort is stable.
3540 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
3541 * testsuite/23_containers/forward_list/comparable.cc: Test with
3542 types that meet the minimum EqualityComparable and LessThanComparable
3543 requirements. Remove irrelevant comment.
3545 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
3546 Do not depend on whether all alternative types are move constructible.
3547 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
3548 from the operand when deciding whether to perform the assignment.
3549 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
3550 with deleted move constructor and deleted move assignment operator.
3551 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
3552 behaviour of variants with DeletedMoves as an alternative.
3553 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
3554 (move_ctor, move_assign): Check that moving a variant with a
3555 DeletedMoves alternative falls back to copying instead of moving.
3557 * testsuite/20_util/variant/compile.cc: Remove empty string literals
3558 from static_assert declarations.
3560 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
3561 actually match its name.
3562 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
3563 (test_swap()): Fix result for MoveCtorOnly and check
3564 MoveCtorAndSwapOnly.
3566 * include/std/optional (optional::value_or(U&&) &&): Add missing
3567 constexpr specifier.
3568 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
3569 for disengaged optionals and rvalue optionals.
3570 * testsuite/20_util/optional/observers/4.cc: Likewise.
3572 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
3574 * include/pstl/algorithm_impl.h: Uglify identfiers.
3575 * include/pstl/numeric_impl.h: Uglify identfiers.
3576 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
3578 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
3580 * include/bits/c++config:
3581 Add definition for __PSTL_ASSERT.
3582 Add definition for __PSTL_ASSERT_MSG.
3583 * include/pstl/algorithm_impl.h: Replace use of assert().
3584 * include/pstl/numeric_impl.h: Replace use of assert().
3585 * include/pstl/parallel_backend_tbb.h:
3586 Replace use of assert().
3587 Replace use of __TBB_ASSERT().
3588 * include/pstl/parallel_backend_utils.h: Replace use of assert().
3590 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
3593 * src/c++17/memory_resource.cc
3594 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
3595 needed to allow placing a _Chunk at the end of the buffer.
3596 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
3598 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
3600 * doc/xml/faq.xml: Add information about emergency EH pool.
3601 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
3602 Move outdated information on mt_allocator to a separate section.
3603 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
3604 doesn't affect the default allocator.
3606 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
3610 * testsuite/20_util/variant/89851.cc: New test.
3612 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3614 * include/std/variant: Adjust whitespace. Add comments.
3615 (_Multi_array): Leave primary template undefined.
3616 (_Multi_array<_Tp>): Define partial specialization for base case of
3618 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3619 which is always a reference.
3620 (__gen_vtable::_S_apply()): Remove function, inline body into
3621 default member initializer.
3622 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3624 * include/std/variant (__variant_idx_cookie): Add member type.
3625 (__visitor_result_type): Remove.
3626 (__do_visit): Use invoke_result instead of __visitor_result_type.
3627 * testsuite/20_util/variant/visit.cc: New test.
3630 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3632 * testsuite/20_util/variant/90008.cc: New test.
3634 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3636 * include/pstl/algorithm_impl.h: Add namespace qualification.
3637 * include/pstl/execution_defs.h: Add namespace qualification.
3638 * include/pstl/execution_impl.h: Add namespace qualification.
3639 * include/pstl/numeric_impl.h: Add namespace qualification.
3640 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3641 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3642 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3644 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3646 Fix visit<R> for variant.
3647 * include/std/variant (__do_visit): Add a template parameter
3648 for enforcing same return types for visit.
3649 (__gen_vtable_impl): Likewise.
3650 (_S_apply_single_alt): Adjust.
3651 (__visit_invoke_impl): New. Handle casting to void.
3652 (__do_visit_invoke): New. Enforces same return types.
3653 (__do_visit_invoke_r): New. Converts return types.
3654 (__visit_invoke): Adjust.
3655 (__gen_vtable): Add a template parameter for enforcing
3656 same return types for visit.
3657 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3658 different return types.
3659 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3660 visitors with different return types don't accidentally
3661 compile with regular visitation.
3663 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3665 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3666 dg-require-filesystem-ts.
3668 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3670 * doc/xml/manual/status_cxx2020.xml: Update status.
3671 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3672 * testsuite/20_util/variant/visit_r.cc: New test.
3674 * include/bits/fs_dir.h (directory_iterator::operator*)
3675 (directory_iterator::operator->): Add noexcept.
3676 (operator==, operator!=): Replace namespace-scope equality operators
3677 for directory iterators with hidden friends.
3680 * config/abi/pre/gnu.ver: Add missing exports.
3681 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3684 * config/abi/pre/gnu.ver: Export new symbols.
3685 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3686 (recursive_directory_iterator::recursion_pending())
3687 (recursive_directory_iterator::disable_recursion_pending()): Remove
3688 inline definitions. Make noexcept.
3689 (recursive_directory_iterator::depth())
3690 (recursive_directory_iterator::operator*())
3691 (recursive_directory_iterator::operator->()): Make noexcept.
3692 (recursive_directory_iterator::_M_options)
3693 (recursive_directory_iterator::_M_pending): Remove data members.
3694 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3695 (recursive_directory_iterator::recursive_directory_iterator): Remove
3696 ctor-initializer. Use new constructor for _Dir_stack.
3697 (recursive_directory_iterator::options())
3698 (recursive_directory_iterator::recursion_pending())
3699 (recursive_directory_iterator::disable_recursion_pending()): Add
3700 non-inline definitions.
3701 (recursive_directory_iterator::depth()): Make noexcept.
3702 (recursive_directory_iterator::increment(error_code&))
3703 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3704 location of options and recursion_pending members.
3705 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3706 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3707 user-declared move constructor and assignment operator, to make the
3710 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3711 d_type == DT_UNKNOWN immediately.
3712 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3714 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3716 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3718 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3719 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3722 PR libstdc++/87431 (again)
3723 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3724 Define partial specialization for basic_string.
3725 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3726 shared_ptr and weak_ptr.
3727 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3729 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3731 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3733 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3735 * include/std/any (_Never_valueless_alt): Define explicit
3736 specialization for any.
3737 * include/std/variant (_Never_valueless_alt): Define primary template.
3738 (__never_valueless): Use _Never_valueless_alt instead of
3739 is_trivially_copyable.
3740 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3741 initializations to avoid try-catch overhead. Add special case for
3742 scalars produced by potentially-throwing conversions. Use
3743 _Never_valueless_alt instead of is_trivially_copyable for the
3744 remaining strong exception-safety cases.
3745 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3746 * testsuite/20_util/variant/87431.cc: Run both test functions.
3747 * testsuite/20_util/variant/exception_safety.cc: New test.
3748 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3749 so the variant becomes valueless.
3751 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3754 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3756 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3758 * include/std/string (__hash_string_base): New class template defining
3759 operator() for hashing strings.
3760 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3761 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3762 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3763 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3765 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3767 Use single-visitation in variant assignment and swap and relops.
3768 Also use indices instead of types when checking whether
3769 variants hold the same thing.
3770 * include/std/variant (__do_visit): Add a template parameter
3771 for index visitation, invoke with indices if index visitation
3773 (__variant_idx_cookie): New.
3774 (__visit_with_index): Likewise.
3775 (_Copy_assign_base::operator=): Do single-visitation with
3777 (_Move_assign_base::operator=): Likewise.
3778 (_Extra_visit_slot_needed): Adjust.
3779 (__visit_invoke): Call with indices if it's an index visitor.
3780 (relops): Do single-visitation with an index visitor.
3782 (__visitor_result_type): New.
3784 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3786 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3788 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3790 Don't revisit a variant we are already visiting.
3791 * include/std/variant (__variant_construct_single): New.
3792 (__variant_construct): Use it.
3793 (_M_destructive_move): Likewise.
3794 (_M_destructive_copy): Likewise.
3795 (_Copy_assign_base::operator=): Adjust.
3796 (_Move_assign_base::operator=): Likewise.
3799 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3802 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3803 destructor so they are not evaluated until the _Key type is complete.
3804 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3805 * testsuite/23_containers/set/85965.cc: New test.
3806 * testsuite/23_containers/unordered_set/85965.cc: New test.
3807 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3808 with regexp matching the corresponding _Rb_tree specialization.
3809 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3810 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3811 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3812 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3813 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3814 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3815 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3817 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3820 Fix based on a suggestion by Antony Polukhin.
3821 * include/std/variant (__never_valueless): New.
3823 (_Extra_visit_slot_needed): New.
3824 (_Multi_array): Use it.
3825 (_S_apply_all_alts): Likewise.
3827 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3830 Fix based on a suggestion by Antony Polukhin.
3831 * include/std/variant (__gen_vtable): Don't reserve an
3832 additional table slot, _Multi_array already does that.
3834 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3837 Fix based on a suggestion by Antony Polukhin.
3838 * include/std/variant (__variant_construct): Capture a pointer
3839 to the storage and visit just one variant.
3841 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3843 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3844 Doxygen-generated pages with unstable URL.
3845 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3846 * doc/xml/manual/extensions.xml: Likewise.
3847 * doc/xml/manual/parallel_mode.xml: Likewise.
3848 * doc/xml/manual/support.xml: Likewise.
3850 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3851 avoid -Wconversion warnings.
3853 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3855 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3856 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3857 (allstamped): Add stamp-pstl.
3858 (install-headers): Add ptsl_builddir.
3859 * include/Makefile.in: Regenerate.
3860 * include/bits/c++config: Add pstl configuration.
3861 * include/pstl/LICENSE.txt: New file.
3862 * include/pstl/algorithm_fwd.h: New file.
3863 * include/pstl/algorithm_impl.h: New file.
3864 * include/pstl/execution_defs.h: New file.
3865 * include/pstl/execution_impl.h: New file.
3866 * include/pstl/glue_algorithm_defs.h: New file.
3867 * include/pstl/glue_algorithm_impl.h: New file.
3868 * include/pstl/glue_execution_defs.h: New file.
3869 * include/pstl/glue_memory_defs.h: New file.
3870 * include/pstl/glue_memory_impl.h: New file.
3871 * include/pstl/glue_numeric_defs.h: New file.
3872 * include/pstl/glue_numeric_impl.h: New file.
3873 * include/pstl/memory_impl.h: New file.
3874 * include/pstl/numeric_fwd.h: New file.
3875 * include/pstl/numeric_impl.h: New file.
3876 * include/pstl/parallel_backend.h: New file.
3877 * include/pstl/parallel_backend_tbb.h: New file.
3878 * include/pstl/parallel_backend_utils.h: New file.
3879 * include/pstl/parallel_impl.h: New file.
3880 * include/pstl/pstl_config.h: New file.
3881 * include/pstl/unseq_backend_simd.h: New file.
3882 * include/pstl/utils.h: New file.
3883 * include/std/algorithm: Include parallel algorithm implementations.
3884 * include/std/execution: New file.
3885 * include/std/memory: Include parallel algorithm implementations.
3886 * include/std/numeric: Include parallel algorithm implementations.
3887 * include/std/version: Add parallel algorithms feature test macro.
3888 * testsuite/util/pstl/pstl_test_config.h: New file.
3889 * testsuite/util/pstl/test_utils.h: New file.
3890 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3891 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3892 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3893 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3894 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3895 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3896 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3897 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3898 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3899 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3900 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3901 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3902 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3903 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3904 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3905 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3906 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3907 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3908 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3909 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3910 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3911 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3912 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3913 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3914 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3915 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3916 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3917 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3918 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3919 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3920 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3921 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3922 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3923 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3924 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3925 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3926 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3927 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3928 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3929 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3930 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3931 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3932 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3933 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3934 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3935 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3936 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3937 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3938 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3939 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3940 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3941 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3942 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3943 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3944 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3945 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3946 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3947 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3948 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3949 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3950 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3951 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3952 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3953 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3954 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3955 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3956 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3957 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3958 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3959 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3960 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3961 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3962 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3963 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3964 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3965 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3966 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3967 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3968 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3969 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3970 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3971 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3972 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3973 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3974 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3975 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3976 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3977 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3978 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3979 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3980 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3981 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3982 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3983 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3984 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3985 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3986 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3987 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3988 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3989 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3990 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3991 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3992 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3993 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3994 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3995 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3997 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3999 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
4000 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
4001 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
4002 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
4003 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
4004 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
4005 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
4006 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
4007 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
4008 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
4009 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
4010 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
4011 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
4012 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
4013 when the special functions IS is enabled, not for C++17.
4014 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
4016 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
4017 without checks for special functions in C++17.
4018 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4022 * include/backward/hash_map: Use <> for includes not "".
4023 * include/backward/hash_set: Likewise.
4024 * include/backward/strstream: Likewise.
4025 * include/tr1/bessel_function.tcc: Likewise.
4026 * include/tr1/exp_integral.tcc: Likewise.
4027 * include/tr1/legendre_function.tcc: Likewise.
4028 * include/tr1/modified_bessel_func.tcc: Likewise.
4029 * include/tr1/riemann_zeta.tcc: Likewise.
4031 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
4033 * doc/xml/manual/allocator.xml: Link to table documenting evolution
4034 of extension allocators.
4035 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
4036 Document new headers in 7.2, 8.1 and 9.1 releases.
4037 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
4038 * doc/html/*: Regenerate.
4040 2019-03-12 John David Anglin <dave.anglin@bell.net>
4043 * testsuite/lib/libstdc++.exp: Locate libatomic.
4044 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
4045 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
4047 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
4048 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
4049 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
4050 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
4052 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
4055 * configure.ac: Check for sockatmark.
4056 * crossconfig.m4: Check for sockatmark.
4057 * config.h.in: Regenerate.
4058 * configure: Regenerate.
4059 * include/experimental/internet (address_v4::_S_hton): Rename
4060 overloaded functions to _S_hton_16 and _S_ntoh_16.
4061 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
4062 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
4063 * include/experimental/socket (basic_socket::at_mark): Check
4064 _GLIBCXX_HAVE_SOCKATMARK.
4066 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
4067 const variables instead of macros.
4070 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
4071 Use correct type for len_aligned.
4072 * testsuite/20_util/hash/89629.cc: New test.
4074 2019-03-11 Jakub Jelinek <jakub@redhat.com>
4077 * include/std/atomic (atomic<T>::store, atomic<T>::load,
4078 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
4079 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
4080 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
4081 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
4082 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
4083 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
4084 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
4085 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
4086 memory_order_seq_cst to int.
4088 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
4090 * doc/xml/manual/using.xml: Use link element instead of xref.
4091 * doc/html/*: Regenerate.
4093 * include/bits/fs_path.h (path::format): Add fixed underlying type.
4095 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
4098 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
4099 parameters in deduction guides.
4100 * include/debug/multimap.h (multimap): Likewise.
4101 * include/debug/set.h (multimap): Likewise.
4102 * include/debug/multiset.h (multimap): Likewise.
4103 * include/debug/unordered_map (unordered_map): Likewise.
4104 (unordered_multimap): Likewise.
4105 * include/debug/unordered_set (unordered_set): Likewise.
4106 (unordered_multiset): Likewise.
4109 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
4110 Invalidate all iterators in case of rehash.
4111 (unordered_multimap<>::_M_check_rehashed): Likewise.
4112 * include/debug/unordered_set
4113 (unordered_set<>::_M_check_rehashed): Likewise.
4114 (unordered_multiset<>::_M_check_rehashed): Likewise.
4115 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
4117 2019-03-07 Andreas Schwab <schwab@suse.de>
4119 * config/abi/post/riscv64-linux-gnu: New directory.
4120 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
4122 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
4124 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
4125 compile test to run. Fix typo.
4127 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
4128 * doc/html/*: Regenerate.
4130 P0356R5 Simplified partial function application
4131 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
4132 helpers for bind_front.
4133 (bind_front, __cpp_lib_bind_front): Define.
4134 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
4136 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4138 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
4139 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
4140 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
4141 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
4143 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
4145 PR libstdc++/86655 - std::assoc_legendre should not constrain
4146 the value of m (or x).
4147 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
4148 __sph_legendre): If degree > order Don't throw, return 0.
4149 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
4150 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
4151 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
4152 * testsuite/tr1/5_numerical_facilities/special_functions/
4153 02_assoc_legendre/pr86655.cc: New test.
4154 * testsuite/tr1/5_numerical_facilities/special_functions/
4155 22_sph_legendre/pr86655.cc: New test.
4157 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
4160 Also PR libstdc++/85517
4161 * include/std/variant (__do_visit): New.
4162 (__variant_cast): Likewise.
4163 (__variant_cookie): Likewise.
4164 (__erased_*): Remove.
4165 (_Variant_storage::_S_vtable): Likewise.
4166 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
4167 (_Variant_storage::__M_reset): Adjust.
4168 (__variant_construct): New.
4169 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
4170 __variant_construct.
4171 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
4172 (_Move_ctor_base::__M_destructive_copy): New.
4173 (_Move_ctor_base::__M_destructive_move): Adjust to use
4174 __variant_construct.
4175 (_Copy_assign_base::operator=): Adjust to use __do_visit.
4176 (_Copy_assign_alias): Adjust to check both copy assignment
4177 and copy construction for triviality.
4178 (_Move_assign_base::operator=): Adjust to use __do_visit.
4179 (_Multi_array): Add support for visitors that accept and return
4181 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
4182 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
4183 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
4184 a __variant_cookie temporary for a variant that is valueless and..
4185 (__gen_vtable_impl::__visit_invoke): ..adjust here.
4186 (__gen_vtable::_Array_type): Conditionally make space for
4187 the __variant_cookie visitor case.
4188 (__variant_construct_by_index): New.
4189 (get_if): Adjust to use std::addressof.
4190 (relops): Adjust to use __do_visit.
4191 (variant): Add __variant_cast and __variant_construct_by_index
4193 (variant::emplace): Use _M_reset() and __variant_construct_by_index
4194 instead of self-destruction.
4195 (variant::swap): Adjust to use __do_visit.
4196 (visit): Reimplement in terms of __do_visit.
4197 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
4198 * testsuite/20_util/variant/compile.cc: Adjust.
4199 * testsuite/20_util/variant/run.cc: Likewise.
4201 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4203 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
4205 * testsuite/experimental/feat-char8_t.cc: Likewise.
4207 * include/std/type_traits [C++20] (is_bounded_array)
4208 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
4210 * testsuite/20_util/is_bounded_array/requirements/
4211 explicit_instantiation.cc: New test.
4212 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
4214 * testsuite/20_util/is_bounded_array/value.cc: New test.
4215 * testsuite/20_util/is_unbounded_array/requirements/
4216 explicit_instantiation.cc: New test.
4217 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
4219 * testsuite/20_util/is_unbounded_array/value.cc: New test.
4221 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
4223 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
4225 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
4227 * include/c_compatibility/math.h [C++20] (lerp): Add using
4229 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
4230 (__lerp): Define function template to implement lerp.
4231 (lerp(float, float, float), lerp(double, double, double))
4232 (lerp(long double, long double, long double)): Define for C++20.
4233 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
4234 (midpoint(T, T), midpoint(T*, T*)): Define.
4235 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
4236 * testsuite/26_numerics/lerp.cc: New test.
4237 * testsuite/26_numerics/midpoint/floating.cc: New test.
4238 * testsuite/26_numerics/midpoint/integral.cc: New test.
4239 * testsuite/26_numerics/midpoint/pointer.cc: New test.
4241 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
4243 PR libstdc++/88996 Implement P0439R0
4244 Make std::memory_order a scoped enumeration.
4245 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
4246 add variables for the old enumerators. Adjust calls.
4247 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
4248 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
4250 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
4252 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
4255 * include/std/memory_resource (polymorphic_allocator): Add default
4256 template argument for C++20.
4257 (polymorphic_allocator::allocate_bytes)
4258 (polymorphic_allocator::deallocate_bytes)
4259 (polymorphic_allocator::allocate_object)
4260 (polymorphic_allocator::deallocate_object)
4261 (polymorphic_allocator::new_object)
4262 (polymorphic_allocator::delete_object): New member functions for
4264 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
4267 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
4270 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
4273 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
4275 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
4276 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
4278 * include/std/memory (uses_allocator_construction_args): New set of
4279 overloaded functions.
4280 (make_obj_using_allocator, uninitialized_construct_using_allocator):
4282 * include/std/memory_resource (polymorphic_allocator::construct)
4283 [__cplusplus > 201703l]: Replace all overloads with a single function
4284 using uses_allocator_construction_args.
4285 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
4287 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
4289 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
4292 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
4293 stylesheet directories before check for xsltproc. Try to use
4294 xmlcatalog to find local stylesheet directory before trying hardcoded
4295 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
4296 check to look for the same stylesheet as doc/Makefile.am uses. Don't
4297 use xsltproc if xmlcatalog fails to find a local stylesheet.
4298 * configure.ac: Check for xmlcatalog.
4299 * Makefile.in: Regenerate.
4300 * configure: Likewise.
4301 * doc/Makefile.in: Likewise.
4302 * include/Makefile.in: Likewise.
4303 * libsupc++/Makefile.in: Likewise.
4304 * po/Makefile.in: Likewise.
4305 * python/Makefile.in: Likewise.
4306 * src/Makefile.in: Likewise.
4307 * src/c++11/Makefile.in: Likewise.
4308 * src/c++17/Makefile.in: Likewise.
4309 * src/c++98/Makefile.in: Likewise.
4310 * src/filesystem/Makefile.in: Likewise.
4311 * testsuite/Makefile.in: Likewise.
4313 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
4316 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
4317 container deduction guides.
4318 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
4319 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
4320 parameters in deduction guides.
4321 * include/bits/stl_multimap.h (multimap): Likewise.
4322 * include/bits/stl_multiset.h (multiset): Likewise.
4323 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
4324 * include/bits/stl_set.h (set): Likewise.
4325 * include/bits/stl_stack.h (stack): Likewise.
4326 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4327 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
4328 constrain parameters in deduction guides.
4329 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4331 * testsuite/23_containers/map/cons/deduction.cc: Test additional
4333 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4334 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4335 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
4336 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4338 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4340 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4343 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
4344 to class template and partial specialization using void_t.
4345 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4347 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
4350 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
4351 copy and move members public.
4353 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
4355 * include/std/type_traits (__underlying_type_impl): New helper to
4356 make underlying_type SFINAE-friendly.
4357 (underlying_type): Derive from __underlying_type_impl.
4358 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
4362 * include/bits/char_traits.h (__constant_char_array): Check index is
4363 in range before dereferencing.
4364 (char_traits<char>::compare, char_traits<char>::find)
4365 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
4366 immediately if n is zero.
4367 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
4368 Remove workarounds for PR 67026.
4369 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
4371 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
4374 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4376 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
4377 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4379 2019-02-22 Jakub Jelinek <jakub@redhat.com>
4382 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
4383 type to std::size_t and argument to type to long double.
4385 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4387 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
4388 * config/abi/post/sparc64-linux-gnu: New directory.
4389 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
4390 * config/abi/post/sparc64-linux-gnu/32: New directory.
4391 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
4393 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4395 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
4396 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
4399 2019-02-22 Tom Honermann <tom@honermann.net>
4401 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
4402 printers for u8string and u8string_view.
4404 2019-02-22 Tom Honermann <tom@honermann.net>
4406 * testsuite/18_support/byte/ops.cc: Validate
4407 std::to_integer<char8_t>, std::to_integer<char16_t>, and
4408 std::to_integer<char32_t>.
4409 * testsuite/18_support/numeric_limits/dr559.cc: Validate
4410 std::numeric_limits<char8_t>.
4411 * testsuite/18_support/numeric_limits/lowest.cc: Validate
4412 std::numeric_limits<char8_t>::lowest().
4413 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
4414 std::numeric_limits<char8_t>::max_digits10.
4415 * testsuite/18_support/type_info/fundamental.cc: Validate
4416 typeinfo for char8_t.
4417 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
4418 std::from_chars with char8_t.
4419 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
4420 Validate explicit instantiation of std::hash<char8_t>.
4421 * testsuite/20_util/is_integral/value.cc: Validate
4422 std::is_integral<char8_t>.
4423 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
4424 Validate std::make_signed<char8_t>.
4425 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
4426 Validate u8string construction from char8_t sources.
4427 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
4429 * testsuite/21_strings/basic_string_view/operations/compare/
4430 char/70483.cc: Validate substr operations on u8string_view.
4431 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
4432 the u8string_view typedef is defined.
4433 * testsuite/21_strings/char_traits/requirements/
4434 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
4436 * testsuite/21_strings/char_traits/requirements/
4437 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
4438 constexpr member functions.
4439 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
4440 that the u8string typedef is defined.
4441 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
4442 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
4443 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
4444 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
4446 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
4447 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
4449 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
4450 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4451 Validate std::atomic<char8_t>::is_always_lock_free
4452 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
4453 Update line numbers.
4454 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
4456 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
4458 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
4459 Validate std::experimental::pmr::u8string.
4460 * testsuite/experimental/string_view/typedefs.cc: Validate that the
4461 u8string_view typedef is defined.
4462 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
4463 char32_t to the typelists.
4465 2019-02-22 Tom Honermann <tom@honermann.net>
4467 * include/ext/typelist.h: Constrain a partial specialization of
4468 typelist::detail::append_ to only match chain<T1,T2>.
4470 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4473 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
4474 class template with class. Replace move and copy member types with
4475 member alias templates, so they are only instantiated when needed.
4476 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4477 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
4478 test for C++11/14/17 as well.
4479 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
4482 2019-02-20 Jakub Jelinek <jakub@redhat.com>
4485 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
4486 _GLIBCXX_PURE to the alias declaration.
4488 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
4490 * testsuite/21_strings/basic_string/literals/types.cc
4491 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
4492 * testsuite/21_strings/basic_string/literals/values.cc
4493 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4494 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
4495 potentially having different type.
4496 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
4497 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
4499 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
4500 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
4501 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
4502 string literals only using basic character set.
4503 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
4504 u8 literals to char.
4505 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
4506 Test ATOMIC_CHAR8_T_LOCK_FREE.
4507 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
4508 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
4509 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
4510 * testsuite/experimental/string_view/literals/types.cc
4511 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
4513 * testsuite/experimental/string_view/literals/values.cc
4514 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4516 2019-02-19 Tom Honermann <tom@honermann.net>
4518 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
4519 from char16_32_t.cc; validates numeric_limits<char8_t>.
4520 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
4521 test cloned from types.cc; validates operator""s for char8_t
4523 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
4524 test cloned from values.cc; validates construction and comparison
4526 * testsuite/21_strings/basic_string/requirements/
4527 /explicit_instantiation/char8_t/1.cc: New test cloned from
4528 char16_t/1.cc; validates explicit instantiation of
4529 basic_string<char8_t>.
4530 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4531 New test cloned from types.cc; validates operator""sv for char8_t
4532 returns u8string_view.
4533 * testsuite/21_strings/basic_string_view/literals/
4534 values-char8_t.cc: New test cloned from values.cc; validates
4535 construction and comparison of u8string_view values.
4536 * testsuite/21_strings/basic_string_view/requirements/
4537 explicit_instantiation/char8_t/1.cc: New test cloned from
4538 char16_t/1.cc; validates explicit instantiation of
4539 basic_string_view<char8_t>.
4540 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
4541 New test cloned from char16_t/65049.cc; validates that
4542 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
4543 * testsuite/21_strings/char_traits/requirements/char8_t/
4544 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
4545 that char_traits<char8_t> member typedefs are present and correct.
4546 * testsuite/21_strings/char_traits/requirements/
4547 explicit_instantiation/char8_t/1.cc: New test cloned from
4548 char16_t/1.cc; validates explicit instantiation of
4549 char_traits<char8_t>.
4550 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
4551 from char16_t.cc: validates
4552 codecvt<char16_t, char8_t, mbstate_t>.
4553 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
4554 from char32_t.cc: validates
4555 codecvt<char32_t, char8_t, mbstate_t>.
4556 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
4557 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
4558 codecvt<char32_t, char8_t, std::mbstate_t>.
4559 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
4560 test cloned from string.cc; validates filesystem::path construction
4562 * testsuite/experimental/feat-char8_t.cc: New test; validates that
4563 the __cpp_lib_char8_t feature test macro is defined with the
4565 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
4566 New test cloned from string.cc; validates filesystem::path
4567 construction from char8_t input.
4568 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
4569 test cloned from types.cc; validates operator""sv for char8_t
4570 returns u8string_view.
4571 * testsuite/experimental/string_view/literals/values-char8_t.cc:
4572 New test cloned from values.cc; validates construction and
4573 comparison of u8string_view values.
4574 * testsuite/experimental/string_view/requirements/
4575 explicit_instantiation/char8_t/1.cc: New test cloned from
4576 char16_t/1.cc; validates explicit instantiation of
4577 basic_string_view<char8_t>.
4578 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
4579 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
4582 2019-02-19 Tom Honermann <tom@honermann.net>
4584 P0482R5 char8_t: Standard library support
4585 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
4586 typeinfo symbols for char8_t.
4587 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
4588 (GLIBCXX_3.4.26): Add symbols for specializations of
4589 numeric_limits and codecvt that involve char8_t.
4590 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
4591 * include/bits/atomic_base.h: Add atomic_char8_t.
4592 * include/bits/basic_string.h: Add std::hash<u8string> and
4593 operator""s(const char8_t*, size_t).
4594 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
4596 * include/bits/char_traits.h: Add char_traits<char8_t>.
4597 * include/bits/codecvt.h: Add
4598 codecvt<char16_t, char8_t, mbstate_t>,
4599 codecvt<char32_t, char8_t, mbstate_t>,
4600 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4601 codecvt_byname<char32_t, char8_t, mbstate_t>.
4602 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
4603 recognize char8_t as an integral type.
4604 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
4606 (path::u8string): Return std::u8string when char8_t support is
4608 (path::generic_u8string): Likewise.
4609 (path::_S_convert): Handle conversion from char8_t input.
4610 (path::_S_str_convert): Likewise.
4611 * include/bits/functional_hash.h: Add hash<char8_t>.
4612 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4614 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4615 for new char8_t specializations.
4616 * include/bits/localefwd.h: Add missing declarations of
4617 codecvt<char16_t, char, mbstate_t> and
4618 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4619 codecvt<char16_t, char8_t, mbstate_t> and
4620 codecvt<char32_t, char8_t, mbstate_t>.
4621 * include/bits/postypes.h: Add u8streampos
4622 * include/bits/stringfwd.h: Add declarations of
4623 char_traits<char8_t> and u8string.
4624 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4625 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4627 (path::u8string): Return std::u8string when char8_t support is
4629 (path::generic_u8string): Likewise.
4630 (path::_S_convert): Handle conversion from char8_t input.
4631 (path::_S_str_convert): Likewise.
4632 * include/experimental/string: Add u8string.
4633 * include/experimental/string_view: Add u8string_view,
4634 hash<experimental::u8string_view>, and
4635 operator""sv(const char8_t*, size_t).
4636 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4637 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4638 as a character type.
4639 * include/std/limits: Add numeric_limits<char8_t>.
4640 * include/std/string_view: Add u8string_view,
4641 hash<experimental::u8string_view>, and
4642 operator""sv(const char8_t*, size_t).
4643 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4644 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4645 * libsupc++/atomic_lockfree_defines.h: Define
4646 ATOMIC_CHAR8_T_LOCK_FREE.
4647 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4648 codecvt.cc and limits.cc so that char8_t specializations of
4649 numeric_limits and codecvt and emitted.
4650 * src/c++11/Makefile.in: Likewise.
4651 * src/c++11/codecvt.cc: Define members of
4652 codecvt<char16_t, char8_t, mbstate_t>,
4653 codecvt<char32_t, char8_t, mbstate_t>,
4654 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4655 codecvt_byname<char32_t, char8_t, mbstate_t>.
4656 * src/c++11/limits.cc: Define members of
4657 numeric_limits<char8_t>.
4658 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4659 locale_init.cc and localename.cc.
4660 * src/c++98/Makefile.in: Likewise.
4661 * src/c++98/locale_init.cc: Add initialization for the
4662 codecvt<char16_t, char8_t, mbstate_t> and
4663 codecvt<char32_t, char8_t, mbstate_t> facets.
4664 * src/c++98/localename.cc: Likewise.
4665 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4667 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4669 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4670 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4671 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4673 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4675 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4676 * doc/html/*: Regenerate.
4678 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4679 * doc/html/*: Regenerate.
4681 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4682 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4683 allocator type in is_constructible checks.
4684 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4685 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4686 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4687 problematic type from LWG 2586 discussion.
4688 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4689 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4691 * configure.ac: Check for C11 timespec_get function.
4692 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4694 * config.h.in: Regenerate.
4695 * configure: Regenerate.
4696 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4697 std for C++17 and up.
4699 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4700 * include/bits/stl_queue.h
4701 (priority_queue(const Compare&, const Container&, const Alloc&))
4702 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4704 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4706 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4707 * include/bits/stl_queue.h (queue, priority_queue): Add static
4708 assertions to enforce LWG 2566 requirement on value_type.
4709 * include/bits/stl_stack.h (stack): Likewise.
4712 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4714 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4715 * include/bits/std_abs.h: Add comment about LWG 2735.
4716 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4718 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4721 * include/std/version [__cpp_impl_destroying_delete]
4722 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4723 * libsupc++/new [__cpp_impl_destroying_delete]
4724 (__cpp_lib_destroying_delete): Likewise.
4725 (destroying_delete_t, destroying_delete): Likewise, but define even
4726 when __cpp_impl_destroying_delete is not defined.
4727 * testsuite/18_support/destroying_delete.cc: New test.
4729 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4732 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4733 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4734 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4735 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4737 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4740 * include/bits/fs_path.h (path::has_root_name)
4741 (path::has_root_directory, path::has_root_path)
4742 (path::has_relative_path, path::has_parent_path)
4743 (path::has_filename, path::has_stem, path::has_extension)
4744 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4746 * src/c++17/fs_path.cc (path::has_root_name)
4747 (path::has_root_directory, path::has_root_path)
4748 (path::has_relative_path, path::has_parent_path)
4749 (path::has_filename, path::_M_find_extension): Add noexcept.
4751 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4753 PR libstdc++/89102 (partial)
4754 * include/std/type_traits (common_type<>): Define.
4755 (common_type<T>): Derive from common_type<T, T>.
4756 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4757 Test zero-length template argument list.
4758 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4759 Test additional single argument cases.
4760 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4761 Adjust expected error.
4763 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4766 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4768 * include/bits/stl_stack.h (stack): Likewise.
4769 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4770 * testsuite/23_containers/queue/deduction.cc: New test.
4771 * testsuite/23_containers/stack/deduction.cc: New test.
4774 * include/std/type_traits (__is_convertible_helper)
4775 (__is_convertible_helper<_From, _To, false>): Revert changes to
4776 support is_nothrow_convertible.
4777 (__is_nt_convertible_helper): New helper.
4778 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4780 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4781 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4784 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4785 __is_alloc_insertable_impl. Replace single type member with two
4786 members, one for each of copy and move insertable.
4787 (__is_move_insertable): New trait for internal use.
4788 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4789 (vector::_S_nothrow_relocate(true_type)): New functions to
4790 conditionally check if __relocate_a can throw.
4791 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4792 on __is_move_insertable.
4793 (vector::_S_do_relocate): New overloaded functions to conditionally
4795 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4796 based on _S_use_relocate.
4797 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4798 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4799 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4802 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4803 parameter unnamed. Add message to static assertion.
4804 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4805 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4808 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4811 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4813 (__is_bitwise_relocatable): ... to this.
4814 (__relocate_a_1): Adapt.
4815 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4816 (__is_bitwise_relocatable): ... to this.
4818 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4821 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4822 final component as well as from _M_pathname. Append the dot using
4823 operator+= instead of only to _M_pathname.
4824 (path::_M_find_extension): Reformat slightly.
4825 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4826 Add more test cases.
4828 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4830 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4832 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4834 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4835 constexpr specifiers from arg and proj.
4837 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4838 __shared_ptr instantiations used by gcc4-compatible ABI.
4840 * include/experimental/forward_list (experimental::erase): Qualify
4842 * include/experimental/list (experimental::erase): Likewise.
4843 * include/std/forward_list (std::erase): Likewise.
4844 * include/std/list (std::erase): Likewise.
4846 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4848 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4849 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4850 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4851 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4852 * testsuite/ext/array_allocator/26875.cc: Likewise.
4853 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4854 * testsuite/util/replacement_memory_operators.h: Likewise.
4855 * testsuite/util/testsuite_allocator.h: Likewise.
4857 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4858 normal mode vector, even for debug mode.
4859 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4860 Define alias template for normal mode vector.
4862 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4865 * config/locale/generic/c_locale.h (__convert_from_v)
4866 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4867 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4868 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4869 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4871 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4874 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4875 data member with static member function _S_use_relocate().
4876 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4877 (vector::_M_default_append): Use _S_use_relocate() instead of
4880 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4883 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4886 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4887 write to stderr instead of using printf.
4889 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4892 * include/bits/char_traits.h (__constant_string_p,
4893 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4896 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4898 Implement C++20 P0600r1.
4899 * include/backward/hash_map: Add nodiscard attribute to empty.
4900 * include/backward/hash_set: Likewise.
4901 * backward/hashtable.h: Likewise.
4902 * include/bits/basic_string.h: Likewise.
4903 * include/bits/forward_list.h: Likewise.
4904 * include/bits/hashtable.h: Likewise.
4905 * include/bits/regex.h: Likewise.
4906 * include/bits/stl_deque.h: Likewise.
4907 * include/bits/stl_list.h: Likewise.
4908 * include/bits/stl_map.h: Likewise.
4909 * include/bits/stl_multimap.h: Likewise.
4910 * include/bits/stl_multiset.h: Likewise.
4911 * include/bits/stl_queue.h: Likewise.
4912 * include/bits/stl_set.h: Likewise.
4913 * include/bits/stl_stack.h: Likewise.
4914 * include/bits/stl_tree.h: Likewise.
4915 * include/bits/stl_vector.h: Likewise.
4916 * include/bits/unordered_map.h: Likewise.
4917 * include/bits/unordered_set.h: Likewise.
4918 * include/debug/array: Likewise.
4919 * include/experimental/any: Likewise.
4920 * include/experimental/bits/fs_path.h: Likewise.
4921 * include/experimental/internet: Likewise.
4922 * include/experimental/string_view: Likewise.
4923 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4925 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4927 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4929 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4931 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4933 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4935 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4937 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4939 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4940 info_fn_imps.hpp: Likewise.
4941 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4942 left_child_next_sibling_heap_.hpp: Likewise.
4943 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4945 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4947 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4949 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4951 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4953 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4955 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4957 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4958 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4959 * include/ext/rope: Likewise.
4960 * include/ext/slist: Likewise.
4961 * include/ext/vstring.h: Likewise.
4962 * include/profile/array: Likewise.
4963 * include/std/array: Likewise.
4964 * include/tr1/array: Likewise.
4965 * include/tr1/hashtable.h: Likewise.
4966 * include/tr1/regex: Likewise.
4967 * include/tr2/dynamic_bitset: Likewise.
4968 * include/bits/alloc_traits.h: Add nodiscard attribute to
4970 * include/experimental/memory_resource: Likewise.
4971 * include/ext/alloc_traits.h: Likewise.
4972 * include/ext/array_allocator.h: Likewise.
4973 * include/ext/bitmap_allocator.h: Likewise.
4974 * include/ext/debug_allocator.h: Likewise.
4975 * include/ext/extptr_allocator.h: Likewise.
4976 * include/ext/mt_allocator.h: Likewise.
4977 * include/ext/new_allocator.h: Likewise.
4978 * include/ext/pool_allocator.h: Likewise.
4979 * include/ext/throw_allocator.h: Likewise.
4980 * include/std/scoped_allocator: Likewise.
4981 * libsupc++/eh_alloc.cc: Likewise.
4982 * include/std/future: Add nodiscard attribute to async.
4983 * libsupc++/new: Add nodiscard attribute to new.
4985 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4990 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4991 * include/bits/shared_ptr.h
4992 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4993 (allocate_shared): Change to use new tag type.
4994 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4995 Declare new member function.
4996 (_Sp_alloc_shared_tag): Define new type.
4997 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4998 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4999 _Sp_make_shared_tag::_S_eq to check type_info.
5000 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
5001 Constrain to prevent being called with _Sp_alloc_shared_tag.
5002 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
5003 Replace constructor with ...
5004 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
5005 reference parameter so address of the new object can be returned to
5006 the caller. Obtain the allocator from the tag type.
5007 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
5008 constructor with ...
5009 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
5010 to the __shared_count constructor.
5011 (__allocate_shared): Change to use new tag type.
5012 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
5014 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
5016 * src/c++17/fs_ops.cc
5017 (equivalent(const path&, const path&, error_code&))
5018 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
5019 compare files instead of relying on incomplete info returned by stat.
5022 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
5023 if the path is already absolute.
5024 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
5025 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
5028 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
5029 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
5030 of filesystem::exists.
5031 (create_directories(const path&, error_code&)): Add assertions.
5032 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
5033 Add workaround for bug in _wstat for paths with trailing slash.
5034 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
5035 for expected behaviour on mingw.
5036 * testsuite/experimental/filesystem/operations/create_directories.cc:
5038 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
5039 "TMP" instead of "TMPDIR" and clean environment before each test. Do
5040 not test permissions on mingw targets.
5042 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
5044 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
5045 constructors and open members taking wide strings. Fix patterns for
5046 filesystem::path members to match wstring_view parameters. Add
5047 exports for shared_ptr members used by directory iterators.
5048 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
5049 error code parameter if the file doesn't exist.
5050 * src/filesystem/ops.cc (remove(const path&, error_code&)):
5052 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
5053 values for mingw targets, where "/" is not an absolute path. Do not
5054 test symlinks on mingw targets.
5055 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
5056 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
5058 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5059 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
5060 that each component of the path is created.
5061 * testsuite/experimental/filesystem/operations/create_directories.cc:
5063 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
5064 permissions on mingw targets.
5065 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
5066 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5067 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
5068 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
5070 * testsuite/experimental/filesystem/operations/permissions.cc:
5072 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
5073 symlinks or permissions on mingw targets.
5074 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
5075 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
5076 symlinks on mingw targets.
5077 * testsuite/experimental/filesystem/operations/remove_all.cc:
5079 * testsuite/27_io/filesystem/operations/status.cc: Do not test
5080 permissions on mingw targets.
5081 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
5082 test symlinks on mingw targets.
5083 * testsuite/experimental/filesystem/operations/space.cc: Fix test
5086 2019-02-14 Ulrich Drepper <drepper@redhat.com>
5089 Warn about unused comparisons of shared_ptr/unique_ptr
5090 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
5091 * include/bits/shared_ptr.h: Use it for operator ==, !=,
5092 <, <=, >, >= for shared_ptr.
5093 * include/bits/unique_ptr.h: Likewise for unique_ptr.
5095 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
5097 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
5098 as 201611L, because P0497R0 changes are supported.
5099 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
5101 * include/bits/erase_if.h [__cplusplus > 201703L]
5102 (__cpp_lib_erase_if): Only define for C++2a.
5103 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5104 (__cpp_lib_null_iterators): Define.
5105 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5106 (__cpp_lib_null_iterators): Define.
5107 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
5109 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
5111 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
5113 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
5114 changes are supported.
5115 * include/std/optional (__cpp_lib_optional): Likewise.
5116 * include/std/variant (__cpp_lib_variant): Likewise.
5117 * include/std/version [!__STRICT_ANSI__]
5118 (__cpp_lib_uncaught_exceptions): Define as long integer.
5119 [__cplusplus >= 201703L] (__cpp_lib_any)
5120 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
5121 (__cpp_lib_variant): Define for C++17.
5122 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
5124 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
5127 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
5129 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
5133 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
5135 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
5138 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5140 * doc/xml/manual/intro.xml: Include new section.
5141 * doc/xml/manual/status_cxx2017.xml: Document more
5142 implementation-defined properties of the library.
5143 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
5144 * doc/html/*: Regenerate.
5146 * include/bits/refwrap.h [__cplusplus > 201703L]
5147 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
5148 (_Reference_wrapper_base_memfun): Do not define for C++2a.
5149 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
5151 (reference_wrapper::operator()): Add static assertion.
5152 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
5154 * include/std/chrono (duration_values::zero(), duration_values::min())
5155 (duration_values::max()): Add noexcept.
5156 (duration::zero(), duration::min(), duration::max()): Likewise.
5157 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
5158 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
5159 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
5161 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
5163 2019-01-11 Jakub Jelinek <jakub@redhat.com>
5165 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
5166 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
5168 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5171 * include/bits/functional_hash.h (hash<nullptr_t>): Define
5172 specialization for C++17 (P0513R0, LWG 2817).
5173 * testsuite/20_util/hash/nullptr.cc: New test.
5176 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
5177 pattern for std::basic_stringbuf::str().
5179 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
5180 basic_ostream::operator<< patterns.
5182 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5184 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
5185 test failures on targets with 32-bit time_t.
5187 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
5188 * include/std/deque: Likewise.
5189 * include/std/forward_list: Likewise.
5190 * include/std/list: Likewise.
5191 * include/std/string: Likewise.
5192 * include/std/vector: Likewise.
5193 * include/std/version: Likewise.
5194 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
5195 * testsuite/23_containers/deque/erasure.cc: Likewise.
5196 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5197 * testsuite/23_containers/list/erasure.cc: Likewise.
5198 * testsuite/23_containers/map/erasure.cc: Likewise.
5199 * testsuite/23_containers/set/erasure.cc: Likewise.
5200 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5201 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5202 * testsuite/23_containers/vector/erasure.cc: Likewise.
5204 * include/experimental/internet [AI_NUMERICSERV]
5205 (resolver_base::numeric_service): Define conditionally.
5206 * testsuite/experimental/net/internet/resolver/base.cc: Test it
5208 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
5211 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
5212 Jonathan Wakely <jwakely@redhat.com>
5215 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
5216 (GLIBCXX_3.4.26): Add new exports.
5217 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
5218 correct list of sources.
5219 * include/Makefile.in: Regenerate.
5220 * include/std/ostream (operator<<(nullptr_t)): New member function.
5221 * src/c++17/ostream-inst.cc: New file.
5222 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
5225 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5227 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
5228 of the source file containing the caller.
5229 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
5230 directories created by test.
5231 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5233 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
5235 * testsuite/experimental/filesystem/iterators/
5236 recursive_directory_iterator.cc: Likewise.
5238 2019-01-10 Jakub Jelinek <jakub@redhat.com>
5240 PR tree-optimization/88775
5241 * include/bits/stl_function.h (greater<_Tp*>::operator(),
5242 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
5243 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
5244 instead of __builtin_constant_p if available. Don't bother with
5245 the pointer comparison in C++11 and earlier.
5247 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
5251 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
5254 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
5256 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
5257 for filesystem::path. Give variables more distinctive names.
5259 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
5260 member function to perform non-trivial assignment.
5261 (_Optional_payload_base::_M_move_assign): Likewise.
5262 (_Optional_payload<T, true, false, true>::operator=)
5263 (_Optional_payload<T, true, true, false>::operator=)
5264 (_Optional_payload<T, true, false, false>::operator=): Call
5265 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
5268 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
5269 test std::complex<long double> if long double format is IBM128.
5270 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
5273 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5275 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
5276 for old std::unique_ptr layout.
5277 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
5278 to become valueless. Add filesystem::path tests.
5281 * include/std/optional (_Optional_payload_base): New class template
5282 for common code hoisted from _Optional_payload specializations. Use
5283 a template for the union, to allow a partial specialization for
5284 types with non-trivial destructors. Add constructors for in-place
5285 initialization to the union.
5286 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
5287 to perform non-trivial copy construction, instead of relying on
5288 non-standard copy elision in a delegating constructor.
5289 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
5290 non-trivial move construction.
5291 (_Optional_payload): Derive from _Optional_payload_base and use it
5292 for everything except the non-trivial assignment operators, which are
5294 (_Optional_payload<false, C, M>): Derive from the specialization
5295 _Optional_payload<true, false, false> and add a destructor.
5296 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
5297 Forward to corresponding members of _Optional_payload.
5298 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
5299 Hoist common members from _Optional_base.
5300 (_Optional_base): Make all members and base class public.
5301 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
5302 _Optional_base_impl.
5303 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
5304 support for new std::optional layout.
5305 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
5308 * include/bits/locale_conv.h: Use <> for includes not "".
5309 * include/ext/random: Likewise.
5310 * include/ext/vstring.h: Likewise.
5312 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5314 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
5315 (GLIBCXX_3.4.21): Likewise.
5317 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5320 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
5321 to match the one that controls whether utimbuf and utime are declared.
5323 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
5326 * include/bits/char_traits.h (char_traits::move): Do not pass null
5327 pointers to memmove.
5328 * include/bits/locale_facets.h
5329 (ctype<char>::widen(const char*, const char*, char*)): Do not
5330 pass null pointers to memcpy.
5331 (ctype<char>::narrow(const char*, const char*, char, char*)):
5333 (ctype<char>::do_widen(const char*, const char*, char*)):
5335 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
5338 * doc/xml/manual/spine.xml: Update copyright years.
5339 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
5340 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
5341 for C++17 filesystem library.
5342 * doc/html/*: Regenerate.
5344 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
5345 * config.h.in: Regenerate.
5346 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
5347 alphabetically and add missing entries for copy_symlink,
5348 hard_link_count, rename, and resize_file.
5349 * configure: Regenerate.
5350 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
5351 used unconditionally.
5352 * src/filesystem/ops-common.h (__gnu_posix::truncate)
5353 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
5354 supports truncating to zero length.
5355 * testsuite/27_io/filesystem/operations/all.cc: New test.
5356 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
5358 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
5361 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
5362 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
5363 * config.h.in: Regenerate.
5364 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
5365 remaining std::filesystem types and functions.
5366 * configure: Regenerate.
5367 * src/c++17/Makefile.am: Add C++17 filesystem sources.
5368 * src/c++17/Makefile.in: Regenerate.
5369 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
5370 here, and change name of included file.
5371 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
5372 here, and change name of included file.
5373 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
5374 path to dir-common.h.
5375 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
5376 path to ops-common.h. Disable -Wunused-parameter warnings.
5377 (internal_file_clock): Define unconditionally.
5378 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
5380 (do_copy_file, do_space): Move definitions to ops.common.h.
5381 (copy, file_size, hard_link_count, last_write_time, space): Only
5382 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
5384 (last_write_time, read_symlink): Remove unused attributes from
5386 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
5387 * src/filesystem/Makefile.in: Regenerate.
5388 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
5389 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
5390 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
5391 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
5392 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
5393 dummy types and functions instead of using #error.
5394 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
5395 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
5397 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
5398 (do_copy_file, do_space): Move definitions here from std-ops.cc.
5399 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
5400 to account for new namespace.
5401 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
5402 -lstdc++fs from dg-options.
5403 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
5404 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
5405 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
5406 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
5407 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
5409 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
5410 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5412 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
5413 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
5414 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
5415 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
5416 * testsuite/27_io/filesystem/operations/create_directories.cc:
5418 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
5419 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
5420 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
5421 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
5422 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
5423 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
5424 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5425 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
5426 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
5427 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
5428 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
5429 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
5430 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
5431 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
5432 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
5433 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
5434 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
5435 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
5437 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
5441 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
5442 typeinfo and vtables less greedy.
5443 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
5444 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
5445 * src/c++17/Makefile.in: Regenerate.
5446 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
5447 here, and change name of included file.
5448 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
5449 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
5451 * src/filesystem/Makefile.in: Regenerate.
5452 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
5453 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
5454 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
5455 from dg-options and remove dg-require-filesystem-ts.
5456 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
5457 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
5458 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
5459 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
5460 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5461 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5462 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5463 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
5464 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
5465 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
5466 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
5467 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
5468 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
5469 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
5470 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
5471 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
5472 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
5473 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
5474 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
5475 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
5476 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
5478 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
5479 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
5480 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
5481 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
5482 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
5483 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
5484 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
5485 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
5486 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
5487 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
5488 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
5489 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
5491 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
5493 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5495 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
5497 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
5498 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
5499 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
5500 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
5501 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
5502 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
5503 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
5504 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
5505 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
5506 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
5508 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
5509 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
5510 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
5511 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
5512 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
5515 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
5516 Check is_trivially_copyable instead of is_scalar.
5517 (variant::emplace<N, Args>(Args&&...)): If construction of the new
5518 contained value can throw and its type is trivially copyable then
5519 construct into a temporary variant and move from it, to provide the
5520 strong exception safety guarantee.
5521 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
5523 * testsuite/20_util/variant/87431.cc: New test.
5524 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
5525 conversion causes valueless state.
5528 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
5529 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
5530 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
5531 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
5532 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
5534 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
5536 * include/bits/fs_fwd.h (__file_clock): Define new clock.
5537 (file_time_type): Redefine in terms of __file_clock.
5538 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
5540 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
5542 (internal_file_lock): New helper type for accessing __file_clock.
5543 (do_copy_file): Use internal_file_lock to convert system time to
5545 (last_write_time(const path&, error_code&)): Likewise.
5546 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
5548 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
5550 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
5551 for const member functions of std::basic_string.
5552 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
5554 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
5555 Make non-standard constructor private.
5556 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
5558 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
5559 explicit instantiations for C++17 as well as earlier dialects.
5560 * src/c++17/Makefile.am: Add new source files.
5561 * src/c++17/Makefile.in: Regenerate.
5562 * src/c++17/cow-string-inst.cc: New file defining explicit
5563 instantiations for basic_string member functions added in C++17.
5564 * src/c++17/string-inst.cc: Likewise.
5566 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
5567 copy/move constructors for old std::basic_string.
5568 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
5569 (basic_string::reference, basic_string::const_reference): Define
5570 as plain references for C++11 and later.
5571 (basic_string::basic_string()): Put constructor body outside
5572 preprocessor conditional groups.
5573 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
5574 instead of copying it.
5575 (basic_string::basic_string(const basic_string&, const _Alloc&)):
5577 (basic_string::basic_string(basic_string&&, const _Alloc&)):
5579 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
5580 cases for old basic_string.
5581 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
5582 allocator-extended constructors unconditionally. Add extra members to
5583 allocator type when using old string ABI.
5584 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
5586 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
5588 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
5589 -fno-inline added to test flags.
5591 * testsuite/21_strings/basic_string/requirements/
5592 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
5594 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
5595 assertion failures with old std::string ABI.
5597 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
5599 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
5600 functions that will only erase elements at the end.
5601 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
5602 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
5603 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
5605 (path::_List::pop_back()): Define.
5606 (path::_List::_M_erase_from(const_iterator)): Define.
5607 (path::operator/=(const path&)): Use pop_back to remove last component
5608 and _M_erase_from to remove multiple components.
5609 (path::_M_append(basic_string_view<value_type>)): Likewise.
5610 (path::operator+=(const path&)): Likewise.
5611 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5612 (path::remove_filename()): Likewise.
5613 (path::lexically_normal()): Use _List::_Impl iterators instead of
5614 path::iterator. Use pop_back to remove components from the end. Clear
5615 trailing filename, instead of using erase(const_iterator) to remove
5616 a non-final component.
5617 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5619 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5621 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5622 incorrect treatment of empty filename after trailing slash.
5623 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5625 * testsuite/21_strings/basic_string/modifiers/assign/char/
5626 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5628 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5629 move_assign_optim.cc: Likewise.
5631 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5632 Jakub Jelinek <jakub@redhat.com>
5635 * include/experimental/memory: Replace UTF-8 quote characters.
5636 * include/std/future: Replace UTF-8 "em dash" characters.
5638 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5641 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5642 * include/debug/forward_list: Likewise.
5643 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5645 * include/experimental/chrono: Likewise.
5646 * include/experimental/functional: Likewise.
5647 * include/experimental/ratio: Likewise.
5648 * include/experimental/system_error: Likewise.
5649 * include/experimental/tuple: Likewise.
5650 * include/experimental/type_traits: Likewise.
5651 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5652 * include/parallel/multiseq_selection.h: Likewise.
5655 * config/abi/pre/gnu.ver: Add missing exports.
5656 * testsuite/22_locale/collate_byname/88681.cc: New test.
5657 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5658 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5660 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5662 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5663 initializer_list<value_type> and from input iterator ranges.
5664 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5666 * testsuite/experimental/string_view/element_access/char/empty.cc:
5667 Fix year range in copyright header.
5669 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5671 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5672 Fix year range in copyright header.
5674 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5676 Update copyright years.
5678 Copyright (C) 2019 Free Software Foundation, Inc.
5680 Copying and distribution of this file, with or without modification,
5681 are permitted in any medium without royalty provided the copyright
5682 notice and this notice are preserved.