1 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
3 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
4 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
5 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
6 specializations for __float128.
7 * testsuite/26_numerics/numbers/float128.cc: New test.
9 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
11 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
14 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
16 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
17 in <algorithm> and <utility> Headers.
18 Implement C++20 p1023 - constexpr comparison operators for std::array.
19 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
20 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
21 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
22 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
23 none_of, partition_copy, partition_point, remove, remove_if,
24 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
25 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
26 count_if, equal, find, find_first_of, find_if, for_each, generate,
27 generate_n, lexicographical_compare, merge, mismatch, replace,
28 replace_if, search, search_n, set_difference, set_intersection,
29 set_symmetric_difference, set_union, transform, unique_copy):
31 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
32 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
33 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
34 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
35 Use const ref instead of ref arg;
36 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
37 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
38 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
39 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
40 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
41 __iter_comp_iter): Mark constexpr.
42 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
43 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
44 none_of, any_of, find_if_not, is_partitioned, partition_point,
45 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
46 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
47 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
48 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
49 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
50 __equal_range, equal_range, binary_search, __includes, includes,
51 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
52 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
53 is_sorted_until, __is_permutation, is_permutation, for_each, find,
54 find_if, find_first_of, adjacent_find, count, count_if, search,
55 search_n, transform, replace, replace_if, generate, generate_n,
56 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
57 set_intersection, __set_difference, set_difference,
58 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
59 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
60 wrappers around __builtin_memmove and __builtin_memcmp
62 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
63 copy, move, __copy_move_b, __copy_move_backward_a,
64 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
65 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
66 __lexicographical_compare_impl, __lexicographical_compare,
67 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
68 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
69 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
70 is_heap): Mark constexpr.
71 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
72 is_heap): Mark constexpr.
73 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
74 * include/std/array: Make comparison ops constexpr.
75 * include/std/utility: Make exchange constexpr.
76 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
77 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
78 * testsuite/23_containers/array/tuple_interface/
79 tuple_element_neg.cc: Adjust.
80 * testsuite/20_util/exchange/constexpr.cc: New.
81 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
82 * testsuite/25_algorithms/constexpr_macro.cc: New.
83 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
84 * testsuite/25_algorithms/all_of/constexpr.cc: New.
85 * testsuite/25_algorithms/any_of/constexpr.cc: New.
86 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
87 * testsuite/25_algorithms/copy/constexpr.cc: New.
88 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
89 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
90 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
91 * testsuite/25_algorithms/count/constexpr.cc: New.
92 * testsuite/25_algorithms/count_if/constexpr.cc: New.
93 * testsuite/25_algorithms/equal/constexpr.cc: New.
94 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
95 * testsuite/25_algorithms/fill/constexpr.cc: New.
96 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
97 * testsuite/25_algorithms/find/constexpr.cc: New.
98 * testsuite/25_algorithms/find_end/constexpr.cc: New.
99 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
100 * testsuite/25_algorithms/find_if/constexpr.cc: New.
101 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
102 * testsuite/25_algorithms/for_each/constexpr.cc: New.
103 * testsuite/25_algorithms/generate/constexpr.cc: New.
104 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
105 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
106 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
107 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
108 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
109 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
110 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
111 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
112 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
113 * testsuite/25_algorithms/merge/constexpr.cc: New.
114 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
115 * testsuite/25_algorithms/none_of/constexpr.cc: New.
116 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
117 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
118 * testsuite/25_algorithms/remove/constexpr.cc: New.
119 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
120 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
121 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
122 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
123 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
124 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
125 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
126 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
127 * testsuite/25_algorithms/search/constexpr.cc: New.
128 * testsuite/25_algorithms/search_n/constexpr.cc: New.
129 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
130 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
131 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
132 * testsuite/25_algorithms/set_union/constexpr.cc: New.
133 * testsuite/25_algorithms/transform/constexpr.cc: New.
134 * testsuite/25_algorithms/unique/constexpr.cc: New.
135 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
136 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
138 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
140 * include/std/memory (make_obj_using_allocator): Qualify call to
141 uses_allocator_construction_args.
143 P0631R4 Math Constants
144 * include/Makefile.am: Add new header.
145 * include/Makefile.in: Regenerate.
146 * include/precompiled/stdc++.h: Include new header.
147 * include/std/numbers: New header.
148 * include/std/version (__cpp_lib_math_constants): Define.
149 * testsuite/26_numerics/numbers/1.cc: New test.
150 * testsuite/26_numerics/numbers/2.cc: New test.
151 * testsuite/26_numerics/numbers/3.cc: New test.
152 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
154 * include/std/bit: Add Doxygen comments.
157 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
158 constraints on deleter that should only apply to the constructor.
159 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
160 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
161 constraints on deleter here.
162 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
164 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
167 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
169 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
171 * testsuite/18_support/51333.cc: New test.
173 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
175 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
176 to the Doxygen manual. Avoid a "here" link on the way.
177 Fix another broken link to Doxygen docblocks.
179 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
181 * include/std/bit (__cpp_lib_endian): Define.
182 * include/std/version (__cpp_lib_endian): Define.
183 * testsuite/26_numerics/endian/2.cc: New.
184 * testsuite/26_numerics/endian/3.cc: New.
185 * testsuite/26_numerics/endian/4.cc: New.
187 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
189 * testsuite/util/testsuite_iterators.h
190 (bidirectional_iterator_wrapper): Fix type comment.
191 (random_access_iterator_wrapper): Likewise.
193 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
195 * include/std/bit (endian): Move definition here as per P1612R1.
196 * include/std/type_traits (endian): Remove definition from here.
197 * testsuite/20_util/endian/1.cc: Rename to ...
198 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
200 2019-07-25 Martin Liska <mliska@suse.cz>
201 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
204 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
206 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
207 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
208 * testsuite/ext/new_allocator/check_new.cc: Likewise.
210 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
212 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
213 * testsuite/26_numerics/bit/bit.count/*: Here.
215 * include/std/bit (__rotl, __rotr): Change second parameter from
216 unsigned int to int and handle negative values.
217 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
218 parameter from unsigned int to int. Add nodiscard attribute.
219 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
220 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
222 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
223 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
226 * include/std/bit (__ceil2): Make unrepresentable results undefined,
227 as per P1355R2. Add debug assertion. Perform one left shift, not two,
228 so that out of range values cause undefined behaviour. Ensure that
229 shift will still be undefined if left operand is promoted.
230 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
231 unrepresentable values with checks that they are not core constant
233 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
235 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
237 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
238 sized deallocation size computation.
240 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
242 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
244 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
246 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
247 (~_Temporary_buffer()): Use latter.
248 (_Temporary_buffer(_FIterator, size_type)): Likewise.
250 2019-07-17 Andreas Schwab <schwab@suse.de>
252 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
254 2019-07-16 Jason Merrill <jason@redhat.com>
256 * include/std/memory (uses_allocator_construction_args): Add parens
259 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
261 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
263 * include/experimental/string_view (__detail::__idt): Remove.
264 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
265 Use __type_identity_t instead of __detail::__idt;
266 * include/std/string_view (__detail::__idt): Remove.
267 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
268 Use __type_identity_t instead of __detail::__idt;
269 * include/std/type_traits (__type_identity_t): New alias template.
271 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
272 and floating point atomics.
274 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
276 * doc/xml/manual/configure.xml: Improve documentation of
277 --enable-libstdcxx-time option.
279 * include/bits/atomic_base.h (__atomic_impl): New namespace for
280 wrappers around atomic built-ins.
281 (__atomic_float, __atomic_ref): New class templates for use as base
283 * include/std/atomic (atomic<float>, atomic<double>)
284 (atomic<long double>): New explicit specializations.
285 (atomic_ref): New class template.
286 (__cpp_lib_atomic_ref): Define.
287 * include/std/version (__cpp_lib_atomic_ref): Define.
288 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
289 * testsuite/29_atomics/atomic_float/1.cc: New test.
290 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
291 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
292 * testsuite/29_atomics/atomic_ref/float.cc: New test.
293 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
294 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
295 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
296 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
298 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
300 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
301 throw() with _GLIBCXX_NOTHROW.
302 (__atomic_add_dispatch): Return after performing atomic increment.
304 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
306 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
307 (__exchange_and_add): Replace static specifier with always_inline
309 (__exchange_and_add_single, __atomic_add_single): Likewise.
310 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
311 combine !__gthread_active_p() and !__GTHREADS branches.
313 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
316 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
317 * configure: Regenerate.
318 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
320 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
321 * testsuite/util/testsuite_abi.cc: Add new symbol version.
323 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
325 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
326 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
327 instead of __is_identifier to detect Clang support.
329 2019-07-02 Jim Wilson <jimw@sifive.com>
331 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
333 * configure: Regenerate.
335 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
338 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
339 for the what_arg parameters.
340 (filesystem_error::filesystem_error): Pass system_error::what() to
341 the _Impl constructor.
342 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
343 filesystem_error::what() contains system_error::what().
345 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
347 * include/std/charconv (chars_format): Define bitmask type.
348 * testsuite/20_util/to_chars/chars_format.cc: New test.
350 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
351 * include/std/bit (_If_is_unsigned_integer_type): Remove.
352 (_If_is_unsigned_integer): Use __is_unsigned_integer.
353 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
354 (countl_one(byte), countr_zero(byte), countr_one(byte))
355 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
356 (log2p1(byte)): Remove.
357 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
358 (__detail::__is_int_to_chars_type): Remove.
359 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
360 and __is_unsigned_integer.
361 * include/std/type_traits (__is_one_of): Move here from <charconv>.
362 (__is_signed_integer, __is_unsigned_integer): New helpers.
363 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
365 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
366 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
367 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
368 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
369 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
370 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
371 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
372 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
373 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
374 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
376 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
378 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
381 2019-06-25 Jakub Jelinek <jakub@redhat.com>
383 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
384 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
385 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
386 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
388 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
390 * include/std/numeric (midpoint(T, T)): Change implementation for
391 floating-point types to avoid incorrect rounding of denormals.
392 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
393 rounding with denormals.
394 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
395 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
397 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
399 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
401 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
403 * configure: Regenerate.
405 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
406 Qualify calls to __never_valueless.
408 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
411 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
412 vector<bool> for test.
413 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
415 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
417 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
419 (istream_iterator::_M_read()): Do not check stream state before
420 attempting extraction. Set stream pointer to null when extraction
422 (operator==(const istream_iterator&, const istream_iterator&)): Change
423 to be a hidden friend of istream_iterator.
424 (operator!=(const istream_iterator&, const istream_iterator&)):
426 (ostream_iterator::ostream_iterator()): Add default constructor.
427 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
429 * testsuite/24_iterators/istream_iterator/1.cc: New test.
430 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
431 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
432 constructor taking a string.
433 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
436 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
437 Jonathan Wakely <jwakely@redhat.com>
440 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
441 values of type bool for vector<bool> elements.
442 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
443 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
445 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
447 PR libstdc++/90920 partially revert r263433
448 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
449 (rotate): Remove checks.
450 * testsuite/25_algorithms/rotate/90920.cc: New test.
452 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
453 category used in invocable check.
454 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
455 * testsuite/26_numerics/reduce/2.cc: New test.
457 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
459 * include/bits/algorithmfwd.h: Change title of doc group.
460 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
462 * include/bits/stl_numeric.h: Define doc group and add algos to it.
463 * include/std/numeric (__is_random_access_iter): New internal trait.
464 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
465 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
466 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
467 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
468 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
469 * testsuite/26_numerics/reduce/1.cc: New test.
470 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
471 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
472 * testsuite/26_numerics/transform_reduce/1.cc: New test.
473 * testsuite/util/testsuite_iterators.h (test_container::size()): New
476 * include/c_global/cstddef (std::byte): Perform arithmetic operations
477 in unsigned int to avoid promotion (LWG 2950).
479 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
481 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
484 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
486 PR libstdc++/90281 Fix string conversions for filesystem::path
487 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
488 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
489 __str_codecvt_in_all to fail for partial conversions and throw on
491 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
492 (path::_Cvt<char8_t>): Add explicit specialization.
493 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
495 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
496 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
497 instead of codecvt_utf8. Use __str_codecvt_in_all and
498 __str_codecvt_out_all.
499 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
500 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
501 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
502 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
503 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
504 after converting to UTF-8.
505 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
506 __str_codecvt_in_all.
507 (path::string): Fix initialization of string types with different
509 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
510 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
511 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
513 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
514 return false for partial conversions.
515 * include/experimental/bits/fs_path.h (u8path):
516 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
517 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
518 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
519 instead of codecvt_utf8. Use __str_codecvt_in_all and
520 __str_codecvt_out_all.
521 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
522 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
523 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
524 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
525 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
526 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
527 __str_codecvt_in_all.
528 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
529 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
530 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
531 __str_codecvt_in_all.
532 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
533 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
534 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
535 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
536 strings and with Unicode characters outside the basic multilingual
538 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
539 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
540 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
541 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
542 * testsuite/experimental/filesystem/path/native/string.cc: Test with
543 empty strings and with Unicode characters outside the basic
546 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
547 Jonathan Wakely <jwakely@redhat.com>
549 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
550 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
551 deallocate node if insertion fails.
552 (_Hashtable::_M_insert_multi_node): Likewise.
553 (_Hashtable::_M_reinsert_node): Pass additional key argument.
554 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
555 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
556 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
557 (_Hashtable::extract(const _Key&)): Likewise.
558 (_Hashtable::_M_merge_unique): Pass additional key argument.
559 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
561 (_Hashtable::_M_insert): Likewise.
562 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
563 (_Hashtable_alloc): Add comments to functions with misleading names.
565 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
567 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
569 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
570 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
571 header for std::allocator.
572 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
573 using-declaration for std::size_t.
574 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
576 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
578 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
579 * testsuite/experimental/map/erasure.cc: Include <string> for
581 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
583 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
585 * include/experimental/type_traits (experimental::nonesuch): Use
586 pragma to disable -Wctor-dtor-privacy warnings.
587 * include/std/type_traits (__is_convertible_helper<From, To, false>)
588 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
590 * include/std/version (__cpp_lib_bind_front): Add missing macro.
592 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
594 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
595 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
596 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
597 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
599 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
600 (variant::emplace): Change static_assert messages from "should be"
602 (hash<monostate>::operator()): Remove name of unused parameter.
604 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
607 * include/Makefile.am: Add new <bits/charconv.h> header.
608 * include/Makefile.in: Regenerate.
609 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
610 (to_string(long), to_string(unsigned long), to_string(long long))
611 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
612 * include/bits/charconv.h: New header.
613 (__detail::__to_chars_len): Move here from <charconv>.
614 (__detail::__to_chars_10_impl): New function extracted from
615 __detail::__to_chars_10.
616 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
617 (__to_chars_unsigned_type): New class template that reuses
618 __make_unsigned_selector_base::__select to pick a type.
619 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
620 (__detail::__to_chars_len): Move to new header.
621 (__detail::__to_chars_10): Add inline specifier. Move code doing the
622 output to __detail::__to_chars_10_impl and call that.
623 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
624 * testsuite/21_strings/basic_string/numeric_conversions/char/
625 to_string.cc: Fix reference in comment. Remove unused variable.
626 * testsuite/21_strings/basic_string/numeric_conversions/char/
627 to_string_int.cc: New test.
629 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
631 Fix ConstexprIterator requirements tests - No constexpr algorithms!
632 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
633 Replace copy with hand-rolled loop.
634 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
637 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
639 Test for C++20 p0858 - ConstexprIterator requirements.
640 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
642 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
645 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
647 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
649 * include/bits/c++config: Rename all macros of the form __PSTL* to
651 * include/std/algorithm: Likewise.
652 * include/std/execution: Likewise.
653 * include/std/numeric: Likewise.
654 * include/std/memory: Likewise.
655 * include/pstl/glue_memory_impl.h: Likewise.
656 * include/pstl/numeric_impl.h: Likewise.
657 * include/pstl/glue_memory_defs.h: Likewise.
658 * include/pstl/execution_defs.h: Likewise.
659 * include/pstl/utils.h: Likewise.
660 * include/pstl/algorithm_fwd.h: Likewise.
661 * include/pstl/unseq_backend_simd.h: Likewise.
662 * include/pstl/glue_execution_defs.h: Likewise.
663 * include/pstl/algorithm_impl.h: Likewise.
664 * include/pstl/parallel_impl.h: Likewise.
665 * include/pstl/memory_impl.h: Likewise.
666 * include/pstl/glue_numeric_defs.h: Likewise.
667 * include/pstl/parallel_backend_utils.h: Likewise.
668 * include/pstl/glue_algorithm_defs.h: Likewise.
669 * include/pstl/parallel_backend.h: Likewise.
670 * include/pstl/glue_numeric_impl.h: Likewise.
671 * include/pstl/parallel_backend_tbb.h: Likewise.
672 * include/pstl/numeric_fwd.h: Likewise.
673 * include/pstl/glue_algorithm_impl.h: Likewise.
674 * include/pstl/execution_impl.h: Likewise.
675 * include/pstl/pstl_config.h: Likewise.
676 * testsuite/util/pstl/pstl_test_config.h: Likewise.
677 * testsuite/util/pstl/test_utils.h: Likewise.
678 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
680 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
682 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
684 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
685 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
686 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
687 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
688 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
690 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
691 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
692 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
693 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
694 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
696 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
697 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
698 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
699 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
700 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
702 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
703 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
704 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
706 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
708 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
709 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
710 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
712 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
714 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
716 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
718 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
720 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
722 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
724 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
726 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
728 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
730 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
732 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
734 Rename header guards to be consistent with upstream project's
736 * include/pstl/glue_memory_impl.h: Rename all macros of the form
737 _PSTL_(.*)_H to _PSTL_\U\1_H.
738 * include/pstl/numeric_impl.h: Likewise.
739 * include/pstl/glue_memory_defs.h: Likewise.
740 * include/pstl/execution_defs.h: Likewise.
741 * include/pstl/utils.h: Likewise.
742 * include/pstl/algorithm_fwd.h: Likewise.
743 * include/pstl/unseq_backend_simd.h: Likewise.
744 * include/pstl/glue_execution_defs.h: Likewise.
745 * include/pstl/algorithm_impl.h: Likewise.
746 * include/pstl/parallel_impl.h: Likewise.
747 * include/pstl/memory_impl.h: Likewise.
748 * include/pstl/glue_numeric_defs.h: Likewise.
749 * include/pstl/parallel_backend_utils.h: Likewise.
750 * include/pstl/glue_algorithm_defs.h: Likewise.
751 * include/pstl/parallel_backend.h: Likewise.
752 * include/pstl/glue_numeric_impl.h: Likewise.
753 * include/pstl/parallel_backend_tbb.h: Likewise.
754 * include/pstl/numeric_fwd.h: Likewise.
755 * include/pstl/glue_algorithm_impl.h: Likewise.
756 * include/pstl/execution_impl.h: Likewise.
757 * include/pstl/pstl_config.h: Likewise.
758 * testsuite/util/pstl/pstl_test_config.h: Likewise.
760 Synchronize libstdc++ parallel algorithms with upstream
762 * include/pstl/algorithm_fwd.h: Synchronize with
763 upstream PSTL project.
764 * include/pstl/algorithm_impl.h: Likewise.
765 * include/pstl/execution_defs.h: Likewise.
766 * include/pstl/execution_impl.h: Likewise.
767 * include/pstl/glue_algorithm_impl.h: Likewise.
768 * include/pstl/glue_execution_defs.h: Likewise.
769 * include/pstl/numeric_fwd.h: Likewise.
770 * include/pstl/numeric_impl.h: Likewise.
771 * include/pstl/parallel_backend.h: Likewise.
772 * include/pstl/pstl_config.h: Likewise.
773 * include/pstl/unseq_backend_simd.h: Likewise.
774 * include/pstl/parallel_backend_serial.h: New file.
775 * include/Makefile.am (pstl_headers): Add
776 parallel_backend_serial.h.
777 * include/Makefile.in: Regenerate.
779 Clean up non-conforming names
780 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
781 Uglfiy copy_range1 and copy_range2
782 (__pattern_walk2_n): Rename local n to __n
783 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
784 Rename parameter _T to _Tp.
786 Integrate non-TBB serial backend support
787 * include/bits/c++config: Adjust TBB detection logic to select serial
788 PSTL backend if no TBB present.
789 * testsuite/utils/pstl/test_utils.h: Remove check for
790 _PSTL_USE_PAR_POLICIES
792 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
794 * testsuite/24_iterators/container_access.cc: Move dg-options before
795 dg-do directive so the target check uses the -std option.
798 * configure: Regenerate.
799 * src/Makefile.am (stamp-debug): Also test for missing makefile.
800 * src/Makefile.in: Regenerate.
802 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
804 * include/std/array: Do not include <stdexcept>.
805 * include/std/optional: Include <exception> and
806 <bits/exception_defines.h> instead of <stdexcept>.
807 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
809 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
811 * testsuite/23_containers/map/erasure.cc: Include <string>.
812 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
814 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
815 dg-prune-output for different C++98 diagnostic.
816 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
818 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
820 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
822 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
824 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
826 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
828 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
830 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
832 * testsuite/23_containers/vector/requirements/dr438/
833 constructor_1_neg.cc: Likewise.
834 * testsuite/23_containers/vector/requirements/dr438/
835 constructor_2_neg.cc: Likewise.
836 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
838 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
840 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
841 Do not test allocator rebinding extension for C++2a.
842 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
843 dg-do directive for C++17 and C++2a.
845 * testsuite/23_containers/deque/requirements/explicit_instantiation/
846 1_c++0x.cc: Remove redundant test.
847 * testsuite/23_containers/deque/requirements/explicit_instantiation/
848 2.cc: Use target selector instead of preprocessor condition.
849 * testsuite/23_containers/deque/requirements/explicit_instantiation/
850 3.cc: Do not run test for C++2a.
851 * testsuite/23_containers/forward_list/requirements/
852 explicit_instantiation/3.cc: Likewise.
853 * testsuite/23_containers/forward_list/requirements/
854 explicit_instantiation/5.cc: Do not test allocator rebinding extension
856 * testsuite/23_containers/list/requirements/explicit_instantiation/
857 1_c++0x.cc: Remove redundant test.
858 * testsuite/23_containers/list/requirements/explicit_instantiation/
859 2.cc: Use target selector instead of preprocessor condition.
860 * testsuite/23_containers/list/requirements/explicit_instantiation/
861 3.cc: Do not run test for C++2a.
862 * testsuite/23_containers/list/requirements/explicit_instantiation/
863 5.cc: Do not test allocator rebinding extension for C++2a.
864 * testsuite/23_containers/map/requirements/explicit_instantiation/
865 1_c++0x.cc: Remove redundant test.
866 * testsuite/23_containers/map/requirements/explicit_instantiation/
867 2.cc: Adjust comment.
868 * testsuite/23_containers/map/requirements/explicit_instantiation/
869 3.cc: Do not run test for C++2a.
870 * testsuite/23_containers/map/requirements/explicit_instantiation/
871 5.cc: Do not test allocator rebinding extension for C++2a.
872 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
873 1_c++0x.cc: Remove redundant test.
874 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
875 3.cc: Do not run test for C++2a.
876 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
877 5.cc: Do not test allocator rebinding extension for C++2a.
878 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
879 3.cc: Do not run test for C++2a.
880 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
881 5.cc: Do not test allocator rebinding extension for C++2a.
882 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
883 Do not run test for C++2a.
884 * testsuite/23_containers/set/requirements/explicit_instantiation/
885 1_c++0x.cc: Remove redundant test.
886 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
887 Do not test allocator rebinding extension for C++2a.
888 * testsuite/23_containers/unordered_map/requirements/
889 explicit_instantiation/3.cc: Likewise.
890 * testsuite/23_containers/unordered_map/requirements/
891 explicit_instantiation/5.cc: Do not test allocator rebinding extension
893 * testsuite/23_containers/unordered_multimap/requirements/
894 explicit_instantiation/3.cc: Do not run test for C++2a.
895 * testsuite/23_containers/unordered_multimap/requirements/
896 explicit_instantiation/5.cc: Do not test allocator rebinding extension
898 * testsuite/23_containers/unordered_multiset/requirements/
899 explicit_instantiation/3.cc: Do not run test for C++2a.
900 * testsuite/23_containers/unordered_multiset/requirements/
901 explicit_instantiation/5.cc: Do not test allocator rebinding extension
903 * testsuite/23_containers/unordered_set/requirements/
904 explicit_instantiation/3.cc: Do not run test for C++2a.
905 * testsuite/23_containers/unordered_set/requirements/
906 explicit_instantiation/5.cc: Do not test allocator rebinding extension
908 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
909 2.cc: Remove redundant test.
910 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
911 3.cc: Do not run test for C++2a.
912 * testsuite/23_containers/vector/requirements/explicit_instantiation/
915 * include/std/type_traits (is_empty, is_polymorphic, is_final)
916 (is_abstract, is_aggregate): Remove static_assert.
917 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
919 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
920 missing -std=gnu++17 option.
921 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
922 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
923 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
926 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
927 * testsuite/18_support/set_unexpected.cc: Likewise.
928 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
930 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
931 function to be valid in C++11.
932 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
933 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
934 include Library Fundamentals or Networking headers in C++11 mode.
935 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
937 * include/std/tuple (_TC): Replace with _TupleConstraints.
938 (_TupleConstraints): New helper for SFINAE constraints, with more
939 expressive member functions to reduce duplication when used.
940 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
941 (tuple::_TCC): Replace dummy type parameter with bool non-type
942 parameter that can be used to check the pack size.
943 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
944 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
945 checking constraints in constructors.
946 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
948 (tuple::tuple): Use new helpers to reduce repitition in constraints.
949 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
950 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
951 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
952 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
953 constraints in constructors.
954 (tuple::__is_alloc_arg()): New SFINAE helpers.
955 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
957 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
958 * testsuite/20_util/tuple/cons/90700.cc: New test.
959 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
960 to meet new constraint on allocator-extended default constructor.
962 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
964 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
965 * include/bits/stl_multimap.h (multimap): Likewise.
967 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
969 Rename variables and cleanup comments.
970 * include/bits/hashtable_policy.h
971 * include/bits/hashtable.h
973 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
975 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
976 Fix bgcolor for P0340R3.
977 * doc/html/*: Regenerate.
980 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
981 <experimental/memory_resource>.
982 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
983 P0339R6, P0340R3, P1164R1 and P1357R1.
984 * doc/html/*: Regenerate.
986 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
987 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
988 allocator::value_type assertion for C++2a.
989 * include/bits/hashtable.h: Likewise.
990 * include/bits/stl_deque.h: Likewise.
991 * include/bits/stl_list.h: Likewise.
992 * include/bits/stl_map.h: Likewise.
993 * include/bits/stl_multimap.h: Likewise.
994 * include/bits/stl_multiset.h: Likewise.
995 * include/bits/stl_set.h: Likewise.
996 * include/bits/stl_vector.h: Likewise.
997 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
998 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
999 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1000 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1001 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1002 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1003 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1004 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1005 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1006 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1007 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1008 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1010 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1012 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1014 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1016 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1018 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1020 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1022 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1024 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1027 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1028 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1029 * libsupc++/eh_term_handler.h: New header defining
1030 _GLIBCXX_DEFAULT_TERM_HANDLER.
1031 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1032 (set_terminate): Restore default handler when argument is null.
1033 (set_unexpected): Likewise.
1034 * testsuite/18_support/set_terminate.cc: New test.
1035 * testsuite/18_support/set_unexpected.cc: New test.
1037 * include/backward/hashtable.h (size_t, ptrdiff_t)
1038 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1039 (distance, vector, pair, __iterator_category): Remove
1040 using-declarations that add these names to namespace __gnu_cxx.
1041 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1042 * include/ext/debug_allocator.h (size_t): Likewise.
1043 * include/ext/functional (size_t, unary_function, binary_function)
1044 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1046 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1047 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1048 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1049 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1050 * include/ext/numeric (iota): Fix outdated comment.
1051 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1052 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1053 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1054 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1055 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1057 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1058 (allocator, __true_type, __false_type): Likewise.
1060 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1063 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1064 New helpers for checking preconditions in traits.
1065 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1066 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1067 (is_destructible, is_nothrow_destructible, is_constructible)
1068 (is_default_constructible, is_copy_constructible)
1069 (is_move_constructible, is_nothrow_default_constructible)
1070 (is_nothrow_constructible, is_nothrow_copy_constructible)
1071 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1072 (is_nothrow_assignable, is_nothrow_copy_assignable)
1073 (is_nothrow_move_assignable, is_trivially_constructible)
1074 (is_trivially_copy_constructible, is_trivially_move_constructible)
1075 is_trivially_assignable, is_trivially_copy_assignable)
1076 (is_trivially_move_assignable, is_trivially_destructible)
1077 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1078 (is_invocable_r, is_nothrow_invocable)
1079 (has_unique_object_representations, is_aggregate): Add static_asserts
1080 to make sure that type traits are not misused with incomplete types.
1081 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1082 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1083 base characteristics without assertions that can be reused in other
1085 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1086 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1088 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1089 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1090 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1091 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1092 * testsuite/20_util/is_function/value.cc: Likewise.
1093 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1094 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1096 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1097 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1098 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1099 * testsuite/20_util/is_union/value.cc: Likewise.
1100 * testsuite/20_util/is_void/value.cc: Likewise.
1101 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1103 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1105 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1106 Add new private member function.
1107 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1108 (random_device::_M_init_pretr1(const string&)): Call new private
1109 member with string data.
1110 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1112 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1113 test using COW strings.
1114 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1115 a value from the device.
1116 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1117 Fix typo in token string.
1119 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1121 LWG2788 basic_string spurious use of a default constructible allocator
1122 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1123 (basic_string::_M_replace_dispatch): Construct temporary string with
1124 the current allocator.
1125 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1126 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1128 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1130 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1132 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1133 section about new/delete overloads. Improve section on verbose
1135 * doc/html/*: Regenerate.
1137 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1138 P0811R3. Change status of P1353R0.
1139 * doc/html/*: Regenerate.
1141 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1142 documentation of implementation-defined types for [thread.req.native].
1143 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1144 implementation-defined strings for [variant.bad.access]. Fix typo in
1145 documentation of implementation-defined support for [fs.conform.9945].
1146 * doc/html/*: Regenerate.
1148 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1151 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1152 that fails on mingw-w64.
1155 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1156 (status(const path&, error_code&)): Use parent_path() to remove
1158 (symlink_status(const path&, error_code&)): Duplicate workaround for
1159 bug in _wstat for paths with trailing slash.
1160 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1161 with trailing slash.
1162 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1163 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1165 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1166 once instead of building it iteratively.
1168 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1170 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1171 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1172 the assembler supports rdseed.
1173 * config.h.in: Regenerate.
1174 * configure: Regenerate.
1175 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1176 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1177 * doc/html/*: Regenerate.
1178 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1179 * include/bits/random.h (random_device::random_device()): Always call
1180 _M_init rather than _M_init_pretr1.
1181 (random_device::random_device(const string&)): Likewise.
1182 (random_device::operator()()): Always call _M_getval().
1183 (random_device::_M_file): Replace first member of union with an
1184 anonymous struct, with _M_file as its first member.
1185 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1186 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1187 (USE_MT19937): Define if none of the above are defined.
1188 (USE_POSIX_FILE_IO): Define.
1189 (_M_strtoul): Remove.
1190 [USE_RDSEED] (__x86_rdseed): Define new function.
1191 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1192 (random_device::_M_init(const string&)): Initialize new union members.
1193 Add support for "rdseed" and "rand_s" tokens. Decide what the
1194 "default" token does according to which USE_* macros are defined.
1195 [USE_POSIX_FILE_IO]: Store a file descriptor.
1196 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1197 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1198 code from _M_strtoul.
1199 [!USE_MT19937]: Call _M_init, transforming the old default token or
1200 numeric tokens to "default".
1201 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1202 (random_device::_M_getval()): Use new union members to obtain a
1203 random number from the stored function pointer or file descriptor.
1204 [USE_MT19937]: Obtain a value from the mt19937 engine.
1205 (random_device::_M_getval_pretr1()): Call _M_getval().
1206 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1208 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1209 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1211 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1214 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1215 _M_split_cmpts() for a path with multiple components.
1216 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1217 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1218 components and reserve space in vector. Return early when there is
1220 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1221 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1223 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1224 form of std::equals for C++11 compatibility.
1226 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1228 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1229 C++ standard at ansi.org.
1231 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1233 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1234 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1237 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1238 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1240 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1242 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1244 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1245 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1246 "compile" test to "run".
1248 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1249 * doc/html/*: Regenerate.
1250 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1251 rvalue aliasing constructor.
1252 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1253 (reinterpret_pointer_cast): Add overloads taking rvalues.
1254 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1255 Add rvalue aliasing constructor.
1256 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1257 "run" and check return values as well as types.
1258 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1259 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1260 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1261 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1264 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1265 * doc/xml/manual/intro.xml: Likewise.
1266 * include/std/future (__create_task_state): Add default arguments
1267 to make providing an allocator optional.
1268 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1269 instead of delegating to another constructor.
1270 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1271 define allocator-extended constructors for C++17 and later.
1272 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1274 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1275 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1276 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1278 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1280 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1281 Don't run the libstdc++/83237 part on simulator targets.
1283 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1285 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1287 * doc/html/*: Regenerate.
1289 * include/experimental/any (__any_caster): Use RTTI if comparing
1290 addresses fails, to support non-unique addresses in shared libraries.
1291 * include/std/any (__any_caster): Likewise.
1294 * include/experimental/any (__any_caster): Constrain to only be
1295 callable for object types. Use remove_cv_t instead of decay_t.
1296 If the type decays or isn't copy constructible, compare the manager
1297 function to a dummy specialization.
1298 (__any_caster): Add overload constrained for non-object types.
1299 (any::_Manager_internal<_Op>): Add dummy specialization.
1300 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1303 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1306 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1307 reversed arguments to uninitialized_copy_n.
1308 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1309 is unchanged by copy assignment.
1310 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1311 compare path components.
1314 * include/experimental/memory_resource: Add system header pragma and
1315 do not define anything unless compiled as C++14 or later.
1316 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1317 (__resource_adaptor_imp::do_allocate): If the requested alignment
1318 is a fundamental alignment then either allocate directly from _M_alloc
1319 or call the new _M_allocate function.
1320 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1321 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1322 of the allocator rebound to a POD type with the specified alignment.
1323 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1324 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1325 Adjust expected allocation sizes.
1326 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1327 xfail for Solaris x86.
1329 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1331 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1332 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1333 Use std::__remove_cvref_t when building with GCC.
1335 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1338 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1339 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1340 Use check_v3_target_prop_cached to cache the result of the test.
1342 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1344 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1347 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1348 Changed v3_target_compile check from preprocess to executable.
1349 Added "-ltbb" to v3_target_compile flags.
1351 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1353 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1354 Add check for Thread Building Blocks 2018 or later.
1356 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1358 * testsuite/experimental/names.cc: Only include Networking TS headers
1359 on targets with the necessary Gthreads support.
1361 2019-05-20 Marek Polacek <polacek@redhat.com>
1363 CWG 2094 - volatile scalars are trivially copyable.
1365 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1366 result for volatile int.
1368 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1370 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1371 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1374 PR c++/90532 Ensure __is_constructible(T[]) is false
1375 * include/std/type_traits (__do_is_default_constructible_impl)
1376 (__is_default_constructible_atom, __is_default_constructible_safe):
1378 (is_default_constructible): Use is_constructible.
1379 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1380 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1381 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1382 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1385 2019-05-20 Pádraig Brady <pbrady@fb.com>
1387 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1388 to the deallocator with -fsized-deallocation.
1390 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1392 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1393 test by passing correct alignment to deallocate function.
1395 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1398 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1399 Raise exception if unique_ptr tuple member has unknown structure.
1400 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1401 Adjust worker to support new __uniq_ptr_data base class. Do not
1402 assume field called _M_head_impl is the first tuple element.
1404 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1406 * include/bits/stl_deque.h
1407 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1408 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1409 (_Deque_base::_Deque_impl_data): New.
1410 (_Deque_base::_Deque_impl): Inherit latter.
1411 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1412 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1413 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1414 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1415 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1416 (deque<>::deque()): Default.
1417 (deque<>::deque(deque&&)): Default.
1418 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1419 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1420 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1421 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1422 _M_range_initialize.
1423 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1424 (deque<>::resize(size_type, const value_type&)): Share a single
1426 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1427 _M_range_insert_aux.
1428 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1429 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1430 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1431 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1433 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1436 * include/std/variant (holds_alternative, get, get_if): Improve
1437 static assertion messages.
1438 (bad_variant_access::bad_variant_access()): Change default message.
1439 (__throw_bad_variant_access(bool)): New overload.
1440 (get): Use new overload.
1441 (visit, visit<R>): Improve exception message.
1443 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1444 targets. Add more cases from P0608R3.
1445 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1447 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1448 * include/experimental/type_traits (is_detected_exact)
1449 (is_detected_exact_v): Likewise.
1450 * include/pstl/execution_defs.h (is_execution_policy)
1451 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1452 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1453 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1454 * testsuite/experimental/names.cc: New test.
1457 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1458 assertions from the destructor.
1459 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1460 Move static_assert for hash function to here.
1461 (_Hash_table_base::_M_equals): Move static_assert for equality
1463 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1465 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1466 the value directly instead of calling _S_value.
1467 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1468 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1469 _S_key(_Const_Link_type).
1470 * testsuite/23_containers/set/85965.cc: Check construction,
1471 destruction, assignment and size() do not trigger the assertions.
1472 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1473 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1475 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1476 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1477 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1478 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1479 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1480 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1481 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1483 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1484 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1487 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1489 * doc/html/*: Regenerate.
1490 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1491 of decay_t (P0777R1).
1493 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1495 Move from state of allocators (LWG2593)
1496 * include/bits/stl_deque.h
1497 (_Deque_base(_Deque_base&&, false_type)): Remove.
1498 (_Deque_base(_Deque_base&&, true_type)): Remove.
1499 (_Deque_base(_Deque_base&&)): Adapt.
1500 (_Deque_base::_M_move_impl()): Remove.
1501 * testsuite/util/testsuite_allocator.h
1502 (propagating_allocator(propagating_allocator&&)): Preserve move from
1504 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1506 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1508 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1509 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1510 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1512 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1514 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1515 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1517 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1519 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1521 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1523 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1525 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1527 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1529 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1532 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1534 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1535 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1537 * include/std/variant (__overload_set): Remove.
1539 (_Build_FUN): New class template to define a single FUN overload,
1540 with specializations to prevent unwanted conversions, as per P0608R3.
1541 (_Build_FUNs): New class template to build an overload set of FUN.
1542 (_FUN_type): New alias template to perform overload resolution.
1543 (__accepted_type): Use integer_constant base for failure case. Use
1544 _FUN_type for successful case.
1545 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1546 (variant::variant(_Tp&&)): Likewise.
1547 (variant::operator=(_Tp&&)): Likewise.
1549 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1550 Replace raw visitation with a runtime check for the valueless state
1551 and a non-raw visitor.
1552 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1553 (variant::index()): Remove branch.
1554 (variant::swap(variant&)): Use valueless_by_exception() instead of
1555 comparing the index to variant_npos, and add likelihood attribute.
1557 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1558 (_Hashtable_base::_Equal_hash_code): Define new class template.
1559 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1562 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1563 Replace with _M_get non-static member function.
1564 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1566 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1567 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1569 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1570 _S_get accessors for members in EBO helpers.
1571 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1572 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1574 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1576 (_Hashtable_base::_M_eq()): Remove non-const overload.
1578 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1580 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1582 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1584 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1587 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1589 * config/os/solaris/solaris2.10: Move to ...
1590 * config/os/solaris: ... this.
1591 * configure.host (os_include_dir): Adapt.
1592 (abi_baseline_pair): Remove Solaris 10 handling.
1593 * config/abi/post/i386-solaris2.10: Remove.
1594 * config/abi/post/sparc-solaris2.10: Remove.
1595 * config/abi/post/i386-solaris2.11: Rename to ...
1596 * config/abi/post/i386-solaris: ... this.
1597 * config/abi/post/sparc-solaris2.11: Rename to ...
1598 * config/abi/post/sparc-solaris: ... this.
1600 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1603 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1606 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1608 * include/std/variant (__visit_with_index): Remove typedef.
1609 (__deduce_visit_result): New tag type.
1610 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1611 visitation of possibly-valueless variants, forwarding to __do_visit
1612 with the relevant tag type.
1613 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1614 and make lambda return void.
1615 (__variant_construct): Likewise.
1616 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1617 __raw_idx_visit and make lambda return void.
1618 (_Multi_array::__untag_result): Add metafunction to check the function
1619 pointer type for a tag type that dictates the kind of visitation.
1620 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1621 Use decltype(auto) instead of tagged function pointer type.
1622 (__gen_vtable_impl): Remove bool non-type parameter and unused
1623 _Variant_tuple parameter.
1624 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1625 (__gen_vtable_impl::__do_visit_invoke): Remove.
1626 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1627 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1628 for the visit<R> case, rather than dispatching to separate functions.
1629 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1631 (variant::swap): Likewise.
1632 (__do_visit): Replace two non-type template parameters with a single
1633 type parameter, so that the caller must specify the visitor's return
1634 type (or one of the tag types).
1635 (visit): Deduce a return type from the visitor and use the
1636 __deduce_visit_result tag to enforce that all overloads return the
1638 (visit<R>): Call __do_visit<R> with explicit result type.
1639 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1642 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1644 nonesuch is insufficiently useless (lwg2996)
1645 * include/std/type_traits (struct __nonesuch): Added private base
1646 class to make __nonesuch not an aggregate and removed deleted default
1648 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1649 (operator=(const pair&)): Use __nonesuch instead of
1650 __nonesuch_no_braces.
1651 (operator=(pair&&)): Likewise
1652 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1653 of __nonesuch_no_braces.
1654 (operator=(tuple&&)): Likewise
1655 * include/experimental/type_traits (struct nonesuch): Added private
1656 base class to make nonesuch not an aggregate and removed deleted
1657 default constructor.
1658 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1659 * testsuite/experimental/type_traits/nonesuch.cc: New.
1661 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1663 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1664 (_Function_handler): Remove partial specializations for void return
1665 types and pointers to member.
1666 (_Function_handler::_M_manager): Adapt to removal of
1667 _Simple_type_wrapper.
1668 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1669 * include/std/functional (_Bind_result::__enable_if_void)
1670 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1671 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1673 * include/std/future (__future_base::_Task_state::_M_run)
1674 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1675 change return type of lambda expressions.
1677 * include/bits/invoke.h (__invoke_r): Define new function implementing
1678 the INVOKE<R> pseudo-function.
1679 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1680 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1682 * include/std/type_traits (__is_nt_convertible_helper): Define it
1683 unconditionally, not only for C++20.
1684 (__is_nothrow_convertible): Define internal trait for use in C++11.
1685 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1686 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1687 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1688 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1689 that has nothrow explicit conversion but potentially-throwing implicit
1691 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1692 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1693 function to only consider implicit conversions.
1694 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1696 * include/std/iterator: Include <iosfwd> instead of <istream> and
1699 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1700 Remove unused, non-standard function.
1702 * include/bits/regex.h (match_results::max_size()): Adjust return
1703 value to account for prefix/suffix/unmatched subs.
1704 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1705 reset the contained sub matches.
1706 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1707 function to set result state following a failed match.
1708 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1709 sub_match states after _M_resize. Use _M_establish_failed_match.
1712 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1713 Replace single _Callable parameter with variadic _Args pack, to
1714 forward them directly to the tuple of decayed copies.
1715 * testsuite/30_threads/thread/cons/69724.cc: New test.
1717 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1719 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1720 * include/bits/basic_string.h: (operator=(const basic_string&):
1721 Move allocator decision to assign.
1722 (assign(const basic_string&)): Move allocator decision here.
1723 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1725 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1728 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1730 * testsuite/util/testsuite_allocator.h (memory_resource)
1731 (default_resource_mgr): Fix indentation.
1733 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1734 Use operator-> to access raw pointer member.
1735 * testsuite/23_containers/vector/59829.cc: Likewise.
1736 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1737 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1738 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1740 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1741 its constructors and equality operators. Change converting
1742 constructors to use operator-> to access private member of the other
1744 (PointerBase_void::operator->()): Add, for access to private member.
1745 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1746 (operator==(PointerBase, PointerBase)): Remove.
1747 (operator!=(PointerBase, PointerBase)): Remove.
1749 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1750 not assume field called _M_head_impl is the first tuple element.
1751 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1752 implementation more accurate.
1753 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1754 empty pointer type and non-empty deleter.
1756 LWG 2899 - Make is_move_constructible correct for unique_ptr
1757 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1758 move assignment operator.
1759 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1760 (__uniq_ptr_data): New class template with conditionally deleted
1762 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1763 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1764 constructor and move assignment operator as defaulted.
1765 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1766 __uniq_ptr_impl::release().
1767 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1768 to __uniq_ptr_impl::reset(pointer).
1769 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1770 Check for new __uniq_ptr_data type.
1771 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1773 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1775 PR libstdc++/90454.cc path construction from void*
1776 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1777 pointers to void are rejected as well as void.
1778 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1779 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1781 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1783 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1784 <remark> elements. Fix formatting of bibliography references.
1786 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1788 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1790 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1792 Remove Profile Mode, deprecated since 7.1.0
1793 * doc/Makefile.am: Remove XML file for profile mode docs.
1794 * doc/Makefile.in: Regenerate.
1795 * doc/xml/authors.xml: Remove authors of profile mode docs.
1796 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1798 * doc/xml/manual/debug.xml: Likewise.
1799 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1800 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1801 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1802 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1804 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1806 * doc/html/*: Regenerate.
1807 * include/Makefile.am: Remove profile mode headers.
1808 * include/Makefile.in: Regenerate.
1809 * include/bits/c++config (std::__profile): Remove namespace.
1810 [_GLIBCXX_PROFILE]: Remove checks for macro.
1811 * include/profile/array: Remove.
1812 * include/profile/base.h: Remove.
1813 * include/profile/bitset: Remove.
1814 * include/profile/deque: Remove.
1815 * include/profile/forward_list: Remove.
1816 * include/profile/impl/profiler.h: Remove.
1817 * include/profile/impl/profiler_algos.h: Remove.
1818 * include/profile/impl/profiler_container_size.h: Remove.
1819 * include/profile/impl/profiler_hash_func.h: Remove.
1820 * include/profile/impl/profiler_hashtable_size.h: Remove.
1821 * include/profile/impl/profiler_list_to_slist.h: Remove.
1822 * include/profile/impl/profiler_list_to_vector.h: Remove.
1823 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1824 * include/profile/impl/profiler_node.h: Remove.
1825 * include/profile/impl/profiler_state.h: Remove.
1826 * include/profile/impl/profiler_trace.h: Remove.
1827 * include/profile/impl/profiler_vector_size.h: Remove.
1828 * include/profile/impl/profiler_vector_to_list.h: Remove.
1829 * include/profile/iterator_tracker.h: Remove.
1830 * include/profile/list: Remove.
1831 * include/profile/map: Remove.
1832 * include/profile/map.h: Remove.
1833 * include/profile/multimap.h: Remove.
1834 * include/profile/multiset.h: Remove.
1835 * include/profile/ordered_base.h: Remove.
1836 * include/profile/set: Remove.
1837 * include/profile/set.h: Remove.
1838 * include/profile/unordered_base.h: Remove.
1839 * include/profile/unordered_map: Remove.
1840 * include/profile/unordered_set: Remove.
1841 * include/profile/vector: Remove.
1842 * scripts/run_doxygen: Do not process profile mode headers.
1843 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1845 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1846 Remove dg-skip-if for profile mode.
1847 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1848 preprocessor check for profile mode.
1849 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1850 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1852 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1854 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1855 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1856 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1857 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1858 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1860 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1862 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1864 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1866 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1867 preprocessor check for profile mode.
1868 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1870 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1871 Remove dg-skip-if for profile mode.
1872 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1873 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1874 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1875 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1876 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1877 * testsuite/Makefile.am: Remove profile_flags variable and
1878 * testsuite/Makefile.am: Remove profile_flags variable and
1879 check-profile target.
1880 * testsuite/Makefile.in: Regenerate.
1881 * testsuite/ext/profile/all.cc: Remove.
1882 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1883 * testsuite/ext/profile/profiler_algos.cc: Remove.
1884 * testsuite/ext/profile/replace_new.cc: Remove.
1885 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1886 preprocessor check for profile mode.
1887 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1888 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1889 (check_v3_target_normal_mode): Do not check for profile mode macro.
1890 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1892 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1893 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1894 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1895 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1896 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1897 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1898 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1899 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1900 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1901 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1903 Remove array_allocator extension, deprecated since 4.9.0
1904 * doc/xml/manual/allocator.xml: Remove documentation for
1906 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1907 * doc/xml/manual/using.xml: Remove header from documentation.
1908 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1909 * include/Makefile.in: Regenerate.
1910 * include/ext/array_allocator.h: Remove.
1911 * include/precompiled/extc++.h: Do not include removed header.
1912 * testsuite/ext/array_allocator/1.cc: Remove.
1913 * testsuite/ext/array_allocator/2.cc: Remove.
1914 * testsuite/ext/array_allocator/26875.cc: Remove.
1915 * testsuite/ext/array_allocator/3.cc: Remove.
1916 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1917 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1918 * testsuite/ext/array_allocator/check_new.cc: Remove.
1919 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1920 * testsuite/ext/headers.cc: Do not include removed header.
1922 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1924 * include/bits/stl_bvector.h
1925 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1927 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1929 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1931 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1933 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1935 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1937 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1939 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1941 (_Bit_iterator::operator-(difference_type)): Likewise.
1942 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1943 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1945 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1946 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1948 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
1951 * testsuite/util/thread/all.h: Do not use remove_pointer for
1952 std::thread::native_handle_type.
1955 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
1956 (_Variant_storage<true, Types...>::_M_reset()))
1957 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
1958 (__get_storage): Likewise.
1959 (variant): Add noexcept to friend declarations for __get and
1963 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
1964 Use _Require for constraints.
1965 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
1967 (__uniq_ptr_hash): New base class with conditionally-disabled call
1969 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
1970 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1971 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
1973 * include/bits/shared_ptr.h: Improve docs.
1974 * include/bits/shared_ptr_base.h: Likewise.
1975 * include/bits/stl_uninitialized.h: Likewise.
1976 * include/bits/unique_ptr.h: Likewise.
1977 * libsupc++/new: Likewise.
1979 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
1981 * include/bits/stl_deque.h
1982 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1984 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1986 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1988 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1990 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1992 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
1994 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
1996 (_Deque_iterator<>::operator-(difference_type)): Likewise.
1998 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2001 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2002 (test01): Reserve for number of insertions to avoid rehash during test.
2003 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2005 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2010 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2012 * include/experimental/bits/fs_path.h: Improve docs.
2013 * include/experimental/bits/net.h: Fix wrong header name in comment.
2014 Do not document implementation details.
2015 * include/experimental/netfwd: Fix doxygen grouping.
2017 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2019 * include/bits/stl_pair.h: Improve docs.
2020 * include/std/tuple: Likewise.
2022 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2024 * include/std/chrono: Improve docs.
2025 * include/std/ratio: Do not document implementation details.
2026 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2028 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2031 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2032 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2033 (__duration_common_type): New helper.
2034 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2035 __duration_common_type.
2036 (__timepoint_common_type_wrapper): Replace with ...
2037 (__timepoint_common_type): New helper.
2038 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2039 Use __time_point_common_type.
2040 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2041 (__common_type_impl): If either argument is transformed by decay,
2042 use the common_type of the decayed types.
2043 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2044 decayed, use __do_common_type_impl to get the common_type.
2045 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2046 (__do_member_type_wrapper, __member_type_wrapper)
2047 (__expanded_common_type_wrapper): Remove.
2048 (__common_type_pack, __common_type_fold): New helpers.
2049 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2050 __member_type_wrapper and __expanded_common_type_wrapper.
2051 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2052 Test zero-length template argument list.
2053 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2054 Test single argument cases and argument types that should decay.
2055 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2056 Adjust expected error.
2057 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2059 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2060 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2061 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2063 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2065 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2067 Make allocator propagation more consistent for
2068 operator+(basic_string) (P1165R1)
2069 * include/bits/basic_string.h
2070 (operator+(basic_string&&, basic_string&&): Changed resulting
2071 allocator to always be the one from the first parameter.
2072 * include/bits/basic_string.tcc
2073 (operator+(const _CharT*, const basic_string&)): Changed
2074 resulting allocator to be SOCCC on the second parameter's allocator.
2075 (operator+(_CharT, const basic_string&)): Likewise.
2076 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2078 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2081 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2083 * include/bits/regex.h: Improve docs.
2084 * include/bits/regex.tcc: Do not document implementation details.
2086 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2088 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2090 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2091 Add type printer for container types in std::__debug namespace.
2092 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2093 (gdb-tests): Use distinct parameters for the type of test and use of
2095 (gdb-test): Check for regex test even if 'whatis' test.
2096 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2098 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2099 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2100 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2101 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2102 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2103 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2104 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2106 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2108 * include/std/system_error (error_category): Fix comment.
2111 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2112 argument is an empty path.
2113 (absolute(const path&, error_code&)): Use invalid_argument as error
2114 code instead of no_such_file_or_directory.
2115 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2116 of non-existent paths and empty paths with both overloads of absolute.
2118 * include/std/system_error (error_category, error_code)
2119 (error_condition): Improve docs.
2120 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2121 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2122 to class documentation. Suppress documentation for implementation
2124 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2125 Suppress documentation for implementation details.
2127 * include/std/system_error (error_code): Remove friend declaration
2128 for hash<error_code>.
2129 (hash<error_code>::operator()): Use public member functions to access
2131 (hash<error_condition>::operator()): Use address of category, not
2132 its object representation.
2133 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2134 Use public member functions to access value and category.
2135 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2137 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2139 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2140 * include/bits/hashtable_policy.h
2141 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2142 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2143 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2144 smaller than input value rather than always greater. Preserve
2145 _M_next_resize if called with 0 input. Use __builtin_floorl.
2146 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2147 elements + number of insertions is greater than _M_next_resize. Start
2148 with 11 buckets if not told otherwise. Use __builtin_floorl.
2149 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2150 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2151 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2152 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2153 told otherwise. Use __builtin_floorl.
2154 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2155 to also validate _Power2_rehash_policy.
2156 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2159 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2162 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2166 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2167 overflow warning with -Wpedantic -Wsystem-headers.
2169 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2172 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2173 * include/bits/move.h (swap): Remove extra parentheses.
2175 * include/experimental/bits/lfts_config.h: Improve doc markup.
2176 * include/experimental/optional: Improve docs.
2177 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2178 (__constexpr_addressof): Remove.
2179 (optional::operator->()): Use std::__addressof().
2180 * include/std/optional (optional::operator->()): Adjust whitespace.
2181 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2182 that operator-> is still constexpr with overloaded operator&. Change
2183 to compile-only test.
2184 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2187 * include/bits/shared_ptr.h: Improve docs.
2188 * include/bits/shared_ptr_atomic.h: Likewise.
2189 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2191 * include/bits/basic_string.h: Fix iterator/index confusion in
2193 * include/bits/range_access.h: Fix Doxygen warnings.
2194 * include/bits/refwrap.h: Do not document implementation details.
2195 (ref, cref): Group docs with reference_wrapper.
2196 * include/std/fstream: Fix Doxygen markup.
2197 * libsupc++/initializer_list (begin, end): Group docs with
2200 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2202 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2203 * include/std/mutex: Likewise.
2204 * include/std/shared_mutex: Likewise.
2206 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2207 * include/bits/fs_fwd.h: Likewise.
2208 * include/bits/fs_ops.h: Likewise.
2209 * include/bits/fs_path.h: Likewise.
2210 * include/std/filesystem: Likewise.
2212 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2213 * include/experimental/buffer: Likewise.
2214 * include/experimental/executor: Likewise.
2215 * include/experimental/internet: Likewise.
2216 * include/experimental/io_context: Likewise.
2217 * include/experimental/net: Likewise.
2218 * include/experimental/netfwd: Likewise.
2219 * include/experimental/socket: Likewise.
2220 * include/experimental/timer: Likewise.
2222 * doc/doxygen/doxygroups.cc: Move description of experimental group
2224 * include/experimental/algorithm: Add to libfund-ts doc group.
2225 * include/experimental/any: Likewise. Do not document implementation
2227 * include/experimental/array: Add to libfund-ts doc group.
2228 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2229 for Library Fundamentals.
2230 * include/experimental/chrono: Add to libfund-ts doc group.
2231 * include/experimental/deque: Likewise.
2232 * include/experimental/forward_list: Likewise.
2233 * include/experimental/functional: Likewise.
2234 * include/experimental/iterator: Likewise.
2235 * include/experimental/list: Likewise.
2236 * include/experimental/map: Likewise.
2237 * include/experimental/memory: Likewise.
2238 * include/experimental/memory_resource: Likewise. Improve docs.
2240 * include/experimental/numeric: Add to libfund-ts doc group.
2241 * include/experimental/optional: Likewise.
2242 * include/experimental/propagate_const: Likewise.
2243 * include/experimental/random: Likewise.
2244 * include/experimental/ratio: Likewise.
2245 * include/experimental/regex: Likewise.
2246 * include/experimental/set: Likewise.
2247 * include/experimental/source_location: Likewise.
2248 * include/experimental/string: Likewise.
2249 * include/experimental/string_view: Likewise.
2250 * include/experimental/system_error: Likewise.
2251 * include/experimental/tuple: Likewise.
2252 * include/experimental/type_traits: Likewise.
2253 * include/experimental/unordered_map: Likewise.
2254 * include/experimental/unordered_set: Likewise.
2255 * include/experimental/utility: Likewise.
2256 * include/experimental/vector: Likewise.
2257 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2258 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2259 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2261 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2262 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2263 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2264 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2265 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2267 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2268 * include/experimental/bits/fs_fwd.h: Improve docs.
2269 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2270 * include/experimental/bits/fs_path.h: Likewise.
2271 (path, filesystem_error, u8path): Improve docs.
2272 * include/experimental/filesystem: Link to docs for TS.
2274 * config/allocator/new_allocator_base.h (__allocator_base): Add
2275 workaround for Doxygen bug #6945.
2276 * include/std/memory: Improve docs. Define group for pointer safety.
2277 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2278 conditional to suppress documentation for implementation details.
2280 * include/bits/specfun.h: Improve docs.
2281 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2284 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2285 (std::experimental): Add docs.
2286 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2287 namespace to nothing when generating docs.
2288 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2289 * include/std/chrono (std::chrono): Likewise.
2290 * include/std/functional (std::placeholders): Likewise.
2291 * include/std/thread (std::this_thread): Likewise.
2293 * include/parallel/settings.h: Fix Doxygen markup.
2295 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2296 anything unless PB_DS_CLASS_C_DEC is defined.
2297 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2298 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2299 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2300 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2301 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2302 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2303 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2305 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2306 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2307 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2308 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2309 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2310 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2311 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2312 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2313 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2314 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2315 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2317 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2318 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2320 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2323 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2324 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2325 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2328 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2330 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2331 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2332 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2333 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2334 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2335 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2337 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2338 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2341 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2344 * include/std/complex (__complex_proj): Return parameter unchanged.
2345 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2346 floating-point types to take std::complex arguments.
2347 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2348 floating-point types.
2349 * testsuite/26_numerics/complex/proj.cc: New test.
2351 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2353 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2354 to _Lock_policyE[012].
2355 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2357 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2359 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2360 macros accidentally left in.
2361 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2362 unnecessary -lstdc++fs option. Fix test for mingw.
2363 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2366 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2368 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2370 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2372 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2374 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2375 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2378 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2380 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2383 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2384 class template and partial specialization.
2387 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2389 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2390 functions to convert a value to an integral type.
2391 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2392 (fill_n): Convert _Size parameter to an integral type.
2393 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2394 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2395 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2396 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2397 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2398 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2400 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2402 Adding noexcept-specification on tuple constructors (LWG 2899)
2403 * libstdc++-v3/include/std/tuple:
2404 (tuple()): Add noexcept-specification.
2405 (tuple(const _Elements&...)): Likewise
2406 (tuple(_UElements&&...)): Likewise
2407 (tuple(const tuple<_UElements...>&)): Likewise
2408 (tuple(tuple<_UElements...>&&)): Likewise
2409 (tuple(const _T1&, const _T2&)): Likewise
2410 (tuple(_U1&&, _U2&&)): Likewise
2411 (tuple(const tuple<_U1, _U2>&): Likewise
2412 (tuple(tuple<_U1, _U2>&&): Likewise
2413 (tuple(const pair<_U1, _U2>&): Likewise
2414 (tuple(pair<_U1, _U2>&&): Likewise
2415 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2417 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2420 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2421 arguments with __restrict.
2423 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2425 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2427 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2429 * include/experimental/bits/fs_path.h
2430 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2431 avoid redundant call to _S_convert_loc with non-const pointers.
2433 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2434 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2435 * testsuite/21_strings/basic_string/hash/hash.cc
2436 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2437 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2438 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2440 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2441 wstring::_M_replace_dispatch with more specific patterns.
2442 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2443 Create const std::string to avoid redundant call to _S_convert_loc
2444 with non-const pointers.
2445 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2446 avoid unnecessary basic_string::assign instantiations.
2448 * include/std/memory (__uses_alloc_args): Add string-literal to
2449 static_assert, to match the one in __uses_alloc.
2450 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2451 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2452 for recursive uses-allocator construction of nested pairs.
2453 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2456 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2458 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2459 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2460 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2461 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2463 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2464 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2465 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2466 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2467 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2468 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2469 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2471 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2474 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2475 * include/std/scoped_allocator [__cplusplus > 201703L]
2476 (scoped_allocator_adaptor::construct): Define in terms of
2477 uses_allocator_construction_args, as per P0591R4.
2478 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2479 * testsuite/util/testsuite_allocator.h: Remove name of unused
2482 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2484 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2485 * doc/html/*: Regenerate.
2487 * include/bits/fs_path.h (operator<, operator<=, operator>)
2488 (operator>=, operator==, operator!=): Make hidden friends, as per
2490 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2491 string type in test.
2492 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2494 * include/std/any (any::any(ValueType&&)): Use __and_v.
2495 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2498 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2500 * include/std/type_traits (__result_of_memfun): Use remove_reference
2501 instead of __remove_cvref_t and remove redundant is_same check.
2502 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2504 * include/experimental/string_view (basic_string_view::pointer)
2505 (basic_string_view::reference): Fix to refer to non-const value_type.
2506 * include/bits/basic_string.h (basic_string): Use __sv_check and
2507 __sv_limit instead of basic_string_view::_M_check and
2508 basic_string_view::_M_limit.
2509 * include/std/string_view (__sv_check, __sv_limit): New
2510 helper functions to replace basic_string_view::_M_check and
2511 basic_string_view::_M_limit.
2512 (basic_string_view): Add static assertions to enforce ill-formed
2513 requirement for traits_type::char_type from P1148R0, and to enforce
2514 required properties of char-like types.
2515 (basic_string_view::pointer, basic_string_view::reference): Fix to
2516 refer to non-const value_type.
2517 (basic_string_view::operator[], basic_string_view::at)
2518 (basic_string_view::front, basic_string_view::back)
2519 (basic_string_view::data): Use const_reference and const_pointer
2520 typedefs for return types.
2521 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2522 (hash<wstring_view>): Fix argument_type typedef.
2523 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2524 char/1.cc: Fix expected return type of basic_string_view::data().
2525 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2526 wchar_t/1.cc: Likewise.
2527 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2528 char/1.cc: Likewise.
2529 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2530 wchar_t/1.cc: Likewise.
2531 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2533 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2534 Check reference and pointer typedefs.
2535 * testsuite/experimental/string_view/requirements/typedefs.cc:
2537 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2538 Fix expected return type of basic_string_view::data().
2539 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2541 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2543 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2547 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2548 Avoid a runtime check for types that can never be stored in std::any.
2549 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2552 PR libstdc++/90220 (partial)
2553 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2554 not attempt ill-formed static_cast to pointers to non-object types.
2555 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2558 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2559 prevent -Wcatch-value warning.
2561 * include/std/variant (__variant_construct): Use template parameter
2562 type instead of equivalent decltype-specifier.
2563 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2564 Replace forward with move.
2565 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2566 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2567 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2568 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2569 index after construction succeeds.
2570 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2571 if-constexpr checks that are always true. Use __remove_cvref_t instead
2572 of remove_reference so that is_nothrow_move_constructible check
2573 doesn't use a const rvalue parameter. In the potentially-throwing case
2574 construct a temporary and move assign it, as per LWG 2904.
2575 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2576 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2577 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2578 construct a temporary and move assign from it, as per LWG 2904.
2579 * testsuite/20_util/variant/exception_safety.cc: Check that
2580 assignment operators have strong exception safety guarantee.
2582 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2584 Document PSTL linker flags
2586 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2588 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2590 * include/std/variant (__detail::__variant::_Traits): Make
2591 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2592 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2594 (__detail::__variant::_Copy_assign_alias): Only depend on
2595 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2596 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2597 move assignment operators.
2600 * include/std/variant (variant::__not_self): New helper for the
2601 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2602 (variant::__to_type_impl): Remove.
2603 (variant::__to_type): Add default argument to check pack size, instead
2604 of using __to_type_impl.
2605 (variant::__accepted_type): Add default argument using __not_self.
2606 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2607 for variant(T&&) constructor constraint.
2608 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2609 Extract __accepted_type into a named template parameter for reuse in
2610 other constraints and in the exception specification.
2611 (variant::variant(in_place_type_t<T>, Args&&...))
2612 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2613 (variant::variant(in_place_index_t<T>, Args&&...))
2614 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2615 (variant::operator=T&&)): Remove redundant && from trait arguments.
2616 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2617 isn't used for in_place_type or in_place_index arguments.
2619 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2620 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2621 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2623 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2624 Bernd Edlinger <bernd.edlinger@hotmail.de>
2625 Jakub Jelinek <jakub@redhat.com>
2628 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2629 general-regs-only target attribute for ARM.
2631 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2634 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2635 specialization also depend on is_nothrow_move_constructible.
2636 * include/std/variant (__detail::__variant::__never_valueless()):
2637 Only true if the variant would have a move assignment operator.
2638 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2639 Check __never_valueless<T...>().
2640 (variant::emplace): Only perform non-throwing move assignments
2641 for never-valueless alternatives if the variant has a move assignment
2643 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2644 types can be emplaced into non-assignable variants.
2645 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2646 don't get copied when emplaced into non-assignable variants.
2648 * include/std/variant (__detail::__variant::__ref_cast): Remove
2650 (__detail::__variant::_Uninitialized::_M_get)
2651 (__detail::__variant::__get)
2652 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2654 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2656 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2658 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2659 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2660 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2661 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2663 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2665 Delegate PSTL configuration to pstl/pstl_config.h
2667 * include/bits/c++config: Remove explicit PSTL configuration
2668 macros and use definitions from <pstl/pstl_config.h>.
2670 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2672 Cleanup algorithm implementations
2673 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2675 (mismatch): Forward execution policy.
2676 (equal): Qualify call to std::equal().
2677 (partial_sort): Forward execution policy.
2678 (inplace_merge): Forward execution policy.
2680 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2682 Improve implementation of parallel equal()
2683 * include/pstl/algorithm_impl.h
2684 (__internal::__brick_equal): use "4 iterator" version of
2686 (__internal::__brick_equal): use simd for random access
2687 iterators on unsequenced execution policies.
2688 (__internal::__pattern_equal): add "4 iterator" version
2689 (__internal::__pattern_equal): dispatch to simd __brick_equal
2690 for vector-only execution policies.
2691 (__internal::__pattern_equal): dispatch to __parallel_or for
2692 parallel execution policies.
2693 * include/pstl/glue_algorithm_impl.h
2694 (std::equal): dispatch to "4 iterator" version of
2695 __internal::__pattern_equal().
2697 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2700 * include/bits/forward_list.h (operator==): Do not use operator!= to
2702 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2703 earlier in the list, so that sort is stable.
2704 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2705 * testsuite/23_containers/forward_list/comparable.cc: Test with
2706 types that meet the minimum EqualityComparable and LessThanComparable
2707 requirements. Remove irrelevant comment.
2709 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2710 Do not depend on whether all alternative types are move constructible.
2711 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2712 from the operand when deciding whether to perform the assignment.
2713 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2714 with deleted move constructor and deleted move assignment operator.
2715 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2716 behaviour of variants with DeletedMoves as an alternative.
2717 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2718 (move_ctor, move_assign): Check that moving a variant with a
2719 DeletedMoves alternative falls back to copying instead of moving.
2721 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2722 from static_assert declarations.
2724 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2725 actually match its name.
2726 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2727 (test_swap()): Fix result for MoveCtorOnly and check
2728 MoveCtorAndSwapOnly.
2730 * include/std/optional (optional::value_or(U&&) &&): Add missing
2731 constexpr specifier.
2732 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2733 for disengaged optionals and rvalue optionals.
2734 * testsuite/20_util/optional/observers/4.cc: Likewise.
2736 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2738 * include/pstl/algorithm_impl.h: Uglify identfiers.
2739 * include/pstl/numeric_impl.h: Uglify identfiers.
2740 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2742 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2744 * include/bits/c++config:
2745 Add definition for __PSTL_ASSERT.
2746 Add definition for __PSTL_ASSERT_MSG.
2747 * include/pstl/algorithm_impl.h: Replace use of assert().
2748 * include/pstl/numeric_impl.h: Replace use of assert().
2749 * include/pstl/parallel_backend_tbb.h:
2750 Replace use of assert().
2751 Replace use of __TBB_ASSERT().
2752 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2754 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2757 * src/c++17/memory_resource.cc
2758 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2759 needed to allow placing a _Chunk at the end of the buffer.
2760 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2762 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2764 * doc/xml/faq.xml: Add information about emergency EH pool.
2765 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2766 Move outdated information on mt_allocator to a separate section.
2767 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2768 doesn't affect the default allocator.
2770 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2774 * testsuite/20_util/variant/89851.cc: New test.
2776 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2778 * include/std/variant: Adjust whitespace. Add comments.
2779 (_Multi_array): Leave primary template undefined.
2780 (_Multi_array<_Tp>): Define partial specialization for base case of
2782 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2783 which is always a reference.
2784 (__gen_vtable::_S_apply()): Remove function, inline body into
2785 default member initializer.
2786 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2788 * include/std/variant (__variant_idx_cookie): Add member type.
2789 (__visitor_result_type): Remove.
2790 (__do_visit): Use invoke_result instead of __visitor_result_type.
2791 * testsuite/20_util/variant/visit.cc: New test.
2794 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2796 * testsuite/20_util/variant/90008.cc: New test.
2798 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2800 * include/pstl/algorithm_impl.h: Add namespace qualification.
2801 * include/pstl/execution_defs.h: Add namespace qualification.
2802 * include/pstl/execution_impl.h: Add namespace qualification.
2803 * include/pstl/numeric_impl.h: Add namespace qualification.
2804 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2805 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2806 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2808 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2810 Fix visit<R> for variant.
2811 * include/std/variant (__do_visit): Add a template parameter
2812 for enforcing same return types for visit.
2813 (__gen_vtable_impl): Likewise.
2814 (_S_apply_single_alt): Adjust.
2815 (__visit_invoke_impl): New. Handle casting to void.
2816 (__do_visit_invoke): New. Enforces same return types.
2817 (__do_visit_invoke_r): New. Converts return types.
2818 (__visit_invoke): Adjust.
2819 (__gen_vtable): Add a template parameter for enforcing
2820 same return types for visit.
2821 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2822 different return types.
2823 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2824 visitors with different return types don't accidentally
2825 compile with regular visitation.
2827 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2829 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2830 dg-require-filesystem-ts.
2832 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2834 * doc/xml/manual/status_cxx2020.xml: Update status.
2835 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2836 * testsuite/20_util/variant/visit_r.cc: New test.
2838 * include/bits/fs_dir.h (directory_iterator::operator*)
2839 (directory_iterator::operator->): Add noexcept.
2840 (operator==, operator!=): Replace namespace-scope equality operators
2841 for directory iterators with hidden friends.
2844 * config/abi/pre/gnu.ver: Add missing exports.
2845 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2848 * config/abi/pre/gnu.ver: Export new symbols.
2849 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2850 (recursive_directory_iterator::recursion_pending())
2851 (recursive_directory_iterator::disable_recursion_pending()): Remove
2852 inline definitions. Make noexcept.
2853 (recursive_directory_iterator::depth())
2854 (recursive_directory_iterator::operator*())
2855 (recursive_directory_iterator::operator->()): Make noexcept.
2856 (recursive_directory_iterator::_M_options)
2857 (recursive_directory_iterator::_M_pending): Remove data members.
2858 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2859 (recursive_directory_iterator::recursive_directory_iterator): Remove
2860 ctor-initializer. Use new constructor for _Dir_stack.
2861 (recursive_directory_iterator::options())
2862 (recursive_directory_iterator::recursion_pending())
2863 (recursive_directory_iterator::disable_recursion_pending()): Add
2864 non-inline definitions.
2865 (recursive_directory_iterator::depth()): Make noexcept.
2866 (recursive_directory_iterator::increment(error_code&))
2867 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2868 location of options and recursion_pending members.
2869 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2870 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2871 user-declared move constructor and assignment operator, to make the
2874 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2875 d_type == DT_UNKNOWN immediately.
2876 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2878 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2880 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2882 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2883 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2886 PR libstdc++/87431 (again)
2887 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2888 Define partial specialization for basic_string.
2889 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2890 shared_ptr and weak_ptr.
2891 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2893 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2895 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2897 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2899 * include/std/any (_Never_valueless_alt): Define explicit
2900 specialization for any.
2901 * include/std/variant (_Never_valueless_alt): Define primary template.
2902 (__never_valueless): Use _Never_valueless_alt instead of
2903 is_trivially_copyable.
2904 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2905 initializations to avoid try-catch overhead. Add special case for
2906 scalars produced by potentially-throwing conversions. Use
2907 _Never_valueless_alt instead of is_trivially_copyable for the
2908 remaining strong exception-safety cases.
2909 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2910 * testsuite/20_util/variant/87431.cc: Run both test functions.
2911 * testsuite/20_util/variant/exception_safety.cc: New test.
2912 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2913 so the variant becomes valueless.
2915 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2918 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2920 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2922 * include/std/string (__hash_string_base): New class template defining
2923 operator() for hashing strings.
2924 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2925 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2926 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2927 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2929 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2931 Use single-visitation in variant assignment and swap and relops.
2932 Also use indices instead of types when checking whether
2933 variants hold the same thing.
2934 * include/std/variant (__do_visit): Add a template parameter
2935 for index visitation, invoke with indices if index visitation
2937 (__variant_idx_cookie): New.
2938 (__visit_with_index): Likewise.
2939 (_Copy_assign_base::operator=): Do single-visitation with
2941 (_Move_assign_base::operator=): Likewise.
2942 (_Extra_visit_slot_needed): Adjust.
2943 (__visit_invoke): Call with indices if it's an index visitor.
2944 (relops): Do single-visitation with an index visitor.
2946 (__visitor_result_type): New.
2948 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2950 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
2952 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2954 Don't revisit a variant we are already visiting.
2955 * include/std/variant (__variant_construct_single): New.
2956 (__variant_construct): Use it.
2957 (_M_destructive_move): Likewise.
2958 (_M_destructive_copy): Likewise.
2959 (_Copy_assign_base::operator=): Adjust.
2960 (_Move_assign_base::operator=): Likewise.
2963 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
2966 * include/bits/hashtable.h (_Hashtable): Move static assertions to
2967 destructor so they are not evaluated until the _Key type is complete.
2968 * include/bits/stl_tree.h (_Rb_tree): Likewise.
2969 * testsuite/23_containers/set/85965.cc: New test.
2970 * testsuite/23_containers/unordered_set/85965.cc: New test.
2971 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
2972 with regexp matching the corresponding _Rb_tree specialization.
2973 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2974 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
2975 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2976 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2977 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2978 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2979 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2981 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2984 Fix based on a suggestion by Antony Polukhin.
2985 * include/std/variant (__never_valueless): New.
2987 (_Extra_visit_slot_needed): New.
2988 (_Multi_array): Use it.
2989 (_S_apply_all_alts): Likewise.
2991 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2994 Fix based on a suggestion by Antony Polukhin.
2995 * include/std/variant (__gen_vtable): Don't reserve an
2996 additional table slot, _Multi_array already does that.
2998 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3001 Fix based on a suggestion by Antony Polukhin.
3002 * include/std/variant (__variant_construct): Capture a pointer
3003 to the storage and visit just one variant.
3005 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3007 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3008 Doxygen-generated pages with unstable URL.
3009 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3010 * doc/xml/manual/extensions.xml: Likewise.
3011 * doc/xml/manual/parallel_mode.xml: Likewise.
3012 * doc/xml/manual/support.xml: Likewise.
3014 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3015 avoid -Wconversion warnings.
3017 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3019 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3020 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3021 (allstamped): Add stamp-pstl.
3022 (install-headers): Add ptsl_builddir.
3023 * include/Makefile.in: Regenerate.
3024 * include/bits/c++config: Add pstl configuration.
3025 * include/pstl/LICENSE.txt: New file.
3026 * include/pstl/algorithm_fwd.h: New file.
3027 * include/pstl/algorithm_impl.h: New file.
3028 * include/pstl/execution_defs.h: New file.
3029 * include/pstl/execution_impl.h: New file.
3030 * include/pstl/glue_algorithm_defs.h: New file.
3031 * include/pstl/glue_algorithm_impl.h: New file.
3032 * include/pstl/glue_execution_defs.h: New file.
3033 * include/pstl/glue_memory_defs.h: New file.
3034 * include/pstl/glue_memory_impl.h: New file.
3035 * include/pstl/glue_numeric_defs.h: New file.
3036 * include/pstl/glue_numeric_impl.h: New file.
3037 * include/pstl/memory_impl.h: New file.
3038 * include/pstl/numeric_fwd.h: New file.
3039 * include/pstl/numeric_impl.h: New file.
3040 * include/pstl/parallel_backend.h: New file.
3041 * include/pstl/parallel_backend_tbb.h: New file.
3042 * include/pstl/parallel_backend_utils.h: New file.
3043 * include/pstl/parallel_impl.h: New file.
3044 * include/pstl/pstl_config.h: New file.
3045 * include/pstl/unseq_backend_simd.h: New file.
3046 * include/pstl/utils.h: New file.
3047 * include/std/algorithm: Include parallel algorithm implementations.
3048 * include/std/execution: New file.
3049 * include/std/memory: Include parallel algorithm implementations.
3050 * include/std/numeric: Include parallel algorithm implementations.
3051 * include/std/version: Add parallel algorithms feature test macro.
3052 * testsuite/util/pstl/pstl_test_config.h: New file.
3053 * testsuite/util/pstl/test_utils.h: New file.
3054 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3055 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3056 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3057 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3058 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3059 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3060 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3061 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3062 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3063 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3064 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3065 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3066 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3067 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3068 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3069 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3070 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3071 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3072 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3073 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3074 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3075 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3076 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3077 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3078 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3079 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3080 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3081 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3082 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3083 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3084 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3085 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3086 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3087 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3088 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3089 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3090 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3091 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3092 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3093 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3094 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3095 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3096 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3097 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3098 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3099 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3100 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3101 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3102 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3103 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3104 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3105 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3106 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3107 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3108 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3109 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3110 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3111 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3112 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3113 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3114 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3115 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3116 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3117 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3118 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3119 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3120 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3121 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3122 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3123 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3124 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3125 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3126 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3127 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3128 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3129 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3130 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3131 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3132 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3133 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3134 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3135 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3136 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3137 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3138 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3139 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3140 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3141 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3142 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3143 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3144 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3145 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3146 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3147 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3148 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3149 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3150 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3151 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3152 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3153 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3154 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3155 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3156 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3157 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3158 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3159 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3161 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3163 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3164 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3165 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3166 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3167 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3168 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3169 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3170 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3171 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3172 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3173 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3174 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3175 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3176 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3177 when the special functions IS is enabled, not for C++17.
3178 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3180 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3181 without checks for special functions in C++17.
3182 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3186 * include/backward/hash_map: Use <> for includes not "".
3187 * include/backward/hash_set: Likewise.
3188 * include/backward/strstream: Likewise.
3189 * include/tr1/bessel_function.tcc: Likewise.
3190 * include/tr1/exp_integral.tcc: Likewise.
3191 * include/tr1/legendre_function.tcc: Likewise.
3192 * include/tr1/modified_bessel_func.tcc: Likewise.
3193 * include/tr1/riemann_zeta.tcc: Likewise.
3195 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3197 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3198 of extension allocators.
3199 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3200 Document new headers in 7.2, 8.1 and 9.1 releases.
3201 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3202 * doc/html/*: Regenerate.
3204 2019-03-12 John David Anglin <dave.anglin@bell.net>
3207 * testsuite/lib/libstdc++.exp: Locate libatomic.
3208 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3209 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3211 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3212 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3213 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3214 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3216 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3219 * configure.ac: Check for sockatmark.
3220 * crossconfig.m4: Check for sockatmark.
3221 * config.h.in: Regenerate.
3222 * configure: Regenerate.
3223 * include/experimental/internet (address_v4::_S_hton): Rename
3224 overloaded functions to _S_hton_16 and _S_ntoh_16.
3225 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3226 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3227 * include/experimental/socket (basic_socket::at_mark): Check
3228 _GLIBCXX_HAVE_SOCKATMARK.
3230 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3231 const variables instead of macros.
3234 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3235 Use correct type for len_aligned.
3236 * testsuite/20_util/hash/89629.cc: New test.
3238 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3241 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3242 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3243 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3244 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3245 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3246 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3247 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3248 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3249 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3250 memory_order_seq_cst to int.
3252 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3254 * doc/xml/manual/using.xml: Use link element instead of xref.
3255 * doc/html/*: Regenerate.
3257 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3259 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3262 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3263 parameters in deduction guides.
3264 * include/debug/multimap.h (multimap): Likewise.
3265 * include/debug/set.h (multimap): Likewise.
3266 * include/debug/multiset.h (multimap): Likewise.
3267 * include/debug/unordered_map (unordered_map): Likewise.
3268 (unordered_multimap): Likewise.
3269 * include/debug/unordered_set (unordered_set): Likewise.
3270 (unordered_multiset): Likewise.
3273 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3274 Invalidate all iterators in case of rehash.
3275 (unordered_multimap<>::_M_check_rehashed): Likewise.
3276 * include/debug/unordered_set
3277 (unordered_set<>::_M_check_rehashed): Likewise.
3278 (unordered_multiset<>::_M_check_rehashed): Likewise.
3279 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3281 2019-03-07 Andreas Schwab <schwab@suse.de>
3283 * config/abi/post/riscv64-linux-gnu: New directory.
3284 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3286 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3288 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3289 compile test to run. Fix typo.
3291 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3292 * doc/html/*: Regenerate.
3294 P0356R5 Simplified partial function application
3295 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3296 helpers for bind_front.
3297 (bind_front, __cpp_lib_bind_front): Define.
3298 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3300 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3302 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3303 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3304 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3305 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3307 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3309 PR libstdc++/86655 - std::assoc_legendre should not constrain
3310 the value of m (or x).
3311 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3312 __sph_legendre): If degree > order Don't throw, return 0.
3313 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3314 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3315 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3316 * testsuite/tr1/5_numerical_facilities/special_functions/
3317 02_assoc_legendre/pr86655.cc: New test.
3318 * testsuite/tr1/5_numerical_facilities/special_functions/
3319 22_sph_legendre/pr86655.cc: New test.
3321 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3324 Also PR libstdc++/85517
3325 * include/std/variant (__do_visit): New.
3326 (__variant_cast): Likewise.
3327 (__variant_cookie): Likewise.
3328 (__erased_*): Remove.
3329 (_Variant_storage::_S_vtable): Likewise.
3330 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3331 (_Variant_storage::__M_reset): Adjust.
3332 (__variant_construct): New.
3333 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3334 __variant_construct.
3335 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3336 (_Move_ctor_base::__M_destructive_copy): New.
3337 (_Move_ctor_base::__M_destructive_move): Adjust to use
3338 __variant_construct.
3339 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3340 (_Copy_assign_alias): Adjust to check both copy assignment
3341 and copy construction for triviality.
3342 (_Move_assign_base::operator=): Adjust to use __do_visit.
3343 (_Multi_array): Add support for visitors that accept and return
3345 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3346 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3347 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3348 a __variant_cookie temporary for a variant that is valueless and..
3349 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3350 (__gen_vtable::_Array_type): Conditionally make space for
3351 the __variant_cookie visitor case.
3352 (__variant_construct_by_index): New.
3353 (get_if): Adjust to use std::addressof.
3354 (relops): Adjust to use __do_visit.
3355 (variant): Add __variant_cast and __variant_construct_by_index
3357 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3358 instead of self-destruction.
3359 (variant::swap): Adjust to use __do_visit.
3360 (visit): Reimplement in terms of __do_visit.
3361 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3362 * testsuite/20_util/variant/compile.cc: Adjust.
3363 * testsuite/20_util/variant/run.cc: Likewise.
3365 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3367 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3369 * testsuite/experimental/feat-char8_t.cc: Likewise.
3371 * include/std/type_traits [C++20] (is_bounded_array)
3372 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3374 * testsuite/20_util/is_bounded_array/requirements/
3375 explicit_instantiation.cc: New test.
3376 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3378 * testsuite/20_util/is_bounded_array/value.cc: New test.
3379 * testsuite/20_util/is_unbounded_array/requirements/
3380 explicit_instantiation.cc: New test.
3381 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3383 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3385 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3387 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3389 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3391 * include/c_compatibility/math.h [C++20] (lerp): Add using
3393 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3394 (__lerp): Define function template to implement lerp.
3395 (lerp(float, float, float), lerp(double, double, double))
3396 (lerp(long double, long double, long double)): Define for C++20.
3397 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3398 (midpoint(T, T), midpoint(T*, T*)): Define.
3399 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3400 * testsuite/26_numerics/lerp.cc: New test.
3401 * testsuite/26_numerics/midpoint/floating.cc: New test.
3402 * testsuite/26_numerics/midpoint/integral.cc: New test.
3403 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3405 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3407 PR libstdc++/88996 Implement P0439R0
3408 Make std::memory_order a scoped enumeration.
3409 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3410 add variables for the old enumerators. Adjust calls.
3411 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3412 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3414 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3416 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3419 * include/std/memory_resource (polymorphic_allocator): Add default
3420 template argument for C++20.
3421 (polymorphic_allocator::allocate_bytes)
3422 (polymorphic_allocator::deallocate_bytes)
3423 (polymorphic_allocator::allocate_object)
3424 (polymorphic_allocator::deallocate_object)
3425 (polymorphic_allocator::new_object)
3426 (polymorphic_allocator::delete_object): New member functions for
3428 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3431 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3434 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3437 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3439 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3440 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3442 * include/std/memory (uses_allocator_construction_args): New set of
3443 overloaded functions.
3444 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3446 * include/std/memory_resource (polymorphic_allocator::construct)
3447 [__cplusplus > 201703l]: Replace all overloads with a single function
3448 using uses_allocator_construction_args.
3449 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3451 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3453 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3456 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3457 stylesheet directories before check for xsltproc. Try to use
3458 xmlcatalog to find local stylesheet directory before trying hardcoded
3459 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3460 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3461 use xsltproc if xmlcatalog fails to find a local stylesheet.
3462 * configure.ac: Check for xmlcatalog.
3463 * Makefile.in: Regenerate.
3464 * configure: Likewise.
3465 * doc/Makefile.in: Likewise.
3466 * include/Makefile.in: Likewise.
3467 * libsupc++/Makefile.in: Likewise.
3468 * po/Makefile.in: Likewise.
3469 * python/Makefile.in: Likewise.
3470 * src/Makefile.in: Likewise.
3471 * src/c++11/Makefile.in: Likewise.
3472 * src/c++17/Makefile.in: Likewise.
3473 * src/c++98/Makefile.in: Likewise.
3474 * src/filesystem/Makefile.in: Likewise.
3475 * testsuite/Makefile.in: Likewise.
3477 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3480 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3481 container deduction guides.
3482 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3483 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3484 parameters in deduction guides.
3485 * include/bits/stl_multimap.h (multimap): Likewise.
3486 * include/bits/stl_multiset.h (multiset): Likewise.
3487 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3488 * include/bits/stl_set.h (set): Likewise.
3489 * include/bits/stl_stack.h (stack): Likewise.
3490 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3491 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3492 constrain parameters in deduction guides.
3493 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3495 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3497 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3498 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3499 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3500 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3502 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3504 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3507 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3508 to class template and partial specialization using void_t.
3509 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3511 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3514 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3515 copy and move members public.
3517 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3519 * include/std/type_traits (__underlying_type_impl): New helper to
3520 make underlying_type SFINAE-friendly.
3521 (underlying_type): Derive from __underlying_type_impl.
3522 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3526 * include/bits/char_traits.h (__constant_char_array): Check index is
3527 in range before dereferencing.
3528 (char_traits<char>::compare, char_traits<char>::find)
3529 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3530 immediately if n is zero.
3531 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3532 Remove workarounds for PR 67026.
3533 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3535 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3538 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3540 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3541 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3543 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3546 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3547 type to std::size_t and argument to type to long double.
3549 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3551 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3552 * config/abi/post/sparc64-linux-gnu: New directory.
3553 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3554 * config/abi/post/sparc64-linux-gnu/32: New directory.
3555 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3557 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3559 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3560 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3563 2019-02-22 Tom Honermann <tom@honermann.net>
3565 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3566 printers for u8string and u8string_view.
3568 2019-02-22 Tom Honermann <tom@honermann.net>
3570 * testsuite/18_support/byte/ops.cc: Validate
3571 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3572 std::to_integer<char32_t>.
3573 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3574 std::numeric_limits<char8_t>.
3575 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3576 std::numeric_limits<char8_t>::lowest().
3577 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3578 std::numeric_limits<char8_t>::max_digits10.
3579 * testsuite/18_support/type_info/fundamental.cc: Validate
3580 typeinfo for char8_t.
3581 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3582 std::from_chars with char8_t.
3583 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3584 Validate explicit instantiation of std::hash<char8_t>.
3585 * testsuite/20_util/is_integral/value.cc: Validate
3586 std::is_integral<char8_t>.
3587 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3588 Validate std::make_signed<char8_t>.
3589 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3590 Validate u8string construction from char8_t sources.
3591 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3593 * testsuite/21_strings/basic_string_view/operations/compare/
3594 char/70483.cc: Validate substr operations on u8string_view.
3595 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3596 the u8string_view typedef is defined.
3597 * testsuite/21_strings/char_traits/requirements/
3598 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3600 * testsuite/21_strings/char_traits/requirements/
3601 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3602 constexpr member functions.
3603 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3604 that the u8string typedef is defined.
3605 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3606 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3607 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3608 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3610 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3611 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3613 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3614 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3615 Validate std::atomic<char8_t>::is_always_lock_free
3616 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3617 Update line numbers.
3618 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3620 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3622 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3623 Validate std::experimental::pmr::u8string.
3624 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3625 u8string_view typedef is defined.
3626 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3627 char32_t to the typelists.
3629 2019-02-22 Tom Honermann <tom@honermann.net>
3631 * include/ext/typelist.h: Constrain a partial specialization of
3632 typelist::detail::append_ to only match chain<T1,T2>.
3634 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3637 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3638 class template with class. Replace move and copy member types with
3639 member alias templates, so they are only instantiated when needed.
3640 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3641 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3642 test for C++11/14/17 as well.
3643 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3646 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3649 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3650 _GLIBCXX_PURE to the alias declaration.
3652 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3654 * testsuite/21_strings/basic_string/literals/types.cc
3655 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3656 * testsuite/21_strings/basic_string/literals/values.cc
3657 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3658 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3659 potentially having different type.
3660 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3661 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3663 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3664 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3665 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3666 string literals only using basic character set.
3667 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3668 u8 literals to char.
3669 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3670 Test ATOMIC_CHAR8_T_LOCK_FREE.
3671 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3672 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3673 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3674 * testsuite/experimental/string_view/literals/types.cc
3675 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3677 * testsuite/experimental/string_view/literals/values.cc
3678 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3680 2019-02-19 Tom Honermann <tom@honermann.net>
3682 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3683 from char16_32_t.cc; validates numeric_limits<char8_t>.
3684 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3685 test cloned from types.cc; validates operator""s for char8_t
3687 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3688 test cloned from values.cc; validates construction and comparison
3690 * testsuite/21_strings/basic_string/requirements/
3691 /explicit_instantiation/char8_t/1.cc: New test cloned from
3692 char16_t/1.cc; validates explicit instantiation of
3693 basic_string<char8_t>.
3694 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3695 New test cloned from types.cc; validates operator""sv for char8_t
3696 returns u8string_view.
3697 * testsuite/21_strings/basic_string_view/literals/
3698 values-char8_t.cc: New test cloned from values.cc; validates
3699 construction and comparison of u8string_view values.
3700 * testsuite/21_strings/basic_string_view/requirements/
3701 explicit_instantiation/char8_t/1.cc: New test cloned from
3702 char16_t/1.cc; validates explicit instantiation of
3703 basic_string_view<char8_t>.
3704 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3705 New test cloned from char16_t/65049.cc; validates that
3706 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3707 * testsuite/21_strings/char_traits/requirements/char8_t/
3708 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3709 that char_traits<char8_t> member typedefs are present and correct.
3710 * testsuite/21_strings/char_traits/requirements/
3711 explicit_instantiation/char8_t/1.cc: New test cloned from
3712 char16_t/1.cc; validates explicit instantiation of
3713 char_traits<char8_t>.
3714 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3715 from char16_t.cc: validates
3716 codecvt<char16_t, char8_t, mbstate_t>.
3717 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3718 from char32_t.cc: validates
3719 codecvt<char32_t, char8_t, mbstate_t>.
3720 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3721 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3722 codecvt<char32_t, char8_t, std::mbstate_t>.
3723 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3724 test cloned from string.cc; validates filesystem::path construction
3726 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3727 the __cpp_lib_char8_t feature test macro is defined with the
3729 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3730 New test cloned from string.cc; validates filesystem::path
3731 construction from char8_t input.
3732 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3733 test cloned from types.cc; validates operator""sv for char8_t
3734 returns u8string_view.
3735 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3736 New test cloned from values.cc; validates construction and
3737 comparison of u8string_view values.
3738 * testsuite/experimental/string_view/requirements/
3739 explicit_instantiation/char8_t/1.cc: New test cloned from
3740 char16_t/1.cc; validates explicit instantiation of
3741 basic_string_view<char8_t>.
3742 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3743 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3746 2019-02-19 Tom Honermann <tom@honermann.net>
3748 P0482R5 char8_t: Standard library support
3749 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3750 typeinfo symbols for char8_t.
3751 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3752 (GLIBCXX_3.4.26): Add symbols for specializations of
3753 numeric_limits and codecvt that involve char8_t.
3754 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3755 * include/bits/atomic_base.h: Add atomic_char8_t.
3756 * include/bits/basic_string.h: Add std::hash<u8string> and
3757 operator""s(const char8_t*, size_t).
3758 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3760 * include/bits/char_traits.h: Add char_traits<char8_t>.
3761 * include/bits/codecvt.h: Add
3762 codecvt<char16_t, char8_t, mbstate_t>,
3763 codecvt<char32_t, char8_t, mbstate_t>,
3764 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3765 codecvt_byname<char32_t, char8_t, mbstate_t>.
3766 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3767 recognize char8_t as an integral type.
3768 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3770 (path::u8string): Return std::u8string when char8_t support is
3772 (path::generic_u8string): Likewise.
3773 (path::_S_convert): Handle conversion from char8_t input.
3774 (path::_S_str_convert): Likewise.
3775 * include/bits/functional_hash.h: Add hash<char8_t>.
3776 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3778 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3779 for new char8_t specializations.
3780 * include/bits/localefwd.h: Add missing declarations of
3781 codecvt<char16_t, char, mbstate_t> and
3782 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3783 codecvt<char16_t, char8_t, mbstate_t> and
3784 codecvt<char32_t, char8_t, mbstate_t>.
3785 * include/bits/postypes.h: Add u8streampos
3786 * include/bits/stringfwd.h: Add declarations of
3787 char_traits<char8_t> and u8string.
3788 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3789 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3791 (path::u8string): Return std::u8string when char8_t support is
3793 (path::generic_u8string): Likewise.
3794 (path::_S_convert): Handle conversion from char8_t input.
3795 (path::_S_str_convert): Likewise.
3796 * include/experimental/string: Add u8string.
3797 * include/experimental/string_view: Add u8string_view,
3798 hash<experimental::u8string_view>, and
3799 operator""sv(const char8_t*, size_t).
3800 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3801 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3802 as a character type.
3803 * include/std/limits: Add numeric_limits<char8_t>.
3804 * include/std/string_view: Add u8string_view,
3805 hash<experimental::u8string_view>, and
3806 operator""sv(const char8_t*, size_t).
3807 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3808 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3809 * libsupc++/atomic_lockfree_defines.h: Define
3810 ATOMIC_CHAR8_T_LOCK_FREE.
3811 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3812 codecvt.cc and limits.cc so that char8_t specializations of
3813 numeric_limits and codecvt and emitted.
3814 * src/c++11/Makefile.in: Likewise.
3815 * src/c++11/codecvt.cc: Define members of
3816 codecvt<char16_t, char8_t, mbstate_t>,
3817 codecvt<char32_t, char8_t, mbstate_t>,
3818 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3819 codecvt_byname<char32_t, char8_t, mbstate_t>.
3820 * src/c++11/limits.cc: Define members of
3821 numeric_limits<char8_t>.
3822 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3823 locale_init.cc and localename.cc.
3824 * src/c++98/Makefile.in: Likewise.
3825 * src/c++98/locale_init.cc: Add initialization for the
3826 codecvt<char16_t, char8_t, mbstate_t> and
3827 codecvt<char32_t, char8_t, mbstate_t> facets.
3828 * src/c++98/localename.cc: Likewise.
3829 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3831 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3833 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3834 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3835 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3837 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3839 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3840 * doc/html/*: Regenerate.
3842 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3843 * doc/html/*: Regenerate.
3845 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3846 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3847 allocator type in is_constructible checks.
3848 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3849 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3850 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3851 problematic type from LWG 2586 discussion.
3852 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3853 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3855 * configure.ac: Check for C11 timespec_get function.
3856 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3858 * config.h.in: Regenerate.
3859 * configure: Regenerate.
3860 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3861 std for C++17 and up.
3863 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3864 * include/bits/stl_queue.h
3865 (priority_queue(const Compare&, const Container&, const Alloc&))
3866 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3868 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3870 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3871 * include/bits/stl_queue.h (queue, priority_queue): Add static
3872 assertions to enforce LWG 2566 requirement on value_type.
3873 * include/bits/stl_stack.h (stack): Likewise.
3876 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3878 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3879 * include/bits/std_abs.h: Add comment about LWG 2735.
3880 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3882 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3885 * include/std/version [__cpp_impl_destroying_delete]
3886 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3887 * libsupc++/new [__cpp_impl_destroying_delete]
3888 (__cpp_lib_destroying_delete): Likewise.
3889 (destroying_delete_t, destroying_delete): Likewise, but define even
3890 when __cpp_impl_destroying_delete is not defined.
3891 * testsuite/18_support/destroying_delete.cc: New test.
3893 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3896 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3897 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3898 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3899 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3901 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3904 * include/bits/fs_path.h (path::has_root_name)
3905 (path::has_root_directory, path::has_root_path)
3906 (path::has_relative_path, path::has_parent_path)
3907 (path::has_filename, path::has_stem, path::has_extension)
3908 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3910 * src/c++17/fs_path.cc (path::has_root_name)
3911 (path::has_root_directory, path::has_root_path)
3912 (path::has_relative_path, path::has_parent_path)
3913 (path::has_filename, path::_M_find_extension): Add noexcept.
3915 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3917 PR libstdc++/89102 (partial)
3918 * include/std/type_traits (common_type<>): Define.
3919 (common_type<T>): Derive from common_type<T, T>.
3920 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3921 Test zero-length template argument list.
3922 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3923 Test additional single argument cases.
3924 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3925 Adjust expected error.
3927 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3930 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3932 * include/bits/stl_stack.h (stack): Likewise.
3933 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3934 * testsuite/23_containers/queue/deduction.cc: New test.
3935 * testsuite/23_containers/stack/deduction.cc: New test.
3938 * include/std/type_traits (__is_convertible_helper)
3939 (__is_convertible_helper<_From, _To, false>): Revert changes to
3940 support is_nothrow_convertible.
3941 (__is_nt_convertible_helper): New helper.
3942 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3944 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3945 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3948 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3949 __is_alloc_insertable_impl. Replace single type member with two
3950 members, one for each of copy and move insertable.
3951 (__is_move_insertable): New trait for internal use.
3952 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
3953 (vector::_S_nothrow_relocate(true_type)): New functions to
3954 conditionally check if __relocate_a can throw.
3955 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
3956 on __is_move_insertable.
3957 (vector::_S_do_relocate): New overloaded functions to conditionally
3959 (vector::_S_relocate): New function that dispatches to _S_do_relocate
3960 based on _S_use_relocate.
3961 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3962 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
3963 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
3966 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
3967 parameter unnamed. Add message to static assertion.
3968 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
3969 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
3972 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
3975 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
3977 (__is_bitwise_relocatable): ... to this.
3978 (__relocate_a_1): Adapt.
3979 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
3980 (__is_bitwise_relocatable): ... to this.
3982 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
3985 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
3986 final component as well as from _M_pathname. Append the dot using
3987 operator+= instead of only to _M_pathname.
3988 (path::_M_find_extension): Reformat slightly.
3989 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
3990 Add more test cases.
3992 2019-01-30 Ulrich Drepper <drepper@redhat.com>
3994 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
3996 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
3998 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
3999 constexpr specifiers from arg and proj.
4001 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4002 __shared_ptr instantiations used by gcc4-compatible ABI.
4004 * include/experimental/forward_list (experimental::erase): Qualify
4006 * include/experimental/list (experimental::erase): Likewise.
4007 * include/std/forward_list (std::erase): Likewise.
4008 * include/std/list (std::erase): Likewise.
4010 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4012 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4013 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4014 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4015 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4016 * testsuite/ext/array_allocator/26875.cc: Likewise.
4017 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4018 * testsuite/util/replacement_memory_operators.h: Likewise.
4019 * testsuite/util/testsuite_allocator.h: Likewise.
4021 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4022 normal mode vector, even for debug mode.
4023 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4024 Define alias template for normal mode vector.
4026 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4029 * config/locale/generic/c_locale.h (__convert_from_v)
4030 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4031 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4032 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4033 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4035 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4038 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4039 data member with static member function _S_use_relocate().
4040 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4041 (vector::_M_default_append): Use _S_use_relocate() instead of
4044 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4047 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4050 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4051 write to stderr instead of using printf.
4053 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4056 * include/bits/char_traits.h (__constant_string_p,
4057 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4060 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4062 Implement C++20 P0600r1.
4063 * include/backward/hash_map: Add nodiscard attribute to empty.
4064 * include/backward/hash_set: Likewise.
4065 * backward/hashtable.h: Likewise.
4066 * include/bits/basic_string.h: Likewise.
4067 * include/bits/forward_list.h: Likewise.
4068 * include/bits/hashtable.h: Likewise.
4069 * include/bits/regex.h: Likewise.
4070 * include/bits/stl_deque.h: Likewise.
4071 * include/bits/stl_list.h: Likewise.
4072 * include/bits/stl_map.h: Likewise.
4073 * include/bits/stl_multimap.h: Likewise.
4074 * include/bits/stl_multiset.h: Likewise.
4075 * include/bits/stl_queue.h: Likewise.
4076 * include/bits/stl_set.h: Likewise.
4077 * include/bits/stl_stack.h: Likewise.
4078 * include/bits/stl_tree.h: Likewise.
4079 * include/bits/stl_vector.h: Likewise.
4080 * include/bits/unordered_map.h: Likewise.
4081 * include/bits/unordered_set.h: Likewise.
4082 * include/debug/array: Likewise.
4083 * include/experimental/any: Likewise.
4084 * include/experimental/bits/fs_path.h: Likewise.
4085 * include/experimental/internet: Likewise.
4086 * include/experimental/string_view: Likewise.
4087 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4089 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4091 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4093 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4095 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4097 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4099 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4101 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4103 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4104 info_fn_imps.hpp: Likewise.
4105 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4106 left_child_next_sibling_heap_.hpp: Likewise.
4107 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4109 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4111 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4113 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4115 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4117 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4119 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4121 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4122 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4123 * include/ext/rope: Likewise.
4124 * include/ext/slist: Likewise.
4125 * include/ext/vstring.h: Likewise.
4126 * include/profile/array: Likewise.
4127 * include/std/array: Likewise.
4128 * include/tr1/array: Likewise.
4129 * include/tr1/hashtable.h: Likewise.
4130 * include/tr1/regex: Likewise.
4131 * include/tr2/dynamic_bitset: Likewise.
4132 * include/bits/alloc_traits.h: Add nodiscard attribute to
4134 * include/experimental/memory_resource: Likewise.
4135 * include/ext/alloc_traits.h: Likewise.
4136 * include/ext/array_allocator.h: Likewise.
4137 * include/ext/bitmap_allocator.h: Likewise.
4138 * include/ext/debug_allocator.h: Likewise.
4139 * include/ext/extptr_allocator.h: Likewise.
4140 * include/ext/mt_allocator.h: Likewise.
4141 * include/ext/new_allocator.h: Likewise.
4142 * include/ext/pool_allocator.h: Likewise.
4143 * include/ext/throw_allocator.h: Likewise.
4144 * include/std/scoped_allocator: Likewise.
4145 * libsupc++/eh_alloc.cc: Likewise.
4146 * include/std/future: Add nodiscard attribute to async.
4147 * libsupc++/new: Add nodiscard attribute to new.
4149 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4154 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4155 * include/bits/shared_ptr.h
4156 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4157 (allocate_shared): Change to use new tag type.
4158 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4159 Declare new member function.
4160 (_Sp_alloc_shared_tag): Define new type.
4161 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4162 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4163 _Sp_make_shared_tag::_S_eq to check type_info.
4164 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4165 Constrain to prevent being called with _Sp_alloc_shared_tag.
4166 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4167 Replace constructor with ...
4168 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4169 reference parameter so address of the new object can be returned to
4170 the caller. Obtain the allocator from the tag type.
4171 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4172 constructor with ...
4173 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4174 to the __shared_count constructor.
4175 (__allocate_shared): Change to use new tag type.
4176 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4178 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4180 * src/c++17/fs_ops.cc
4181 (equivalent(const path&, const path&, error_code&))
4182 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4183 compare files instead of relying on incomplete info returned by stat.
4186 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4187 if the path is already absolute.
4188 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4189 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4192 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4193 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4194 of filesystem::exists.
4195 (create_directories(const path&, error_code&)): Add assertions.
4196 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4197 Add workaround for bug in _wstat for paths with trailing slash.
4198 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4199 for expected behaviour on mingw.
4200 * testsuite/experimental/filesystem/operations/create_directories.cc:
4202 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4203 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4204 not test permissions on mingw targets.
4206 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4208 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4209 constructors and open members taking wide strings. Fix patterns for
4210 filesystem::path members to match wstring_view parameters. Add
4211 exports for shared_ptr members used by directory iterators.
4212 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4213 error code parameter if the file doesn't exist.
4214 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4216 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4217 values for mingw targets, where "/" is not an absolute path. Do not
4218 test symlinks on mingw targets.
4219 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4220 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4222 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4223 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4224 that each component of the path is created.
4225 * testsuite/experimental/filesystem/operations/create_directories.cc:
4227 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4228 permissions on mingw targets.
4229 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4230 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4231 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4232 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4234 * testsuite/experimental/filesystem/operations/permissions.cc:
4236 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4237 symlinks or permissions on mingw targets.
4238 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4239 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4240 symlinks on mingw targets.
4241 * testsuite/experimental/filesystem/operations/remove_all.cc:
4243 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4244 permissions on mingw targets.
4245 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4246 test symlinks on mingw targets.
4247 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4250 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4253 Warn about unused comparisons of shared_ptr/unique_ptr
4254 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4255 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4256 <, <=, >, >= for shared_ptr.
4257 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4259 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4261 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4262 as 201611L, because P0497R0 changes are supported.
4263 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4265 * include/bits/erase_if.h [__cplusplus > 201703L]
4266 (__cpp_lib_erase_if): Only define for C++2a.
4267 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4268 (__cpp_lib_null_iterators): Define.
4269 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4270 (__cpp_lib_null_iterators): Define.
4271 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4273 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4275 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4277 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4278 changes are supported.
4279 * include/std/optional (__cpp_lib_optional): Likewise.
4280 * include/std/variant (__cpp_lib_variant): Likewise.
4281 * include/std/version [!__STRICT_ANSI__]
4282 (__cpp_lib_uncaught_exceptions): Define as long integer.
4283 [__cplusplus >= 201703L] (__cpp_lib_any)
4284 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4285 (__cpp_lib_variant): Define for C++17.
4286 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4288 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4291 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4293 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4297 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4299 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4302 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4304 * doc/xml/manual/intro.xml: Include new section.
4305 * doc/xml/manual/status_cxx2017.xml: Document more
4306 implementation-defined properties of the library.
4307 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4308 * doc/html/*: Regenerate.
4310 * include/bits/refwrap.h [__cplusplus > 201703L]
4311 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4312 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4313 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4315 (reference_wrapper::operator()): Add static assertion.
4316 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4318 * include/std/chrono (duration_values::zero(), duration_values::min())
4319 (duration_values::max()): Add noexcept.
4320 (duration::zero(), duration::min(), duration::max()): Likewise.
4321 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4322 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4323 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4325 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4327 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4329 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4330 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4332 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4335 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4336 specialization for C++17 (P0513R0, LWG 2817).
4337 * testsuite/20_util/hash/nullptr.cc: New test.
4340 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4341 pattern for std::basic_stringbuf::str().
4343 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4344 basic_ostream::operator<< patterns.
4346 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4348 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4349 test failures on targets with 32-bit time_t.
4351 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4352 * include/std/deque: Likewise.
4353 * include/std/forward_list: Likewise.
4354 * include/std/list: Likewise.
4355 * include/std/string: Likewise.
4356 * include/std/vector: Likewise.
4357 * include/std/version: Likewise.
4358 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4359 * testsuite/23_containers/deque/erasure.cc: Likewise.
4360 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4361 * testsuite/23_containers/list/erasure.cc: Likewise.
4362 * testsuite/23_containers/map/erasure.cc: Likewise.
4363 * testsuite/23_containers/set/erasure.cc: Likewise.
4364 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4365 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4366 * testsuite/23_containers/vector/erasure.cc: Likewise.
4368 * include/experimental/internet [AI_NUMERICSERV]
4369 (resolver_base::numeric_service): Define conditionally.
4370 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4372 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4375 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4376 Jonathan Wakely <jwakely@redhat.com>
4379 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4380 (GLIBCXX_3.4.26): Add new exports.
4381 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4382 correct list of sources.
4383 * include/Makefile.in: Regenerate.
4384 * include/std/ostream (operator<<(nullptr_t)): New member function.
4385 * src/c++17/ostream-inst.cc: New file.
4386 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4389 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4391 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4392 of the source file containing the caller.
4393 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4394 directories created by test.
4395 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4397 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4399 * testsuite/experimental/filesystem/iterators/
4400 recursive_directory_iterator.cc: Likewise.
4402 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4404 PR tree-optimization/88775
4405 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4406 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4407 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4408 instead of __builtin_constant_p if available. Don't bother with
4409 the pointer comparison in C++11 and earlier.
4411 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4415 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4418 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4420 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4421 for filesystem::path. Give variables more distinctive names.
4423 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4424 member function to perform non-trivial assignment.
4425 (_Optional_payload_base::_M_move_assign): Likewise.
4426 (_Optional_payload<T, true, false, true>::operator=)
4427 (_Optional_payload<T, true, true, false>::operator=)
4428 (_Optional_payload<T, true, false, false>::operator=): Call
4429 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4432 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4433 test std::complex<long double> if long double format is IBM128.
4434 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4437 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4439 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4440 for old std::unique_ptr layout.
4441 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4442 to become valueless. Add filesystem::path tests.
4445 * include/std/optional (_Optional_payload_base): New class template
4446 for common code hoisted from _Optional_payload specializations. Use
4447 a template for the union, to allow a partial specialization for
4448 types with non-trivial destructors. Add constructors for in-place
4449 initialization to the union.
4450 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4451 to perform non-trivial copy construction, instead of relying on
4452 non-standard copy elision in a delegating constructor.
4453 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4454 non-trivial move construction.
4455 (_Optional_payload): Derive from _Optional_payload_base and use it
4456 for everything except the non-trivial assignment operators, which are
4458 (_Optional_payload<false, C, M>): Derive from the specialization
4459 _Optional_payload<true, false, false> and add a destructor.
4460 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4461 Forward to corresponding members of _Optional_payload.
4462 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4463 Hoist common members from _Optional_base.
4464 (_Optional_base): Make all members and base class public.
4465 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4466 _Optional_base_impl.
4467 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4468 support for new std::optional layout.
4469 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4472 * include/bits/locale_conv.h: Use <> for includes not "".
4473 * include/ext/random: Likewise.
4474 * include/ext/vstring.h: Likewise.
4476 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4478 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4479 (GLIBCXX_3.4.21): Likewise.
4481 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4484 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4485 to match the one that controls whether utimbuf and utime are declared.
4487 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4490 * include/bits/char_traits.h (char_traits::move): Do not pass null
4491 pointers to memmove.
4492 * include/bits/locale_facets.h
4493 (ctype<char>::widen(const char*, const char*, char*)): Do not
4494 pass null pointers to memcpy.
4495 (ctype<char>::narrow(const char*, const char*, char, char*)):
4497 (ctype<char>::do_widen(const char*, const char*, char*)):
4499 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4502 * doc/xml/manual/spine.xml: Update copyright years.
4503 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4504 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4505 for C++17 filesystem library.
4506 * doc/html/*: Regenerate.
4508 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4509 * config.h.in: Regenerate.
4510 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4511 alphabetically and add missing entries for copy_symlink,
4512 hard_link_count, rename, and resize_file.
4513 * configure: Regenerate.
4514 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4515 used unconditionally.
4516 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4517 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4518 supports truncating to zero length.
4519 * testsuite/27_io/filesystem/operations/all.cc: New test.
4520 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4522 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4525 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4526 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4527 * config.h.in: Regenerate.
4528 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4529 remaining std::filesystem types and functions.
4530 * configure: Regenerate.
4531 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4532 * src/c++17/Makefile.in: Regenerate.
4533 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4534 here, and change name of included file.
4535 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4536 here, and change name of included file.
4537 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4538 path to dir-common.h.
4539 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4540 path to ops-common.h. Disable -Wunused-parameter warnings.
4541 (internal_file_clock): Define unconditionally.
4542 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4544 (do_copy_file, do_space): Move definitions to ops.common.h.
4545 (copy, file_size, hard_link_count, last_write_time, space): Only
4546 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4548 (last_write_time, read_symlink): Remove unused attributes from
4550 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4551 * src/filesystem/Makefile.in: Regenerate.
4552 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4553 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4554 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4555 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4556 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4557 dummy types and functions instead of using #error.
4558 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4559 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4561 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4562 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4563 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4564 to account for new namespace.
4565 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4566 -lstdc++fs from dg-options.
4567 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4568 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4569 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4570 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4571 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4573 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4574 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4576 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4577 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4578 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4579 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4580 * testsuite/27_io/filesystem/operations/create_directories.cc:
4582 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4583 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4584 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4585 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4586 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4587 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4588 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4589 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4590 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4591 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4592 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4593 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4594 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4595 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4596 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4597 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4598 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4599 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4601 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4605 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4606 typeinfo and vtables less greedy.
4607 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4608 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4609 * src/c++17/Makefile.in: Regenerate.
4610 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4611 here, and change name of included file.
4612 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4613 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4615 * src/filesystem/Makefile.in: Regenerate.
4616 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4617 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4618 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4619 from dg-options and remove dg-require-filesystem-ts.
4620 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4621 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4622 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4623 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4624 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4625 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4626 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4627 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4628 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4629 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4630 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4631 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4632 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4633 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4634 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4635 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4636 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4637 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4638 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4639 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4640 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4642 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4643 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4644 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4645 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4646 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4647 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4648 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4649 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4650 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4651 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4652 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4653 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4655 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4657 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4659 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4661 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4662 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4663 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4664 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4665 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4666 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4667 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4668 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4669 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4670 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4672 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4673 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4674 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4675 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4676 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4679 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4680 Check is_trivially_copyable instead of is_scalar.
4681 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4682 contained value can throw and its type is trivially copyable then
4683 construct into a temporary variant and move from it, to provide the
4684 strong exception safety guarantee.
4685 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4687 * testsuite/20_util/variant/87431.cc: New test.
4688 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4689 conversion causes valueless state.
4692 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4693 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4694 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4695 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4696 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4698 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4700 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4701 (file_time_type): Redefine in terms of __file_clock.
4702 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4704 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4706 (internal_file_lock): New helper type for accessing __file_clock.
4707 (do_copy_file): Use internal_file_lock to convert system time to
4709 (last_write_time(const path&, error_code&)): Likewise.
4710 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4712 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4714 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4715 for const member functions of std::basic_string.
4716 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4718 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4719 Make non-standard constructor private.
4720 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4722 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4723 explicit instantiations for C++17 as well as earlier dialects.
4724 * src/c++17/Makefile.am: Add new source files.
4725 * src/c++17/Makefile.in: Regenerate.
4726 * src/c++17/cow-string-inst.cc: New file defining explicit
4727 instantiations for basic_string member functions added in C++17.
4728 * src/c++17/string-inst.cc: Likewise.
4730 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4731 copy/move constructors for old std::basic_string.
4732 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4733 (basic_string::reference, basic_string::const_reference): Define
4734 as plain references for C++11 and later.
4735 (basic_string::basic_string()): Put constructor body outside
4736 preprocessor conditional groups.
4737 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4738 instead of copying it.
4739 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4741 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4743 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4744 cases for old basic_string.
4745 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4746 allocator-extended constructors unconditionally. Add extra members to
4747 allocator type when using old string ABI.
4748 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4750 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4752 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4753 -fno-inline added to test flags.
4755 * testsuite/21_strings/basic_string/requirements/
4756 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4758 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4759 assertion failures with old std::string ABI.
4761 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4763 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4764 functions that will only erase elements at the end.
4765 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4766 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4767 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4769 (path::_List::pop_back()): Define.
4770 (path::_List::_M_erase_from(const_iterator)): Define.
4771 (path::operator/=(const path&)): Use pop_back to remove last component
4772 and _M_erase_from to remove multiple components.
4773 (path::_M_append(basic_string_view<value_type>)): Likewise.
4774 (path::operator+=(const path&)): Likewise.
4775 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4776 (path::remove_filename()): Likewise.
4777 (path::lexically_normal()): Use _List::_Impl iterators instead of
4778 path::iterator. Use pop_back to remove components from the end. Clear
4779 trailing filename, instead of using erase(const_iterator) to remove
4780 a non-final component.
4781 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4783 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4785 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4786 incorrect treatment of empty filename after trailing slash.
4787 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4789 * testsuite/21_strings/basic_string/modifiers/assign/char/
4790 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4792 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4793 move_assign_optim.cc: Likewise.
4795 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4796 Jakub Jelinek <jakub@redhat.com>
4799 * include/experimental/memory: Replace UTF-8 quote characters.
4800 * include/std/future: Replace UTF-8 "em dash" characters.
4802 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4805 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4806 * include/debug/forward_list: Likewise.
4807 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4809 * include/experimental/chrono: Likewise.
4810 * include/experimental/functional: Likewise.
4811 * include/experimental/ratio: Likewise.
4812 * include/experimental/system_error: Likewise.
4813 * include/experimental/tuple: Likewise.
4814 * include/experimental/type_traits: Likewise.
4815 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4816 * include/parallel/multiseq_selection.h: Likewise.
4819 * config/abi/pre/gnu.ver: Add missing exports.
4820 * testsuite/22_locale/collate_byname/88681.cc: New test.
4821 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4822 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4824 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4826 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4827 initializer_list<value_type> and from input iterator ranges.
4828 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4830 * testsuite/experimental/string_view/element_access/char/empty.cc:
4831 Fix year range in copyright header.
4833 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4835 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4836 Fix year range in copyright header.
4838 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4840 Update copyright years.
4842 Copyright (C) 2019 Free Software Foundation, Inc.
4844 Copying and distribution of this file, with or without modification,
4845 are permitted in any medium without royalty provided the copyright
4846 notice and this notice are preserved.