1 2019-10-11 Jonathan Wakely <jwakely@redhat.com>
4 * include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
5 special member functions as defaulted. Add noexcept to most members.
6 (__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)):
7 Mask off unwanted bits in the __val parameter. Avoid undefined left
9 (__dynamic_bitset_base::_M_assign): Remove.
10 (__dynamic_bitset_base::_M_do_reset): Use std::fill.
11 (__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when
12 block_type has lower rank than int.
13 (dynamic_bitset): Add noexcept to most members. Use injected-class-name
14 in return types and parameter types.
15 (dynamic_bitset::_M_Nb): Add default member initializer.
16 (dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as
18 (dynamic_bitset(dynamic_bitset&&)): Clear source object after move.
19 (dynamic_bitset::operator=(const dynamic_bitset&)): Define as
21 (dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier.
22 Define without using swap, to propagate allocator correctly.
23 (dynamic_bitset(const char*, const _Alloc&)): Use strlen.
24 (dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use
25 casts to avoid unwanted integer promotions.
26 (dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and
27 add default template arguments and default argument to simplify usage.
28 (dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr.
29 (operator==(const dynamic_bitset&, const dynamic_bitset&))
30 (operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb.
31 * include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr):
32 Adjust template parameters to match declaration.
33 * testsuite/tr2/dynamic_bitset/cmp.cc: New test.
34 * testsuite/tr2/dynamic_bitset/cons.cc: New test.
35 * testsuite/tr2/dynamic_bitset/copy.cc: New test.
36 * testsuite/tr2/dynamic_bitset/move.cc: New test.
37 * testsuite/tr2/dynamic_bitset/pr92059.cc: New test.
39 * include/bits/charconv.h (__to_chars_len): Avoid -Wsign-compare
42 2019-10-10 Jonathan Wakely <jwakely@redhat.com>
45 * src/c++98/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]
46 (find_ldbl_sync_facet): Fix parameter type and missing return.
48 2019-10-09 Marek Polacek <polacek@redhat.com>
50 PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound.
51 PR c++/69531 - DR 1307: Differently bounded array parameters.
52 PR c++/88128 - DR 330: Qual convs and pointers to arrays of pointers.
53 * testsuite/23_containers/span/lwg3255.cc: Adjust test to match the
54 post-P0388R4 behavior.
56 2019-10-09 Jonathan Wakely <jwakely@redhat.com>
59 * src/c++98/locale.cc (locale::id::_M_id()) [__GTHREADS]: Use atomic
60 compare-exchange or double-checked lock to ensure only one thread sets
61 the _M_index variable.
62 [_GLIBCXX_LONG_DOUBLE_COMPAT]: Call find_ldbl_sync_facet to detect
63 facets that share another facet's ID.
64 [_GLIBCXX_LONG_DOUBLE_COMPAT] (find_ldbl_sync_facet): New function.
67 * src/c++98/locale_init.cc (locale::classic()): Do not construct a new
68 locale object for every call.
69 (locale::_S_initialize_once()): Construct C locale here.
71 2019-10-08 Jonathan Wakely <jwakely@redhat.com>
73 * doc/Makefile.am (doc-html-docbook-regenerate): New target.
74 (${docbook_outdir}/html): Do not create unused 'html/ext' directory.
75 * doc/Makefile.in: Regenerate.
76 * doc/xml/manual/documentation_hacking.xml: Document new target.
77 * doc/html/*: Regenerate.
79 * doc/xml/manual/allocator.xml: Use archived copy of CUJ article.
80 * doc/html/*: Regenerate.
82 2019-10-06 François Dumont <fdumont@gcc.gnu.org>
84 * include/bits/stl_algo.h
85 (__copy_n_a(_IIte, _Size, _OIte)): New.
86 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
87 (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
89 * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
90 std::__copy_n_a friend.
91 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
92 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
93 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
94 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.
96 * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define
98 (_RequireInputIte): Likewise and use __enable_if_t.
100 (__is_random_access_iter): Use __iterator_category_t.
102 * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment
104 * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New.
105 * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New.
107 2019-10-04 François Dumont <fdumont@gcc.gnu.org>
109 * include/debug/forward_list
110 (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign
111 distance when not empty.
112 * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size):
114 * include/debug/helper_functions.h (__dp_sign_max_size): New
115 _Distance_precision enum entry.
116 (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type,
117 __false_type)): Adapt.
118 * include/debug/safe_iterator.tcc
119 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review
120 distance computation.
122 2019-10-04 Jonathan Wakely <jwakely@redhat.com>
126 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
127 * config.h.in: Regenerate:
128 * configure: Regenerate:
129 * include/Makefile.am (${host_builddir}/largefile-config.h): New
130 target to generate config header for filesystem library.
131 (${host_builddir}/c++config.h): Rename macros for large file support.
132 * include/Makefile.in: Regenerate.
133 * src/c++17/fs_dir.cc: Include new config header.
134 * src/c++17/fs_ops.cc: Likewise.
135 (filesystem::file_size): Use uintmax_t for size.
136 * src/filesystem/dir.cc: Include new config header.
137 * src/filesystem/ops.cc: Likewise.
138 (experimental::filesystem::file_size): Use uintmax_t for size.
140 * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
141 std::tr1::unordered_map.
142 * testsuite/util/testsuite_allocator.h: Likewise.
144 * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.
146 * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
147 __gnu_cxx::__alloc_traits for allocator construct function.
148 (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function.
150 * include/precompiled/stdc++.h: Include <span> for C++20.
151 * testsuite/17_intro/names.cc: Do not define 'e' for C++20.
153 2019-10-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
155 * include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp.
157 2019-10-02 Jonathan Wakely <jwakely@redhat.com>
159 * config/abi/pre/gnu.ver: Tighten up greedy wildcards.
161 * doc/xml/manual/parallel_mode.xml: Add caveat about support for
163 * doc/html/*: Regenerate.
165 2019-10-01 Jonathan Wakely <jwakely@redhat.com>
167 * include/experimental/algorithm (experimental::sample): Qualify call
168 to __sample correctly.
169 * include/parallel/algo.h (sample, for_each_n): Add using-declarations
170 for algorithms that don't have parallel implementations.
172 * include/parallel/algobase.h (equal, lexicographical_compare): Add
173 _GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
175 * include/parallel/algorithmfwd.h (equal, lexicographical_compare):
176 Add _GLIBCXX20_CONSTEXPR.
178 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for
180 * testsuite/20_util/hash/84998.cc: Likewise.
181 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise.
182 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise.
183 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
184 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
185 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
186 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
187 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
188 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
190 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
192 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
194 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
196 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
198 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise.
199 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
200 * testsuite/25_algorithms/copy/86658.cc: Likewise.
201 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
202 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
203 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
204 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
206 * include/parallel/algo.h: Replace non-reserved names.
207 * include/parallel/multiway_merge.h: Likewise.
208 * include/parallel/multiway_mergesort.h: Likewise.
209 * include/parallel/numericfwd.h: Likewise.
210 * testsuite/17_intro/names.cc: Add RAI to test macros.
212 2019-09-30 François Dumont <fdumont@gcc.gnu.org>
214 * include/debug/array: Add C++20 constexpr to comparison operators.
215 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt
216 dg-error line numbers.
217 * testsuite/23_containers/array/tuple_interface/
218 tuple_element_debug_neg.cc: Likewise.
220 2019-09-30 Andreas Tobler <andreast@gcc.gnu.org>
222 * include/experimental/internet: Include netinet/in.h if we have
223 _GLIBCXX_HAVE_NETINET_IN_H defined.
225 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
226 FreeBSD warning about lower advertised precision of tgammal.
227 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
228 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
229 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
230 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
231 * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
232 * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
233 * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
234 * testsuite/tr1/5_numerical_facilities/special_functions/
235 08_cyl_bessel_i/check_nan.cc: Likewise.
236 * testsuite/tr1/5_numerical_facilities/special_functions/
237 09_cyl_bessel_j/check_nan.cc: Likewise.
238 * testuite/tr1/5_numerical_facilities/special_functions/
239 10_cyl_bessel_k/check_nan.cc: Likewise.
240 * testsuite/tr1/5_numerical_facilities/special_functions/
241 11_cyl_neumann/check_nan.cc: Likewise.
242 * testsuite/tr1/5_numerical_facilities/special_functions/
243 21_sph_bessel/check_nan.cc: Likewise.
244 * testsuite/tr1/5_numerical_facilities/special_functions/
245 23_sph_neumann/check_nan.cc: Likewise.
247 2019-09-30 Jonathan Wakely <jwakely@redhat.com>
249 * include/std/span (span(element_type(&)[N]))
250 (span(array<value_type, N>&), span(const array<value_type, N>&)):
251 Deduce array element type to allow safe const conversions (LWG 3255).
252 [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use
253 remove_cv_t on arguments to __is_std_span and __is_std_array.
254 * testsuite/23_containers/span/lwg3255.cc: New test.
257 * include/parallel/checkers.h (__is_sorted): Remove unused variable.
259 2019-09-28 François Dumont <fdumont@gcc.gnu.org>
261 * include/bits/stl_algo.h (merge): Fix documentation.
262 * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr.
263 (__check_sorted): Likewise and remove nested irreflexive check.
264 (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr.
265 (__check_partitioned_lower, __check_partitioned_upper): Likewise.
266 (_Irreflexive_checker::_S_is_valid): Likewise.
267 (__is_irreflexive, __is_irreflexive_pred): Likewise.
268 * include/debug/helper_functions.h (__get_distance): Add constexpr.
269 (__valid_range_aux): Add C++20 constexpr.
270 (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)):
271 Likewise and add std::is_constant_evaluated check.
272 (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New.
273 (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New.
274 (__valid_range_aux(_Integral, _Integral, std::__true_type)): New,
276 (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and
277 __builtin_is_contant_evaludated check..
278 (__can_advance, __base): Add constexpr.
279 * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED]
280 (_GLIBCXX_DEBUG_VERIFY_COND_AT): New.
281 (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive.
282 (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred.
283 * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive
285 * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
286 * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix
287 lambda to be irreflexive.
289 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
291 * configure: Regenerate.
293 2019-09-27 Jonathan Wakely <jwakely@redhat.com>
296 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer
297 atomically and lock the mutex before accessing the sequence.
298 (_Safe_local_iterator_base::_M_detach()): Likewise.
299 (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
301 2019-09-26 Jonathan Wakely <jwakely@redhat.com>
303 * include/debug/array (to_array): Define for debug mode.
305 * include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to
306 piecewise construction constructor, assignment operators, and swap.
307 * include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)):
308 Add _GLIBCXX20_CONSTEXPR.
309 (pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise.
310 * testsuite/20_util/pair/constexpr_assign.cc: New test.
311 * testsuite/20_util/pair/constexpr_swap.cc: New test.
313 * include/experimental/internet (operator==, operator<): Fix loop
314 condition to avoid reading past the end of the array.
316 * include/std/array: Remove references to profile mode.
317 * include/std/bitset: Likewise.
318 * include/std/deque: Likewise.
319 * include/std/forward_list: Likewise.
320 * include/std/list: Likewise.
321 * include/std/map: Likewise.
322 * include/std/set: Likewise.
323 * include/std/unordered_map: Likewise.
324 * include/std/unordered_set: Likewise.
325 * include/std/vector: Likewise.
326 * testsuite/17_intro/headers/c++1998/profile_mode.cc: New test.
327 * testsuite/17_intro/headers/c++2011/profile_mode.cc: New test.
329 2019-09-25 Jonathan Wakely <jwakely@redhat.com>
331 * include/bits/regex.h
332 (basic_regex::assign(const C*, size_t, flag_type)): Add default
334 * testsuite/28_regex/basic_regex/assign/char/lwg3296.cc: New test.
335 * testsuite/28_regex/basic_regex/assign/wchar_t/lwg3296.cc: New test.
337 2019-09-24 Jonathan Wakely <jwakely@redhat.com>
339 * include/std/variant (variant::index()): Remove impossible case.
342 * testsuite/util/testsuite_hooks.h
343 (conversion::iterator_to_const_iterator()): Do not return an invalid
344 iterator. Test direct-initialization and direct-list-initialization
345 as well as implicit conversion.
347 2019-09-23 Jonathan Wakely <jwakely@redhat.com>
349 PR libstdc++/91788 (partial)
350 * include/std/variant (variant::index()): Improve codegen for cases
351 where conversion to size_t already works correctly.
353 2019-09-23 Andreas Schwab <schwab@suse.de>
355 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
357 2019-09-12 Jonathan Wakely <jwakely@redhat.com>
360 * include/bits/stl_algo.h (for_each_n): Fix random access iterator
362 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
365 2019-09-11 Jonathan Wakely <jwakely@redhat.com>
367 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
370 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
371 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
372 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile
375 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
377 * include/std/type_traits (__do_common_type_impl): Implement
378 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20.
379 (basic_common_reference, common_reference, common_reference_t): Define
381 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New
383 * testsuite/20_util/common_reference/requirements/
384 explicit_instantiation.cc: New test.
385 * testsuite/20_util/common_reference/requirements/typedefs.cc: New
388 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
389 non-template overloads for each signed and unsigned integer type and
390 char. Define deleted overload for bool (LWG 3266).
391 * testsuite/20_util/to_chars/1_neg.cc: Remove.
392 * testsuite/20_util/to_chars/3.cc: New test.
393 * testsuite/20_util/to_chars/lwg3266.cc: New test.
395 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
397 * acinclude.m4: Handle uclinux*.
398 * configure: Regenerate.
399 * configure.host: Handle uclinux*
401 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
402 Mickaël Guêné <mickael.guene@st.com>
404 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
407 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
410 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
411 0ul being a valid null pointer constant.
413 * include/std/type_traits (__remove_cv_t): New alias template.
414 (is_void, is_integral, is_floating_point, is_pointer)
415 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
416 (is_member_point), __is_signed_integer, __is_unsigned_integer)
417 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
418 (__decay_selector): Use __remove_cv_t.
419 (remove_cv): Add partial specializations for cv-qualified types.
420 (__decay_t): New alias template.
421 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
423 (__enable_if_t): Move earlier in the file.
424 (_Require): Use __enable_if_t.
425 (swap(T&, T&)): Use _Require.
426 (swap(T(&)[N])): Use __enable_if_t.
428 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
430 Implement C++20 p1424 - 'constexpr' feature macro concerns,
431 Issue 3256 - Feature testing macro for constexpr algorithms,
432 and Issue 3257 - Missing feature testing macro update from P0858.
433 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
434 * include/bits/algorithmfwd.h: Ditto.
435 * include/std/utility: Ditto.
436 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
437 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
438 __cpp_lib_constexpr macro in <algorith>.
439 * testsuite/20_util/exchange/constexpr.cc: Add check for
440 __cpp_lib_constexpr macro in <utility>.
441 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
442 __cpp_lib_constexpr_algorithms.
443 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
444 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
445 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
446 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
447 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
448 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
449 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
450 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
451 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
452 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
453 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
454 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
455 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
456 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
457 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
458 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
459 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
460 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
461 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
462 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
463 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
464 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
465 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
466 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
467 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
468 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
469 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
470 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
471 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
472 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
473 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
474 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
475 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
476 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
477 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
478 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
479 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
480 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
481 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
482 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
483 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
484 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
485 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
486 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
487 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
488 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
489 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
490 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
491 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
492 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
493 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
494 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
495 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
497 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
499 Update docs for recent <span> and constexpr lib changes.
500 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
501 p1023r0, p1085r2 status.
502 * doc/html/manual/status.html: Regenerate.
504 2019-09-09 Antony Polukhin <antoshkka@gmail.com>
506 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
507 final offsets with constants.
509 2019-09-09 Jonathan Wakely <jwakely@redhat.com>
511 * include/bits/range_access.h (__adl_to_address): Remove.
512 * include/std/span (__is_base_derived_safe_convertible_v): Replace
513 with span::__is_compatible.
514 (__is_std_array_v): Replace with __is_std_array class template and
515 partial specializations.
516 (__is_std_array, __is_std_span): New class templates and partial
518 (span::__is_compatible): New alias template for SFINAE constraints.
519 (span::span(element_type (&)[N])): Remove redundant constraints. Do
520 not use __adl_data to obtain a pointer.
521 (span::span(array<value_type, N>&)): Likewise.
522 (span::span(const array<value_type, N>&)): Likewise.
523 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
524 (span::iter_value_t, span::derived_from): New alias templates for
525 SFINAE constraints, until the equivalents are supported in <concepts>
527 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
528 for SFINAE constraints.
529 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
531 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
532 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
533 Use std::to_address instead of __adl_to_address.
534 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
535 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
536 template for SFINAE constraints.
537 [!_GLIBCXX_P1394] (span::span(Container&))
538 (span::span(const Container&)): Improve constraints.
539 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
540 (span::span(pointer, pointer)): Remove redundant cast of pointer.
541 (span(const span<OType, OExtent>&)): New constructor.
543 2019-09-06 Jonathan Wakely <jwakely@redhat.com>
545 * include/bits/range_access.h (ssize): Define for C++20.
546 * testsuite/24_iterators/range_access_cpp20.cc: New test.
547 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
548 * doc/html/*: Regenerate.
550 2019-09-06 Florian Weimer <fweimer@redhat.com>
552 * configure: Regenerate.
554 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
556 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
557 P1024R3. Remove entry for P0920R2.
558 * include/std/span (__cpp_lib_span): Change value.
559 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
561 (span): Replace __extent_storage base class with data member.
562 (span::_S_subspan_extent): New function.
563 (span::empty()): Add nodiscard attribute.
564 (span::front, span::back, span::operator[]): Check preconditions.
565 (span::first, span::last, span::subspan): Add noexcept. Improve
566 precondition checks (LWG 3103).
567 (get): Remove redundant condition from static_assert.
568 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
569 (as_writable_bytes): Add inline specifier.
570 * include/std/version (__cpp_lib_span): Change value.
571 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
572 * testsuite/23_containers/span/front_neg.cc: Likewise.
573 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
574 * testsuite/23_containers/span/last_neg.cc: Improve test.
575 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
576 * testsuite/23_containers/span/1.cc: New test.
577 * testsuite/23_containers/span/2.cc: New test.
578 * testsuite/23_containers/span/back_assert_neg.cc: New test.
579 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
580 * testsuite/23_containers/span/first_assert_neg.cc: New test.
581 * testsuite/23_containers/span/first_neg.cc: New test.
582 * testsuite/23_containers/span/front_assert_neg.cc: New test.
583 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
584 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
585 * testsuite/23_containers/span/last_assert_neg.cc: New test.
586 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
587 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
588 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
589 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
590 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
591 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
593 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
595 * include/Makefile.am: Add <span> header.
596 * include/Makefile.in: Regenerate.
597 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
598 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
599 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
600 New functions for performing argument-dependent lookup of range
601 customization points.
602 * include/bits/stl_iterator.h (__normal_iterator): Add
603 _GLIBCXX20_CONSTEXPR to all functions.
604 * include/std/span: New header.
605 * include/std/version (__cpp_lib_span): Define feature test macro.
606 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
607 * testsuite/23_containers/span/everything.cc: New test.
608 * testsuite/23_containers/span/get_neg.cc: New test.
609 * testsuite/23_containers/span/last_neg.cc: New test.
610 * testsuite/23_containers/span/subspan_neg.cc: New test.
611 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
612 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
613 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
615 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
617 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
618 * doc/html/*: Regenerate.
620 2019-09-04 Mike Crowe <mac@mcrowe.com>
623 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
624 pthread_cond_clockwait function.
625 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
626 * configure: Regenerate.
627 * config.h.in: Regenerate.
628 * include/std/condition_variable: (condition_variable): Rename
629 __steady_clock_t typedef and add system_clock. Change __clock_t to be
630 a typedef for the preferred clock to convert arbitrary other clocks to.
631 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
633 (wait_until): Change __clock_t overload to use system_clock.
634 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
635 steady_clock overload that calls pthread_cond_clockwait.
636 (__wait_until_impl): Change __clock_t overload to use system_clock.
637 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
638 steady_clock for __clock_t if pthread_cond_clockwait is available.
640 2019-09-04 Mike Crowe <mac@mcrowe.com>
642 * testsuite/30_threads/condition_variable/members/2.cc (test01):
643 Parameterise so that test can be run against an arbitrary clock.
644 (main): Test using std::chrono::steady_clock and a user-defined
645 clock in addition to the previous std::chrono::system_clock.
646 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
648 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
650 * crossconfig.m4: Remove references to spu.
651 * configure: Regenerate.
652 * doc/xml/manual/appendix_contributing.xml: Remove references
653 to __ea as "badword" for spu.
654 * doc/html/manual/source_code_style.html: Regenerate.
655 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
656 to avoid __ea (as "badword" for spu).
657 (__ellint_rj): Likewise.
659 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
662 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
663 scanning to conform to the GNU Coding Standards.
664 * configure: Regenerate.
666 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
668 * src/c++17/memory_resource.cc: Use __constinit keyword.
670 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
672 * doc/xml/manual/abi.xml: Document 9.x library versions.
673 * doc/html/*: Regenerate.
675 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
677 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
678 (__detail::__to_chars_8_len): Remove.
679 (__detail::__to_chars_8): Inline length calculation here.
680 (__detail::__from_chars_binary): Use numeric_limits instead of
683 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
685 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
686 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
687 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
688 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
691 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
693 * testsuite_files/util/testsuite_performance.h
694 (resource_counter::start): Ignore unused malloc(0) result.
696 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
698 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
699 Model Object Technologies): Adjust name and link.
701 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
703 * include/std/charconv (__detail::__to_chars_8)
704 __detail::__to_chars_16): Replace array of precomputed digits with
705 arithmetic operations to avoid CPU cache misses. Remove zero
706 termination from array of digits to allow symbol merge with generic
707 implementation of __detail::__to_chars. Replace final offsets with
708 constants. Use __detail::__to_chars_len_2 instead of a generic
709 __detail::__to_chars_len.
710 (__detail::__to_chars): Remove zero termination from array of digits.
711 (__detail::__to_chars_2): Leading digit is always '1'.
713 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
715 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
717 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
719 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
721 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
724 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
725 to template parameters.
726 * include/bits/stl_uninitialized.h (uninitialized_copy)
727 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
728 diagnose invalid uses.
729 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
730 Adjust expected error.
731 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
733 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
735 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
737 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
739 * testsuite/23_containers/vector/cons/89164.cc: New test.
740 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
742 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
745 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
746 * configure: Regenerate.
747 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
749 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
751 * testsuite/util/testsuite_abi.cc: Add new symbol version.
753 2019-08-29 Jakub Jelinek <jakub@redhat.com>
755 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
756 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
758 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
760 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
761 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
762 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
763 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
764 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
765 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
766 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
768 2019-08-23 Joseph Myers <joseph@codesourcery.com>
770 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
771 (std::filesystem::__gnu_posix::lstat): Add return type.
773 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
775 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
777 * include/std/numeric (reduce): Fix Doxygen markup.
780 * include/std/type_traits (is_function): Simplify definition. Remove
781 partial specializations for function types.
782 (__is_referenceable): Simplify definition.
783 * testsuite/20_util/bind/91371.cc: New test.
784 * testsuite/20_util/is_function/91371.cc: New test.
785 * testsuite/20_util/is_function/value.cc: Check more pointer types.
786 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
787 * testsuite/20_util/is_object/91371.cc: New test.
789 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
791 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
793 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
796 * include/bits/std_function.h (__check_func_return_type): Remove.
797 (function::_Callable): Use std::__is_invocable_impl instead of
798 __check_func_return_type.
799 * include/std/type_traits (__is_invocable_impl): Add another defaulted
800 template parameter. Define a separate partial specialization for
801 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
802 with a check that models delayed temporary materialization.
803 * testsuite/20_util/function/91456.cc: New test.
804 * testsuite/20_util/is_invocable/91456.cc: New test.
806 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
808 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
810 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
812 Implement C++20 p0879 - Constexpr for swap and swap related functions.
813 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
814 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
816 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
817 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
818 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
819 * include/bits/move.h (swap): Add constexpr.
820 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
821 (__gcd, __rotate, rotate, __partition, __heap_select)
822 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
823 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
824 (__introselect, __chunk_insertion_sort, next_permutation)
825 (prev_permutation, partition, partial_sort, nth_element, sort)
826 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
827 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
828 (swap_ranges): Add constexpr.
829 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
830 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
832 * include/std/type_traits (swap): Add constexpr.
833 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
834 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
835 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
836 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
837 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
838 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
839 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
840 * testsuite/25_algorithms/partition/constexpr.cc: New test.
841 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
842 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
843 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
844 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
845 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
846 * testsuite/25_algorithms/sort/constexpr.cc: New test.
847 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
848 * testsuite/25_algorithms/swap/constexpr.cc: New test.
849 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
851 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
854 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
856 * include/std/tuple (__unpack_std_tuple): New variable template and
857 partial specializations.
858 (apply, make_from_tuple): Add noexcept-specifier.
859 * testsuite/20_util/tuple/apply/2.cc: New test.
860 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
862 2019-08-09 Corentin Gay <gay@adacore.com>
864 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
865 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
866 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
867 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
868 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
869 Add call to `VERIFY`.
871 2019-08-09 Alexandre Oliva <oliva@adacore.com>
874 (normal_mv_distribution::param_type::param_type): New private
875 ctor taking a decomposed varcov matrix, for use by...
876 (operator>>): ... this, befriended.
877 * include/ext/random.tcc (operator>>): Use it.
878 (normal_mv_distribution::param_type::_M_init_lower): Adjust
879 member function name in exception message.
881 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
883 P0325R4 to_array from LFTS with updates
884 * include/experimental/array (to_array): Qualify call to __to_array.
885 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
886 * include/std/version (__cpp_lib_to_array): Likewise.
887 * testsuite/23_containers/array/creation/1.cc: New test.
888 * testsuite/23_containers/array/creation/2.cc: New test.
889 * testsuite/23_containers/array/creation/3_neg.cc: New test.
890 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
891 Use zero for dg-error line number.
893 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
895 P1651R0 bind_front should not unwrap reference_wrapper
896 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
897 * include/std/version (__cpp_lib_bind_front): Update value.
898 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
900 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
902 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
903 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
904 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
905 specializations for __float128.
906 * testsuite/26_numerics/numbers/float128.cc: New test.
908 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
910 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
913 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
915 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
916 in <algorithm> and <utility> Headers.
917 Implement C++20 p1023 - constexpr comparison operators for std::array.
918 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
919 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
920 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
921 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
922 none_of, partition_copy, partition_point, remove, remove_if,
923 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
924 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
925 count_if, equal, find, find_first_of, find_if, for_each, generate,
926 generate_n, lexicographical_compare, merge, mismatch, replace,
927 replace_if, search, search_n, set_difference, set_intersection,
928 set_symmetric_difference, set_union, transform, unique_copy):
930 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
931 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
932 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
933 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
934 Use const ref instead of ref arg;
935 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
936 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
937 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
938 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
939 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
940 __iter_comp_iter): Mark constexpr.
941 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
942 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
943 none_of, any_of, find_if_not, is_partitioned, partition_point,
944 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
945 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
946 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
947 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
948 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
949 __equal_range, equal_range, binary_search, __includes, includes,
950 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
951 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
952 is_sorted_until, __is_permutation, is_permutation, for_each, find,
953 find_if, find_first_of, adjacent_find, count, count_if, search,
954 search_n, transform, replace, replace_if, generate, generate_n,
955 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
956 set_intersection, __set_difference, set_difference,
957 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
958 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
959 wrappers around __builtin_memmove and __builtin_memcmp
961 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
962 copy, move, __copy_move_b, __copy_move_backward_a,
963 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
964 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
965 __lexicographical_compare_impl, __lexicographical_compare,
966 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
967 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
968 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
969 is_heap): Mark constexpr.
970 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
971 is_heap): Mark constexpr.
972 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
973 * include/std/array: Make comparison ops constexpr.
974 * include/std/utility: Make exchange constexpr.
975 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
976 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
977 * testsuite/23_containers/array/tuple_interface/
978 tuple_element_neg.cc: Adjust.
979 * testsuite/20_util/exchange/constexpr.cc: New.
980 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
981 * testsuite/25_algorithms/constexpr_macro.cc: New.
982 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
983 * testsuite/25_algorithms/all_of/constexpr.cc: New.
984 * testsuite/25_algorithms/any_of/constexpr.cc: New.
985 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
986 * testsuite/25_algorithms/copy/constexpr.cc: New.
987 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
988 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
989 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
990 * testsuite/25_algorithms/count/constexpr.cc: New.
991 * testsuite/25_algorithms/count_if/constexpr.cc: New.
992 * testsuite/25_algorithms/equal/constexpr.cc: New.
993 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
994 * testsuite/25_algorithms/fill/constexpr.cc: New.
995 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
996 * testsuite/25_algorithms/find/constexpr.cc: New.
997 * testsuite/25_algorithms/find_end/constexpr.cc: New.
998 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
999 * testsuite/25_algorithms/find_if/constexpr.cc: New.
1000 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
1001 * testsuite/25_algorithms/for_each/constexpr.cc: New.
1002 * testsuite/25_algorithms/generate/constexpr.cc: New.
1003 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
1004 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
1005 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
1006 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
1007 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
1008 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
1009 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
1010 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
1011 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
1012 * testsuite/25_algorithms/merge/constexpr.cc: New.
1013 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
1014 * testsuite/25_algorithms/none_of/constexpr.cc: New.
1015 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
1016 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
1017 * testsuite/25_algorithms/remove/constexpr.cc: New.
1018 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
1019 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
1020 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
1021 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
1022 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
1023 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
1024 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
1025 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
1026 * testsuite/25_algorithms/search/constexpr.cc: New.
1027 * testsuite/25_algorithms/search_n/constexpr.cc: New.
1028 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
1029 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
1030 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
1031 * testsuite/25_algorithms/set_union/constexpr.cc: New.
1032 * testsuite/25_algorithms/transform/constexpr.cc: New.
1033 * testsuite/25_algorithms/unique/constexpr.cc: New.
1034 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
1035 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
1037 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
1039 * include/std/memory (make_obj_using_allocator): Qualify call to
1040 uses_allocator_construction_args.
1042 P0631R4 Math Constants
1043 * include/Makefile.am: Add new header.
1044 * include/Makefile.in: Regenerate.
1045 * include/precompiled/stdc++.h: Include new header.
1046 * include/std/numbers: New header.
1047 * include/std/version (__cpp_lib_math_constants): Define.
1048 * testsuite/26_numerics/numbers/1.cc: New test.
1049 * testsuite/26_numerics/numbers/2.cc: New test.
1050 * testsuite/26_numerics/numbers/3.cc: New test.
1051 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
1053 * include/std/bit: Add Doxygen comments.
1056 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
1057 constraints on deleter that should only apply to the constructor.
1058 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
1059 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
1060 constraints on deleter here.
1061 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
1063 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
1066 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
1068 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
1070 * testsuite/18_support/51333.cc: New test.
1072 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
1074 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
1075 to the Doxygen manual. Avoid a "here" link on the way.
1076 Fix another broken link to Doxygen docblocks.
1078 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
1080 * include/std/bit (__cpp_lib_endian): Define.
1081 * include/std/version (__cpp_lib_endian): Define.
1082 * testsuite/26_numerics/endian/2.cc: New.
1083 * testsuite/26_numerics/endian/3.cc: New.
1084 * testsuite/26_numerics/endian/4.cc: New.
1086 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
1088 * testsuite/util/testsuite_iterators.h
1089 (bidirectional_iterator_wrapper): Fix type comment.
1090 (random_access_iterator_wrapper): Likewise.
1092 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
1094 * include/std/bit (endian): Move definition here as per P1612R1.
1095 * include/std/type_traits (endian): Remove definition from here.
1096 * testsuite/20_util/endian/1.cc: Rename to ...
1097 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
1099 2019-07-25 Martin Liska <mliska@suse.cz>
1100 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1103 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
1104 -fno-allocation-dce.
1105 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
1106 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
1107 * testsuite/ext/new_allocator/check_new.cc: Likewise.
1109 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
1111 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
1112 * testsuite/26_numerics/bit/bit.count/*: Here.
1114 * include/std/bit (__rotl, __rotr): Change second parameter from
1115 unsigned int to int and handle negative values.
1116 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
1117 parameter from unsigned int to int. Add nodiscard attribute.
1118 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
1119 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
1121 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
1122 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
1125 * include/std/bit (__ceil2): Make unrepresentable results undefined,
1126 as per P1355R2. Add debug assertion. Perform one left shift, not two,
1127 so that out of range values cause undefined behaviour. Ensure that
1128 shift will still be undefined if left operand is promoted.
1129 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
1130 unrepresentable values with checks that they are not core constant
1132 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
1134 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
1136 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
1137 sized deallocation size computation.
1139 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
1141 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
1143 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
1145 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
1146 (~_Temporary_buffer()): Use latter.
1147 (_Temporary_buffer(_FIterator, size_type)): Likewise.
1149 2019-07-17 Andreas Schwab <schwab@suse.de>
1151 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1153 2019-07-16 Jason Merrill <jason@redhat.com>
1155 * include/std/memory (uses_allocator_construction_args): Add parens
1158 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
1160 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
1162 * include/experimental/string_view (__detail::__idt): Remove.
1163 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1164 Use __type_identity_t instead of __detail::__idt;
1165 * include/std/string_view (__detail::__idt): Remove.
1166 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1167 Use __type_identity_t instead of __detail::__idt;
1168 * include/std/type_traits (__type_identity_t): New alias template.
1170 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
1171 and floating point atomics.
1173 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
1175 * doc/xml/manual/configure.xml: Improve documentation of
1176 --enable-libstdcxx-time option.
1178 * include/bits/atomic_base.h (__atomic_impl): New namespace for
1179 wrappers around atomic built-ins.
1180 (__atomic_float, __atomic_ref): New class templates for use as base
1182 * include/std/atomic (atomic<float>, atomic<double>)
1183 (atomic<long double>): New explicit specializations.
1184 (atomic_ref): New class template.
1185 (__cpp_lib_atomic_ref): Define.
1186 * include/std/version (__cpp_lib_atomic_ref): Define.
1187 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
1188 * testsuite/29_atomics/atomic_float/1.cc: New test.
1189 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
1190 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
1191 * testsuite/29_atomics/atomic_ref/float.cc: New test.
1192 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
1193 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
1194 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
1195 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
1197 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
1199 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
1200 throw() with _GLIBCXX_NOTHROW.
1201 (__atomic_add_dispatch): Return after performing atomic increment.
1203 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
1205 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
1206 (__exchange_and_add): Replace static specifier with always_inline
1208 (__exchange_and_add_single, __atomic_add_single): Likewise.
1209 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
1210 combine !__gthread_active_p() and !__GTHREADS branches.
1212 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
1215 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
1216 * configure: Regenerate.
1217 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
1219 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
1220 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1222 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
1224 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
1225 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
1226 instead of __is_identifier to detect Clang support.
1228 2019-07-02 Jim Wilson <jimw@sifive.com>
1230 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
1232 * configure: Regenerate.
1234 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
1237 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
1238 for the what_arg parameters.
1239 (filesystem_error::filesystem_error): Pass system_error::what() to
1240 the _Impl constructor.
1241 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
1242 filesystem_error::what() contains system_error::what().
1244 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
1246 * include/std/charconv (chars_format): Define bitmask type.
1247 * testsuite/20_util/to_chars/chars_format.cc: New test.
1249 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
1250 * include/std/bit (_If_is_unsigned_integer_type): Remove.
1251 (_If_is_unsigned_integer): Use __is_unsigned_integer.
1252 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
1253 (countl_one(byte), countr_zero(byte), countr_one(byte))
1254 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
1255 (log2p1(byte)): Remove.
1256 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
1257 (__detail::__is_int_to_chars_type): Remove.
1258 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
1259 and __is_unsigned_integer.
1260 * include/std/type_traits (__is_one_of): Move here from <charconv>.
1261 (__is_signed_integer, __is_unsigned_integer): New helpers.
1262 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
1264 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
1265 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
1266 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
1267 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
1268 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
1269 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
1270 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
1271 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
1272 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
1273 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
1275 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
1277 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
1280 2019-06-25 Jakub Jelinek <jakub@redhat.com>
1282 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
1283 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
1284 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
1285 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
1287 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
1289 * include/std/numeric (midpoint(T, T)): Change implementation for
1290 floating-point types to avoid incorrect rounding of denormals.
1291 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
1292 rounding with denormals.
1293 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
1294 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1296 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
1298 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
1300 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
1302 * configure: Regenerate.
1304 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
1305 Qualify calls to __never_valueless.
1307 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
1308 C++17 working draft.
1310 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
1311 vector<bool> for test.
1312 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1314 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1316 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
1318 (istream_iterator::_M_read()): Do not check stream state before
1319 attempting extraction. Set stream pointer to null when extraction
1321 (operator==(const istream_iterator&, const istream_iterator&)): Change
1322 to be a hidden friend of istream_iterator.
1323 (operator!=(const istream_iterator&, const istream_iterator&)):
1325 (ostream_iterator::ostream_iterator()): Add default constructor.
1326 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
1328 * testsuite/24_iterators/istream_iterator/1.cc: New test.
1329 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
1330 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
1331 constructor taking a string.
1332 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
1335 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
1336 Jonathan Wakely <jwakely@redhat.com>
1339 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
1340 values of type bool for vector<bool> elements.
1341 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
1342 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1344 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1346 PR libstdc++/90920 partially revert r263433
1347 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
1348 (rotate): Remove checks.
1349 * testsuite/25_algorithms/rotate/90920.cc: New test.
1351 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
1352 category used in invocable check.
1353 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
1354 * testsuite/26_numerics/reduce/2.cc: New test.
1356 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
1358 * include/bits/algorithmfwd.h: Change title of doc group.
1359 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
1361 * include/bits/stl_numeric.h: Define doc group and add algos to it.
1362 * include/std/numeric (__is_random_access_iter): New internal trait.
1363 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
1364 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
1365 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
1366 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
1367 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
1368 * testsuite/26_numerics/reduce/1.cc: New test.
1369 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
1370 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
1371 * testsuite/26_numerics/transform_reduce/1.cc: New test.
1372 * testsuite/util/testsuite_iterators.h (test_container::size()): New
1375 * include/c_global/cstddef (std::byte): Perform arithmetic operations
1376 in unsigned int to avoid promotion (LWG 2950).
1378 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1380 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
1383 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
1385 PR libstdc++/90281 Fix string conversions for filesystem::path
1386 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1387 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
1388 __str_codecvt_in_all to fail for partial conversions and throw on
1390 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
1391 (path::_Cvt<char8_t>): Add explicit specialization.
1392 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
1394 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1395 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
1396 instead of codecvt_utf8. Use __str_codecvt_in_all and
1397 __str_codecvt_out_all.
1398 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1399 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1400 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1401 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1402 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
1403 after converting to UTF-8.
1404 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
1405 __str_codecvt_in_all.
1406 (path::string): Fix initialization of string types with different
1408 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1409 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1410 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
1412 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
1413 return false for partial conversions.
1414 * include/experimental/bits/fs_path.h (u8path):
1415 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
1416 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
1417 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
1418 instead of codecvt_utf8. Use __str_codecvt_in_all and
1419 __str_codecvt_out_all.
1420 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1421 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1422 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1423 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1424 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
1425 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1426 __str_codecvt_in_all.
1427 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1428 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1429 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
1430 __str_codecvt_in_all.
1431 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
1432 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
1433 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
1434 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
1435 strings and with Unicode characters outside the basic multilingual
1437 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
1438 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
1439 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
1440 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
1441 * testsuite/experimental/filesystem/path/native/string.cc: Test with
1442 empty strings and with Unicode characters outside the basic
1445 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
1446 Jonathan Wakely <jwakely@redhat.com>
1448 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
1449 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
1450 deallocate node if insertion fails.
1451 (_Hashtable::_M_insert_multi_node): Likewise.
1452 (_Hashtable::_M_reinsert_node): Pass additional key argument.
1453 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
1454 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
1455 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
1456 (_Hashtable::extract(const _Key&)): Likewise.
1457 (_Hashtable::_M_merge_unique): Pass additional key argument.
1458 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
1460 (_Hashtable::_M_insert): Likewise.
1461 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
1462 (_Hashtable_alloc): Add comments to functions with misleading names.
1464 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1466 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
1468 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
1469 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
1470 header for std::allocator.
1471 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
1472 using-declaration for std::size_t.
1473 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
1475 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
1477 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
1478 * testsuite/experimental/map/erasure.cc: Include <string> for
1480 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
1482 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
1484 * include/experimental/type_traits (experimental::nonesuch): Use
1485 pragma to disable -Wctor-dtor-privacy warnings.
1486 * include/std/type_traits (__is_convertible_helper<From, To, false>)
1487 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
1489 * include/std/version (__cpp_lib_bind_front): Add missing macro.
1491 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
1493 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
1494 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
1495 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
1496 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
1498 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
1499 (variant::emplace): Change static_assert messages from "should be"
1501 (hash<monostate>::operator()): Remove name of unused parameter.
1503 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
1506 * include/Makefile.am: Add new <bits/charconv.h> header.
1507 * include/Makefile.in: Regenerate.
1508 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
1509 (to_string(long), to_string(unsigned long), to_string(long long))
1510 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
1511 * include/bits/charconv.h: New header.
1512 (__detail::__to_chars_len): Move here from <charconv>.
1513 (__detail::__to_chars_10_impl): New function extracted from
1514 __detail::__to_chars_10.
1515 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
1516 (__to_chars_unsigned_type): New class template that reuses
1517 __make_unsigned_selector_base::__select to pick a type.
1518 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
1519 (__detail::__to_chars_len): Move to new header.
1520 (__detail::__to_chars_10): Add inline specifier. Move code doing the
1521 output to __detail::__to_chars_10_impl and call that.
1522 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
1523 * testsuite/21_strings/basic_string/numeric_conversions/char/
1524 to_string.cc: Fix reference in comment. Remove unused variable.
1525 * testsuite/21_strings/basic_string/numeric_conversions/char/
1526 to_string_int.cc: New test.
1528 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1530 Fix ConstexprIterator requirements tests - No constexpr algorithms!
1531 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1532 Replace copy with hand-rolled loop.
1533 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1536 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
1538 Test for C++20 p0858 - ConstexprIterator requirements.
1539 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1541 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1544 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
1546 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
1548 * include/bits/c++config: Rename all macros of the form __PSTL* to
1550 * include/std/algorithm: Likewise.
1551 * include/std/execution: Likewise.
1552 * include/std/numeric: Likewise.
1553 * include/std/memory: Likewise.
1554 * include/pstl/glue_memory_impl.h: Likewise.
1555 * include/pstl/numeric_impl.h: Likewise.
1556 * include/pstl/glue_memory_defs.h: Likewise.
1557 * include/pstl/execution_defs.h: Likewise.
1558 * include/pstl/utils.h: Likewise.
1559 * include/pstl/algorithm_fwd.h: Likewise.
1560 * include/pstl/unseq_backend_simd.h: Likewise.
1561 * include/pstl/glue_execution_defs.h: Likewise.
1562 * include/pstl/algorithm_impl.h: Likewise.
1563 * include/pstl/parallel_impl.h: Likewise.
1564 * include/pstl/memory_impl.h: Likewise.
1565 * include/pstl/glue_numeric_defs.h: Likewise.
1566 * include/pstl/parallel_backend_utils.h: Likewise.
1567 * include/pstl/glue_algorithm_defs.h: Likewise.
1568 * include/pstl/parallel_backend.h: Likewise.
1569 * include/pstl/glue_numeric_impl.h: Likewise.
1570 * include/pstl/parallel_backend_tbb.h: Likewise.
1571 * include/pstl/numeric_fwd.h: Likewise.
1572 * include/pstl/glue_algorithm_impl.h: Likewise.
1573 * include/pstl/execution_impl.h: Likewise.
1574 * include/pstl/pstl_config.h: Likewise.
1575 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1576 * testsuite/util/pstl/test_utils.h: Likewise.
1577 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
1579 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
1581 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
1583 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
1584 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
1585 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
1586 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
1587 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
1589 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
1590 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
1591 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
1592 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
1593 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
1595 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
1596 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
1597 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
1598 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
1599 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
1601 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
1602 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
1603 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
1605 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
1607 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
1608 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
1609 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
1611 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
1613 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
1615 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
1617 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
1619 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
1621 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
1623 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
1625 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
1627 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
1629 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
1631 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
1633 Rename header guards to be consistent with upstream project's
1635 * include/pstl/glue_memory_impl.h: Rename all macros of the form
1636 _PSTL_(.*)_H to _PSTL_\U\1_H.
1637 * include/pstl/numeric_impl.h: Likewise.
1638 * include/pstl/glue_memory_defs.h: Likewise.
1639 * include/pstl/execution_defs.h: Likewise.
1640 * include/pstl/utils.h: Likewise.
1641 * include/pstl/algorithm_fwd.h: Likewise.
1642 * include/pstl/unseq_backend_simd.h: Likewise.
1643 * include/pstl/glue_execution_defs.h: Likewise.
1644 * include/pstl/algorithm_impl.h: Likewise.
1645 * include/pstl/parallel_impl.h: Likewise.
1646 * include/pstl/memory_impl.h: Likewise.
1647 * include/pstl/glue_numeric_defs.h: Likewise.
1648 * include/pstl/parallel_backend_utils.h: Likewise.
1649 * include/pstl/glue_algorithm_defs.h: Likewise.
1650 * include/pstl/parallel_backend.h: Likewise.
1651 * include/pstl/glue_numeric_impl.h: Likewise.
1652 * include/pstl/parallel_backend_tbb.h: Likewise.
1653 * include/pstl/numeric_fwd.h: Likewise.
1654 * include/pstl/glue_algorithm_impl.h: Likewise.
1655 * include/pstl/execution_impl.h: Likewise.
1656 * include/pstl/pstl_config.h: Likewise.
1657 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1659 Synchronize libstdc++ parallel algorithms with upstream
1661 * include/pstl/algorithm_fwd.h: Synchronize with
1662 upstream PSTL project.
1663 * include/pstl/algorithm_impl.h: Likewise.
1664 * include/pstl/execution_defs.h: Likewise.
1665 * include/pstl/execution_impl.h: Likewise.
1666 * include/pstl/glue_algorithm_impl.h: Likewise.
1667 * include/pstl/glue_execution_defs.h: Likewise.
1668 * include/pstl/numeric_fwd.h: Likewise.
1669 * include/pstl/numeric_impl.h: Likewise.
1670 * include/pstl/parallel_backend.h: Likewise.
1671 * include/pstl/pstl_config.h: Likewise.
1672 * include/pstl/unseq_backend_simd.h: Likewise.
1673 * include/pstl/parallel_backend_serial.h: New file.
1674 * include/Makefile.am (pstl_headers): Add
1675 parallel_backend_serial.h.
1676 * include/Makefile.in: Regenerate.
1678 Clean up non-conforming names
1679 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1680 Uglfiy copy_range1 and copy_range2
1681 (__pattern_walk2_n): Rename local n to __n
1682 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1683 Rename parameter _T to _Tp.
1685 Integrate non-TBB serial backend support
1686 * include/bits/c++config: Adjust TBB detection logic to select serial
1687 PSTL backend if no TBB present.
1688 * testsuite/utils/pstl/test_utils.h: Remove check for
1689 _PSTL_USE_PAR_POLICIES
1691 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1693 * testsuite/24_iterators/container_access.cc: Move dg-options before
1694 dg-do directive so the target check uses the -std option.
1697 * configure: Regenerate.
1698 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1699 * src/Makefile.in: Regenerate.
1701 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1703 * include/std/array: Do not include <stdexcept>.
1704 * include/std/optional: Include <exception> and
1705 <bits/exception_defines.h> instead of <stdexcept>.
1706 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1708 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1710 * testsuite/23_containers/map/erasure.cc: Include <string>.
1711 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1713 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1714 dg-prune-output for different C++98 diagnostic.
1715 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1717 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1719 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1721 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1723 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1725 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1727 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1729 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1731 * testsuite/23_containers/vector/requirements/dr438/
1732 constructor_1_neg.cc: Likewise.
1733 * testsuite/23_containers/vector/requirements/dr438/
1734 constructor_2_neg.cc: Likewise.
1735 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1737 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1739 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1740 Do not test allocator rebinding extension for C++2a.
1741 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1742 dg-do directive for C++17 and C++2a.
1744 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1745 1_c++0x.cc: Remove redundant test.
1746 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1747 2.cc: Use target selector instead of preprocessor condition.
1748 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1749 3.cc: Do not run test for C++2a.
1750 * testsuite/23_containers/forward_list/requirements/
1751 explicit_instantiation/3.cc: Likewise.
1752 * testsuite/23_containers/forward_list/requirements/
1753 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1755 * testsuite/23_containers/list/requirements/explicit_instantiation/
1756 1_c++0x.cc: Remove redundant test.
1757 * testsuite/23_containers/list/requirements/explicit_instantiation/
1758 2.cc: Use target selector instead of preprocessor condition.
1759 * testsuite/23_containers/list/requirements/explicit_instantiation/
1760 3.cc: Do not run test for C++2a.
1761 * testsuite/23_containers/list/requirements/explicit_instantiation/
1762 5.cc: Do not test allocator rebinding extension for C++2a.
1763 * testsuite/23_containers/map/requirements/explicit_instantiation/
1764 1_c++0x.cc: Remove redundant test.
1765 * testsuite/23_containers/map/requirements/explicit_instantiation/
1766 2.cc: Adjust comment.
1767 * testsuite/23_containers/map/requirements/explicit_instantiation/
1768 3.cc: Do not run test for C++2a.
1769 * testsuite/23_containers/map/requirements/explicit_instantiation/
1770 5.cc: Do not test allocator rebinding extension for C++2a.
1771 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1772 1_c++0x.cc: Remove redundant test.
1773 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1774 3.cc: Do not run test for C++2a.
1775 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1776 5.cc: Do not test allocator rebinding extension for C++2a.
1777 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1778 3.cc: Do not run test for C++2a.
1779 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1780 5.cc: Do not test allocator rebinding extension for C++2a.
1781 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1782 Do not run test for C++2a.
1783 * testsuite/23_containers/set/requirements/explicit_instantiation/
1784 1_c++0x.cc: Remove redundant test.
1785 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1786 Do not test allocator rebinding extension for C++2a.
1787 * testsuite/23_containers/unordered_map/requirements/
1788 explicit_instantiation/3.cc: Likewise.
1789 * testsuite/23_containers/unordered_map/requirements/
1790 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1792 * testsuite/23_containers/unordered_multimap/requirements/
1793 explicit_instantiation/3.cc: Do not run test for C++2a.
1794 * testsuite/23_containers/unordered_multimap/requirements/
1795 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1797 * testsuite/23_containers/unordered_multiset/requirements/
1798 explicit_instantiation/3.cc: Do not run test for C++2a.
1799 * testsuite/23_containers/unordered_multiset/requirements/
1800 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1802 * testsuite/23_containers/unordered_set/requirements/
1803 explicit_instantiation/3.cc: Do not run test for C++2a.
1804 * testsuite/23_containers/unordered_set/requirements/
1805 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1807 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1808 2.cc: Remove redundant test.
1809 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1810 3.cc: Do not run test for C++2a.
1811 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1814 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1815 (is_abstract, is_aggregate): Remove static_assert.
1816 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1818 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1819 missing -std=gnu++17 option.
1820 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1821 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1822 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1825 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1826 * testsuite/18_support/set_unexpected.cc: Likewise.
1827 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1829 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1830 function to be valid in C++11.
1831 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1832 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1833 include Library Fundamentals or Networking headers in C++11 mode.
1834 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1836 * include/std/tuple (_TC): Replace with _TupleConstraints.
1837 (_TupleConstraints): New helper for SFINAE constraints, with more
1838 expressive member functions to reduce duplication when used.
1839 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1840 (tuple::_TCC): Replace dummy type parameter with bool non-type
1841 parameter that can be used to check the pack size.
1842 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1843 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1844 checking constraints in constructors.
1845 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1847 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1848 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1849 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1850 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1851 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1852 constraints in constructors.
1853 (tuple::__is_alloc_arg()): New SFINAE helpers.
1854 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1856 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1857 * testsuite/20_util/tuple/cons/90700.cc: New test.
1858 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1859 to meet new constraint on allocator-extended default constructor.
1861 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1863 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1864 * include/bits/stl_multimap.h (multimap): Likewise.
1866 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1868 Rename variables and cleanup comments.
1869 * include/bits/hashtable_policy.h
1870 * include/bits/hashtable.h
1872 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1874 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1875 Fix bgcolor for P0340R3.
1876 * doc/html/*: Regenerate.
1879 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1880 <experimental/memory_resource>.
1881 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1882 P0339R6, P0340R3, P1164R1 and P1357R1.
1883 * doc/html/*: Regenerate.
1885 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1886 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1887 allocator::value_type assertion for C++2a.
1888 * include/bits/hashtable.h: Likewise.
1889 * include/bits/stl_deque.h: Likewise.
1890 * include/bits/stl_list.h: Likewise.
1891 * include/bits/stl_map.h: Likewise.
1892 * include/bits/stl_multimap.h: Likewise.
1893 * include/bits/stl_multiset.h: Likewise.
1894 * include/bits/stl_set.h: Likewise.
1895 * include/bits/stl_vector.h: Likewise.
1896 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1897 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1898 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1899 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1900 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1901 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1902 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1903 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1904 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1905 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1906 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1907 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1909 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1911 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1913 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1915 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1917 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1919 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1921 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1923 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1926 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1927 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1928 * libsupc++/eh_term_handler.h: New header defining
1929 _GLIBCXX_DEFAULT_TERM_HANDLER.
1930 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1931 (set_terminate): Restore default handler when argument is null.
1932 (set_unexpected): Likewise.
1933 * testsuite/18_support/set_terminate.cc: New test.
1934 * testsuite/18_support/set_unexpected.cc: New test.
1936 * include/backward/hashtable.h (size_t, ptrdiff_t)
1937 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1938 (distance, vector, pair, __iterator_category): Remove
1939 using-declarations that add these names to namespace __gnu_cxx.
1940 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1941 * include/ext/debug_allocator.h (size_t): Likewise.
1942 * include/ext/functional (size_t, unary_function, binary_function)
1943 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1945 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1946 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1947 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1948 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1949 * include/ext/numeric (iota): Fix outdated comment.
1950 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1951 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1952 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1953 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1954 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1956 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1957 (allocator, __true_type, __false_type): Likewise.
1959 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1962 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1963 New helpers for checking preconditions in traits.
1964 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1965 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1966 (is_destructible, is_nothrow_destructible, is_constructible)
1967 (is_default_constructible, is_copy_constructible)
1968 (is_move_constructible, is_nothrow_default_constructible)
1969 (is_nothrow_constructible, is_nothrow_copy_constructible)
1970 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1971 (is_nothrow_assignable, is_nothrow_copy_assignable)
1972 (is_nothrow_move_assignable, is_trivially_constructible)
1973 (is_trivially_copy_constructible, is_trivially_move_constructible)
1974 is_trivially_assignable, is_trivially_copy_assignable)
1975 (is_trivially_move_assignable, is_trivially_destructible)
1976 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1977 (is_invocable_r, is_nothrow_invocable)
1978 (has_unique_object_representations, is_aggregate): Add static_asserts
1979 to make sure that type traits are not misused with incomplete types.
1980 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1981 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1982 base characteristics without assertions that can be reused in other
1984 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1985 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1987 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1988 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1989 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1990 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1991 * testsuite/20_util/is_function/value.cc: Likewise.
1992 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1993 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1995 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1996 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1997 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1998 * testsuite/20_util/is_union/value.cc: Likewise.
1999 * testsuite/20_util/is_void/value.cc: Likewise.
2000 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
2002 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2004 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
2005 Add new private member function.
2006 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
2007 (random_device::_M_init_pretr1(const string&)): Call new private
2008 member with string data.
2009 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
2011 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
2012 test using COW strings.
2013 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
2014 a value from the device.
2015 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
2016 Fix typo in token string.
2018 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
2020 LWG2788 basic_string spurious use of a default constructible allocator
2021 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
2022 (basic_string::_M_replace_dispatch): Construct temporary string with
2023 the current allocator.
2024 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
2025 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
2027 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
2029 * doc/xml/manual/diagnostics.xml: Update list of headers that define
2031 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
2032 section about new/delete overloads. Improve section on verbose
2034 * doc/html/*: Regenerate.
2036 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
2037 P0811R3. Change status of P1353R0.
2038 * doc/html/*: Regenerate.
2040 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
2041 documentation of implementation-defined types for [thread.req.native].
2042 * doc/xml/manual/status_cxx2017.xml: Update documentation of
2043 implementation-defined strings for [variant.bad.access]. Fix typo in
2044 documentation of implementation-defined support for [fs.conform.9945].
2045 * doc/html/*: Regenerate.
2047 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
2050 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
2051 that fails on mingw-w64.
2054 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2055 (status(const path&, error_code&)): Use parent_path() to remove
2057 (symlink_status(const path&, error_code&)): Duplicate workaround for
2058 bug in _wstat for paths with trailing slash.
2059 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
2060 with trailing slash.
2061 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2062 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2064 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
2065 once instead of building it iteratively.
2067 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
2069 PR libstdc++/85494 use rdseed and rand_s in std::random_device
2070 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
2071 the assembler supports rdseed.
2072 * config.h.in: Regenerate.
2073 * configure: Regenerate.
2074 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
2075 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
2076 * doc/html/*: Regenerate.
2077 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
2078 * include/bits/random.h (random_device::random_device()): Always call
2079 _M_init rather than _M_init_pretr1.
2080 (random_device::random_device(const string&)): Likewise.
2081 (random_device::operator()()): Always call _M_getval().
2082 (random_device::_M_file): Replace first member of union with an
2083 anonymous struct, with _M_file as its first member.
2084 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
2085 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
2086 (USE_MT19937): Define if none of the above are defined.
2087 (USE_POSIX_FILE_IO): Define.
2088 (_M_strtoul): Remove.
2089 [USE_RDSEED] (__x86_rdseed): Define new function.
2090 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
2091 (random_device::_M_init(const string&)): Initialize new union members.
2092 Add support for "rdseed" and "rand_s" tokens. Decide what the
2093 "default" token does according to which USE_* macros are defined.
2094 [USE_POSIX_FILE_IO]: Store a file descriptor.
2095 [USE_MT19937]: Forward to _M_init_pretr1 instead.
2096 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
2097 code from _M_strtoul.
2098 [!USE_MT19937]: Call _M_init, transforming the old default token or
2099 numeric tokens to "default".
2100 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
2101 (random_device::_M_getval()): Use new union members to obtain a
2102 random number from the stored function pointer or file descriptor.
2103 [USE_MT19937]: Obtain a value from the mt19937 engine.
2104 (random_device::_M_getval_pretr1()): Call _M_getval().
2105 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
2107 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
2108 * testsuite/26_numerics/random/random_device/85494.cc: New test.
2110 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
2113 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
2114 _M_split_cmpts() for a path with multiple components.
2115 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
2116 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
2117 components and reserve space in vector. Return early when there is
2119 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
2120 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
2122 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
2123 form of std::equals for C++11 compatibility.
2125 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
2127 * doc/xml/manual/appendix_contributing.xml: Update pointer to
2128 C++ standard at ansi.org.
2130 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
2132 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
2133 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
2136 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
2137 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
2139 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2141 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
2143 * testsuite/20_util/function_objects/invoke/3.cc: New test.
2144 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2145 "compile" test to "run".
2147 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
2148 * doc/html/*: Regenerate.
2149 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
2150 rvalue aliasing constructor.
2151 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
2152 (reinterpret_pointer_cast): Add overloads taking rvalues.
2153 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
2154 Add rvalue aliasing constructor.
2155 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
2156 "run" and check return values as well as types.
2157 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
2158 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
2159 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
2160 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
2163 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
2164 * doc/xml/manual/intro.xml: Likewise.
2165 * include/std/future (__create_task_state): Add default arguments
2166 to make providing an allocator optional.
2167 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
2168 instead of delegating to another constructor.
2169 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
2170 define allocator-extended constructors for C++17 and later.
2171 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
2173 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
2174 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
2175 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
2177 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
2179 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
2180 Don't run the libstdc++/83237 part on simulator targets.
2182 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2184 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
2186 * doc/html/*: Regenerate.
2188 * include/experimental/any (__any_caster): Use RTTI if comparing
2189 addresses fails, to support non-unique addresses in shared libraries.
2190 * include/std/any (__any_caster): Likewise.
2193 * include/experimental/any (__any_caster): Constrain to only be
2194 callable for object types. Use remove_cv_t instead of decay_t.
2195 If the type decays or isn't copy constructible, compare the manager
2196 function to a dummy specialization.
2197 (__any_caster): Add overload constrained for non-object types.
2198 (any::_Manager_internal<_Op>): Add dummy specialization.
2199 * testsuite/experimental/any/misc/any_cast.cc: Test function types
2202 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
2205 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
2206 reversed arguments to uninitialized_copy_n.
2207 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
2208 is unchanged by copy assignment.
2209 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
2210 compare path components.
2213 * include/experimental/memory_resource: Add system header pragma and
2214 do not define anything unless compiled as C++14 or later.
2215 (__resource_adaptor_common::__guaranteed_alignment): Remove.
2216 (__resource_adaptor_imp::do_allocate): If the requested alignment
2217 is a fundamental alignment then either allocate directly from _M_alloc
2218 or call the new _M_allocate function.
2219 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
2220 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
2221 of the allocator rebound to a POD type with the specified alignment.
2222 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
2223 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2224 Adjust expected allocation sizes.
2225 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
2226 xfail for Solaris x86.
2228 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
2230 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
2231 * include/pstl/execution_defs.h (__enable_if_execution_policy):
2232 Use std::__remove_cvref_t when building with GCC.
2234 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
2237 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2238 Use "additional_flags" to pass -ltbb to v3_target_compile command.
2239 Use check_v3_target_prop_cached to cache the result of the test.
2241 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
2243 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2246 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2247 Changed v3_target_compile check from preprocess to executable.
2248 Added "-ltbb" to v3_target_compile flags.
2250 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2252 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2253 Add check for Thread Building Blocks 2018 or later.
2255 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2257 * testsuite/experimental/names.cc: Only include Networking TS headers
2258 on targets with the necessary Gthreads support.
2260 2019-05-20 Marek Polacek <polacek@redhat.com>
2262 CWG 2094 - volatile scalars are trivially copyable.
2264 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
2265 result for volatile int.
2267 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2269 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
2270 * testsuite/experimental/names.cc: Include <experimental/filesystem>
2273 PR c++/90532 Ensure __is_constructible(T[]) is false
2274 * include/std/type_traits (__do_is_default_constructible_impl)
2275 (__is_default_constructible_atom, __is_default_constructible_safe):
2277 (is_default_constructible): Use is_constructible.
2278 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
2279 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
2280 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
2281 * testsuite/20_util/is_trivially_default_constructible/value.cc:
2284 2019-05-20 Pádraig Brady <pbrady@fb.com>
2286 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
2287 to the deallocator with -fsized-deallocation.
2289 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2291 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
2292 test by passing correct alignment to deallocate function.
2294 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
2297 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2298 Raise exception if unique_ptr tuple member has unknown structure.
2299 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
2300 Adjust worker to support new __uniq_ptr_data base class. Do not
2301 assume field called _M_head_impl is the first tuple element.
2303 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2305 * include/bits/stl_deque.h
2306 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
2307 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
2308 (_Deque_base::_Deque_impl_data): New.
2309 (_Deque_base::_Deque_impl): Inherit latter.
2310 (_Deque_base::_Deque_impl::_M_swap_data): Move...
2311 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
2312 (_Deque_base::_Deque_impl()): Add noexcept qualification.
2313 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
2314 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
2315 (deque<>::deque()): Default.
2316 (deque<>::deque(deque&&)): Default.
2317 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
2318 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
2319 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
2320 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
2321 _M_range_initialize.
2322 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
2323 (deque<>::resize(size_type, const value_type&)): Share a single
2325 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
2326 _M_range_insert_aux.
2327 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
2328 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
2329 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
2330 * testsuite/23_containers/deque/allocator/default_init.cc: New.
2332 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
2335 * include/std/variant (holds_alternative, get, get_if): Improve
2336 static assertion messages.
2337 (bad_variant_access::bad_variant_access()): Change default message.
2338 (__throw_bad_variant_access(bool)): New overload.
2339 (get): Use new overload.
2340 (visit, visit<R>): Improve exception message.
2342 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
2343 targets. Add more cases from P0608R3.
2344 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
2346 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
2347 * include/experimental/type_traits (is_detected_exact)
2348 (is_detected_exact_v): Likewise.
2349 * include/pstl/execution_defs.h (is_execution_policy)
2350 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
2351 * include/pstl/execution_impl.h (__policy_traits): Likewise.
2352 * testsuite/17_intro/names.cc: Check for more non-reserved names.
2353 * testsuite/experimental/names.cc: New test.
2356 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
2357 assertions from the destructor.
2358 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
2359 Move static_assert for hash function to here.
2360 (_Hash_table_base::_M_equals): Move static_assert for equality
2362 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
2364 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
2365 the value directly instead of calling _S_value.
2366 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
2367 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
2368 _S_key(_Const_Link_type).
2369 * testsuite/23_containers/set/85965.cc: Check construction,
2370 destruction, assignment and size() do not trigger the assertions.
2371 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
2372 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
2374 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2375 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
2376 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2377 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2378 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2379 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2380 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2382 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
2383 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
2386 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
2388 * doc/html/*: Regenerate.
2389 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
2390 of decay_t (P0777R1).
2392 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2394 Move from state of allocators (LWG2593)
2395 * include/bits/stl_deque.h
2396 (_Deque_base(_Deque_base&&, false_type)): Remove.
2397 (_Deque_base(_Deque_base&&, true_type)): Remove.
2398 (_Deque_base(_Deque_base&&)): Adapt.
2399 (_Deque_base::_M_move_impl()): Remove.
2400 * testsuite/util/testsuite_allocator.h
2401 (propagating_allocator(propagating_allocator&&)): Preserve move from
2403 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
2405 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
2407 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
2408 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
2409 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
2411 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
2413 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
2414 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
2416 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
2418 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
2420 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
2422 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
2424 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
2426 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
2428 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
2431 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
2433 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
2434 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
2436 * include/std/variant (__overload_set): Remove.
2438 (_Build_FUN): New class template to define a single FUN overload,
2439 with specializations to prevent unwanted conversions, as per P0608R3.
2440 (_Build_FUNs): New class template to build an overload set of FUN.
2441 (_FUN_type): New alias template to perform overload resolution.
2442 (__accepted_type): Use integer_constant base for failure case. Use
2443 _FUN_type for successful case.
2444 (variant::__accepted_index): Use _Tp instead of _Tp&&.
2445 (variant::variant(_Tp&&)): Likewise.
2446 (variant::operator=(_Tp&&)): Likewise.
2448 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
2449 Replace raw visitation with a runtime check for the valueless state
2450 and a non-raw visitor.
2451 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
2452 (variant::index()): Remove branch.
2453 (variant::swap(variant&)): Use valueless_by_exception() instead of
2454 comparing the index to variant_npos, and add likelihood attribute.
2456 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
2457 (_Hashtable_base::_Equal_hash_code): Define new class template.
2458 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
2461 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
2462 Replace with _M_get non-static member function.
2463 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
2465 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
2466 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
2468 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
2469 _S_get accessors for members in EBO helpers.
2470 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
2471 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
2473 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
2475 (_Hashtable_base::_M_eq()): Remove non-const overload.
2477 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
2479 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
2481 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2483 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
2486 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2488 * config/os/solaris/solaris2.10: Move to ...
2489 * config/os/solaris: ... this.
2490 * configure.host (os_include_dir): Adapt.
2491 (abi_baseline_pair): Remove Solaris 10 handling.
2492 * config/abi/post/i386-solaris2.10: Remove.
2493 * config/abi/post/sparc-solaris2.10: Remove.
2494 * config/abi/post/i386-solaris2.11: Rename to ...
2495 * config/abi/post/i386-solaris: ... this.
2496 * config/abi/post/sparc-solaris2.11: Rename to ...
2497 * config/abi/post/sparc-solaris: ... this.
2499 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
2502 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
2505 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2507 * include/std/variant (__visit_with_index): Remove typedef.
2508 (__deduce_visit_result): New tag type.
2509 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
2510 visitation of possibly-valueless variants, forwarding to __do_visit
2511 with the relevant tag type.
2512 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
2513 and make lambda return void.
2514 (__variant_construct): Likewise.
2515 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
2516 __raw_idx_visit and make lambda return void.
2517 (_Multi_array::__untag_result): Add metafunction to check the function
2518 pointer type for a tag type that dictates the kind of visitation.
2519 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
2520 Use decltype(auto) instead of tagged function pointer type.
2521 (__gen_vtable_impl): Remove bool non-type parameter and unused
2522 _Variant_tuple parameter.
2523 (__gen_vtable_impl::__visit_invoke_impl): Remove.
2524 (__gen_vtable_impl::__do_visit_invoke): Remove.
2525 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
2526 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
2527 for the visit<R> case, rather than dispatching to separate functions.
2528 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
2530 (variant::swap): Likewise.
2531 (__do_visit): Replace two non-type template parameters with a single
2532 type parameter, so that the caller must specify the visitor's return
2533 type (or one of the tag types).
2534 (visit): Deduce a return type from the visitor and use the
2535 __deduce_visit_result tag to enforce that all overloads return the
2537 (visit<R>): Call __do_visit<R> with explicit result type.
2538 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
2541 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2543 nonesuch is insufficiently useless (lwg2996)
2544 * include/std/type_traits (struct __nonesuch): Added private base
2545 class to make __nonesuch not an aggregate and removed deleted default
2547 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
2548 (operator=(const pair&)): Use __nonesuch instead of
2549 __nonesuch_no_braces.
2550 (operator=(pair&&)): Likewise
2551 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
2552 of __nonesuch_no_braces.
2553 (operator=(tuple&&)): Likewise
2554 * include/experimental/type_traits (struct nonesuch): Added private
2555 base class to make nonesuch not an aggregate and removed deleted
2556 default constructor.
2557 * testsuite/20_util/nonesuch/nonesuch.cc: New.
2558 * testsuite/experimental/type_traits/nonesuch.cc: New.
2560 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2562 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
2563 (_Function_handler): Remove partial specializations for void return
2564 types and pointers to member.
2565 (_Function_handler::_M_manager): Adapt to removal of
2566 _Simple_type_wrapper.
2567 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
2568 * include/std/functional (_Bind_result::__enable_if_void)
2569 (_Bind_result::__disable_if_void): Remove sfinae helpers.
2570 (_Bind_result::__call): Use __invoke_r and remove overloads for void
2572 * include/std/future (__future_base::_Task_state::_M_run)
2573 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
2574 change return type of lambda expressions.
2576 * include/bits/invoke.h (__invoke_r): Define new function implementing
2577 the INVOKE<R> pseudo-function.
2578 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
2579 * testsuite/20_util/function_objects/invoke/2.cc: New test.
2581 * include/std/type_traits (__is_nt_convertible_helper): Define it
2582 unconditionally, not only for C++20.
2583 (__is_nothrow_convertible): Define internal trait for use in C++11.
2584 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
2585 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
2586 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
2587 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
2588 that has nothrow explicit conversion but potentially-throwing implicit
2590 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
2591 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
2592 function to only consider implicit conversions.
2593 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
2595 * include/std/iterator: Include <iosfwd> instead of <istream> and
2598 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
2599 Remove unused, non-standard function.
2601 * include/bits/regex.h (match_results::max_size()): Adjust return
2602 value to account for prefix/suffix/unmatched subs.
2603 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
2604 reset the contained sub matches.
2605 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
2606 function to set result state following a failed match.
2607 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
2608 sub_match states after _M_resize. Use _M_establish_failed_match.
2611 * include/std/thread (thread::_State_impl, thread::_S_make_state):
2612 Replace single _Callable parameter with variadic _Args pack, to
2613 forward them directly to the tuple of decayed copies.
2614 * testsuite/30_threads/thread/cons/69724.cc: New test.
2616 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2618 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
2619 * include/bits/basic_string.h: (operator=(const basic_string&):
2620 Move allocator decision to assign.
2621 (assign(const basic_string&)): Move allocator decision here.
2622 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2624 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2627 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2629 * testsuite/util/testsuite_allocator.h (memory_resource)
2630 (default_resource_mgr): Fix indentation.
2632 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
2633 Use operator-> to access raw pointer member.
2634 * testsuite/23_containers/vector/59829.cc: Likewise.
2635 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
2636 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
2637 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
2639 (PointerBase, PointerBase_void): Derive from NullablePointer and use
2640 its constructors and equality operators. Change converting
2641 constructors to use operator-> to access private member of the other
2643 (PointerBase_void::operator->()): Add, for access to private member.
2644 (operator-(PointerBase, PointerBase)): Change to hidden friend.
2645 (operator==(PointerBase, PointerBase)): Remove.
2646 (operator!=(PointerBase, PointerBase)): Remove.
2648 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
2649 not assume field called _M_head_impl is the first tuple element.
2650 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
2651 implementation more accurate.
2652 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
2653 empty pointer type and non-empty deleter.
2655 LWG 2899 - Make is_move_constructible correct for unique_ptr
2656 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
2657 move assignment operator.
2658 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
2659 (__uniq_ptr_data): New class template with conditionally deleted
2661 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
2662 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
2663 constructor and move assignment operator as defaulted.
2664 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
2665 __uniq_ptr_impl::release().
2666 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
2667 to __uniq_ptr_impl::reset(pointer).
2668 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2669 Check for new __uniq_ptr_data type.
2670 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
2672 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2674 PR libstdc++/90454.cc path construction from void*
2675 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2676 pointers to void are rejected as well as void.
2677 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2678 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2680 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2682 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2683 <remark> elements. Fix formatting of bibliography references.
2685 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2687 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2689 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2691 Remove Profile Mode, deprecated since 7.1.0
2692 * doc/Makefile.am: Remove XML file for profile mode docs.
2693 * doc/Makefile.in: Regenerate.
2694 * doc/xml/authors.xml: Remove authors of profile mode docs.
2695 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2697 * doc/xml/manual/debug.xml: Likewise.
2698 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2699 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2700 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2701 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2703 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2705 * doc/html/*: Regenerate.
2706 * include/Makefile.am: Remove profile mode headers.
2707 * include/Makefile.in: Regenerate.
2708 * include/bits/c++config (std::__profile): Remove namespace.
2709 [_GLIBCXX_PROFILE]: Remove checks for macro.
2710 * include/profile/array: Remove.
2711 * include/profile/base.h: Remove.
2712 * include/profile/bitset: Remove.
2713 * include/profile/deque: Remove.
2714 * include/profile/forward_list: Remove.
2715 * include/profile/impl/profiler.h: Remove.
2716 * include/profile/impl/profiler_algos.h: Remove.
2717 * include/profile/impl/profiler_container_size.h: Remove.
2718 * include/profile/impl/profiler_hash_func.h: Remove.
2719 * include/profile/impl/profiler_hashtable_size.h: Remove.
2720 * include/profile/impl/profiler_list_to_slist.h: Remove.
2721 * include/profile/impl/profiler_list_to_vector.h: Remove.
2722 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2723 * include/profile/impl/profiler_node.h: Remove.
2724 * include/profile/impl/profiler_state.h: Remove.
2725 * include/profile/impl/profiler_trace.h: Remove.
2726 * include/profile/impl/profiler_vector_size.h: Remove.
2727 * include/profile/impl/profiler_vector_to_list.h: Remove.
2728 * include/profile/iterator_tracker.h: Remove.
2729 * include/profile/list: Remove.
2730 * include/profile/map: Remove.
2731 * include/profile/map.h: Remove.
2732 * include/profile/multimap.h: Remove.
2733 * include/profile/multiset.h: Remove.
2734 * include/profile/ordered_base.h: Remove.
2735 * include/profile/set: Remove.
2736 * include/profile/set.h: Remove.
2737 * include/profile/unordered_base.h: Remove.
2738 * include/profile/unordered_map: Remove.
2739 * include/profile/unordered_set: Remove.
2740 * include/profile/vector: Remove.
2741 * scripts/run_doxygen: Do not process profile mode headers.
2742 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2744 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2745 Remove dg-skip-if for profile mode.
2746 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2747 preprocessor check for profile mode.
2748 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2749 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2751 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2753 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2754 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2755 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2756 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2757 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2759 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2761 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2763 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2765 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2766 preprocessor check for profile mode.
2767 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2769 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2770 Remove dg-skip-if for profile mode.
2771 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2772 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2773 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2774 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2775 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2776 * testsuite/Makefile.am: Remove profile_flags variable and
2777 * testsuite/Makefile.am: Remove profile_flags variable and
2778 check-profile target.
2779 * testsuite/Makefile.in: Regenerate.
2780 * testsuite/ext/profile/all.cc: Remove.
2781 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2782 * testsuite/ext/profile/profiler_algos.cc: Remove.
2783 * testsuite/ext/profile/replace_new.cc: Remove.
2784 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2785 preprocessor check for profile mode.
2786 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2787 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2788 (check_v3_target_normal_mode): Do not check for profile mode macro.
2789 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2791 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2792 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2793 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2794 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2795 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2796 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2797 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2798 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2799 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2800 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2802 Remove array_allocator extension, deprecated since 4.9.0
2803 * doc/xml/manual/allocator.xml: Remove documentation for
2805 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2806 * doc/xml/manual/using.xml: Remove header from documentation.
2807 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2808 * include/Makefile.in: Regenerate.
2809 * include/ext/array_allocator.h: Remove.
2810 * include/precompiled/extc++.h: Do not include removed header.
2811 * testsuite/ext/array_allocator/1.cc: Remove.
2812 * testsuite/ext/array_allocator/2.cc: Remove.
2813 * testsuite/ext/array_allocator/26875.cc: Remove.
2814 * testsuite/ext/array_allocator/3.cc: Remove.
2815 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2816 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2817 * testsuite/ext/array_allocator/check_new.cc: Remove.
2818 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2819 * testsuite/ext/headers.cc: Do not include removed header.
2821 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2823 * include/bits/stl_bvector.h
2824 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2826 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2828 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2830 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2832 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2834 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2836 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2838 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2840 (_Bit_iterator::operator-(difference_type)): Likewise.
2841 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2842 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2844 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2845 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2847 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2850 * testsuite/util/thread/all.h: Do not use remove_pointer for
2851 std::thread::native_handle_type.
2854 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2855 (_Variant_storage<true, Types...>::_M_reset()))
2856 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2857 (__get_storage): Likewise.
2858 (variant): Add noexcept to friend declarations for __get and
2862 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2863 Use _Require for constraints.
2864 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2866 (__uniq_ptr_hash): New base class with conditionally-disabled call
2868 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2869 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2870 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2872 * include/bits/shared_ptr.h: Improve docs.
2873 * include/bits/shared_ptr_base.h: Likewise.
2874 * include/bits/stl_uninitialized.h: Likewise.
2875 * include/bits/unique_ptr.h: Likewise.
2876 * libsupc++/new: Likewise.
2878 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2880 * include/bits/stl_deque.h
2881 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2883 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2885 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2887 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2889 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2891 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2893 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2895 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2897 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2900 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2901 (test01): Reserve for number of insertions to avoid rehash during test.
2902 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2904 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2909 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2911 * include/experimental/bits/fs_path.h: Improve docs.
2912 * include/experimental/bits/net.h: Fix wrong header name in comment.
2913 Do not document implementation details.
2914 * include/experimental/netfwd: Fix doxygen grouping.
2916 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2918 * include/bits/stl_pair.h: Improve docs.
2919 * include/std/tuple: Likewise.
2921 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2923 * include/std/chrono: Improve docs.
2924 * include/std/ratio: Do not document implementation details.
2925 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2927 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2930 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2931 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2932 (__duration_common_type): New helper.
2933 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2934 __duration_common_type.
2935 (__timepoint_common_type_wrapper): Replace with ...
2936 (__timepoint_common_type): New helper.
2937 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2938 Use __time_point_common_type.
2939 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2940 (__common_type_impl): If either argument is transformed by decay,
2941 use the common_type of the decayed types.
2942 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2943 decayed, use __do_common_type_impl to get the common_type.
2944 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2945 (__do_member_type_wrapper, __member_type_wrapper)
2946 (__expanded_common_type_wrapper): Remove.
2947 (__common_type_pack, __common_type_fold): New helpers.
2948 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2949 __member_type_wrapper and __expanded_common_type_wrapper.
2950 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2951 Test zero-length template argument list.
2952 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2953 Test single argument cases and argument types that should decay.
2954 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2955 Adjust expected error.
2956 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2958 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2959 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2960 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2962 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2964 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2966 Make allocator propagation more consistent for
2967 operator+(basic_string) (P1165R1)
2968 * include/bits/basic_string.h
2969 (operator+(basic_string&&, basic_string&&): Changed resulting
2970 allocator to always be the one from the first parameter.
2971 * include/bits/basic_string.tcc
2972 (operator+(const _CharT*, const basic_string&)): Changed
2973 resulting allocator to be SOCCC on the second parameter's allocator.
2974 (operator+(_CharT, const basic_string&)): Likewise.
2975 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2977 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2980 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2982 * include/bits/regex.h: Improve docs.
2983 * include/bits/regex.tcc: Do not document implementation details.
2985 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2987 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2989 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2990 Add type printer for container types in std::__debug namespace.
2991 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2992 (gdb-tests): Use distinct parameters for the type of test and use of
2994 (gdb-test): Check for regex test even if 'whatis' test.
2995 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2997 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2998 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2999 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3000 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3001 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3002 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3003 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3005 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
3007 * include/std/system_error (error_category): Fix comment.
3010 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
3011 argument is an empty path.
3012 (absolute(const path&, error_code&)): Use invalid_argument as error
3013 code instead of no_such_file_or_directory.
3014 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
3015 of non-existent paths and empty paths with both overloads of absolute.
3017 * include/std/system_error (error_category, error_code)
3018 (error_condition): Improve docs.
3019 * libsupc++/exception: Add missing @addtogroup Doxygen command.
3020 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
3021 to class documentation. Suppress documentation for implementation
3023 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
3024 Suppress documentation for implementation details.
3026 * include/std/system_error (error_code): Remove friend declaration
3027 for hash<error_code>.
3028 (hash<error_code>::operator()): Use public member functions to access
3030 (hash<error_condition>::operator()): Use address of category, not
3031 its object representation.
3032 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
3033 Use public member functions to access value and category.
3034 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
3036 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
3038 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
3039 * include/bits/hashtable_policy.h
3040 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
3041 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
3042 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
3043 smaller than input value rather than always greater. Preserve
3044 _M_next_resize if called with 0 input. Use __builtin_floorl.
3045 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
3046 elements + number of insertions is greater than _M_next_resize. Start
3047 with 11 buckets if not told otherwise. Use __builtin_floorl.
3048 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
3049 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
3050 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
3051 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
3052 told otherwise. Use __builtin_floorl.
3053 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
3054 to also validate _Power2_rehash_policy.
3055 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
3058 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
3061 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
3065 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
3066 overflow warning with -Wpedantic -Wsystem-headers.
3068 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
3071 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
3072 * include/bits/move.h (swap): Remove extra parentheses.
3074 * include/experimental/bits/lfts_config.h: Improve doc markup.
3075 * include/experimental/optional: Improve docs.
3076 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
3077 (__constexpr_addressof): Remove.
3078 (optional::operator->()): Use std::__addressof().
3079 * include/std/optional (optional::operator->()): Adjust whitespace.
3080 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
3081 that operator-> is still constexpr with overloaded operator&. Change
3082 to compile-only test.
3083 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
3086 * include/bits/shared_ptr.h: Improve docs.
3087 * include/bits/shared_ptr_atomic.h: Likewise.
3088 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
3090 * include/bits/basic_string.h: Fix iterator/index confusion in
3092 * include/bits/range_access.h: Fix Doxygen warnings.
3093 * include/bits/refwrap.h: Do not document implementation details.
3094 (ref, cref): Group docs with reference_wrapper.
3095 * include/std/fstream: Fix Doxygen markup.
3096 * libsupc++/initializer_list (begin, end): Group docs with
3099 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
3101 * include/bits/unique_lock.h: Fix/improve doxygen markup.
3102 * include/std/mutex: Likewise.
3103 * include/std/shared_mutex: Likewise.
3105 * include/bits/fs_dir.h: Fix/improve doxygen markup.
3106 * include/bits/fs_fwd.h: Likewise.
3107 * include/bits/fs_ops.h: Likewise.
3108 * include/bits/fs_path.h: Likewise.
3109 * include/std/filesystem: Likewise.
3111 * include/experimental/bits/net.h: Fix/improve doxygen markup.
3112 * include/experimental/buffer: Likewise.
3113 * include/experimental/executor: Likewise.
3114 * include/experimental/internet: Likewise.
3115 * include/experimental/io_context: Likewise.
3116 * include/experimental/net: Likewise.
3117 * include/experimental/netfwd: Likewise.
3118 * include/experimental/socket: Likewise.
3119 * include/experimental/timer: Likewise.
3121 * doc/doxygen/doxygroups.cc: Move description of experimental group
3123 * include/experimental/algorithm: Add to libfund-ts doc group.
3124 * include/experimental/any: Likewise. Do not document implementation
3126 * include/experimental/array: Add to libfund-ts doc group.
3127 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
3128 for Library Fundamentals.
3129 * include/experimental/chrono: Add to libfund-ts doc group.
3130 * include/experimental/deque: Likewise.
3131 * include/experimental/forward_list: Likewise.
3132 * include/experimental/functional: Likewise.
3133 * include/experimental/iterator: Likewise.
3134 * include/experimental/list: Likewise.
3135 * include/experimental/map: Likewise.
3136 * include/experimental/memory: Likewise.
3137 * include/experimental/memory_resource: Likewise. Improve docs.
3139 * include/experimental/numeric: Add to libfund-ts doc group.
3140 * include/experimental/optional: Likewise.
3141 * include/experimental/propagate_const: Likewise.
3142 * include/experimental/random: Likewise.
3143 * include/experimental/ratio: Likewise.
3144 * include/experimental/regex: Likewise.
3145 * include/experimental/set: Likewise.
3146 * include/experimental/source_location: Likewise.
3147 * include/experimental/string: Likewise.
3148 * include/experimental/string_view: Likewise.
3149 * include/experimental/system_error: Likewise.
3150 * include/experimental/tuple: Likewise.
3151 * include/experimental/type_traits: Likewise.
3152 * include/experimental/unordered_map: Likewise.
3153 * include/experimental/unordered_set: Likewise.
3154 * include/experimental/utility: Likewise.
3155 * include/experimental/vector: Likewise.
3156 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
3157 * testsuite/experimental/array/neg.cc: Adjust dg-error.
3158 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
3160 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
3161 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
3162 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
3163 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
3164 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
3166 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
3167 * include/experimental/bits/fs_fwd.h: Improve docs.
3168 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
3169 * include/experimental/bits/fs_path.h: Likewise.
3170 (path, filesystem_error, u8path): Improve docs.
3171 * include/experimental/filesystem: Link to docs for TS.
3173 * config/allocator/new_allocator_base.h (__allocator_base): Add
3174 workaround for Doxygen bug #6945.
3175 * include/std/memory: Improve docs. Define group for pointer safety.
3176 * include/std/scoped_allocator: Improve docs. Use "undocumented"
3177 conditional to suppress documentation for implementation details.
3179 * include/bits/specfun.h: Improve docs.
3180 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
3183 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
3184 (std::experimental): Add docs.
3185 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
3186 namespace to nothing when generating docs.
3187 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
3188 * include/std/chrono (std::chrono): Likewise.
3189 * include/std/functional (std::placeholders): Likewise.
3190 * include/std/thread (std::this_thread): Likewise.
3192 * include/parallel/settings.h: Fix Doxygen markup.
3194 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
3195 anything unless PB_DS_CLASS_C_DEC is defined.
3196 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
3197 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
3198 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
3199 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
3200 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
3201 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
3202 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
3204 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
3205 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
3206 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
3207 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
3208 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
3209 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
3210 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
3211 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
3212 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
3213 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
3214 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
3216 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
3217 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
3219 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
3222 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
3223 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
3224 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
3227 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3229 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
3230 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
3231 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
3232 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
3233 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
3234 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
3236 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
3237 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
3240 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
3243 * include/std/complex (__complex_proj): Return parameter unchanged.
3244 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
3245 floating-point types to take std::complex arguments.
3246 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
3247 floating-point types.
3248 * testsuite/26_numerics/complex/proj.cc: New test.
3250 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3252 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
3253 to _Lock_policyE[012].
3254 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3256 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
3258 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
3259 macros accidentally left in.
3260 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
3261 unnecessary -lstdc++fs option. Fix test for mingw.
3262 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3265 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3267 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3269 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
3271 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
3273 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
3274 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
3277 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
3279 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
3282 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
3283 class template and partial specialization.
3286 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
3288 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
3289 functions to convert a value to an integral type.
3290 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
3291 (fill_n): Convert _Size parameter to an integral type.
3292 * testsuite/25_algorithms/fill_n/87982.cc: New test.
3293 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
3294 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
3295 * testsuite/25_algorithms/generate_n/87982.cc: New test.
3296 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
3297 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
3299 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
3301 Adding noexcept-specification on tuple constructors (LWG 2899)
3302 * libstdc++-v3/include/std/tuple:
3303 (tuple()): Add noexcept-specification.
3304 (tuple(const _Elements&...)): Likewise
3305 (tuple(_UElements&&...)): Likewise
3306 (tuple(const tuple<_UElements...>&)): Likewise
3307 (tuple(tuple<_UElements...>&&)): Likewise
3308 (tuple(const _T1&, const _T2&)): Likewise
3309 (tuple(_U1&&, _U2&&)): Likewise
3310 (tuple(const tuple<_U1, _U2>&): Likewise
3311 (tuple(tuple<_U1, _U2>&&): Likewise
3312 (tuple(const pair<_U1, _U2>&): Likewise
3313 (tuple(pair<_U1, _U2>&&): Likewise
3314 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
3316 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
3319 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
3320 arguments with __restrict.
3322 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
3324 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3326 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
3328 * include/experimental/bits/fs_path.h
3329 (path::_S_convert_loc<_InputIterator>): Create const std::string to
3330 avoid redundant call to _S_convert_loc with non-const pointers.
3332 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
3333 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
3334 * testsuite/21_strings/basic_string/hash/hash.cc
3335 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
3336 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
3337 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
3339 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
3340 wstring::_M_replace_dispatch with more specific patterns.
3341 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
3342 Create const std::string to avoid redundant call to _S_convert_loc
3343 with non-const pointers.
3344 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
3345 avoid unnecessary basic_string::assign instantiations.
3347 * include/std/memory (__uses_alloc_args): Add string-literal to
3348 static_assert, to match the one in __uses_alloc.
3349 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
3350 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
3351 for recursive uses-allocator construction of nested pairs.
3352 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
3355 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3357 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
3358 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
3359 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
3360 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
3362 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3363 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3364 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
3365 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3366 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3367 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3368 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3370 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
3373 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
3374 * include/std/scoped_allocator [__cplusplus > 201703L]
3375 (scoped_allocator_adaptor::construct): Define in terms of
3376 uses_allocator_construction_args, as per P0591R4.
3377 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
3378 * testsuite/util/testsuite_allocator.h: Remove name of unused
3381 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
3383 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
3384 * doc/html/*: Regenerate.
3386 * include/bits/fs_path.h (operator<, operator<=, operator>)
3387 (operator>=, operator==, operator!=): Make hidden friends, as per
3389 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
3390 string type in test.
3391 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3393 * include/std/any (any::any(ValueType&&)): Use __and_v.
3394 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
3397 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
3399 * include/std/type_traits (__result_of_memfun): Use remove_reference
3400 instead of __remove_cvref_t and remove redundant is_same check.
3401 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
3403 * include/experimental/string_view (basic_string_view::pointer)
3404 (basic_string_view::reference): Fix to refer to non-const value_type.
3405 * include/bits/basic_string.h (basic_string): Use __sv_check and
3406 __sv_limit instead of basic_string_view::_M_check and
3407 basic_string_view::_M_limit.
3408 * include/std/string_view (__sv_check, __sv_limit): New
3409 helper functions to replace basic_string_view::_M_check and
3410 basic_string_view::_M_limit.
3411 (basic_string_view): Add static assertions to enforce ill-formed
3412 requirement for traits_type::char_type from P1148R0, and to enforce
3413 required properties of char-like types.
3414 (basic_string_view::pointer, basic_string_view::reference): Fix to
3415 refer to non-const value_type.
3416 (basic_string_view::operator[], basic_string_view::at)
3417 (basic_string_view::front, basic_string_view::back)
3418 (basic_string_view::data): Use const_reference and const_pointer
3419 typedefs for return types.
3420 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
3421 (hash<wstring_view>): Fix argument_type typedef.
3422 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3423 char/1.cc: Fix expected return type of basic_string_view::data().
3424 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3425 wchar_t/1.cc: Likewise.
3426 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3427 char/1.cc: Likewise.
3428 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3429 wchar_t/1.cc: Likewise.
3430 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
3432 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3433 Check reference and pointer typedefs.
3434 * testsuite/experimental/string_view/requirements/typedefs.cc:
3436 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
3437 Fix expected return type of basic_string_view::data().
3438 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
3440 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
3442 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
3446 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
3447 Avoid a runtime check for types that can never be stored in std::any.
3448 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3451 PR libstdc++/90220 (partial)
3452 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
3453 not attempt ill-formed static_cast to pointers to non-object types.
3454 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3457 * testsuite/20_util/variant/run.cc: Catch exception by reference to
3458 prevent -Wcatch-value warning.
3460 * include/std/variant (__variant_construct): Use template parameter
3461 type instead of equivalent decltype-specifier.
3462 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
3463 Replace forward with move.
3464 (_Move_ctor_base<false, Types...>::_M_destructive_move)
3465 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
3466 (_Move_ctor_base<true, Types...>::_M_destructive_move)
3467 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
3468 index after construction succeeds.
3469 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
3470 if-constexpr checks that are always true. Use __remove_cvref_t instead
3471 of remove_reference so that is_nothrow_move_constructible check
3472 doesn't use a const rvalue parameter. In the potentially-throwing case
3473 construct a temporary and move assign it, as per LWG 2904.
3474 (_Move_assign_base<false, Types...>::operator=): Remove redundant
3475 if-constexpr checks that are always true. Use emplace as per LWG 2904.
3476 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
3477 construct a temporary and move assign from it, as per LWG 2904.
3478 * testsuite/20_util/variant/exception_safety.cc: Check that
3479 assignment operators have strong exception safety guarantee.
3481 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
3483 Document PSTL linker flags
3485 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
3487 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3489 * include/std/variant (__detail::__variant::_Traits): Make
3490 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
3491 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
3493 (__detail::__variant::_Copy_assign_alias): Only depend on
3494 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
3495 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
3496 move assignment operators.
3499 * include/std/variant (variant::__not_self): New helper for the
3500 is_same_v<remove_cvref_t<T>, variant>==false constraints.
3501 (variant::__to_type_impl): Remove.
3502 (variant::__to_type): Add default argument to check pack size, instead
3503 of using __to_type_impl.
3504 (variant::__accepted_type): Add default argument using __not_self.
3505 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
3506 for variant(T&&) constructor constraint.
3507 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
3508 Extract __accepted_type into a named template parameter for reuse in
3509 other constraints and in the exception specification.
3510 (variant::variant(in_place_type_t<T>, Args&&...))
3511 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
3512 (variant::variant(in_place_index_t<T>, Args&&...))
3513 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
3514 (variant::operator=T&&)): Remove redundant && from trait arguments.
3515 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
3516 isn't used for in_place_type or in_place_index arguments.
3518 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
3519 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
3520 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
3522 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3523 Bernd Edlinger <bernd.edlinger@hotmail.de>
3524 Jakub Jelinek <jakub@redhat.com>
3527 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
3528 general-regs-only target attribute for ARM.
3530 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3533 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
3534 specialization also depend on is_nothrow_move_constructible.
3535 * include/std/variant (__detail::__variant::__never_valueless()):
3536 Only true if the variant would have a move assignment operator.
3537 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
3538 Check __never_valueless<T...>().
3539 (variant::emplace): Only perform non-throwing move assignments
3540 for never-valueless alternatives if the variant has a move assignment
3542 * testsuite/20_util/variant/compile.cc: Check that never-valueless
3543 types can be emplaced into non-assignable variants.
3544 * testsuite/20_util/variant/run.cc: Check that never-valueless types
3545 don't get copied when emplaced into non-assignable variants.
3547 * include/std/variant (__detail::__variant::__ref_cast): Remove
3549 (__detail::__variant::_Uninitialized::_M_get)
3550 (__detail::__variant::__get)
3551 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
3553 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
3555 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
3557 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3558 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3559 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3560 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3562 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3564 Delegate PSTL configuration to pstl/pstl_config.h
3566 * include/bits/c++config: Remove explicit PSTL configuration
3567 macros and use definitions from <pstl/pstl_config.h>.
3569 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3571 Cleanup algorithm implementations
3572 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
3574 (mismatch): Forward execution policy.
3575 (equal): Qualify call to std::equal().
3576 (partial_sort): Forward execution policy.
3577 (inplace_merge): Forward execution policy.
3579 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
3581 Improve implementation of parallel equal()
3582 * include/pstl/algorithm_impl.h
3583 (__internal::__brick_equal): use "4 iterator" version of
3585 (__internal::__brick_equal): use simd for random access
3586 iterators on unsequenced execution policies.
3587 (__internal::__pattern_equal): add "4 iterator" version
3588 (__internal::__pattern_equal): dispatch to simd __brick_equal
3589 for vector-only execution policies.
3590 (__internal::__pattern_equal): dispatch to __parallel_or for
3591 parallel execution policies.
3592 * include/pstl/glue_algorithm_impl.h
3593 (std::equal): dispatch to "4 iterator" version of
3594 __internal::__pattern_equal().
3596 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
3599 * include/bits/forward_list.h (operator==): Do not use operator!= to
3601 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
3602 earlier in the list, so that sort is stable.
3603 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
3604 * testsuite/23_containers/forward_list/comparable.cc: Test with
3605 types that meet the minimum EqualityComparable and LessThanComparable
3606 requirements. Remove irrelevant comment.
3608 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
3609 Do not depend on whether all alternative types are move constructible.
3610 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
3611 from the operand when deciding whether to perform the assignment.
3612 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
3613 with deleted move constructor and deleted move assignment operator.
3614 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
3615 behaviour of variants with DeletedMoves as an alternative.
3616 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
3617 (move_ctor, move_assign): Check that moving a variant with a
3618 DeletedMoves alternative falls back to copying instead of moving.
3620 * testsuite/20_util/variant/compile.cc: Remove empty string literals
3621 from static_assert declarations.
3623 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
3624 actually match its name.
3625 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
3626 (test_swap()): Fix result for MoveCtorOnly and check
3627 MoveCtorAndSwapOnly.
3629 * include/std/optional (optional::value_or(U&&) &&): Add missing
3630 constexpr specifier.
3631 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
3632 for disengaged optionals and rvalue optionals.
3633 * testsuite/20_util/optional/observers/4.cc: Likewise.
3635 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
3637 * include/pstl/algorithm_impl.h: Uglify identfiers.
3638 * include/pstl/numeric_impl.h: Uglify identfiers.
3639 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
3641 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
3643 * include/bits/c++config:
3644 Add definition for __PSTL_ASSERT.
3645 Add definition for __PSTL_ASSERT_MSG.
3646 * include/pstl/algorithm_impl.h: Replace use of assert().
3647 * include/pstl/numeric_impl.h: Replace use of assert().
3648 * include/pstl/parallel_backend_tbb.h:
3649 Replace use of assert().
3650 Replace use of __TBB_ASSERT().
3651 * include/pstl/parallel_backend_utils.h: Replace use of assert().
3653 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
3656 * src/c++17/memory_resource.cc
3657 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
3658 needed to allow placing a _Chunk at the end of the buffer.
3659 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
3661 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
3663 * doc/xml/faq.xml: Add information about emergency EH pool.
3664 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
3665 Move outdated information on mt_allocator to a separate section.
3666 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
3667 doesn't affect the default allocator.
3669 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
3673 * testsuite/20_util/variant/89851.cc: New test.
3675 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3677 * include/std/variant: Adjust whitespace. Add comments.
3678 (_Multi_array): Leave primary template undefined.
3679 (_Multi_array<_Tp>): Define partial specialization for base case of
3681 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3682 which is always a reference.
3683 (__gen_vtable::_S_apply()): Remove function, inline body into
3684 default member initializer.
3685 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3687 * include/std/variant (__variant_idx_cookie): Add member type.
3688 (__visitor_result_type): Remove.
3689 (__do_visit): Use invoke_result instead of __visitor_result_type.
3690 * testsuite/20_util/variant/visit.cc: New test.
3693 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3695 * testsuite/20_util/variant/90008.cc: New test.
3697 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3699 * include/pstl/algorithm_impl.h: Add namespace qualification.
3700 * include/pstl/execution_defs.h: Add namespace qualification.
3701 * include/pstl/execution_impl.h: Add namespace qualification.
3702 * include/pstl/numeric_impl.h: Add namespace qualification.
3703 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3704 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3705 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3707 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3709 Fix visit<R> for variant.
3710 * include/std/variant (__do_visit): Add a template parameter
3711 for enforcing same return types for visit.
3712 (__gen_vtable_impl): Likewise.
3713 (_S_apply_single_alt): Adjust.
3714 (__visit_invoke_impl): New. Handle casting to void.
3715 (__do_visit_invoke): New. Enforces same return types.
3716 (__do_visit_invoke_r): New. Converts return types.
3717 (__visit_invoke): Adjust.
3718 (__gen_vtable): Add a template parameter for enforcing
3719 same return types for visit.
3720 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3721 different return types.
3722 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3723 visitors with different return types don't accidentally
3724 compile with regular visitation.
3726 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3728 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3729 dg-require-filesystem-ts.
3731 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3733 * doc/xml/manual/status_cxx2020.xml: Update status.
3734 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3735 * testsuite/20_util/variant/visit_r.cc: New test.
3737 * include/bits/fs_dir.h (directory_iterator::operator*)
3738 (directory_iterator::operator->): Add noexcept.
3739 (operator==, operator!=): Replace namespace-scope equality operators
3740 for directory iterators with hidden friends.
3743 * config/abi/pre/gnu.ver: Add missing exports.
3744 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3747 * config/abi/pre/gnu.ver: Export new symbols.
3748 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3749 (recursive_directory_iterator::recursion_pending())
3750 (recursive_directory_iterator::disable_recursion_pending()): Remove
3751 inline definitions. Make noexcept.
3752 (recursive_directory_iterator::depth())
3753 (recursive_directory_iterator::operator*())
3754 (recursive_directory_iterator::operator->()): Make noexcept.
3755 (recursive_directory_iterator::_M_options)
3756 (recursive_directory_iterator::_M_pending): Remove data members.
3757 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3758 (recursive_directory_iterator::recursive_directory_iterator): Remove
3759 ctor-initializer. Use new constructor for _Dir_stack.
3760 (recursive_directory_iterator::options())
3761 (recursive_directory_iterator::recursion_pending())
3762 (recursive_directory_iterator::disable_recursion_pending()): Add
3763 non-inline definitions.
3764 (recursive_directory_iterator::depth()): Make noexcept.
3765 (recursive_directory_iterator::increment(error_code&))
3766 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3767 location of options and recursion_pending members.
3768 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3769 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3770 user-declared move constructor and assignment operator, to make the
3773 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3774 d_type == DT_UNKNOWN immediately.
3775 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3777 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3779 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3781 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3782 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3785 PR libstdc++/87431 (again)
3786 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3787 Define partial specialization for basic_string.
3788 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3789 shared_ptr and weak_ptr.
3790 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3792 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3794 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3796 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3798 * include/std/any (_Never_valueless_alt): Define explicit
3799 specialization for any.
3800 * include/std/variant (_Never_valueless_alt): Define primary template.
3801 (__never_valueless): Use _Never_valueless_alt instead of
3802 is_trivially_copyable.
3803 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3804 initializations to avoid try-catch overhead. Add special case for
3805 scalars produced by potentially-throwing conversions. Use
3806 _Never_valueless_alt instead of is_trivially_copyable for the
3807 remaining strong exception-safety cases.
3808 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3809 * testsuite/20_util/variant/87431.cc: Run both test functions.
3810 * testsuite/20_util/variant/exception_safety.cc: New test.
3811 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3812 so the variant becomes valueless.
3814 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3817 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3819 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3821 * include/std/string (__hash_string_base): New class template defining
3822 operator() for hashing strings.
3823 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3824 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3825 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3826 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3828 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3830 Use single-visitation in variant assignment and swap and relops.
3831 Also use indices instead of types when checking whether
3832 variants hold the same thing.
3833 * include/std/variant (__do_visit): Add a template parameter
3834 for index visitation, invoke with indices if index visitation
3836 (__variant_idx_cookie): New.
3837 (__visit_with_index): Likewise.
3838 (_Copy_assign_base::operator=): Do single-visitation with
3840 (_Move_assign_base::operator=): Likewise.
3841 (_Extra_visit_slot_needed): Adjust.
3842 (__visit_invoke): Call with indices if it's an index visitor.
3843 (relops): Do single-visitation with an index visitor.
3845 (__visitor_result_type): New.
3847 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3849 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3851 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3853 Don't revisit a variant we are already visiting.
3854 * include/std/variant (__variant_construct_single): New.
3855 (__variant_construct): Use it.
3856 (_M_destructive_move): Likewise.
3857 (_M_destructive_copy): Likewise.
3858 (_Copy_assign_base::operator=): Adjust.
3859 (_Move_assign_base::operator=): Likewise.
3862 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3865 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3866 destructor so they are not evaluated until the _Key type is complete.
3867 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3868 * testsuite/23_containers/set/85965.cc: New test.
3869 * testsuite/23_containers/unordered_set/85965.cc: New test.
3870 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3871 with regexp matching the corresponding _Rb_tree specialization.
3872 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3873 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3874 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3875 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3876 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3877 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3878 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3880 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3883 Fix based on a suggestion by Antony Polukhin.
3884 * include/std/variant (__never_valueless): New.
3886 (_Extra_visit_slot_needed): New.
3887 (_Multi_array): Use it.
3888 (_S_apply_all_alts): Likewise.
3890 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3893 Fix based on a suggestion by Antony Polukhin.
3894 * include/std/variant (__gen_vtable): Don't reserve an
3895 additional table slot, _Multi_array already does that.
3897 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3900 Fix based on a suggestion by Antony Polukhin.
3901 * include/std/variant (__variant_construct): Capture a pointer
3902 to the storage and visit just one variant.
3904 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3906 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3907 Doxygen-generated pages with unstable URL.
3908 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3909 * doc/xml/manual/extensions.xml: Likewise.
3910 * doc/xml/manual/parallel_mode.xml: Likewise.
3911 * doc/xml/manual/support.xml: Likewise.
3913 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3914 avoid -Wconversion warnings.
3916 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3918 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3919 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3920 (allstamped): Add stamp-pstl.
3921 (install-headers): Add ptsl_builddir.
3922 * include/Makefile.in: Regenerate.
3923 * include/bits/c++config: Add pstl configuration.
3924 * include/pstl/LICENSE.txt: New file.
3925 * include/pstl/algorithm_fwd.h: New file.
3926 * include/pstl/algorithm_impl.h: New file.
3927 * include/pstl/execution_defs.h: New file.
3928 * include/pstl/execution_impl.h: New file.
3929 * include/pstl/glue_algorithm_defs.h: New file.
3930 * include/pstl/glue_algorithm_impl.h: New file.
3931 * include/pstl/glue_execution_defs.h: New file.
3932 * include/pstl/glue_memory_defs.h: New file.
3933 * include/pstl/glue_memory_impl.h: New file.
3934 * include/pstl/glue_numeric_defs.h: New file.
3935 * include/pstl/glue_numeric_impl.h: New file.
3936 * include/pstl/memory_impl.h: New file.
3937 * include/pstl/numeric_fwd.h: New file.
3938 * include/pstl/numeric_impl.h: New file.
3939 * include/pstl/parallel_backend.h: New file.
3940 * include/pstl/parallel_backend_tbb.h: New file.
3941 * include/pstl/parallel_backend_utils.h: New file.
3942 * include/pstl/parallel_impl.h: New file.
3943 * include/pstl/pstl_config.h: New file.
3944 * include/pstl/unseq_backend_simd.h: New file.
3945 * include/pstl/utils.h: New file.
3946 * include/std/algorithm: Include parallel algorithm implementations.
3947 * include/std/execution: New file.
3948 * include/std/memory: Include parallel algorithm implementations.
3949 * include/std/numeric: Include parallel algorithm implementations.
3950 * include/std/version: Add parallel algorithms feature test macro.
3951 * testsuite/util/pstl/pstl_test_config.h: New file.
3952 * testsuite/util/pstl/test_utils.h: New file.
3953 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3954 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3955 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3956 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3957 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3958 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3959 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3960 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3961 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3962 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3963 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3964 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3965 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3966 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3967 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3968 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3969 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3970 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3971 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3972 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3973 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3974 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3975 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3976 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3977 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3978 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3979 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3980 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3981 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3982 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3983 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3984 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3985 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3986 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3987 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3988 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3989 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3990 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3991 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3992 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3993 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3994 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3995 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3996 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3997 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3998 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3999 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4000 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4001 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4002 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4003 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4004 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4005 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4006 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4007 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4008 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4009 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4010 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4011 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4012 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4013 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4014 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4015 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4016 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4017 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4018 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4019 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4020 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4021 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4022 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4023 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4024 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4025 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4026 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4027 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4028 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4029 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4030 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4031 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4032 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4033 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4034 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4035 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4036 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4037 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4038 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4039 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4040 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4041 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4042 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4043 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4044 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4045 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4046 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4047 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4048 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4049 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4050 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4051 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4052 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4053 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4054 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4055 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4056 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4057 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4058 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4060 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
4062 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
4063 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
4064 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
4065 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
4066 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
4067 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
4068 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
4069 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
4070 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
4071 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
4072 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
4073 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
4074 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
4075 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
4076 when the special functions IS is enabled, not for C++17.
4077 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
4079 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
4080 without checks for special functions in C++17.
4081 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4085 * include/backward/hash_map: Use <> for includes not "".
4086 * include/backward/hash_set: Likewise.
4087 * include/backward/strstream: Likewise.
4088 * include/tr1/bessel_function.tcc: Likewise.
4089 * include/tr1/exp_integral.tcc: Likewise.
4090 * include/tr1/legendre_function.tcc: Likewise.
4091 * include/tr1/modified_bessel_func.tcc: Likewise.
4092 * include/tr1/riemann_zeta.tcc: Likewise.
4094 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
4096 * doc/xml/manual/allocator.xml: Link to table documenting evolution
4097 of extension allocators.
4098 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
4099 Document new headers in 7.2, 8.1 and 9.1 releases.
4100 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
4101 * doc/html/*: Regenerate.
4103 2019-03-12 John David Anglin <dave.anglin@bell.net>
4106 * testsuite/lib/libstdc++.exp: Locate libatomic.
4107 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
4108 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
4110 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
4111 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
4112 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
4113 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
4115 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
4118 * configure.ac: Check for sockatmark.
4119 * crossconfig.m4: Check for sockatmark.
4120 * config.h.in: Regenerate.
4121 * configure: Regenerate.
4122 * include/experimental/internet (address_v4::_S_hton): Rename
4123 overloaded functions to _S_hton_16 and _S_ntoh_16.
4124 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
4125 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
4126 * include/experimental/socket (basic_socket::at_mark): Check
4127 _GLIBCXX_HAVE_SOCKATMARK.
4129 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
4130 const variables instead of macros.
4133 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
4134 Use correct type for len_aligned.
4135 * testsuite/20_util/hash/89629.cc: New test.
4137 2019-03-11 Jakub Jelinek <jakub@redhat.com>
4140 * include/std/atomic (atomic<T>::store, atomic<T>::load,
4141 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
4142 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
4143 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
4144 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
4145 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
4146 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
4147 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
4148 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
4149 memory_order_seq_cst to int.
4151 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
4153 * doc/xml/manual/using.xml: Use link element instead of xref.
4154 * doc/html/*: Regenerate.
4156 * include/bits/fs_path.h (path::format): Add fixed underlying type.
4158 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
4161 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
4162 parameters in deduction guides.
4163 * include/debug/multimap.h (multimap): Likewise.
4164 * include/debug/set.h (multimap): Likewise.
4165 * include/debug/multiset.h (multimap): Likewise.
4166 * include/debug/unordered_map (unordered_map): Likewise.
4167 (unordered_multimap): Likewise.
4168 * include/debug/unordered_set (unordered_set): Likewise.
4169 (unordered_multiset): Likewise.
4172 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
4173 Invalidate all iterators in case of rehash.
4174 (unordered_multimap<>::_M_check_rehashed): Likewise.
4175 * include/debug/unordered_set
4176 (unordered_set<>::_M_check_rehashed): Likewise.
4177 (unordered_multiset<>::_M_check_rehashed): Likewise.
4178 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
4180 2019-03-07 Andreas Schwab <schwab@suse.de>
4182 * config/abi/post/riscv64-linux-gnu: New directory.
4183 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
4185 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
4187 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
4188 compile test to run. Fix typo.
4190 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
4191 * doc/html/*: Regenerate.
4193 P0356R5 Simplified partial function application
4194 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
4195 helpers for bind_front.
4196 (bind_front, __cpp_lib_bind_front): Define.
4197 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
4199 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4201 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
4202 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
4203 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
4204 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
4206 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
4208 PR libstdc++/86655 - std::assoc_legendre should not constrain
4209 the value of m (or x).
4210 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
4211 __sph_legendre): If degree > order Don't throw, return 0.
4212 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
4213 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
4214 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
4215 * testsuite/tr1/5_numerical_facilities/special_functions/
4216 02_assoc_legendre/pr86655.cc: New test.
4217 * testsuite/tr1/5_numerical_facilities/special_functions/
4218 22_sph_legendre/pr86655.cc: New test.
4220 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
4223 Also PR libstdc++/85517
4224 * include/std/variant (__do_visit): New.
4225 (__variant_cast): Likewise.
4226 (__variant_cookie): Likewise.
4227 (__erased_*): Remove.
4228 (_Variant_storage::_S_vtable): Likewise.
4229 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
4230 (_Variant_storage::__M_reset): Adjust.
4231 (__variant_construct): New.
4232 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
4233 __variant_construct.
4234 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
4235 (_Move_ctor_base::__M_destructive_copy): New.
4236 (_Move_ctor_base::__M_destructive_move): Adjust to use
4237 __variant_construct.
4238 (_Copy_assign_base::operator=): Adjust to use __do_visit.
4239 (_Copy_assign_alias): Adjust to check both copy assignment
4240 and copy construction for triviality.
4241 (_Move_assign_base::operator=): Adjust to use __do_visit.
4242 (_Multi_array): Add support for visitors that accept and return
4244 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
4245 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
4246 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
4247 a __variant_cookie temporary for a variant that is valueless and..
4248 (__gen_vtable_impl::__visit_invoke): ..adjust here.
4249 (__gen_vtable::_Array_type): Conditionally make space for
4250 the __variant_cookie visitor case.
4251 (__variant_construct_by_index): New.
4252 (get_if): Adjust to use std::addressof.
4253 (relops): Adjust to use __do_visit.
4254 (variant): Add __variant_cast and __variant_construct_by_index
4256 (variant::emplace): Use _M_reset() and __variant_construct_by_index
4257 instead of self-destruction.
4258 (variant::swap): Adjust to use __do_visit.
4259 (visit): Reimplement in terms of __do_visit.
4260 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
4261 * testsuite/20_util/variant/compile.cc: Adjust.
4262 * testsuite/20_util/variant/run.cc: Likewise.
4264 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4266 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
4268 * testsuite/experimental/feat-char8_t.cc: Likewise.
4270 * include/std/type_traits [C++20] (is_bounded_array)
4271 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
4273 * testsuite/20_util/is_bounded_array/requirements/
4274 explicit_instantiation.cc: New test.
4275 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
4277 * testsuite/20_util/is_bounded_array/value.cc: New test.
4278 * testsuite/20_util/is_unbounded_array/requirements/
4279 explicit_instantiation.cc: New test.
4280 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
4282 * testsuite/20_util/is_unbounded_array/value.cc: New test.
4284 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
4286 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
4288 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
4290 * include/c_compatibility/math.h [C++20] (lerp): Add using
4292 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
4293 (__lerp): Define function template to implement lerp.
4294 (lerp(float, float, float), lerp(double, double, double))
4295 (lerp(long double, long double, long double)): Define for C++20.
4296 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
4297 (midpoint(T, T), midpoint(T*, T*)): Define.
4298 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
4299 * testsuite/26_numerics/lerp.cc: New test.
4300 * testsuite/26_numerics/midpoint/floating.cc: New test.
4301 * testsuite/26_numerics/midpoint/integral.cc: New test.
4302 * testsuite/26_numerics/midpoint/pointer.cc: New test.
4304 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
4306 PR libstdc++/88996 Implement P0439R0
4307 Make std::memory_order a scoped enumeration.
4308 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
4309 add variables for the old enumerators. Adjust calls.
4310 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
4311 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
4313 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
4315 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
4318 * include/std/memory_resource (polymorphic_allocator): Add default
4319 template argument for C++20.
4320 (polymorphic_allocator::allocate_bytes)
4321 (polymorphic_allocator::deallocate_bytes)
4322 (polymorphic_allocator::allocate_object)
4323 (polymorphic_allocator::deallocate_object)
4324 (polymorphic_allocator::new_object)
4325 (polymorphic_allocator::delete_object): New member functions for
4327 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
4330 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
4333 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
4336 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
4338 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
4339 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
4341 * include/std/memory (uses_allocator_construction_args): New set of
4342 overloaded functions.
4343 (make_obj_using_allocator, uninitialized_construct_using_allocator):
4345 * include/std/memory_resource (polymorphic_allocator::construct)
4346 [__cplusplus > 201703l]: Replace all overloads with a single function
4347 using uses_allocator_construction_args.
4348 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
4350 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
4352 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
4355 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
4356 stylesheet directories before check for xsltproc. Try to use
4357 xmlcatalog to find local stylesheet directory before trying hardcoded
4358 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
4359 check to look for the same stylesheet as doc/Makefile.am uses. Don't
4360 use xsltproc if xmlcatalog fails to find a local stylesheet.
4361 * configure.ac: Check for xmlcatalog.
4362 * Makefile.in: Regenerate.
4363 * configure: Likewise.
4364 * doc/Makefile.in: Likewise.
4365 * include/Makefile.in: Likewise.
4366 * libsupc++/Makefile.in: Likewise.
4367 * po/Makefile.in: Likewise.
4368 * python/Makefile.in: Likewise.
4369 * src/Makefile.in: Likewise.
4370 * src/c++11/Makefile.in: Likewise.
4371 * src/c++17/Makefile.in: Likewise.
4372 * src/c++98/Makefile.in: Likewise.
4373 * src/filesystem/Makefile.in: Likewise.
4374 * testsuite/Makefile.in: Likewise.
4376 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
4379 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
4380 container deduction guides.
4381 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
4382 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
4383 parameters in deduction guides.
4384 * include/bits/stl_multimap.h (multimap): Likewise.
4385 * include/bits/stl_multiset.h (multiset): Likewise.
4386 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
4387 * include/bits/stl_set.h (set): Likewise.
4388 * include/bits/stl_stack.h (stack): Likewise.
4389 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4390 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
4391 constrain parameters in deduction guides.
4392 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4394 * testsuite/23_containers/map/cons/deduction.cc: Test additional
4396 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4397 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4398 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
4399 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4401 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4403 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4406 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
4407 to class template and partial specialization using void_t.
4408 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4410 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
4413 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
4414 copy and move members public.
4416 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
4418 * include/std/type_traits (__underlying_type_impl): New helper to
4419 make underlying_type SFINAE-friendly.
4420 (underlying_type): Derive from __underlying_type_impl.
4421 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
4425 * include/bits/char_traits.h (__constant_char_array): Check index is
4426 in range before dereferencing.
4427 (char_traits<char>::compare, char_traits<char>::find)
4428 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
4429 immediately if n is zero.
4430 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
4431 Remove workarounds for PR 67026.
4432 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
4434 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
4437 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4439 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
4440 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4442 2019-02-22 Jakub Jelinek <jakub@redhat.com>
4445 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
4446 type to std::size_t and argument to type to long double.
4448 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4450 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
4451 * config/abi/post/sparc64-linux-gnu: New directory.
4452 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
4453 * config/abi/post/sparc64-linux-gnu/32: New directory.
4454 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
4456 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4458 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
4459 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
4462 2019-02-22 Tom Honermann <tom@honermann.net>
4464 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
4465 printers for u8string and u8string_view.
4467 2019-02-22 Tom Honermann <tom@honermann.net>
4469 * testsuite/18_support/byte/ops.cc: Validate
4470 std::to_integer<char8_t>, std::to_integer<char16_t>, and
4471 std::to_integer<char32_t>.
4472 * testsuite/18_support/numeric_limits/dr559.cc: Validate
4473 std::numeric_limits<char8_t>.
4474 * testsuite/18_support/numeric_limits/lowest.cc: Validate
4475 std::numeric_limits<char8_t>::lowest().
4476 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
4477 std::numeric_limits<char8_t>::max_digits10.
4478 * testsuite/18_support/type_info/fundamental.cc: Validate
4479 typeinfo for char8_t.
4480 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
4481 std::from_chars with char8_t.
4482 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
4483 Validate explicit instantiation of std::hash<char8_t>.
4484 * testsuite/20_util/is_integral/value.cc: Validate
4485 std::is_integral<char8_t>.
4486 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
4487 Validate std::make_signed<char8_t>.
4488 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
4489 Validate u8string construction from char8_t sources.
4490 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
4492 * testsuite/21_strings/basic_string_view/operations/compare/
4493 char/70483.cc: Validate substr operations on u8string_view.
4494 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
4495 the u8string_view typedef is defined.
4496 * testsuite/21_strings/char_traits/requirements/
4497 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
4499 * testsuite/21_strings/char_traits/requirements/
4500 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
4501 constexpr member functions.
4502 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
4503 that the u8string typedef is defined.
4504 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
4505 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
4506 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
4507 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
4509 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
4510 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
4512 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
4513 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4514 Validate std::atomic<char8_t>::is_always_lock_free
4515 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
4516 Update line numbers.
4517 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
4519 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
4521 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
4522 Validate std::experimental::pmr::u8string.
4523 * testsuite/experimental/string_view/typedefs.cc: Validate that the
4524 u8string_view typedef is defined.
4525 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
4526 char32_t to the typelists.
4528 2019-02-22 Tom Honermann <tom@honermann.net>
4530 * include/ext/typelist.h: Constrain a partial specialization of
4531 typelist::detail::append_ to only match chain<T1,T2>.
4533 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4536 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
4537 class template with class. Replace move and copy member types with
4538 member alias templates, so they are only instantiated when needed.
4539 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4540 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
4541 test for C++11/14/17 as well.
4542 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
4545 2019-02-20 Jakub Jelinek <jakub@redhat.com>
4548 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
4549 _GLIBCXX_PURE to the alias declaration.
4551 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
4553 * testsuite/21_strings/basic_string/literals/types.cc
4554 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
4555 * testsuite/21_strings/basic_string/literals/values.cc
4556 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4557 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
4558 potentially having different type.
4559 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
4560 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
4562 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
4563 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
4564 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
4565 string literals only using basic character set.
4566 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
4567 u8 literals to char.
4568 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
4569 Test ATOMIC_CHAR8_T_LOCK_FREE.
4570 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
4571 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
4572 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
4573 * testsuite/experimental/string_view/literals/types.cc
4574 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
4576 * testsuite/experimental/string_view/literals/values.cc
4577 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4579 2019-02-19 Tom Honermann <tom@honermann.net>
4581 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
4582 from char16_32_t.cc; validates numeric_limits<char8_t>.
4583 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
4584 test cloned from types.cc; validates operator""s for char8_t
4586 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
4587 test cloned from values.cc; validates construction and comparison
4589 * testsuite/21_strings/basic_string/requirements/
4590 /explicit_instantiation/char8_t/1.cc: New test cloned from
4591 char16_t/1.cc; validates explicit instantiation of
4592 basic_string<char8_t>.
4593 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4594 New test cloned from types.cc; validates operator""sv for char8_t
4595 returns u8string_view.
4596 * testsuite/21_strings/basic_string_view/literals/
4597 values-char8_t.cc: New test cloned from values.cc; validates
4598 construction and comparison of u8string_view values.
4599 * testsuite/21_strings/basic_string_view/requirements/
4600 explicit_instantiation/char8_t/1.cc: New test cloned from
4601 char16_t/1.cc; validates explicit instantiation of
4602 basic_string_view<char8_t>.
4603 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
4604 New test cloned from char16_t/65049.cc; validates that
4605 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
4606 * testsuite/21_strings/char_traits/requirements/char8_t/
4607 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
4608 that char_traits<char8_t> member typedefs are present and correct.
4609 * testsuite/21_strings/char_traits/requirements/
4610 explicit_instantiation/char8_t/1.cc: New test cloned from
4611 char16_t/1.cc; validates explicit instantiation of
4612 char_traits<char8_t>.
4613 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
4614 from char16_t.cc: validates
4615 codecvt<char16_t, char8_t, mbstate_t>.
4616 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
4617 from char32_t.cc: validates
4618 codecvt<char32_t, char8_t, mbstate_t>.
4619 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
4620 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
4621 codecvt<char32_t, char8_t, std::mbstate_t>.
4622 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
4623 test cloned from string.cc; validates filesystem::path construction
4625 * testsuite/experimental/feat-char8_t.cc: New test; validates that
4626 the __cpp_lib_char8_t feature test macro is defined with the
4628 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
4629 New test cloned from string.cc; validates filesystem::path
4630 construction from char8_t input.
4631 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
4632 test cloned from types.cc; validates operator""sv for char8_t
4633 returns u8string_view.
4634 * testsuite/experimental/string_view/literals/values-char8_t.cc:
4635 New test cloned from values.cc; validates construction and
4636 comparison of u8string_view values.
4637 * testsuite/experimental/string_view/requirements/
4638 explicit_instantiation/char8_t/1.cc: New test cloned from
4639 char16_t/1.cc; validates explicit instantiation of
4640 basic_string_view<char8_t>.
4641 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
4642 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
4645 2019-02-19 Tom Honermann <tom@honermann.net>
4647 P0482R5 char8_t: Standard library support
4648 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
4649 typeinfo symbols for char8_t.
4650 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
4651 (GLIBCXX_3.4.26): Add symbols for specializations of
4652 numeric_limits and codecvt that involve char8_t.
4653 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
4654 * include/bits/atomic_base.h: Add atomic_char8_t.
4655 * include/bits/basic_string.h: Add std::hash<u8string> and
4656 operator""s(const char8_t*, size_t).
4657 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
4659 * include/bits/char_traits.h: Add char_traits<char8_t>.
4660 * include/bits/codecvt.h: Add
4661 codecvt<char16_t, char8_t, mbstate_t>,
4662 codecvt<char32_t, char8_t, mbstate_t>,
4663 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4664 codecvt_byname<char32_t, char8_t, mbstate_t>.
4665 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
4666 recognize char8_t as an integral type.
4667 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
4669 (path::u8string): Return std::u8string when char8_t support is
4671 (path::generic_u8string): Likewise.
4672 (path::_S_convert): Handle conversion from char8_t input.
4673 (path::_S_str_convert): Likewise.
4674 * include/bits/functional_hash.h: Add hash<char8_t>.
4675 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4677 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4678 for new char8_t specializations.
4679 * include/bits/localefwd.h: Add missing declarations of
4680 codecvt<char16_t, char, mbstate_t> and
4681 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4682 codecvt<char16_t, char8_t, mbstate_t> and
4683 codecvt<char32_t, char8_t, mbstate_t>.
4684 * include/bits/postypes.h: Add u8streampos
4685 * include/bits/stringfwd.h: Add declarations of
4686 char_traits<char8_t> and u8string.
4687 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4688 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4690 (path::u8string): Return std::u8string when char8_t support is
4692 (path::generic_u8string): Likewise.
4693 (path::_S_convert): Handle conversion from char8_t input.
4694 (path::_S_str_convert): Likewise.
4695 * include/experimental/string: Add u8string.
4696 * include/experimental/string_view: Add u8string_view,
4697 hash<experimental::u8string_view>, and
4698 operator""sv(const char8_t*, size_t).
4699 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4700 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4701 as a character type.
4702 * include/std/limits: Add numeric_limits<char8_t>.
4703 * include/std/string_view: Add u8string_view,
4704 hash<experimental::u8string_view>, and
4705 operator""sv(const char8_t*, size_t).
4706 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4707 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4708 * libsupc++/atomic_lockfree_defines.h: Define
4709 ATOMIC_CHAR8_T_LOCK_FREE.
4710 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4711 codecvt.cc and limits.cc so that char8_t specializations of
4712 numeric_limits and codecvt and emitted.
4713 * src/c++11/Makefile.in: Likewise.
4714 * src/c++11/codecvt.cc: Define members of
4715 codecvt<char16_t, char8_t, mbstate_t>,
4716 codecvt<char32_t, char8_t, mbstate_t>,
4717 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4718 codecvt_byname<char32_t, char8_t, mbstate_t>.
4719 * src/c++11/limits.cc: Define members of
4720 numeric_limits<char8_t>.
4721 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4722 locale_init.cc and localename.cc.
4723 * src/c++98/Makefile.in: Likewise.
4724 * src/c++98/locale_init.cc: Add initialization for the
4725 codecvt<char16_t, char8_t, mbstate_t> and
4726 codecvt<char32_t, char8_t, mbstate_t> facets.
4727 * src/c++98/localename.cc: Likewise.
4728 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4730 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4732 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4733 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4734 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4736 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4738 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4739 * doc/html/*: Regenerate.
4741 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4742 * doc/html/*: Regenerate.
4744 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4745 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4746 allocator type in is_constructible checks.
4747 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4748 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4749 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4750 problematic type from LWG 2586 discussion.
4751 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4752 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4754 * configure.ac: Check for C11 timespec_get function.
4755 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4757 * config.h.in: Regenerate.
4758 * configure: Regenerate.
4759 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4760 std for C++17 and up.
4762 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4763 * include/bits/stl_queue.h
4764 (priority_queue(const Compare&, const Container&, const Alloc&))
4765 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4767 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4769 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4770 * include/bits/stl_queue.h (queue, priority_queue): Add static
4771 assertions to enforce LWG 2566 requirement on value_type.
4772 * include/bits/stl_stack.h (stack): Likewise.
4775 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4777 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4778 * include/bits/std_abs.h: Add comment about LWG 2735.
4779 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4781 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4784 * include/std/version [__cpp_impl_destroying_delete]
4785 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4786 * libsupc++/new [__cpp_impl_destroying_delete]
4787 (__cpp_lib_destroying_delete): Likewise.
4788 (destroying_delete_t, destroying_delete): Likewise, but define even
4789 when __cpp_impl_destroying_delete is not defined.
4790 * testsuite/18_support/destroying_delete.cc: New test.
4792 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4795 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4796 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4797 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4798 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4800 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4803 * include/bits/fs_path.h (path::has_root_name)
4804 (path::has_root_directory, path::has_root_path)
4805 (path::has_relative_path, path::has_parent_path)
4806 (path::has_filename, path::has_stem, path::has_extension)
4807 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4809 * src/c++17/fs_path.cc (path::has_root_name)
4810 (path::has_root_directory, path::has_root_path)
4811 (path::has_relative_path, path::has_parent_path)
4812 (path::has_filename, path::_M_find_extension): Add noexcept.
4814 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4816 PR libstdc++/89102 (partial)
4817 * include/std/type_traits (common_type<>): Define.
4818 (common_type<T>): Derive from common_type<T, T>.
4819 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4820 Test zero-length template argument list.
4821 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4822 Test additional single argument cases.
4823 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4824 Adjust expected error.
4826 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4829 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4831 * include/bits/stl_stack.h (stack): Likewise.
4832 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4833 * testsuite/23_containers/queue/deduction.cc: New test.
4834 * testsuite/23_containers/stack/deduction.cc: New test.
4837 * include/std/type_traits (__is_convertible_helper)
4838 (__is_convertible_helper<_From, _To, false>): Revert changes to
4839 support is_nothrow_convertible.
4840 (__is_nt_convertible_helper): New helper.
4841 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4843 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4844 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4847 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4848 __is_alloc_insertable_impl. Replace single type member with two
4849 members, one for each of copy and move insertable.
4850 (__is_move_insertable): New trait for internal use.
4851 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4852 (vector::_S_nothrow_relocate(true_type)): New functions to
4853 conditionally check if __relocate_a can throw.
4854 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4855 on __is_move_insertable.
4856 (vector::_S_do_relocate): New overloaded functions to conditionally
4858 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4859 based on _S_use_relocate.
4860 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4861 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4862 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4865 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4866 parameter unnamed. Add message to static assertion.
4867 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4868 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4871 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4874 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4876 (__is_bitwise_relocatable): ... to this.
4877 (__relocate_a_1): Adapt.
4878 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4879 (__is_bitwise_relocatable): ... to this.
4881 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4884 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4885 final component as well as from _M_pathname. Append the dot using
4886 operator+= instead of only to _M_pathname.
4887 (path::_M_find_extension): Reformat slightly.
4888 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4889 Add more test cases.
4891 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4893 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4895 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4897 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4898 constexpr specifiers from arg and proj.
4900 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4901 __shared_ptr instantiations used by gcc4-compatible ABI.
4903 * include/experimental/forward_list (experimental::erase): Qualify
4905 * include/experimental/list (experimental::erase): Likewise.
4906 * include/std/forward_list (std::erase): Likewise.
4907 * include/std/list (std::erase): Likewise.
4909 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4911 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4912 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4913 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4914 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4915 * testsuite/ext/array_allocator/26875.cc: Likewise.
4916 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4917 * testsuite/util/replacement_memory_operators.h: Likewise.
4918 * testsuite/util/testsuite_allocator.h: Likewise.
4920 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4921 normal mode vector, even for debug mode.
4922 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4923 Define alias template for normal mode vector.
4925 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4928 * config/locale/generic/c_locale.h (__convert_from_v)
4929 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4930 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4931 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4932 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4934 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4937 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4938 data member with static member function _S_use_relocate().
4939 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4940 (vector::_M_default_append): Use _S_use_relocate() instead of
4943 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4946 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4949 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4950 write to stderr instead of using printf.
4952 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4955 * include/bits/char_traits.h (__constant_string_p,
4956 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4959 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4961 Implement C++20 P0600r1.
4962 * include/backward/hash_map: Add nodiscard attribute to empty.
4963 * include/backward/hash_set: Likewise.
4964 * backward/hashtable.h: Likewise.
4965 * include/bits/basic_string.h: Likewise.
4966 * include/bits/forward_list.h: Likewise.
4967 * include/bits/hashtable.h: Likewise.
4968 * include/bits/regex.h: Likewise.
4969 * include/bits/stl_deque.h: Likewise.
4970 * include/bits/stl_list.h: Likewise.
4971 * include/bits/stl_map.h: Likewise.
4972 * include/bits/stl_multimap.h: Likewise.
4973 * include/bits/stl_multiset.h: Likewise.
4974 * include/bits/stl_queue.h: Likewise.
4975 * include/bits/stl_set.h: Likewise.
4976 * include/bits/stl_stack.h: Likewise.
4977 * include/bits/stl_tree.h: Likewise.
4978 * include/bits/stl_vector.h: Likewise.
4979 * include/bits/unordered_map.h: Likewise.
4980 * include/bits/unordered_set.h: Likewise.
4981 * include/debug/array: Likewise.
4982 * include/experimental/any: Likewise.
4983 * include/experimental/bits/fs_path.h: Likewise.
4984 * include/experimental/internet: Likewise.
4985 * include/experimental/string_view: Likewise.
4986 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4988 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4990 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4992 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4994 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4996 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4998 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
5000 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
5002 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5003 info_fn_imps.hpp: Likewise.
5004 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5005 left_child_next_sibling_heap_.hpp: Likewise.
5006 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
5008 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
5010 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
5012 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
5014 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
5016 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
5018 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
5020 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
5021 * include/ext/pb_ds/trie_policy.hpp: Likewise.
5022 * include/ext/rope: Likewise.
5023 * include/ext/slist: Likewise.
5024 * include/ext/vstring.h: Likewise.
5025 * include/profile/array: Likewise.
5026 * include/std/array: Likewise.
5027 * include/tr1/array: Likewise.
5028 * include/tr1/hashtable.h: Likewise.
5029 * include/tr1/regex: Likewise.
5030 * include/tr2/dynamic_bitset: Likewise.
5031 * include/bits/alloc_traits.h: Add nodiscard attribute to
5033 * include/experimental/memory_resource: Likewise.
5034 * include/ext/alloc_traits.h: Likewise.
5035 * include/ext/array_allocator.h: Likewise.
5036 * include/ext/bitmap_allocator.h: Likewise.
5037 * include/ext/debug_allocator.h: Likewise.
5038 * include/ext/extptr_allocator.h: Likewise.
5039 * include/ext/mt_allocator.h: Likewise.
5040 * include/ext/new_allocator.h: Likewise.
5041 * include/ext/pool_allocator.h: Likewise.
5042 * include/ext/throw_allocator.h: Likewise.
5043 * include/std/scoped_allocator: Likewise.
5044 * libsupc++/eh_alloc.cc: Likewise.
5045 * include/std/future: Add nodiscard attribute to async.
5046 * libsupc++/new: Add nodiscard attribute to new.
5048 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
5053 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
5054 * include/bits/shared_ptr.h
5055 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
5056 (allocate_shared): Change to use new tag type.
5057 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
5058 Declare new member function.
5059 (_Sp_alloc_shared_tag): Define new type.
5060 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
5061 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
5062 _Sp_make_shared_tag::_S_eq to check type_info.
5063 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
5064 Constrain to prevent being called with _Sp_alloc_shared_tag.
5065 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
5066 Replace constructor with ...
5067 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
5068 reference parameter so address of the new object can be returned to
5069 the caller. Obtain the allocator from the tag type.
5070 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
5071 constructor with ...
5072 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
5073 to the __shared_count constructor.
5074 (__allocate_shared): Change to use new tag type.
5075 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
5077 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
5079 * src/c++17/fs_ops.cc
5080 (equivalent(const path&, const path&, error_code&))
5081 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
5082 compare files instead of relying on incomplete info returned by stat.
5085 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
5086 if the path is already absolute.
5087 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
5088 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
5091 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
5092 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
5093 of filesystem::exists.
5094 (create_directories(const path&, error_code&)): Add assertions.
5095 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
5096 Add workaround for bug in _wstat for paths with trailing slash.
5097 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
5098 for expected behaviour on mingw.
5099 * testsuite/experimental/filesystem/operations/create_directories.cc:
5101 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
5102 "TMP" instead of "TMPDIR" and clean environment before each test. Do
5103 not test permissions on mingw targets.
5105 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
5107 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
5108 constructors and open members taking wide strings. Fix patterns for
5109 filesystem::path members to match wstring_view parameters. Add
5110 exports for shared_ptr members used by directory iterators.
5111 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
5112 error code parameter if the file doesn't exist.
5113 * src/filesystem/ops.cc (remove(const path&, error_code&)):
5115 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
5116 values for mingw targets, where "/" is not an absolute path. Do not
5117 test symlinks on mingw targets.
5118 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
5119 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
5121 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5122 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
5123 that each component of the path is created.
5124 * testsuite/experimental/filesystem/operations/create_directories.cc:
5126 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
5127 permissions on mingw targets.
5128 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
5129 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5130 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
5131 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
5133 * testsuite/experimental/filesystem/operations/permissions.cc:
5135 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
5136 symlinks or permissions on mingw targets.
5137 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
5138 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
5139 symlinks on mingw targets.
5140 * testsuite/experimental/filesystem/operations/remove_all.cc:
5142 * testsuite/27_io/filesystem/operations/status.cc: Do not test
5143 permissions on mingw targets.
5144 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
5145 test symlinks on mingw targets.
5146 * testsuite/experimental/filesystem/operations/space.cc: Fix test
5149 2019-02-14 Ulrich Drepper <drepper@redhat.com>
5152 Warn about unused comparisons of shared_ptr/unique_ptr
5153 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
5154 * include/bits/shared_ptr.h: Use it for operator ==, !=,
5155 <, <=, >, >= for shared_ptr.
5156 * include/bits/unique_ptr.h: Likewise for unique_ptr.
5158 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
5160 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
5161 as 201611L, because P0497R0 changes are supported.
5162 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
5164 * include/bits/erase_if.h [__cplusplus > 201703L]
5165 (__cpp_lib_erase_if): Only define for C++2a.
5166 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5167 (__cpp_lib_null_iterators): Define.
5168 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5169 (__cpp_lib_null_iterators): Define.
5170 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
5172 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
5174 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
5176 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
5177 changes are supported.
5178 * include/std/optional (__cpp_lib_optional): Likewise.
5179 * include/std/variant (__cpp_lib_variant): Likewise.
5180 * include/std/version [!__STRICT_ANSI__]
5181 (__cpp_lib_uncaught_exceptions): Define as long integer.
5182 [__cplusplus >= 201703L] (__cpp_lib_any)
5183 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
5184 (__cpp_lib_variant): Define for C++17.
5185 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
5187 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
5190 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
5192 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
5196 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
5198 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
5201 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5203 * doc/xml/manual/intro.xml: Include new section.
5204 * doc/xml/manual/status_cxx2017.xml: Document more
5205 implementation-defined properties of the library.
5206 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
5207 * doc/html/*: Regenerate.
5209 * include/bits/refwrap.h [__cplusplus > 201703L]
5210 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
5211 (_Reference_wrapper_base_memfun): Do not define for C++2a.
5212 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
5214 (reference_wrapper::operator()): Add static assertion.
5215 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
5217 * include/std/chrono (duration_values::zero(), duration_values::min())
5218 (duration_values::max()): Add noexcept.
5219 (duration::zero(), duration::min(), duration::max()): Likewise.
5220 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
5221 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
5222 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
5224 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
5226 2019-01-11 Jakub Jelinek <jakub@redhat.com>
5228 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
5229 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
5231 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5234 * include/bits/functional_hash.h (hash<nullptr_t>): Define
5235 specialization for C++17 (P0513R0, LWG 2817).
5236 * testsuite/20_util/hash/nullptr.cc: New test.
5239 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
5240 pattern for std::basic_stringbuf::str().
5242 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
5243 basic_ostream::operator<< patterns.
5245 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5247 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
5248 test failures on targets with 32-bit time_t.
5250 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
5251 * include/std/deque: Likewise.
5252 * include/std/forward_list: Likewise.
5253 * include/std/list: Likewise.
5254 * include/std/string: Likewise.
5255 * include/std/vector: Likewise.
5256 * include/std/version: Likewise.
5257 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
5258 * testsuite/23_containers/deque/erasure.cc: Likewise.
5259 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5260 * testsuite/23_containers/list/erasure.cc: Likewise.
5261 * testsuite/23_containers/map/erasure.cc: Likewise.
5262 * testsuite/23_containers/set/erasure.cc: Likewise.
5263 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5264 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5265 * testsuite/23_containers/vector/erasure.cc: Likewise.
5267 * include/experimental/internet [AI_NUMERICSERV]
5268 (resolver_base::numeric_service): Define conditionally.
5269 * testsuite/experimental/net/internet/resolver/base.cc: Test it
5271 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
5274 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
5275 Jonathan Wakely <jwakely@redhat.com>
5278 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
5279 (GLIBCXX_3.4.26): Add new exports.
5280 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
5281 correct list of sources.
5282 * include/Makefile.in: Regenerate.
5283 * include/std/ostream (operator<<(nullptr_t)): New member function.
5284 * src/c++17/ostream-inst.cc: New file.
5285 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
5288 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5290 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
5291 of the source file containing the caller.
5292 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
5293 directories created by test.
5294 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5296 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
5298 * testsuite/experimental/filesystem/iterators/
5299 recursive_directory_iterator.cc: Likewise.
5301 2019-01-10 Jakub Jelinek <jakub@redhat.com>
5303 PR tree-optimization/88775
5304 * include/bits/stl_function.h (greater<_Tp*>::operator(),
5305 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
5306 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
5307 instead of __builtin_constant_p if available. Don't bother with
5308 the pointer comparison in C++11 and earlier.
5310 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
5314 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
5317 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
5319 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
5320 for filesystem::path. Give variables more distinctive names.
5322 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
5323 member function to perform non-trivial assignment.
5324 (_Optional_payload_base::_M_move_assign): Likewise.
5325 (_Optional_payload<T, true, false, true>::operator=)
5326 (_Optional_payload<T, true, true, false>::operator=)
5327 (_Optional_payload<T, true, false, false>::operator=): Call
5328 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
5331 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
5332 test std::complex<long double> if long double format is IBM128.
5333 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
5336 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5338 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
5339 for old std::unique_ptr layout.
5340 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
5341 to become valueless. Add filesystem::path tests.
5344 * include/std/optional (_Optional_payload_base): New class template
5345 for common code hoisted from _Optional_payload specializations. Use
5346 a template for the union, to allow a partial specialization for
5347 types with non-trivial destructors. Add constructors for in-place
5348 initialization to the union.
5349 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
5350 to perform non-trivial copy construction, instead of relying on
5351 non-standard copy elision in a delegating constructor.
5352 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
5353 non-trivial move construction.
5354 (_Optional_payload): Derive from _Optional_payload_base and use it
5355 for everything except the non-trivial assignment operators, which are
5357 (_Optional_payload<false, C, M>): Derive from the specialization
5358 _Optional_payload<true, false, false> and add a destructor.
5359 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
5360 Forward to corresponding members of _Optional_payload.
5361 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
5362 Hoist common members from _Optional_base.
5363 (_Optional_base): Make all members and base class public.
5364 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
5365 _Optional_base_impl.
5366 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
5367 support for new std::optional layout.
5368 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
5371 * include/bits/locale_conv.h: Use <> for includes not "".
5372 * include/ext/random: Likewise.
5373 * include/ext/vstring.h: Likewise.
5375 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5377 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
5378 (GLIBCXX_3.4.21): Likewise.
5380 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5383 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
5384 to match the one that controls whether utimbuf and utime are declared.
5386 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
5389 * include/bits/char_traits.h (char_traits::move): Do not pass null
5390 pointers to memmove.
5391 * include/bits/locale_facets.h
5392 (ctype<char>::widen(const char*, const char*, char*)): Do not
5393 pass null pointers to memcpy.
5394 (ctype<char>::narrow(const char*, const char*, char, char*)):
5396 (ctype<char>::do_widen(const char*, const char*, char*)):
5398 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
5401 * doc/xml/manual/spine.xml: Update copyright years.
5402 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
5403 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
5404 for C++17 filesystem library.
5405 * doc/html/*: Regenerate.
5407 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
5408 * config.h.in: Regenerate.
5409 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
5410 alphabetically and add missing entries for copy_symlink,
5411 hard_link_count, rename, and resize_file.
5412 * configure: Regenerate.
5413 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
5414 used unconditionally.
5415 * src/filesystem/ops-common.h (__gnu_posix::truncate)
5416 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
5417 supports truncating to zero length.
5418 * testsuite/27_io/filesystem/operations/all.cc: New test.
5419 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
5421 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
5424 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
5425 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
5426 * config.h.in: Regenerate.
5427 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
5428 remaining std::filesystem types and functions.
5429 * configure: Regenerate.
5430 * src/c++17/Makefile.am: Add C++17 filesystem sources.
5431 * src/c++17/Makefile.in: Regenerate.
5432 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
5433 here, and change name of included file.
5434 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
5435 here, and change name of included file.
5436 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
5437 path to dir-common.h.
5438 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
5439 path to ops-common.h. Disable -Wunused-parameter warnings.
5440 (internal_file_clock): Define unconditionally.
5441 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
5443 (do_copy_file, do_space): Move definitions to ops.common.h.
5444 (copy, file_size, hard_link_count, last_write_time, space): Only
5445 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
5447 (last_write_time, read_symlink): Remove unused attributes from
5449 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
5450 * src/filesystem/Makefile.in: Regenerate.
5451 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
5452 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
5453 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
5454 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
5455 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
5456 dummy types and functions instead of using #error.
5457 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
5458 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
5460 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
5461 (do_copy_file, do_space): Move definitions here from std-ops.cc.
5462 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
5463 to account for new namespace.
5464 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
5465 -lstdc++fs from dg-options.
5466 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
5467 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
5468 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
5469 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
5470 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
5472 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
5473 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5475 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
5476 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
5477 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
5478 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
5479 * testsuite/27_io/filesystem/operations/create_directories.cc:
5481 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
5482 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
5483 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
5484 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
5485 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
5486 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
5487 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5488 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
5489 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
5490 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
5491 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
5492 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
5493 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
5494 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
5495 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
5496 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
5497 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
5498 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
5500 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
5504 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
5505 typeinfo and vtables less greedy.
5506 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
5507 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
5508 * src/c++17/Makefile.in: Regenerate.
5509 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
5510 here, and change name of included file.
5511 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
5512 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
5514 * src/filesystem/Makefile.in: Regenerate.
5515 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
5516 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
5517 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
5518 from dg-options and remove dg-require-filesystem-ts.
5519 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
5520 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
5521 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
5522 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
5523 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5524 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5525 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5526 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
5527 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
5528 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
5529 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
5530 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
5531 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
5532 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
5533 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
5534 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
5535 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
5536 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
5537 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
5538 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
5539 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
5541 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
5542 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
5543 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
5544 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
5545 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
5546 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
5547 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
5548 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
5549 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
5550 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
5551 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
5552 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
5554 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
5556 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5558 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
5560 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
5561 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
5562 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
5563 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
5564 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
5565 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
5566 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
5567 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
5568 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
5569 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
5571 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
5572 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
5573 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
5574 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
5575 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
5578 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
5579 Check is_trivially_copyable instead of is_scalar.
5580 (variant::emplace<N, Args>(Args&&...)): If construction of the new
5581 contained value can throw and its type is trivially copyable then
5582 construct into a temporary variant and move from it, to provide the
5583 strong exception safety guarantee.
5584 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
5586 * testsuite/20_util/variant/87431.cc: New test.
5587 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
5588 conversion causes valueless state.
5591 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
5592 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
5593 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
5594 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
5595 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
5597 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
5599 * include/bits/fs_fwd.h (__file_clock): Define new clock.
5600 (file_time_type): Redefine in terms of __file_clock.
5601 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
5603 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
5605 (internal_file_lock): New helper type for accessing __file_clock.
5606 (do_copy_file): Use internal_file_lock to convert system time to
5608 (last_write_time(const path&, error_code&)): Likewise.
5609 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
5611 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
5613 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
5614 for const member functions of std::basic_string.
5615 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
5617 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
5618 Make non-standard constructor private.
5619 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
5621 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
5622 explicit instantiations for C++17 as well as earlier dialects.
5623 * src/c++17/Makefile.am: Add new source files.
5624 * src/c++17/Makefile.in: Regenerate.
5625 * src/c++17/cow-string-inst.cc: New file defining explicit
5626 instantiations for basic_string member functions added in C++17.
5627 * src/c++17/string-inst.cc: Likewise.
5629 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
5630 copy/move constructors for old std::basic_string.
5631 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
5632 (basic_string::reference, basic_string::const_reference): Define
5633 as plain references for C++11 and later.
5634 (basic_string::basic_string()): Put constructor body outside
5635 preprocessor conditional groups.
5636 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
5637 instead of copying it.
5638 (basic_string::basic_string(const basic_string&, const _Alloc&)):
5640 (basic_string::basic_string(basic_string&&, const _Alloc&)):
5642 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
5643 cases for old basic_string.
5644 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
5645 allocator-extended constructors unconditionally. Add extra members to
5646 allocator type when using old string ABI.
5647 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
5649 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
5651 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
5652 -fno-inline added to test flags.
5654 * testsuite/21_strings/basic_string/requirements/
5655 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
5657 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
5658 assertion failures with old std::string ABI.
5660 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
5662 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
5663 functions that will only erase elements at the end.
5664 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
5665 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
5666 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
5668 (path::_List::pop_back()): Define.
5669 (path::_List::_M_erase_from(const_iterator)): Define.
5670 (path::operator/=(const path&)): Use pop_back to remove last component
5671 and _M_erase_from to remove multiple components.
5672 (path::_M_append(basic_string_view<value_type>)): Likewise.
5673 (path::operator+=(const path&)): Likewise.
5674 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5675 (path::remove_filename()): Likewise.
5676 (path::lexically_normal()): Use _List::_Impl iterators instead of
5677 path::iterator. Use pop_back to remove components from the end. Clear
5678 trailing filename, instead of using erase(const_iterator) to remove
5679 a non-final component.
5680 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5682 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5684 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5685 incorrect treatment of empty filename after trailing slash.
5686 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5688 * testsuite/21_strings/basic_string/modifiers/assign/char/
5689 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5691 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5692 move_assign_optim.cc: Likewise.
5694 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5695 Jakub Jelinek <jakub@redhat.com>
5698 * include/experimental/memory: Replace UTF-8 quote characters.
5699 * include/std/future: Replace UTF-8 "em dash" characters.
5701 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5704 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5705 * include/debug/forward_list: Likewise.
5706 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5708 * include/experimental/chrono: Likewise.
5709 * include/experimental/functional: Likewise.
5710 * include/experimental/ratio: Likewise.
5711 * include/experimental/system_error: Likewise.
5712 * include/experimental/tuple: Likewise.
5713 * include/experimental/type_traits: Likewise.
5714 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5715 * include/parallel/multiseq_selection.h: Likewise.
5718 * config/abi/pre/gnu.ver: Add missing exports.
5719 * testsuite/22_locale/collate_byname/88681.cc: New test.
5720 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5721 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5723 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5725 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5726 initializer_list<value_type> and from input iterator ranges.
5727 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5729 * testsuite/experimental/string_view/element_access/char/empty.cc:
5730 Fix year range in copyright header.
5732 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5734 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5735 Fix year range in copyright header.
5737 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5739 Update copyright years.
5741 Copyright (C) 2019 Free Software Foundation, Inc.
5743 Copying and distribution of this file, with or without modification,
5744 are permitted in any medium without royalty provided the copyright
5745 notice and this notice are preserved.