1 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
4 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
6 * include/std/tuple (__unpack_std_tuple): New variable template and
7 partial specializations.
8 (apply, make_from_tuple): Add noexcept-specifier.
9 * testsuite/20_util/tuple/apply/2.cc: New test.
10 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
12 2019-08-09 Corentin Gay <gay@adacore.com>
14 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
15 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
16 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
17 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
18 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
21 2019-08-09 Alexandre Oliva <oliva@adacore.com>
24 (normal_mv_distribution::param_type::param_type): New private
25 ctor taking a decomposed varcov matrix, for use by...
26 (operator>>): ... this, befriended.
27 * include/ext/random.tcc (operator>>): Use it.
28 (normal_mv_distribution::param_type::_M_init_lower): Adjust
29 member function name in exception message.
31 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
33 P0325R4 to_array from LFTS with updates
34 * include/experimental/array (to_array): Qualify call to __to_array.
35 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
36 * include/std/version (__cpp_lib_to_array): Likewise.
37 * testsuite/23_containers/array/creation/1.cc: New test.
38 * testsuite/23_containers/array/creation/2.cc: New test.
39 * testsuite/23_containers/array/creation/3_neg.cc: New test.
40 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
41 Use zero for dg-error line number.
43 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
45 P1651R0 bind_front should not unwrap reference_wrapper
46 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
47 * include/std/version (__cpp_lib_bind_front): Update value.
48 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
50 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
52 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
53 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
54 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
55 specializations for __float128.
56 * testsuite/26_numerics/numbers/float128.cc: New test.
58 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
60 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
63 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
65 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
66 in <algorithm> and <utility> Headers.
67 Implement C++20 p1023 - constexpr comparison operators for std::array.
68 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
69 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
70 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
71 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
72 none_of, partition_copy, partition_point, remove, remove_if,
73 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
74 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
75 count_if, equal, find, find_first_of, find_if, for_each, generate,
76 generate_n, lexicographical_compare, merge, mismatch, replace,
77 replace_if, search, search_n, set_difference, set_intersection,
78 set_symmetric_difference, set_union, transform, unique_copy):
80 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
81 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
82 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
83 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
84 Use const ref instead of ref arg;
85 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
86 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
87 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
88 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
89 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
90 __iter_comp_iter): Mark constexpr.
91 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
92 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
93 none_of, any_of, find_if_not, is_partitioned, partition_point,
94 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
95 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
96 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
97 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
98 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
99 __equal_range, equal_range, binary_search, __includes, includes,
100 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
101 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
102 is_sorted_until, __is_permutation, is_permutation, for_each, find,
103 find_if, find_first_of, adjacent_find, count, count_if, search,
104 search_n, transform, replace, replace_if, generate, generate_n,
105 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
106 set_intersection, __set_difference, set_difference,
107 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
108 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
109 wrappers around __builtin_memmove and __builtin_memcmp
111 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
112 copy, move, __copy_move_b, __copy_move_backward_a,
113 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
114 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
115 __lexicographical_compare_impl, __lexicographical_compare,
116 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
117 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
118 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
119 is_heap): Mark constexpr.
120 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
121 is_heap): Mark constexpr.
122 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
123 * include/std/array: Make comparison ops constexpr.
124 * include/std/utility: Make exchange constexpr.
125 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
126 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
127 * testsuite/23_containers/array/tuple_interface/
128 tuple_element_neg.cc: Adjust.
129 * testsuite/20_util/exchange/constexpr.cc: New.
130 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
131 * testsuite/25_algorithms/constexpr_macro.cc: New.
132 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
133 * testsuite/25_algorithms/all_of/constexpr.cc: New.
134 * testsuite/25_algorithms/any_of/constexpr.cc: New.
135 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
136 * testsuite/25_algorithms/copy/constexpr.cc: New.
137 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
138 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
139 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
140 * testsuite/25_algorithms/count/constexpr.cc: New.
141 * testsuite/25_algorithms/count_if/constexpr.cc: New.
142 * testsuite/25_algorithms/equal/constexpr.cc: New.
143 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
144 * testsuite/25_algorithms/fill/constexpr.cc: New.
145 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
146 * testsuite/25_algorithms/find/constexpr.cc: New.
147 * testsuite/25_algorithms/find_end/constexpr.cc: New.
148 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
149 * testsuite/25_algorithms/find_if/constexpr.cc: New.
150 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
151 * testsuite/25_algorithms/for_each/constexpr.cc: New.
152 * testsuite/25_algorithms/generate/constexpr.cc: New.
153 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
154 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
155 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
156 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
157 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
158 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
159 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
160 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
161 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
162 * testsuite/25_algorithms/merge/constexpr.cc: New.
163 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
164 * testsuite/25_algorithms/none_of/constexpr.cc: New.
165 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
166 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
167 * testsuite/25_algorithms/remove/constexpr.cc: New.
168 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
169 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
170 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
171 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
172 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
173 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
174 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
175 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
176 * testsuite/25_algorithms/search/constexpr.cc: New.
177 * testsuite/25_algorithms/search_n/constexpr.cc: New.
178 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
179 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
180 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
181 * testsuite/25_algorithms/set_union/constexpr.cc: New.
182 * testsuite/25_algorithms/transform/constexpr.cc: New.
183 * testsuite/25_algorithms/unique/constexpr.cc: New.
184 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
185 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
187 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
189 * include/std/memory (make_obj_using_allocator): Qualify call to
190 uses_allocator_construction_args.
192 P0631R4 Math Constants
193 * include/Makefile.am: Add new header.
194 * include/Makefile.in: Regenerate.
195 * include/precompiled/stdc++.h: Include new header.
196 * include/std/numbers: New header.
197 * include/std/version (__cpp_lib_math_constants): Define.
198 * testsuite/26_numerics/numbers/1.cc: New test.
199 * testsuite/26_numerics/numbers/2.cc: New test.
200 * testsuite/26_numerics/numbers/3.cc: New test.
201 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
203 * include/std/bit: Add Doxygen comments.
206 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
207 constraints on deleter that should only apply to the constructor.
208 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
209 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
210 constraints on deleter here.
211 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
213 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
216 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
218 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
220 * testsuite/18_support/51333.cc: New test.
222 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
224 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
225 to the Doxygen manual. Avoid a "here" link on the way.
226 Fix another broken link to Doxygen docblocks.
228 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
230 * include/std/bit (__cpp_lib_endian): Define.
231 * include/std/version (__cpp_lib_endian): Define.
232 * testsuite/26_numerics/endian/2.cc: New.
233 * testsuite/26_numerics/endian/3.cc: New.
234 * testsuite/26_numerics/endian/4.cc: New.
236 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
238 * testsuite/util/testsuite_iterators.h
239 (bidirectional_iterator_wrapper): Fix type comment.
240 (random_access_iterator_wrapper): Likewise.
242 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
244 * include/std/bit (endian): Move definition here as per P1612R1.
245 * include/std/type_traits (endian): Remove definition from here.
246 * testsuite/20_util/endian/1.cc: Rename to ...
247 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
249 2019-07-25 Martin Liska <mliska@suse.cz>
250 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
253 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
255 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
256 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
257 * testsuite/ext/new_allocator/check_new.cc: Likewise.
259 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
261 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
262 * testsuite/26_numerics/bit/bit.count/*: Here.
264 * include/std/bit (__rotl, __rotr): Change second parameter from
265 unsigned int to int and handle negative values.
266 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
267 parameter from unsigned int to int. Add nodiscard attribute.
268 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
269 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
271 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
272 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
275 * include/std/bit (__ceil2): Make unrepresentable results undefined,
276 as per P1355R2. Add debug assertion. Perform one left shift, not two,
277 so that out of range values cause undefined behaviour. Ensure that
278 shift will still be undefined if left operand is promoted.
279 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
280 unrepresentable values with checks that they are not core constant
282 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
284 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
286 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
287 sized deallocation size computation.
289 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
291 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
293 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
295 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
296 (~_Temporary_buffer()): Use latter.
297 (_Temporary_buffer(_FIterator, size_type)): Likewise.
299 2019-07-17 Andreas Schwab <schwab@suse.de>
301 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
303 2019-07-16 Jason Merrill <jason@redhat.com>
305 * include/std/memory (uses_allocator_construction_args): Add parens
308 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
310 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
312 * include/experimental/string_view (__detail::__idt): Remove.
313 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
314 Use __type_identity_t instead of __detail::__idt;
315 * include/std/string_view (__detail::__idt): Remove.
316 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
317 Use __type_identity_t instead of __detail::__idt;
318 * include/std/type_traits (__type_identity_t): New alias template.
320 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
321 and floating point atomics.
323 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
325 * doc/xml/manual/configure.xml: Improve documentation of
326 --enable-libstdcxx-time option.
328 * include/bits/atomic_base.h (__atomic_impl): New namespace for
329 wrappers around atomic built-ins.
330 (__atomic_float, __atomic_ref): New class templates for use as base
332 * include/std/atomic (atomic<float>, atomic<double>)
333 (atomic<long double>): New explicit specializations.
334 (atomic_ref): New class template.
335 (__cpp_lib_atomic_ref): Define.
336 * include/std/version (__cpp_lib_atomic_ref): Define.
337 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
338 * testsuite/29_atomics/atomic_float/1.cc: New test.
339 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
340 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
341 * testsuite/29_atomics/atomic_ref/float.cc: New test.
342 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
343 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
344 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
345 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
347 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
349 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
350 throw() with _GLIBCXX_NOTHROW.
351 (__atomic_add_dispatch): Return after performing atomic increment.
353 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
355 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
356 (__exchange_and_add): Replace static specifier with always_inline
358 (__exchange_and_add_single, __atomic_add_single): Likewise.
359 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
360 combine !__gthread_active_p() and !__GTHREADS branches.
362 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
365 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
366 * configure: Regenerate.
367 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
369 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
370 * testsuite/util/testsuite_abi.cc: Add new symbol version.
372 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
374 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
375 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
376 instead of __is_identifier to detect Clang support.
378 2019-07-02 Jim Wilson <jimw@sifive.com>
380 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
382 * configure: Regenerate.
384 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
387 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
388 for the what_arg parameters.
389 (filesystem_error::filesystem_error): Pass system_error::what() to
390 the _Impl constructor.
391 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
392 filesystem_error::what() contains system_error::what().
394 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
396 * include/std/charconv (chars_format): Define bitmask type.
397 * testsuite/20_util/to_chars/chars_format.cc: New test.
399 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
400 * include/std/bit (_If_is_unsigned_integer_type): Remove.
401 (_If_is_unsigned_integer): Use __is_unsigned_integer.
402 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
403 (countl_one(byte), countr_zero(byte), countr_one(byte))
404 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
405 (log2p1(byte)): Remove.
406 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
407 (__detail::__is_int_to_chars_type): Remove.
408 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
409 and __is_unsigned_integer.
410 * include/std/type_traits (__is_one_of): Move here from <charconv>.
411 (__is_signed_integer, __is_unsigned_integer): New helpers.
412 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
414 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
415 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
416 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
417 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
418 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
419 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
420 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
421 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
422 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
423 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
425 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
427 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
430 2019-06-25 Jakub Jelinek <jakub@redhat.com>
432 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
433 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
434 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
435 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
437 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
439 * include/std/numeric (midpoint(T, T)): Change implementation for
440 floating-point types to avoid incorrect rounding of denormals.
441 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
442 rounding with denormals.
443 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
444 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
446 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
448 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
450 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
452 * configure: Regenerate.
454 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
455 Qualify calls to __never_valueless.
457 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
460 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
461 vector<bool> for test.
462 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
464 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
466 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
468 (istream_iterator::_M_read()): Do not check stream state before
469 attempting extraction. Set stream pointer to null when extraction
471 (operator==(const istream_iterator&, const istream_iterator&)): Change
472 to be a hidden friend of istream_iterator.
473 (operator!=(const istream_iterator&, const istream_iterator&)):
475 (ostream_iterator::ostream_iterator()): Add default constructor.
476 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
478 * testsuite/24_iterators/istream_iterator/1.cc: New test.
479 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
480 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
481 constructor taking a string.
482 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
485 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
486 Jonathan Wakely <jwakely@redhat.com>
489 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
490 values of type bool for vector<bool> elements.
491 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
492 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
494 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
496 PR libstdc++/90920 partially revert r263433
497 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
498 (rotate): Remove checks.
499 * testsuite/25_algorithms/rotate/90920.cc: New test.
501 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
502 category used in invocable check.
503 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
504 * testsuite/26_numerics/reduce/2.cc: New test.
506 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
508 * include/bits/algorithmfwd.h: Change title of doc group.
509 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
511 * include/bits/stl_numeric.h: Define doc group and add algos to it.
512 * include/std/numeric (__is_random_access_iter): New internal trait.
513 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
514 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
515 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
516 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
517 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
518 * testsuite/26_numerics/reduce/1.cc: New test.
519 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
520 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
521 * testsuite/26_numerics/transform_reduce/1.cc: New test.
522 * testsuite/util/testsuite_iterators.h (test_container::size()): New
525 * include/c_global/cstddef (std::byte): Perform arithmetic operations
526 in unsigned int to avoid promotion (LWG 2950).
528 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
530 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
533 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
535 PR libstdc++/90281 Fix string conversions for filesystem::path
536 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
537 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
538 __str_codecvt_in_all to fail for partial conversions and throw on
540 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
541 (path::_Cvt<char8_t>): Add explicit specialization.
542 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
544 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
545 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
546 instead of codecvt_utf8. Use __str_codecvt_in_all and
547 __str_codecvt_out_all.
548 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
549 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
550 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
551 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
552 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
553 after converting to UTF-8.
554 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
555 __str_codecvt_in_all.
556 (path::string): Fix initialization of string types with different
558 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
559 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
560 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
562 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
563 return false for partial conversions.
564 * include/experimental/bits/fs_path.h (u8path):
565 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
566 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
567 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
568 instead of codecvt_utf8. Use __str_codecvt_in_all and
569 __str_codecvt_out_all.
570 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
571 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
572 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
573 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
574 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
575 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
576 __str_codecvt_in_all.
577 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
578 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
579 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
580 __str_codecvt_in_all.
581 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
582 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
583 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
584 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
585 strings and with Unicode characters outside the basic multilingual
587 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
588 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
589 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
590 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
591 * testsuite/experimental/filesystem/path/native/string.cc: Test with
592 empty strings and with Unicode characters outside the basic
595 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
596 Jonathan Wakely <jwakely@redhat.com>
598 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
599 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
600 deallocate node if insertion fails.
601 (_Hashtable::_M_insert_multi_node): Likewise.
602 (_Hashtable::_M_reinsert_node): Pass additional key argument.
603 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
604 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
605 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
606 (_Hashtable::extract(const _Key&)): Likewise.
607 (_Hashtable::_M_merge_unique): Pass additional key argument.
608 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
610 (_Hashtable::_M_insert): Likewise.
611 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
612 (_Hashtable_alloc): Add comments to functions with misleading names.
614 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
616 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
618 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
619 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
620 header for std::allocator.
621 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
622 using-declaration for std::size_t.
623 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
625 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
627 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
628 * testsuite/experimental/map/erasure.cc: Include <string> for
630 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
632 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
634 * include/experimental/type_traits (experimental::nonesuch): Use
635 pragma to disable -Wctor-dtor-privacy warnings.
636 * include/std/type_traits (__is_convertible_helper<From, To, false>)
637 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
639 * include/std/version (__cpp_lib_bind_front): Add missing macro.
641 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
643 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
644 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
645 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
646 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
648 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
649 (variant::emplace): Change static_assert messages from "should be"
651 (hash<monostate>::operator()): Remove name of unused parameter.
653 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
656 * include/Makefile.am: Add new <bits/charconv.h> header.
657 * include/Makefile.in: Regenerate.
658 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
659 (to_string(long), to_string(unsigned long), to_string(long long))
660 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
661 * include/bits/charconv.h: New header.
662 (__detail::__to_chars_len): Move here from <charconv>.
663 (__detail::__to_chars_10_impl): New function extracted from
664 __detail::__to_chars_10.
665 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
666 (__to_chars_unsigned_type): New class template that reuses
667 __make_unsigned_selector_base::__select to pick a type.
668 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
669 (__detail::__to_chars_len): Move to new header.
670 (__detail::__to_chars_10): Add inline specifier. Move code doing the
671 output to __detail::__to_chars_10_impl and call that.
672 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
673 * testsuite/21_strings/basic_string/numeric_conversions/char/
674 to_string.cc: Fix reference in comment. Remove unused variable.
675 * testsuite/21_strings/basic_string/numeric_conversions/char/
676 to_string_int.cc: New test.
678 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
680 Fix ConstexprIterator requirements tests - No constexpr algorithms!
681 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
682 Replace copy with hand-rolled loop.
683 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
686 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
688 Test for C++20 p0858 - ConstexprIterator requirements.
689 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
691 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
694 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
696 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
698 * include/bits/c++config: Rename all macros of the form __PSTL* to
700 * include/std/algorithm: Likewise.
701 * include/std/execution: Likewise.
702 * include/std/numeric: Likewise.
703 * include/std/memory: Likewise.
704 * include/pstl/glue_memory_impl.h: Likewise.
705 * include/pstl/numeric_impl.h: Likewise.
706 * include/pstl/glue_memory_defs.h: Likewise.
707 * include/pstl/execution_defs.h: Likewise.
708 * include/pstl/utils.h: Likewise.
709 * include/pstl/algorithm_fwd.h: Likewise.
710 * include/pstl/unseq_backend_simd.h: Likewise.
711 * include/pstl/glue_execution_defs.h: Likewise.
712 * include/pstl/algorithm_impl.h: Likewise.
713 * include/pstl/parallel_impl.h: Likewise.
714 * include/pstl/memory_impl.h: Likewise.
715 * include/pstl/glue_numeric_defs.h: Likewise.
716 * include/pstl/parallel_backend_utils.h: Likewise.
717 * include/pstl/glue_algorithm_defs.h: Likewise.
718 * include/pstl/parallel_backend.h: Likewise.
719 * include/pstl/glue_numeric_impl.h: Likewise.
720 * include/pstl/parallel_backend_tbb.h: Likewise.
721 * include/pstl/numeric_fwd.h: Likewise.
722 * include/pstl/glue_algorithm_impl.h: Likewise.
723 * include/pstl/execution_impl.h: Likewise.
724 * include/pstl/pstl_config.h: Likewise.
725 * testsuite/util/pstl/pstl_test_config.h: Likewise.
726 * testsuite/util/pstl/test_utils.h: Likewise.
727 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
729 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
731 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
733 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
734 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
735 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
736 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
737 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
739 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
740 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
741 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
742 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
743 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
745 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
746 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
747 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
748 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
749 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
751 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
752 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
753 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
755 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
757 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
758 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
759 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
761 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
763 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
765 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
767 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
769 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
771 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
773 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
775 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
777 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
779 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
781 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
783 Rename header guards to be consistent with upstream project's
785 * include/pstl/glue_memory_impl.h: Rename all macros of the form
786 _PSTL_(.*)_H to _PSTL_\U\1_H.
787 * include/pstl/numeric_impl.h: Likewise.
788 * include/pstl/glue_memory_defs.h: Likewise.
789 * include/pstl/execution_defs.h: Likewise.
790 * include/pstl/utils.h: Likewise.
791 * include/pstl/algorithm_fwd.h: Likewise.
792 * include/pstl/unseq_backend_simd.h: Likewise.
793 * include/pstl/glue_execution_defs.h: Likewise.
794 * include/pstl/algorithm_impl.h: Likewise.
795 * include/pstl/parallel_impl.h: Likewise.
796 * include/pstl/memory_impl.h: Likewise.
797 * include/pstl/glue_numeric_defs.h: Likewise.
798 * include/pstl/parallel_backend_utils.h: Likewise.
799 * include/pstl/glue_algorithm_defs.h: Likewise.
800 * include/pstl/parallel_backend.h: Likewise.
801 * include/pstl/glue_numeric_impl.h: Likewise.
802 * include/pstl/parallel_backend_tbb.h: Likewise.
803 * include/pstl/numeric_fwd.h: Likewise.
804 * include/pstl/glue_algorithm_impl.h: Likewise.
805 * include/pstl/execution_impl.h: Likewise.
806 * include/pstl/pstl_config.h: Likewise.
807 * testsuite/util/pstl/pstl_test_config.h: Likewise.
809 Synchronize libstdc++ parallel algorithms with upstream
811 * include/pstl/algorithm_fwd.h: Synchronize with
812 upstream PSTL project.
813 * include/pstl/algorithm_impl.h: Likewise.
814 * include/pstl/execution_defs.h: Likewise.
815 * include/pstl/execution_impl.h: Likewise.
816 * include/pstl/glue_algorithm_impl.h: Likewise.
817 * include/pstl/glue_execution_defs.h: Likewise.
818 * include/pstl/numeric_fwd.h: Likewise.
819 * include/pstl/numeric_impl.h: Likewise.
820 * include/pstl/parallel_backend.h: Likewise.
821 * include/pstl/pstl_config.h: Likewise.
822 * include/pstl/unseq_backend_simd.h: Likewise.
823 * include/pstl/parallel_backend_serial.h: New file.
824 * include/Makefile.am (pstl_headers): Add
825 parallel_backend_serial.h.
826 * include/Makefile.in: Regenerate.
828 Clean up non-conforming names
829 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
830 Uglfiy copy_range1 and copy_range2
831 (__pattern_walk2_n): Rename local n to __n
832 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
833 Rename parameter _T to _Tp.
835 Integrate non-TBB serial backend support
836 * include/bits/c++config: Adjust TBB detection logic to select serial
837 PSTL backend if no TBB present.
838 * testsuite/utils/pstl/test_utils.h: Remove check for
839 _PSTL_USE_PAR_POLICIES
841 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
843 * testsuite/24_iterators/container_access.cc: Move dg-options before
844 dg-do directive so the target check uses the -std option.
847 * configure: Regenerate.
848 * src/Makefile.am (stamp-debug): Also test for missing makefile.
849 * src/Makefile.in: Regenerate.
851 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
853 * include/std/array: Do not include <stdexcept>.
854 * include/std/optional: Include <exception> and
855 <bits/exception_defines.h> instead of <stdexcept>.
856 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
858 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
860 * testsuite/23_containers/map/erasure.cc: Include <string>.
861 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
863 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
864 dg-prune-output for different C++98 diagnostic.
865 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
867 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
869 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
871 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
873 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
875 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
877 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
879 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
881 * testsuite/23_containers/vector/requirements/dr438/
882 constructor_1_neg.cc: Likewise.
883 * testsuite/23_containers/vector/requirements/dr438/
884 constructor_2_neg.cc: Likewise.
885 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
887 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
889 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
890 Do not test allocator rebinding extension for C++2a.
891 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
892 dg-do directive for C++17 and C++2a.
894 * testsuite/23_containers/deque/requirements/explicit_instantiation/
895 1_c++0x.cc: Remove redundant test.
896 * testsuite/23_containers/deque/requirements/explicit_instantiation/
897 2.cc: Use target selector instead of preprocessor condition.
898 * testsuite/23_containers/deque/requirements/explicit_instantiation/
899 3.cc: Do not run test for C++2a.
900 * testsuite/23_containers/forward_list/requirements/
901 explicit_instantiation/3.cc: Likewise.
902 * testsuite/23_containers/forward_list/requirements/
903 explicit_instantiation/5.cc: Do not test allocator rebinding extension
905 * testsuite/23_containers/list/requirements/explicit_instantiation/
906 1_c++0x.cc: Remove redundant test.
907 * testsuite/23_containers/list/requirements/explicit_instantiation/
908 2.cc: Use target selector instead of preprocessor condition.
909 * testsuite/23_containers/list/requirements/explicit_instantiation/
910 3.cc: Do not run test for C++2a.
911 * testsuite/23_containers/list/requirements/explicit_instantiation/
912 5.cc: Do not test allocator rebinding extension for C++2a.
913 * testsuite/23_containers/map/requirements/explicit_instantiation/
914 1_c++0x.cc: Remove redundant test.
915 * testsuite/23_containers/map/requirements/explicit_instantiation/
916 2.cc: Adjust comment.
917 * testsuite/23_containers/map/requirements/explicit_instantiation/
918 3.cc: Do not run test for C++2a.
919 * testsuite/23_containers/map/requirements/explicit_instantiation/
920 5.cc: Do not test allocator rebinding extension for C++2a.
921 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
922 1_c++0x.cc: Remove redundant test.
923 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
924 3.cc: Do not run test for C++2a.
925 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
926 5.cc: Do not test allocator rebinding extension for C++2a.
927 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
928 3.cc: Do not run test for C++2a.
929 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
930 5.cc: Do not test allocator rebinding extension for C++2a.
931 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
932 Do not run test for C++2a.
933 * testsuite/23_containers/set/requirements/explicit_instantiation/
934 1_c++0x.cc: Remove redundant test.
935 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
936 Do not test allocator rebinding extension for C++2a.
937 * testsuite/23_containers/unordered_map/requirements/
938 explicit_instantiation/3.cc: Likewise.
939 * testsuite/23_containers/unordered_map/requirements/
940 explicit_instantiation/5.cc: Do not test allocator rebinding extension
942 * testsuite/23_containers/unordered_multimap/requirements/
943 explicit_instantiation/3.cc: Do not run test for C++2a.
944 * testsuite/23_containers/unordered_multimap/requirements/
945 explicit_instantiation/5.cc: Do not test allocator rebinding extension
947 * testsuite/23_containers/unordered_multiset/requirements/
948 explicit_instantiation/3.cc: Do not run test for C++2a.
949 * testsuite/23_containers/unordered_multiset/requirements/
950 explicit_instantiation/5.cc: Do not test allocator rebinding extension
952 * testsuite/23_containers/unordered_set/requirements/
953 explicit_instantiation/3.cc: Do not run test for C++2a.
954 * testsuite/23_containers/unordered_set/requirements/
955 explicit_instantiation/5.cc: Do not test allocator rebinding extension
957 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
958 2.cc: Remove redundant test.
959 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
960 3.cc: Do not run test for C++2a.
961 * testsuite/23_containers/vector/requirements/explicit_instantiation/
964 * include/std/type_traits (is_empty, is_polymorphic, is_final)
965 (is_abstract, is_aggregate): Remove static_assert.
966 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
968 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
969 missing -std=gnu++17 option.
970 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
971 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
972 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
975 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
976 * testsuite/18_support/set_unexpected.cc: Likewise.
977 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
979 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
980 function to be valid in C++11.
981 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
982 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
983 include Library Fundamentals or Networking headers in C++11 mode.
984 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
986 * include/std/tuple (_TC): Replace with _TupleConstraints.
987 (_TupleConstraints): New helper for SFINAE constraints, with more
988 expressive member functions to reduce duplication when used.
989 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
990 (tuple::_TCC): Replace dummy type parameter with bool non-type
991 parameter that can be used to check the pack size.
992 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
993 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
994 checking constraints in constructors.
995 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
997 (tuple::tuple): Use new helpers to reduce repitition in constraints.
998 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
999 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1000 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1001 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1002 constraints in constructors.
1003 (tuple::__is_alloc_arg()): New SFINAE helpers.
1004 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1006 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1007 * testsuite/20_util/tuple/cons/90700.cc: New test.
1008 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1009 to meet new constraint on allocator-extended default constructor.
1011 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1013 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1014 * include/bits/stl_multimap.h (multimap): Likewise.
1016 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1018 Rename variables and cleanup comments.
1019 * include/bits/hashtable_policy.h
1020 * include/bits/hashtable.h
1022 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1024 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1025 Fix bgcolor for P0340R3.
1026 * doc/html/*: Regenerate.
1029 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1030 <experimental/memory_resource>.
1031 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1032 P0339R6, P0340R3, P1164R1 and P1357R1.
1033 * doc/html/*: Regenerate.
1035 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1036 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1037 allocator::value_type assertion for C++2a.
1038 * include/bits/hashtable.h: Likewise.
1039 * include/bits/stl_deque.h: Likewise.
1040 * include/bits/stl_list.h: Likewise.
1041 * include/bits/stl_map.h: Likewise.
1042 * include/bits/stl_multimap.h: Likewise.
1043 * include/bits/stl_multiset.h: Likewise.
1044 * include/bits/stl_set.h: Likewise.
1045 * include/bits/stl_vector.h: Likewise.
1046 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1047 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1048 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1049 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1050 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1051 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1052 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1053 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1054 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1055 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1056 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1057 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1059 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1061 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1063 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1065 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1067 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1069 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1071 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1073 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1076 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1077 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1078 * libsupc++/eh_term_handler.h: New header defining
1079 _GLIBCXX_DEFAULT_TERM_HANDLER.
1080 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1081 (set_terminate): Restore default handler when argument is null.
1082 (set_unexpected): Likewise.
1083 * testsuite/18_support/set_terminate.cc: New test.
1084 * testsuite/18_support/set_unexpected.cc: New test.
1086 * include/backward/hashtable.h (size_t, ptrdiff_t)
1087 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1088 (distance, vector, pair, __iterator_category): Remove
1089 using-declarations that add these names to namespace __gnu_cxx.
1090 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1091 * include/ext/debug_allocator.h (size_t): Likewise.
1092 * include/ext/functional (size_t, unary_function, binary_function)
1093 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1095 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1096 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1097 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1098 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1099 * include/ext/numeric (iota): Fix outdated comment.
1100 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1101 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1102 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1103 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1104 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1106 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1107 (allocator, __true_type, __false_type): Likewise.
1109 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1112 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1113 New helpers for checking preconditions in traits.
1114 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1115 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1116 (is_destructible, is_nothrow_destructible, is_constructible)
1117 (is_default_constructible, is_copy_constructible)
1118 (is_move_constructible, is_nothrow_default_constructible)
1119 (is_nothrow_constructible, is_nothrow_copy_constructible)
1120 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1121 (is_nothrow_assignable, is_nothrow_copy_assignable)
1122 (is_nothrow_move_assignable, is_trivially_constructible)
1123 (is_trivially_copy_constructible, is_trivially_move_constructible)
1124 is_trivially_assignable, is_trivially_copy_assignable)
1125 (is_trivially_move_assignable, is_trivially_destructible)
1126 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1127 (is_invocable_r, is_nothrow_invocable)
1128 (has_unique_object_representations, is_aggregate): Add static_asserts
1129 to make sure that type traits are not misused with incomplete types.
1130 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1131 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1132 base characteristics without assertions that can be reused in other
1134 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1135 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1137 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1138 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1139 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1140 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1141 * testsuite/20_util/is_function/value.cc: Likewise.
1142 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1143 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1145 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1146 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1147 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1148 * testsuite/20_util/is_union/value.cc: Likewise.
1149 * testsuite/20_util/is_void/value.cc: Likewise.
1150 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1152 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1154 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1155 Add new private member function.
1156 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1157 (random_device::_M_init_pretr1(const string&)): Call new private
1158 member with string data.
1159 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1161 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1162 test using COW strings.
1163 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1164 a value from the device.
1165 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1166 Fix typo in token string.
1168 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1170 LWG2788 basic_string spurious use of a default constructible allocator
1171 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1172 (basic_string::_M_replace_dispatch): Construct temporary string with
1173 the current allocator.
1174 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1175 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1177 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1179 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1181 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1182 section about new/delete overloads. Improve section on verbose
1184 * doc/html/*: Regenerate.
1186 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1187 P0811R3. Change status of P1353R0.
1188 * doc/html/*: Regenerate.
1190 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1191 documentation of implementation-defined types for [thread.req.native].
1192 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1193 implementation-defined strings for [variant.bad.access]. Fix typo in
1194 documentation of implementation-defined support for [fs.conform.9945].
1195 * doc/html/*: Regenerate.
1197 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1200 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1201 that fails on mingw-w64.
1204 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1205 (status(const path&, error_code&)): Use parent_path() to remove
1207 (symlink_status(const path&, error_code&)): Duplicate workaround for
1208 bug in _wstat for paths with trailing slash.
1209 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1210 with trailing slash.
1211 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1212 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1214 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1215 once instead of building it iteratively.
1217 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1219 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1220 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1221 the assembler supports rdseed.
1222 * config.h.in: Regenerate.
1223 * configure: Regenerate.
1224 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1225 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1226 * doc/html/*: Regenerate.
1227 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1228 * include/bits/random.h (random_device::random_device()): Always call
1229 _M_init rather than _M_init_pretr1.
1230 (random_device::random_device(const string&)): Likewise.
1231 (random_device::operator()()): Always call _M_getval().
1232 (random_device::_M_file): Replace first member of union with an
1233 anonymous struct, with _M_file as its first member.
1234 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1235 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1236 (USE_MT19937): Define if none of the above are defined.
1237 (USE_POSIX_FILE_IO): Define.
1238 (_M_strtoul): Remove.
1239 [USE_RDSEED] (__x86_rdseed): Define new function.
1240 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1241 (random_device::_M_init(const string&)): Initialize new union members.
1242 Add support for "rdseed" and "rand_s" tokens. Decide what the
1243 "default" token does according to which USE_* macros are defined.
1244 [USE_POSIX_FILE_IO]: Store a file descriptor.
1245 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1246 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1247 code from _M_strtoul.
1248 [!USE_MT19937]: Call _M_init, transforming the old default token or
1249 numeric tokens to "default".
1250 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1251 (random_device::_M_getval()): Use new union members to obtain a
1252 random number from the stored function pointer or file descriptor.
1253 [USE_MT19937]: Obtain a value from the mt19937 engine.
1254 (random_device::_M_getval_pretr1()): Call _M_getval().
1255 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1257 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1258 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1260 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1263 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1264 _M_split_cmpts() for a path with multiple components.
1265 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1266 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1267 components and reserve space in vector. Return early when there is
1269 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1270 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1272 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1273 form of std::equals for C++11 compatibility.
1275 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1277 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1278 C++ standard at ansi.org.
1280 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1282 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1283 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1286 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1287 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1289 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1291 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1293 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1294 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1295 "compile" test to "run".
1297 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1298 * doc/html/*: Regenerate.
1299 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1300 rvalue aliasing constructor.
1301 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1302 (reinterpret_pointer_cast): Add overloads taking rvalues.
1303 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1304 Add rvalue aliasing constructor.
1305 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1306 "run" and check return values as well as types.
1307 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1308 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1309 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1310 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1313 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1314 * doc/xml/manual/intro.xml: Likewise.
1315 * include/std/future (__create_task_state): Add default arguments
1316 to make providing an allocator optional.
1317 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1318 instead of delegating to another constructor.
1319 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1320 define allocator-extended constructors for C++17 and later.
1321 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1323 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1324 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1325 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1327 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1329 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1330 Don't run the libstdc++/83237 part on simulator targets.
1332 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1334 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1336 * doc/html/*: Regenerate.
1338 * include/experimental/any (__any_caster): Use RTTI if comparing
1339 addresses fails, to support non-unique addresses in shared libraries.
1340 * include/std/any (__any_caster): Likewise.
1343 * include/experimental/any (__any_caster): Constrain to only be
1344 callable for object types. Use remove_cv_t instead of decay_t.
1345 If the type decays or isn't copy constructible, compare the manager
1346 function to a dummy specialization.
1347 (__any_caster): Add overload constrained for non-object types.
1348 (any::_Manager_internal<_Op>): Add dummy specialization.
1349 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1352 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1355 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1356 reversed arguments to uninitialized_copy_n.
1357 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1358 is unchanged by copy assignment.
1359 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1360 compare path components.
1363 * include/experimental/memory_resource: Add system header pragma and
1364 do not define anything unless compiled as C++14 or later.
1365 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1366 (__resource_adaptor_imp::do_allocate): If the requested alignment
1367 is a fundamental alignment then either allocate directly from _M_alloc
1368 or call the new _M_allocate function.
1369 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1370 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1371 of the allocator rebound to a POD type with the specified alignment.
1372 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1373 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1374 Adjust expected allocation sizes.
1375 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1376 xfail for Solaris x86.
1378 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1380 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1381 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1382 Use std::__remove_cvref_t when building with GCC.
1384 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1387 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1388 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1389 Use check_v3_target_prop_cached to cache the result of the test.
1391 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1393 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1396 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1397 Changed v3_target_compile check from preprocess to executable.
1398 Added "-ltbb" to v3_target_compile flags.
1400 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1402 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1403 Add check for Thread Building Blocks 2018 or later.
1405 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1407 * testsuite/experimental/names.cc: Only include Networking TS headers
1408 on targets with the necessary Gthreads support.
1410 2019-05-20 Marek Polacek <polacek@redhat.com>
1412 CWG 2094 - volatile scalars are trivially copyable.
1414 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1415 result for volatile int.
1417 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1419 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1420 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1423 PR c++/90532 Ensure __is_constructible(T[]) is false
1424 * include/std/type_traits (__do_is_default_constructible_impl)
1425 (__is_default_constructible_atom, __is_default_constructible_safe):
1427 (is_default_constructible): Use is_constructible.
1428 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1429 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1430 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1431 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1434 2019-05-20 Pádraig Brady <pbrady@fb.com>
1436 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1437 to the deallocator with -fsized-deallocation.
1439 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1441 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1442 test by passing correct alignment to deallocate function.
1444 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1447 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1448 Raise exception if unique_ptr tuple member has unknown structure.
1449 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1450 Adjust worker to support new __uniq_ptr_data base class. Do not
1451 assume field called _M_head_impl is the first tuple element.
1453 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1455 * include/bits/stl_deque.h
1456 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1457 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1458 (_Deque_base::_Deque_impl_data): New.
1459 (_Deque_base::_Deque_impl): Inherit latter.
1460 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1461 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1462 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1463 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1464 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1465 (deque<>::deque()): Default.
1466 (deque<>::deque(deque&&)): Default.
1467 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1468 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1469 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1470 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1471 _M_range_initialize.
1472 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1473 (deque<>::resize(size_type, const value_type&)): Share a single
1475 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1476 _M_range_insert_aux.
1477 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1478 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1479 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1480 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1482 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1485 * include/std/variant (holds_alternative, get, get_if): Improve
1486 static assertion messages.
1487 (bad_variant_access::bad_variant_access()): Change default message.
1488 (__throw_bad_variant_access(bool)): New overload.
1489 (get): Use new overload.
1490 (visit, visit<R>): Improve exception message.
1492 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1493 targets. Add more cases from P0608R3.
1494 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1496 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1497 * include/experimental/type_traits (is_detected_exact)
1498 (is_detected_exact_v): Likewise.
1499 * include/pstl/execution_defs.h (is_execution_policy)
1500 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1501 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1502 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1503 * testsuite/experimental/names.cc: New test.
1506 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1507 assertions from the destructor.
1508 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1509 Move static_assert for hash function to here.
1510 (_Hash_table_base::_M_equals): Move static_assert for equality
1512 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1514 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1515 the value directly instead of calling _S_value.
1516 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1517 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1518 _S_key(_Const_Link_type).
1519 * testsuite/23_containers/set/85965.cc: Check construction,
1520 destruction, assignment and size() do not trigger the assertions.
1521 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1522 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1524 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1525 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1526 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1527 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1528 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1529 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1530 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1532 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1533 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1536 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1538 * doc/html/*: Regenerate.
1539 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1540 of decay_t (P0777R1).
1542 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1544 Move from state of allocators (LWG2593)
1545 * include/bits/stl_deque.h
1546 (_Deque_base(_Deque_base&&, false_type)): Remove.
1547 (_Deque_base(_Deque_base&&, true_type)): Remove.
1548 (_Deque_base(_Deque_base&&)): Adapt.
1549 (_Deque_base::_M_move_impl()): Remove.
1550 * testsuite/util/testsuite_allocator.h
1551 (propagating_allocator(propagating_allocator&&)): Preserve move from
1553 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1555 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1557 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1558 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1559 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1561 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1563 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1564 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1566 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1568 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1570 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1572 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1574 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1576 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1578 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1581 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1583 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1584 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1586 * include/std/variant (__overload_set): Remove.
1588 (_Build_FUN): New class template to define a single FUN overload,
1589 with specializations to prevent unwanted conversions, as per P0608R3.
1590 (_Build_FUNs): New class template to build an overload set of FUN.
1591 (_FUN_type): New alias template to perform overload resolution.
1592 (__accepted_type): Use integer_constant base for failure case. Use
1593 _FUN_type for successful case.
1594 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1595 (variant::variant(_Tp&&)): Likewise.
1596 (variant::operator=(_Tp&&)): Likewise.
1598 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1599 Replace raw visitation with a runtime check for the valueless state
1600 and a non-raw visitor.
1601 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1602 (variant::index()): Remove branch.
1603 (variant::swap(variant&)): Use valueless_by_exception() instead of
1604 comparing the index to variant_npos, and add likelihood attribute.
1606 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1607 (_Hashtable_base::_Equal_hash_code): Define new class template.
1608 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1611 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1612 Replace with _M_get non-static member function.
1613 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1615 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1616 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1618 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1619 _S_get accessors for members in EBO helpers.
1620 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1621 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1623 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1625 (_Hashtable_base::_M_eq()): Remove non-const overload.
1627 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1629 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1631 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1633 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1636 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1638 * config/os/solaris/solaris2.10: Move to ...
1639 * config/os/solaris: ... this.
1640 * configure.host (os_include_dir): Adapt.
1641 (abi_baseline_pair): Remove Solaris 10 handling.
1642 * config/abi/post/i386-solaris2.10: Remove.
1643 * config/abi/post/sparc-solaris2.10: Remove.
1644 * config/abi/post/i386-solaris2.11: Rename to ...
1645 * config/abi/post/i386-solaris: ... this.
1646 * config/abi/post/sparc-solaris2.11: Rename to ...
1647 * config/abi/post/sparc-solaris: ... this.
1649 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1652 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1655 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1657 * include/std/variant (__visit_with_index): Remove typedef.
1658 (__deduce_visit_result): New tag type.
1659 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1660 visitation of possibly-valueless variants, forwarding to __do_visit
1661 with the relevant tag type.
1662 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1663 and make lambda return void.
1664 (__variant_construct): Likewise.
1665 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1666 __raw_idx_visit and make lambda return void.
1667 (_Multi_array::__untag_result): Add metafunction to check the function
1668 pointer type for a tag type that dictates the kind of visitation.
1669 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1670 Use decltype(auto) instead of tagged function pointer type.
1671 (__gen_vtable_impl): Remove bool non-type parameter and unused
1672 _Variant_tuple parameter.
1673 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1674 (__gen_vtable_impl::__do_visit_invoke): Remove.
1675 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1676 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1677 for the visit<R> case, rather than dispatching to separate functions.
1678 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1680 (variant::swap): Likewise.
1681 (__do_visit): Replace two non-type template parameters with a single
1682 type parameter, so that the caller must specify the visitor's return
1683 type (or one of the tag types).
1684 (visit): Deduce a return type from the visitor and use the
1685 __deduce_visit_result tag to enforce that all overloads return the
1687 (visit<R>): Call __do_visit<R> with explicit result type.
1688 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1691 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1693 nonesuch is insufficiently useless (lwg2996)
1694 * include/std/type_traits (struct __nonesuch): Added private base
1695 class to make __nonesuch not an aggregate and removed deleted default
1697 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1698 (operator=(const pair&)): Use __nonesuch instead of
1699 __nonesuch_no_braces.
1700 (operator=(pair&&)): Likewise
1701 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1702 of __nonesuch_no_braces.
1703 (operator=(tuple&&)): Likewise
1704 * include/experimental/type_traits (struct nonesuch): Added private
1705 base class to make nonesuch not an aggregate and removed deleted
1706 default constructor.
1707 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1708 * testsuite/experimental/type_traits/nonesuch.cc: New.
1710 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1712 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1713 (_Function_handler): Remove partial specializations for void return
1714 types and pointers to member.
1715 (_Function_handler::_M_manager): Adapt to removal of
1716 _Simple_type_wrapper.
1717 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1718 * include/std/functional (_Bind_result::__enable_if_void)
1719 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1720 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1722 * include/std/future (__future_base::_Task_state::_M_run)
1723 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1724 change return type of lambda expressions.
1726 * include/bits/invoke.h (__invoke_r): Define new function implementing
1727 the INVOKE<R> pseudo-function.
1728 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1729 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1731 * include/std/type_traits (__is_nt_convertible_helper): Define it
1732 unconditionally, not only for C++20.
1733 (__is_nothrow_convertible): Define internal trait for use in C++11.
1734 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1735 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1736 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1737 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1738 that has nothrow explicit conversion but potentially-throwing implicit
1740 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1741 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1742 function to only consider implicit conversions.
1743 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1745 * include/std/iterator: Include <iosfwd> instead of <istream> and
1748 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1749 Remove unused, non-standard function.
1751 * include/bits/regex.h (match_results::max_size()): Adjust return
1752 value to account for prefix/suffix/unmatched subs.
1753 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1754 reset the contained sub matches.
1755 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1756 function to set result state following a failed match.
1757 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1758 sub_match states after _M_resize. Use _M_establish_failed_match.
1761 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1762 Replace single _Callable parameter with variadic _Args pack, to
1763 forward them directly to the tuple of decayed copies.
1764 * testsuite/30_threads/thread/cons/69724.cc: New test.
1766 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1768 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1769 * include/bits/basic_string.h: (operator=(const basic_string&):
1770 Move allocator decision to assign.
1771 (assign(const basic_string&)): Move allocator decision here.
1772 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1774 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1777 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1779 * testsuite/util/testsuite_allocator.h (memory_resource)
1780 (default_resource_mgr): Fix indentation.
1782 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1783 Use operator-> to access raw pointer member.
1784 * testsuite/23_containers/vector/59829.cc: Likewise.
1785 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1786 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1787 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1789 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1790 its constructors and equality operators. Change converting
1791 constructors to use operator-> to access private member of the other
1793 (PointerBase_void::operator->()): Add, for access to private member.
1794 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1795 (operator==(PointerBase, PointerBase)): Remove.
1796 (operator!=(PointerBase, PointerBase)): Remove.
1798 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1799 not assume field called _M_head_impl is the first tuple element.
1800 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1801 implementation more accurate.
1802 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1803 empty pointer type and non-empty deleter.
1805 LWG 2899 - Make is_move_constructible correct for unique_ptr
1806 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1807 move assignment operator.
1808 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1809 (__uniq_ptr_data): New class template with conditionally deleted
1811 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1812 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1813 constructor and move assignment operator as defaulted.
1814 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1815 __uniq_ptr_impl::release().
1816 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1817 to __uniq_ptr_impl::reset(pointer).
1818 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1819 Check for new __uniq_ptr_data type.
1820 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1822 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1824 PR libstdc++/90454.cc path construction from void*
1825 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1826 pointers to void are rejected as well as void.
1827 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1828 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1830 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1832 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1833 <remark> elements. Fix formatting of bibliography references.
1835 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1837 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1839 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1841 Remove Profile Mode, deprecated since 7.1.0
1842 * doc/Makefile.am: Remove XML file for profile mode docs.
1843 * doc/Makefile.in: Regenerate.
1844 * doc/xml/authors.xml: Remove authors of profile mode docs.
1845 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1847 * doc/xml/manual/debug.xml: Likewise.
1848 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1849 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1850 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1851 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1853 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1855 * doc/html/*: Regenerate.
1856 * include/Makefile.am: Remove profile mode headers.
1857 * include/Makefile.in: Regenerate.
1858 * include/bits/c++config (std::__profile): Remove namespace.
1859 [_GLIBCXX_PROFILE]: Remove checks for macro.
1860 * include/profile/array: Remove.
1861 * include/profile/base.h: Remove.
1862 * include/profile/bitset: Remove.
1863 * include/profile/deque: Remove.
1864 * include/profile/forward_list: Remove.
1865 * include/profile/impl/profiler.h: Remove.
1866 * include/profile/impl/profiler_algos.h: Remove.
1867 * include/profile/impl/profiler_container_size.h: Remove.
1868 * include/profile/impl/profiler_hash_func.h: Remove.
1869 * include/profile/impl/profiler_hashtable_size.h: Remove.
1870 * include/profile/impl/profiler_list_to_slist.h: Remove.
1871 * include/profile/impl/profiler_list_to_vector.h: Remove.
1872 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1873 * include/profile/impl/profiler_node.h: Remove.
1874 * include/profile/impl/profiler_state.h: Remove.
1875 * include/profile/impl/profiler_trace.h: Remove.
1876 * include/profile/impl/profiler_vector_size.h: Remove.
1877 * include/profile/impl/profiler_vector_to_list.h: Remove.
1878 * include/profile/iterator_tracker.h: Remove.
1879 * include/profile/list: Remove.
1880 * include/profile/map: Remove.
1881 * include/profile/map.h: Remove.
1882 * include/profile/multimap.h: Remove.
1883 * include/profile/multiset.h: Remove.
1884 * include/profile/ordered_base.h: Remove.
1885 * include/profile/set: Remove.
1886 * include/profile/set.h: Remove.
1887 * include/profile/unordered_base.h: Remove.
1888 * include/profile/unordered_map: Remove.
1889 * include/profile/unordered_set: Remove.
1890 * include/profile/vector: Remove.
1891 * scripts/run_doxygen: Do not process profile mode headers.
1892 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1894 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1895 Remove dg-skip-if for profile mode.
1896 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1897 preprocessor check for profile mode.
1898 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1899 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1901 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1903 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1904 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1905 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1906 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1907 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1909 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1911 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1913 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1915 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1916 preprocessor check for profile mode.
1917 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1919 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1920 Remove dg-skip-if for profile mode.
1921 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1922 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1923 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1924 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1925 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1926 * testsuite/Makefile.am: Remove profile_flags variable and
1927 * testsuite/Makefile.am: Remove profile_flags variable and
1928 check-profile target.
1929 * testsuite/Makefile.in: Regenerate.
1930 * testsuite/ext/profile/all.cc: Remove.
1931 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
1932 * testsuite/ext/profile/profiler_algos.cc: Remove.
1933 * testsuite/ext/profile/replace_new.cc: Remove.
1934 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
1935 preprocessor check for profile mode.
1936 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
1937 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
1938 (check_v3_target_normal_mode): Do not check for profile mode macro.
1939 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
1941 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
1942 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1943 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1944 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1945 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1946 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1947 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1948 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1949 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1950 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
1952 Remove array_allocator extension, deprecated since 4.9.0
1953 * doc/xml/manual/allocator.xml: Remove documentation for
1955 * doc/xml/manual/evolution.xml: Document array_allocator removal.
1956 * doc/xml/manual/using.xml: Remove header from documentation.
1957 * include/Makefile.am: Remove <ext/array_allocator.h> header.
1958 * include/Makefile.in: Regenerate.
1959 * include/ext/array_allocator.h: Remove.
1960 * include/precompiled/extc++.h: Do not include removed header.
1961 * testsuite/ext/array_allocator/1.cc: Remove.
1962 * testsuite/ext/array_allocator/2.cc: Remove.
1963 * testsuite/ext/array_allocator/26875.cc: Remove.
1964 * testsuite/ext/array_allocator/3.cc: Remove.
1965 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
1966 * testsuite/ext/array_allocator/check_delete.cc: Remove.
1967 * testsuite/ext/array_allocator/check_new.cc: Remove.
1968 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
1969 * testsuite/ext/headers.cc: Do not include removed header.
1971 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
1973 * include/bits/stl_bvector.h
1974 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1976 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1978 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1980 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1982 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1984 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1986 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
1988 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
1990 (_Bit_iterator::operator-(difference_type)): Likewise.
1991 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
1992 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
1994 (_Bit_const_iterator::operator-(difference_type)): Likewise.
1995 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
1997 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2000 * testsuite/util/thread/all.h: Do not use remove_pointer for
2001 std::thread::native_handle_type.
2004 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2005 (_Variant_storage<true, Types...>::_M_reset()))
2006 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2007 (__get_storage): Likewise.
2008 (variant): Add noexcept to friend declarations for __get and
2012 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2013 Use _Require for constraints.
2014 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2016 (__uniq_ptr_hash): New base class with conditionally-disabled call
2018 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2019 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2020 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2022 * include/bits/shared_ptr.h: Improve docs.
2023 * include/bits/shared_ptr_base.h: Likewise.
2024 * include/bits/stl_uninitialized.h: Likewise.
2025 * include/bits/unique_ptr.h: Likewise.
2026 * libsupc++/new: Likewise.
2028 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2030 * include/bits/stl_deque.h
2031 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2033 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2035 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2037 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2039 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2041 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2043 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2045 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2047 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2050 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2051 (test01): Reserve for number of insertions to avoid rehash during test.
2052 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2054 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2059 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2061 * include/experimental/bits/fs_path.h: Improve docs.
2062 * include/experimental/bits/net.h: Fix wrong header name in comment.
2063 Do not document implementation details.
2064 * include/experimental/netfwd: Fix doxygen grouping.
2066 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2068 * include/bits/stl_pair.h: Improve docs.
2069 * include/std/tuple: Likewise.
2071 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2073 * include/std/chrono: Improve docs.
2074 * include/std/ratio: Do not document implementation details.
2075 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2077 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2080 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2081 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2082 (__duration_common_type): New helper.
2083 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2084 __duration_common_type.
2085 (__timepoint_common_type_wrapper): Replace with ...
2086 (__timepoint_common_type): New helper.
2087 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2088 Use __time_point_common_type.
2089 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2090 (__common_type_impl): If either argument is transformed by decay,
2091 use the common_type of the decayed types.
2092 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2093 decayed, use __do_common_type_impl to get the common_type.
2094 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2095 (__do_member_type_wrapper, __member_type_wrapper)
2096 (__expanded_common_type_wrapper): Remove.
2097 (__common_type_pack, __common_type_fold): New helpers.
2098 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2099 __member_type_wrapper and __expanded_common_type_wrapper.
2100 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2101 Test zero-length template argument list.
2102 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2103 Test single argument cases and argument types that should decay.
2104 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2105 Adjust expected error.
2106 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2108 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2109 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2110 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2112 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2114 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2116 Make allocator propagation more consistent for
2117 operator+(basic_string) (P1165R1)
2118 * include/bits/basic_string.h
2119 (operator+(basic_string&&, basic_string&&): Changed resulting
2120 allocator to always be the one from the first parameter.
2121 * include/bits/basic_string.tcc
2122 (operator+(const _CharT*, const basic_string&)): Changed
2123 resulting allocator to be SOCCC on the second parameter's allocator.
2124 (operator+(_CharT, const basic_string&)): Likewise.
2125 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2127 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2130 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2132 * include/bits/regex.h: Improve docs.
2133 * include/bits/regex.tcc: Do not document implementation details.
2135 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2137 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2139 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2140 Add type printer for container types in std::__debug namespace.
2141 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2142 (gdb-tests): Use distinct parameters for the type of test and use of
2144 (gdb-test): Check for regex test even if 'whatis' test.
2145 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2147 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2148 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2149 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2150 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2151 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2152 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2153 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2155 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2157 * include/std/system_error (error_category): Fix comment.
2160 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2161 argument is an empty path.
2162 (absolute(const path&, error_code&)): Use invalid_argument as error
2163 code instead of no_such_file_or_directory.
2164 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2165 of non-existent paths and empty paths with both overloads of absolute.
2167 * include/std/system_error (error_category, error_code)
2168 (error_condition): Improve docs.
2169 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2170 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2171 to class documentation. Suppress documentation for implementation
2173 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2174 Suppress documentation for implementation details.
2176 * include/std/system_error (error_code): Remove friend declaration
2177 for hash<error_code>.
2178 (hash<error_code>::operator()): Use public member functions to access
2180 (hash<error_condition>::operator()): Use address of category, not
2181 its object representation.
2182 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2183 Use public member functions to access value and category.
2184 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2186 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2188 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2189 * include/bits/hashtable_policy.h
2190 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2191 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2192 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2193 smaller than input value rather than always greater. Preserve
2194 _M_next_resize if called with 0 input. Use __builtin_floorl.
2195 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2196 elements + number of insertions is greater than _M_next_resize. Start
2197 with 11 buckets if not told otherwise. Use __builtin_floorl.
2198 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2199 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2200 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2201 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2202 told otherwise. Use __builtin_floorl.
2203 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2204 to also validate _Power2_rehash_policy.
2205 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2208 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2211 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2215 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2216 overflow warning with -Wpedantic -Wsystem-headers.
2218 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2221 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2222 * include/bits/move.h (swap): Remove extra parentheses.
2224 * include/experimental/bits/lfts_config.h: Improve doc markup.
2225 * include/experimental/optional: Improve docs.
2226 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2227 (__constexpr_addressof): Remove.
2228 (optional::operator->()): Use std::__addressof().
2229 * include/std/optional (optional::operator->()): Adjust whitespace.
2230 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2231 that operator-> is still constexpr with overloaded operator&. Change
2232 to compile-only test.
2233 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2236 * include/bits/shared_ptr.h: Improve docs.
2237 * include/bits/shared_ptr_atomic.h: Likewise.
2238 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2240 * include/bits/basic_string.h: Fix iterator/index confusion in
2242 * include/bits/range_access.h: Fix Doxygen warnings.
2243 * include/bits/refwrap.h: Do not document implementation details.
2244 (ref, cref): Group docs with reference_wrapper.
2245 * include/std/fstream: Fix Doxygen markup.
2246 * libsupc++/initializer_list (begin, end): Group docs with
2249 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2251 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2252 * include/std/mutex: Likewise.
2253 * include/std/shared_mutex: Likewise.
2255 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2256 * include/bits/fs_fwd.h: Likewise.
2257 * include/bits/fs_ops.h: Likewise.
2258 * include/bits/fs_path.h: Likewise.
2259 * include/std/filesystem: Likewise.
2261 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2262 * include/experimental/buffer: Likewise.
2263 * include/experimental/executor: Likewise.
2264 * include/experimental/internet: Likewise.
2265 * include/experimental/io_context: Likewise.
2266 * include/experimental/net: Likewise.
2267 * include/experimental/netfwd: Likewise.
2268 * include/experimental/socket: Likewise.
2269 * include/experimental/timer: Likewise.
2271 * doc/doxygen/doxygroups.cc: Move description of experimental group
2273 * include/experimental/algorithm: Add to libfund-ts doc group.
2274 * include/experimental/any: Likewise. Do not document implementation
2276 * include/experimental/array: Add to libfund-ts doc group.
2277 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2278 for Library Fundamentals.
2279 * include/experimental/chrono: Add to libfund-ts doc group.
2280 * include/experimental/deque: Likewise.
2281 * include/experimental/forward_list: Likewise.
2282 * include/experimental/functional: Likewise.
2283 * include/experimental/iterator: Likewise.
2284 * include/experimental/list: Likewise.
2285 * include/experimental/map: Likewise.
2286 * include/experimental/memory: Likewise.
2287 * include/experimental/memory_resource: Likewise. Improve docs.
2289 * include/experimental/numeric: Add to libfund-ts doc group.
2290 * include/experimental/optional: Likewise.
2291 * include/experimental/propagate_const: Likewise.
2292 * include/experimental/random: Likewise.
2293 * include/experimental/ratio: Likewise.
2294 * include/experimental/regex: Likewise.
2295 * include/experimental/set: Likewise.
2296 * include/experimental/source_location: Likewise.
2297 * include/experimental/string: Likewise.
2298 * include/experimental/string_view: Likewise.
2299 * include/experimental/system_error: Likewise.
2300 * include/experimental/tuple: Likewise.
2301 * include/experimental/type_traits: Likewise.
2302 * include/experimental/unordered_map: Likewise.
2303 * include/experimental/unordered_set: Likewise.
2304 * include/experimental/utility: Likewise.
2305 * include/experimental/vector: Likewise.
2306 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2307 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2308 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2310 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2311 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2312 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2313 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2314 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2316 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2317 * include/experimental/bits/fs_fwd.h: Improve docs.
2318 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2319 * include/experimental/bits/fs_path.h: Likewise.
2320 (path, filesystem_error, u8path): Improve docs.
2321 * include/experimental/filesystem: Link to docs for TS.
2323 * config/allocator/new_allocator_base.h (__allocator_base): Add
2324 workaround for Doxygen bug #6945.
2325 * include/std/memory: Improve docs. Define group for pointer safety.
2326 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2327 conditional to suppress documentation for implementation details.
2329 * include/bits/specfun.h: Improve docs.
2330 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2333 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2334 (std::experimental): Add docs.
2335 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2336 namespace to nothing when generating docs.
2337 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2338 * include/std/chrono (std::chrono): Likewise.
2339 * include/std/functional (std::placeholders): Likewise.
2340 * include/std/thread (std::this_thread): Likewise.
2342 * include/parallel/settings.h: Fix Doxygen markup.
2344 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2345 anything unless PB_DS_CLASS_C_DEC is defined.
2346 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2347 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2348 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2349 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2350 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2351 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2352 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2354 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2355 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2356 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2357 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2358 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2359 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2360 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2361 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2362 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2363 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2364 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2366 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2367 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2369 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2372 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2373 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2374 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2377 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2379 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2380 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2381 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2382 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2383 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2384 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2386 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2387 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2390 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2393 * include/std/complex (__complex_proj): Return parameter unchanged.
2394 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2395 floating-point types to take std::complex arguments.
2396 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2397 floating-point types.
2398 * testsuite/26_numerics/complex/proj.cc: New test.
2400 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2402 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2403 to _Lock_policyE[012].
2404 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2406 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2408 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2409 macros accidentally left in.
2410 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2411 unnecessary -lstdc++fs option. Fix test for mingw.
2412 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2415 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2417 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2419 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2421 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2423 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2424 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2427 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2429 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2432 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2433 class template and partial specialization.
2436 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2438 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2439 functions to convert a value to an integral type.
2440 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2441 (fill_n): Convert _Size parameter to an integral type.
2442 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2443 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2444 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2445 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2446 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2447 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2449 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2451 Adding noexcept-specification on tuple constructors (LWG 2899)
2452 * libstdc++-v3/include/std/tuple:
2453 (tuple()): Add noexcept-specification.
2454 (tuple(const _Elements&...)): Likewise
2455 (tuple(_UElements&&...)): Likewise
2456 (tuple(const tuple<_UElements...>&)): Likewise
2457 (tuple(tuple<_UElements...>&&)): Likewise
2458 (tuple(const _T1&, const _T2&)): Likewise
2459 (tuple(_U1&&, _U2&&)): Likewise
2460 (tuple(const tuple<_U1, _U2>&): Likewise
2461 (tuple(tuple<_U1, _U2>&&): Likewise
2462 (tuple(const pair<_U1, _U2>&): Likewise
2463 (tuple(pair<_U1, _U2>&&): Likewise
2464 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2466 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2469 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2470 arguments with __restrict.
2472 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2474 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2476 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2478 * include/experimental/bits/fs_path.h
2479 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2480 avoid redundant call to _S_convert_loc with non-const pointers.
2482 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2483 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2484 * testsuite/21_strings/basic_string/hash/hash.cc
2485 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2486 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2487 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2489 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2490 wstring::_M_replace_dispatch with more specific patterns.
2491 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2492 Create const std::string to avoid redundant call to _S_convert_loc
2493 with non-const pointers.
2494 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2495 avoid unnecessary basic_string::assign instantiations.
2497 * include/std/memory (__uses_alloc_args): Add string-literal to
2498 static_assert, to match the one in __uses_alloc.
2499 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2500 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2501 for recursive uses-allocator construction of nested pairs.
2502 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2505 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2507 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2508 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2509 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2510 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2512 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2513 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2514 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2515 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2516 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2517 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2518 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2520 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2523 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2524 * include/std/scoped_allocator [__cplusplus > 201703L]
2525 (scoped_allocator_adaptor::construct): Define in terms of
2526 uses_allocator_construction_args, as per P0591R4.
2527 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2528 * testsuite/util/testsuite_allocator.h: Remove name of unused
2531 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2533 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2534 * doc/html/*: Regenerate.
2536 * include/bits/fs_path.h (operator<, operator<=, operator>)
2537 (operator>=, operator==, operator!=): Make hidden friends, as per
2539 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2540 string type in test.
2541 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2543 * include/std/any (any::any(ValueType&&)): Use __and_v.
2544 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2547 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2549 * include/std/type_traits (__result_of_memfun): Use remove_reference
2550 instead of __remove_cvref_t and remove redundant is_same check.
2551 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2553 * include/experimental/string_view (basic_string_view::pointer)
2554 (basic_string_view::reference): Fix to refer to non-const value_type.
2555 * include/bits/basic_string.h (basic_string): Use __sv_check and
2556 __sv_limit instead of basic_string_view::_M_check and
2557 basic_string_view::_M_limit.
2558 * include/std/string_view (__sv_check, __sv_limit): New
2559 helper functions to replace basic_string_view::_M_check and
2560 basic_string_view::_M_limit.
2561 (basic_string_view): Add static assertions to enforce ill-formed
2562 requirement for traits_type::char_type from P1148R0, and to enforce
2563 required properties of char-like types.
2564 (basic_string_view::pointer, basic_string_view::reference): Fix to
2565 refer to non-const value_type.
2566 (basic_string_view::operator[], basic_string_view::at)
2567 (basic_string_view::front, basic_string_view::back)
2568 (basic_string_view::data): Use const_reference and const_pointer
2569 typedefs for return types.
2570 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2571 (hash<wstring_view>): Fix argument_type typedef.
2572 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2573 char/1.cc: Fix expected return type of basic_string_view::data().
2574 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2575 wchar_t/1.cc: Likewise.
2576 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2577 char/1.cc: Likewise.
2578 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2579 wchar_t/1.cc: Likewise.
2580 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2582 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2583 Check reference and pointer typedefs.
2584 * testsuite/experimental/string_view/requirements/typedefs.cc:
2586 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2587 Fix expected return type of basic_string_view::data().
2588 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2590 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2592 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2596 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2597 Avoid a runtime check for types that can never be stored in std::any.
2598 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2601 PR libstdc++/90220 (partial)
2602 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2603 not attempt ill-formed static_cast to pointers to non-object types.
2604 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2607 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2608 prevent -Wcatch-value warning.
2610 * include/std/variant (__variant_construct): Use template parameter
2611 type instead of equivalent decltype-specifier.
2612 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2613 Replace forward with move.
2614 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2615 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2616 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2617 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2618 index after construction succeeds.
2619 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2620 if-constexpr checks that are always true. Use __remove_cvref_t instead
2621 of remove_reference so that is_nothrow_move_constructible check
2622 doesn't use a const rvalue parameter. In the potentially-throwing case
2623 construct a temporary and move assign it, as per LWG 2904.
2624 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2625 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2626 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2627 construct a temporary and move assign from it, as per LWG 2904.
2628 * testsuite/20_util/variant/exception_safety.cc: Check that
2629 assignment operators have strong exception safety guarantee.
2631 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2633 Document PSTL linker flags
2635 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2637 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2639 * include/std/variant (__detail::__variant::_Traits): Make
2640 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2641 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2643 (__detail::__variant::_Copy_assign_alias): Only depend on
2644 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2645 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2646 move assignment operators.
2649 * include/std/variant (variant::__not_self): New helper for the
2650 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2651 (variant::__to_type_impl): Remove.
2652 (variant::__to_type): Add default argument to check pack size, instead
2653 of using __to_type_impl.
2654 (variant::__accepted_type): Add default argument using __not_self.
2655 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2656 for variant(T&&) constructor constraint.
2657 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2658 Extract __accepted_type into a named template parameter for reuse in
2659 other constraints and in the exception specification.
2660 (variant::variant(in_place_type_t<T>, Args&&...))
2661 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2662 (variant::variant(in_place_index_t<T>, Args&&...))
2663 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2664 (variant::operator=T&&)): Remove redundant && from trait arguments.
2665 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2666 isn't used for in_place_type or in_place_index arguments.
2668 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2669 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2670 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2672 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2673 Bernd Edlinger <bernd.edlinger@hotmail.de>
2674 Jakub Jelinek <jakub@redhat.com>
2677 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2678 general-regs-only target attribute for ARM.
2680 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2683 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2684 specialization also depend on is_nothrow_move_constructible.
2685 * include/std/variant (__detail::__variant::__never_valueless()):
2686 Only true if the variant would have a move assignment operator.
2687 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2688 Check __never_valueless<T...>().
2689 (variant::emplace): Only perform non-throwing move assignments
2690 for never-valueless alternatives if the variant has a move assignment
2692 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2693 types can be emplaced into non-assignable variants.
2694 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2695 don't get copied when emplaced into non-assignable variants.
2697 * include/std/variant (__detail::__variant::__ref_cast): Remove
2699 (__detail::__variant::_Uninitialized::_M_get)
2700 (__detail::__variant::__get)
2701 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2703 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2705 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2707 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2708 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2709 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2710 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2712 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2714 Delegate PSTL configuration to pstl/pstl_config.h
2716 * include/bits/c++config: Remove explicit PSTL configuration
2717 macros and use definitions from <pstl/pstl_config.h>.
2719 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2721 Cleanup algorithm implementations
2722 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2724 (mismatch): Forward execution policy.
2725 (equal): Qualify call to std::equal().
2726 (partial_sort): Forward execution policy.
2727 (inplace_merge): Forward execution policy.
2729 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2731 Improve implementation of parallel equal()
2732 * include/pstl/algorithm_impl.h
2733 (__internal::__brick_equal): use "4 iterator" version of
2735 (__internal::__brick_equal): use simd for random access
2736 iterators on unsequenced execution policies.
2737 (__internal::__pattern_equal): add "4 iterator" version
2738 (__internal::__pattern_equal): dispatch to simd __brick_equal
2739 for vector-only execution policies.
2740 (__internal::__pattern_equal): dispatch to __parallel_or for
2741 parallel execution policies.
2742 * include/pstl/glue_algorithm_impl.h
2743 (std::equal): dispatch to "4 iterator" version of
2744 __internal::__pattern_equal().
2746 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2749 * include/bits/forward_list.h (operator==): Do not use operator!= to
2751 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2752 earlier in the list, so that sort is stable.
2753 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2754 * testsuite/23_containers/forward_list/comparable.cc: Test with
2755 types that meet the minimum EqualityComparable and LessThanComparable
2756 requirements. Remove irrelevant comment.
2758 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2759 Do not depend on whether all alternative types are move constructible.
2760 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2761 from the operand when deciding whether to perform the assignment.
2762 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2763 with deleted move constructor and deleted move assignment operator.
2764 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2765 behaviour of variants with DeletedMoves as an alternative.
2766 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2767 (move_ctor, move_assign): Check that moving a variant with a
2768 DeletedMoves alternative falls back to copying instead of moving.
2770 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2771 from static_assert declarations.
2773 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2774 actually match its name.
2775 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2776 (test_swap()): Fix result for MoveCtorOnly and check
2777 MoveCtorAndSwapOnly.
2779 * include/std/optional (optional::value_or(U&&) &&): Add missing
2780 constexpr specifier.
2781 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2782 for disengaged optionals and rvalue optionals.
2783 * testsuite/20_util/optional/observers/4.cc: Likewise.
2785 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2787 * include/pstl/algorithm_impl.h: Uglify identfiers.
2788 * include/pstl/numeric_impl.h: Uglify identfiers.
2789 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2791 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2793 * include/bits/c++config:
2794 Add definition for __PSTL_ASSERT.
2795 Add definition for __PSTL_ASSERT_MSG.
2796 * include/pstl/algorithm_impl.h: Replace use of assert().
2797 * include/pstl/numeric_impl.h: Replace use of assert().
2798 * include/pstl/parallel_backend_tbb.h:
2799 Replace use of assert().
2800 Replace use of __TBB_ASSERT().
2801 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2803 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2806 * src/c++17/memory_resource.cc
2807 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2808 needed to allow placing a _Chunk at the end of the buffer.
2809 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2811 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2813 * doc/xml/faq.xml: Add information about emergency EH pool.
2814 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2815 Move outdated information on mt_allocator to a separate section.
2816 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2817 doesn't affect the default allocator.
2819 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2823 * testsuite/20_util/variant/89851.cc: New test.
2825 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2827 * include/std/variant: Adjust whitespace. Add comments.
2828 (_Multi_array): Leave primary template undefined.
2829 (_Multi_array<_Tp>): Define partial specialization for base case of
2831 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2832 which is always a reference.
2833 (__gen_vtable::_S_apply()): Remove function, inline body into
2834 default member initializer.
2835 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2837 * include/std/variant (__variant_idx_cookie): Add member type.
2838 (__visitor_result_type): Remove.
2839 (__do_visit): Use invoke_result instead of __visitor_result_type.
2840 * testsuite/20_util/variant/visit.cc: New test.
2843 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2845 * testsuite/20_util/variant/90008.cc: New test.
2847 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2849 * include/pstl/algorithm_impl.h: Add namespace qualification.
2850 * include/pstl/execution_defs.h: Add namespace qualification.
2851 * include/pstl/execution_impl.h: Add namespace qualification.
2852 * include/pstl/numeric_impl.h: Add namespace qualification.
2853 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2854 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2855 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2857 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2859 Fix visit<R> for variant.
2860 * include/std/variant (__do_visit): Add a template parameter
2861 for enforcing same return types for visit.
2862 (__gen_vtable_impl): Likewise.
2863 (_S_apply_single_alt): Adjust.
2864 (__visit_invoke_impl): New. Handle casting to void.
2865 (__do_visit_invoke): New. Enforces same return types.
2866 (__do_visit_invoke_r): New. Converts return types.
2867 (__visit_invoke): Adjust.
2868 (__gen_vtable): Add a template parameter for enforcing
2869 same return types for visit.
2870 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2871 different return types.
2872 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2873 visitors with different return types don't accidentally
2874 compile with regular visitation.
2876 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2878 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2879 dg-require-filesystem-ts.
2881 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2883 * doc/xml/manual/status_cxx2020.xml: Update status.
2884 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2885 * testsuite/20_util/variant/visit_r.cc: New test.
2887 * include/bits/fs_dir.h (directory_iterator::operator*)
2888 (directory_iterator::operator->): Add noexcept.
2889 (operator==, operator!=): Replace namespace-scope equality operators
2890 for directory iterators with hidden friends.
2893 * config/abi/pre/gnu.ver: Add missing exports.
2894 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2897 * config/abi/pre/gnu.ver: Export new symbols.
2898 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2899 (recursive_directory_iterator::recursion_pending())
2900 (recursive_directory_iterator::disable_recursion_pending()): Remove
2901 inline definitions. Make noexcept.
2902 (recursive_directory_iterator::depth())
2903 (recursive_directory_iterator::operator*())
2904 (recursive_directory_iterator::operator->()): Make noexcept.
2905 (recursive_directory_iterator::_M_options)
2906 (recursive_directory_iterator::_M_pending): Remove data members.
2907 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2908 (recursive_directory_iterator::recursive_directory_iterator): Remove
2909 ctor-initializer. Use new constructor for _Dir_stack.
2910 (recursive_directory_iterator::options())
2911 (recursive_directory_iterator::recursion_pending())
2912 (recursive_directory_iterator::disable_recursion_pending()): Add
2913 non-inline definitions.
2914 (recursive_directory_iterator::depth()): Make noexcept.
2915 (recursive_directory_iterator::increment(error_code&))
2916 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2917 location of options and recursion_pending members.
2918 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2919 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2920 user-declared move constructor and assignment operator, to make the
2923 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2924 d_type == DT_UNKNOWN immediately.
2925 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
2927 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
2929 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
2931 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
2932 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
2935 PR libstdc++/87431 (again)
2936 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
2937 Define partial specialization for basic_string.
2938 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
2939 shared_ptr and weak_ptr.
2940 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
2942 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
2944 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
2946 * include/debug/vector (_Never_valueless_alt): Likewise for debug
2948 * include/std/any (_Never_valueless_alt): Define explicit
2949 specialization for any.
2950 * include/std/variant (_Never_valueless_alt): Define primary template.
2951 (__never_valueless): Use _Never_valueless_alt instead of
2952 is_trivially_copyable.
2953 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
2954 initializations to avoid try-catch overhead. Add special case for
2955 scalars produced by potentially-throwing conversions. Use
2956 _Never_valueless_alt instead of is_trivially_copyable for the
2957 remaining strong exception-safety cases.
2958 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
2959 * testsuite/20_util/variant/87431.cc: Run both test functions.
2960 * testsuite/20_util/variant/exception_safety.cc: New test.
2961 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
2962 so the variant becomes valueless.
2964 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
2967 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
2969 (variant::emplace<_Tp>): Return result of emplace<N> directly.
2971 * include/std/string (__hash_string_base): New class template defining
2972 operator() for hashing strings.
2973 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
2974 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
2975 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
2976 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
2978 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
2980 Use single-visitation in variant assignment and swap and relops.
2981 Also use indices instead of types when checking whether
2982 variants hold the same thing.
2983 * include/std/variant (__do_visit): Add a template parameter
2984 for index visitation, invoke with indices if index visitation
2986 (__variant_idx_cookie): New.
2987 (__visit_with_index): Likewise.
2988 (_Copy_assign_base::operator=): Do single-visitation with
2990 (_Move_assign_base::operator=): Likewise.
2991 (_Extra_visit_slot_needed): Adjust.
2992 (__visit_invoke): Call with indices if it's an index visitor.
2993 (relops): Do single-visitation with an index visitor.
2995 (__visitor_result_type): New.
2997 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
2999 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3001 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3003 Don't revisit a variant we are already visiting.
3004 * include/std/variant (__variant_construct_single): New.
3005 (__variant_construct): Use it.
3006 (_M_destructive_move): Likewise.
3007 (_M_destructive_copy): Likewise.
3008 (_Copy_assign_base::operator=): Adjust.
3009 (_Move_assign_base::operator=): Likewise.
3012 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3015 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3016 destructor so they are not evaluated until the _Key type is complete.
3017 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3018 * testsuite/23_containers/set/85965.cc: New test.
3019 * testsuite/23_containers/unordered_set/85965.cc: New test.
3020 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3021 with regexp matching the corresponding _Rb_tree specialization.
3022 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3023 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3024 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3025 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3026 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3027 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3028 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3030 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3033 Fix based on a suggestion by Antony Polukhin.
3034 * include/std/variant (__never_valueless): New.
3036 (_Extra_visit_slot_needed): New.
3037 (_Multi_array): Use it.
3038 (_S_apply_all_alts): Likewise.
3040 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3043 Fix based on a suggestion by Antony Polukhin.
3044 * include/std/variant (__gen_vtable): Don't reserve an
3045 additional table slot, _Multi_array already does that.
3047 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3050 Fix based on a suggestion by Antony Polukhin.
3051 * include/std/variant (__variant_construct): Capture a pointer
3052 to the storage and visit just one variant.
3054 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3056 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3057 Doxygen-generated pages with unstable URL.
3058 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3059 * doc/xml/manual/extensions.xml: Likewise.
3060 * doc/xml/manual/parallel_mode.xml: Likewise.
3061 * doc/xml/manual/support.xml: Likewise.
3063 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3064 avoid -Wconversion warnings.
3066 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3068 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3069 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3070 (allstamped): Add stamp-pstl.
3071 (install-headers): Add ptsl_builddir.
3072 * include/Makefile.in: Regenerate.
3073 * include/bits/c++config: Add pstl configuration.
3074 * include/pstl/LICENSE.txt: New file.
3075 * include/pstl/algorithm_fwd.h: New file.
3076 * include/pstl/algorithm_impl.h: New file.
3077 * include/pstl/execution_defs.h: New file.
3078 * include/pstl/execution_impl.h: New file.
3079 * include/pstl/glue_algorithm_defs.h: New file.
3080 * include/pstl/glue_algorithm_impl.h: New file.
3081 * include/pstl/glue_execution_defs.h: New file.
3082 * include/pstl/glue_memory_defs.h: New file.
3083 * include/pstl/glue_memory_impl.h: New file.
3084 * include/pstl/glue_numeric_defs.h: New file.
3085 * include/pstl/glue_numeric_impl.h: New file.
3086 * include/pstl/memory_impl.h: New file.
3087 * include/pstl/numeric_fwd.h: New file.
3088 * include/pstl/numeric_impl.h: New file.
3089 * include/pstl/parallel_backend.h: New file.
3090 * include/pstl/parallel_backend_tbb.h: New file.
3091 * include/pstl/parallel_backend_utils.h: New file.
3092 * include/pstl/parallel_impl.h: New file.
3093 * include/pstl/pstl_config.h: New file.
3094 * include/pstl/unseq_backend_simd.h: New file.
3095 * include/pstl/utils.h: New file.
3096 * include/std/algorithm: Include parallel algorithm implementations.
3097 * include/std/execution: New file.
3098 * include/std/memory: Include parallel algorithm implementations.
3099 * include/std/numeric: Include parallel algorithm implementations.
3100 * include/std/version: Add parallel algorithms feature test macro.
3101 * testsuite/util/pstl/pstl_test_config.h: New file.
3102 * testsuite/util/pstl/test_utils.h: New file.
3103 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3104 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3105 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3106 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3107 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3108 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3109 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3110 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3111 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3112 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3113 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3114 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3115 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3116 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3117 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3118 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3119 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3120 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3121 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3122 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3123 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3124 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3125 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3126 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3127 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3128 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3129 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3130 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3131 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3132 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3133 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3134 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3135 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3136 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3137 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3138 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3139 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3140 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3141 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3142 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3143 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3144 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3145 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3146 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3147 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3148 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3149 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3150 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3151 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3152 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3153 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3154 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3155 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3156 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3157 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3158 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3159 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3160 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3161 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3162 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3163 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3164 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3165 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3166 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3167 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3168 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3169 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3170 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3171 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3172 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3173 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3174 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3175 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3176 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3177 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3178 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3179 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3180 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3181 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3182 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3183 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3184 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3185 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3186 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3187 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3188 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3189 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3190 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3191 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3192 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3193 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3194 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3195 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3196 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3197 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3198 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3199 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3200 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3201 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3202 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3203 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3204 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3205 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3206 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3207 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3208 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3210 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3212 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3213 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3214 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3215 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3216 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3217 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3218 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3219 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3220 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3221 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3222 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3223 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3224 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3225 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3226 when the special functions IS is enabled, not for C++17.
3227 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3229 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3230 without checks for special functions in C++17.
3231 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3235 * include/backward/hash_map: Use <> for includes not "".
3236 * include/backward/hash_set: Likewise.
3237 * include/backward/strstream: Likewise.
3238 * include/tr1/bessel_function.tcc: Likewise.
3239 * include/tr1/exp_integral.tcc: Likewise.
3240 * include/tr1/legendre_function.tcc: Likewise.
3241 * include/tr1/modified_bessel_func.tcc: Likewise.
3242 * include/tr1/riemann_zeta.tcc: Likewise.
3244 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3246 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3247 of extension allocators.
3248 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3249 Document new headers in 7.2, 8.1 and 9.1 releases.
3250 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3251 * doc/html/*: Regenerate.
3253 2019-03-12 John David Anglin <dave.anglin@bell.net>
3256 * testsuite/lib/libstdc++.exp: Locate libatomic.
3257 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3258 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3260 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3261 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3262 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3263 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3265 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3268 * configure.ac: Check for sockatmark.
3269 * crossconfig.m4: Check for sockatmark.
3270 * config.h.in: Regenerate.
3271 * configure: Regenerate.
3272 * include/experimental/internet (address_v4::_S_hton): Rename
3273 overloaded functions to _S_hton_16 and _S_ntoh_16.
3274 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3275 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3276 * include/experimental/socket (basic_socket::at_mark): Check
3277 _GLIBCXX_HAVE_SOCKATMARK.
3279 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3280 const variables instead of macros.
3283 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3284 Use correct type for len_aligned.
3285 * testsuite/20_util/hash/89629.cc: New test.
3287 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3290 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3291 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3292 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3293 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3294 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3295 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3296 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3297 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3298 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3299 memory_order_seq_cst to int.
3301 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3303 * doc/xml/manual/using.xml: Use link element instead of xref.
3304 * doc/html/*: Regenerate.
3306 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3308 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3311 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3312 parameters in deduction guides.
3313 * include/debug/multimap.h (multimap): Likewise.
3314 * include/debug/set.h (multimap): Likewise.
3315 * include/debug/multiset.h (multimap): Likewise.
3316 * include/debug/unordered_map (unordered_map): Likewise.
3317 (unordered_multimap): Likewise.
3318 * include/debug/unordered_set (unordered_set): Likewise.
3319 (unordered_multiset): Likewise.
3322 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3323 Invalidate all iterators in case of rehash.
3324 (unordered_multimap<>::_M_check_rehashed): Likewise.
3325 * include/debug/unordered_set
3326 (unordered_set<>::_M_check_rehashed): Likewise.
3327 (unordered_multiset<>::_M_check_rehashed): Likewise.
3328 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3330 2019-03-07 Andreas Schwab <schwab@suse.de>
3332 * config/abi/post/riscv64-linux-gnu: New directory.
3333 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3335 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3337 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3338 compile test to run. Fix typo.
3340 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3341 * doc/html/*: Regenerate.
3343 P0356R5 Simplified partial function application
3344 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3345 helpers for bind_front.
3346 (bind_front, __cpp_lib_bind_front): Define.
3347 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3349 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3351 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3352 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3353 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3354 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3356 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3358 PR libstdc++/86655 - std::assoc_legendre should not constrain
3359 the value of m (or x).
3360 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3361 __sph_legendre): If degree > order Don't throw, return 0.
3362 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3363 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3364 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3365 * testsuite/tr1/5_numerical_facilities/special_functions/
3366 02_assoc_legendre/pr86655.cc: New test.
3367 * testsuite/tr1/5_numerical_facilities/special_functions/
3368 22_sph_legendre/pr86655.cc: New test.
3370 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3373 Also PR libstdc++/85517
3374 * include/std/variant (__do_visit): New.
3375 (__variant_cast): Likewise.
3376 (__variant_cookie): Likewise.
3377 (__erased_*): Remove.
3378 (_Variant_storage::_S_vtable): Likewise.
3379 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3380 (_Variant_storage::__M_reset): Adjust.
3381 (__variant_construct): New.
3382 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3383 __variant_construct.
3384 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3385 (_Move_ctor_base::__M_destructive_copy): New.
3386 (_Move_ctor_base::__M_destructive_move): Adjust to use
3387 __variant_construct.
3388 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3389 (_Copy_assign_alias): Adjust to check both copy assignment
3390 and copy construction for triviality.
3391 (_Move_assign_base::operator=): Adjust to use __do_visit.
3392 (_Multi_array): Add support for visitors that accept and return
3394 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3395 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3396 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3397 a __variant_cookie temporary for a variant that is valueless and..
3398 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3399 (__gen_vtable::_Array_type): Conditionally make space for
3400 the __variant_cookie visitor case.
3401 (__variant_construct_by_index): New.
3402 (get_if): Adjust to use std::addressof.
3403 (relops): Adjust to use __do_visit.
3404 (variant): Add __variant_cast and __variant_construct_by_index
3406 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3407 instead of self-destruction.
3408 (variant::swap): Adjust to use __do_visit.
3409 (visit): Reimplement in terms of __do_visit.
3410 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3411 * testsuite/20_util/variant/compile.cc: Adjust.
3412 * testsuite/20_util/variant/run.cc: Likewise.
3414 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3416 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3418 * testsuite/experimental/feat-char8_t.cc: Likewise.
3420 * include/std/type_traits [C++20] (is_bounded_array)
3421 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3423 * testsuite/20_util/is_bounded_array/requirements/
3424 explicit_instantiation.cc: New test.
3425 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3427 * testsuite/20_util/is_bounded_array/value.cc: New test.
3428 * testsuite/20_util/is_unbounded_array/requirements/
3429 explicit_instantiation.cc: New test.
3430 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3432 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3434 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3436 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3438 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3440 * include/c_compatibility/math.h [C++20] (lerp): Add using
3442 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3443 (__lerp): Define function template to implement lerp.
3444 (lerp(float, float, float), lerp(double, double, double))
3445 (lerp(long double, long double, long double)): Define for C++20.
3446 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3447 (midpoint(T, T), midpoint(T*, T*)): Define.
3448 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3449 * testsuite/26_numerics/lerp.cc: New test.
3450 * testsuite/26_numerics/midpoint/floating.cc: New test.
3451 * testsuite/26_numerics/midpoint/integral.cc: New test.
3452 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3454 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3456 PR libstdc++/88996 Implement P0439R0
3457 Make std::memory_order a scoped enumeration.
3458 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3459 add variables for the old enumerators. Adjust calls.
3460 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3461 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3463 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3465 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3468 * include/std/memory_resource (polymorphic_allocator): Add default
3469 template argument for C++20.
3470 (polymorphic_allocator::allocate_bytes)
3471 (polymorphic_allocator::deallocate_bytes)
3472 (polymorphic_allocator::allocate_object)
3473 (polymorphic_allocator::deallocate_object)
3474 (polymorphic_allocator::new_object)
3475 (polymorphic_allocator::delete_object): New member functions for
3477 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3480 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3483 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3486 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3488 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3489 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3491 * include/std/memory (uses_allocator_construction_args): New set of
3492 overloaded functions.
3493 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3495 * include/std/memory_resource (polymorphic_allocator::construct)
3496 [__cplusplus > 201703l]: Replace all overloads with a single function
3497 using uses_allocator_construction_args.
3498 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3500 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3502 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3505 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3506 stylesheet directories before check for xsltproc. Try to use
3507 xmlcatalog to find local stylesheet directory before trying hardcoded
3508 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3509 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3510 use xsltproc if xmlcatalog fails to find a local stylesheet.
3511 * configure.ac: Check for xmlcatalog.
3512 * Makefile.in: Regenerate.
3513 * configure: Likewise.
3514 * doc/Makefile.in: Likewise.
3515 * include/Makefile.in: Likewise.
3516 * libsupc++/Makefile.in: Likewise.
3517 * po/Makefile.in: Likewise.
3518 * python/Makefile.in: Likewise.
3519 * src/Makefile.in: Likewise.
3520 * src/c++11/Makefile.in: Likewise.
3521 * src/c++17/Makefile.in: Likewise.
3522 * src/c++98/Makefile.in: Likewise.
3523 * src/filesystem/Makefile.in: Likewise.
3524 * testsuite/Makefile.in: Likewise.
3526 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3529 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3530 container deduction guides.
3531 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3532 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3533 parameters in deduction guides.
3534 * include/bits/stl_multimap.h (multimap): Likewise.
3535 * include/bits/stl_multiset.h (multiset): Likewise.
3536 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3537 * include/bits/stl_set.h (set): Likewise.
3538 * include/bits/stl_stack.h (stack): Likewise.
3539 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3540 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3541 constrain parameters in deduction guides.
3542 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3544 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3546 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3547 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3548 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3549 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3551 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3553 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3556 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3557 to class template and partial specialization using void_t.
3558 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3560 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3563 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3564 copy and move members public.
3566 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3568 * include/std/type_traits (__underlying_type_impl): New helper to
3569 make underlying_type SFINAE-friendly.
3570 (underlying_type): Derive from __underlying_type_impl.
3571 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3575 * include/bits/char_traits.h (__constant_char_array): Check index is
3576 in range before dereferencing.
3577 (char_traits<char>::compare, char_traits<char>::find)
3578 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3579 immediately if n is zero.
3580 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3581 Remove workarounds for PR 67026.
3582 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3584 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3587 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3589 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3590 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3592 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3595 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3596 type to std::size_t and argument to type to long double.
3598 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3600 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3601 * config/abi/post/sparc64-linux-gnu: New directory.
3602 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3603 * config/abi/post/sparc64-linux-gnu/32: New directory.
3604 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3606 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3608 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3609 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3612 2019-02-22 Tom Honermann <tom@honermann.net>
3614 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3615 printers for u8string and u8string_view.
3617 2019-02-22 Tom Honermann <tom@honermann.net>
3619 * testsuite/18_support/byte/ops.cc: Validate
3620 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3621 std::to_integer<char32_t>.
3622 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3623 std::numeric_limits<char8_t>.
3624 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3625 std::numeric_limits<char8_t>::lowest().
3626 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3627 std::numeric_limits<char8_t>::max_digits10.
3628 * testsuite/18_support/type_info/fundamental.cc: Validate
3629 typeinfo for char8_t.
3630 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3631 std::from_chars with char8_t.
3632 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3633 Validate explicit instantiation of std::hash<char8_t>.
3634 * testsuite/20_util/is_integral/value.cc: Validate
3635 std::is_integral<char8_t>.
3636 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3637 Validate std::make_signed<char8_t>.
3638 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3639 Validate u8string construction from char8_t sources.
3640 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3642 * testsuite/21_strings/basic_string_view/operations/compare/
3643 char/70483.cc: Validate substr operations on u8string_view.
3644 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3645 the u8string_view typedef is defined.
3646 * testsuite/21_strings/char_traits/requirements/
3647 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3649 * testsuite/21_strings/char_traits/requirements/
3650 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3651 constexpr member functions.
3652 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3653 that the u8string typedef is defined.
3654 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3655 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3656 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3657 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3659 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3660 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3662 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3663 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3664 Validate std::atomic<char8_t>::is_always_lock_free
3665 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3666 Update line numbers.
3667 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3669 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3671 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3672 Validate std::experimental::pmr::u8string.
3673 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3674 u8string_view typedef is defined.
3675 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3676 char32_t to the typelists.
3678 2019-02-22 Tom Honermann <tom@honermann.net>
3680 * include/ext/typelist.h: Constrain a partial specialization of
3681 typelist::detail::append_ to only match chain<T1,T2>.
3683 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3686 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3687 class template with class. Replace move and copy member types with
3688 member alias templates, so they are only instantiated when needed.
3689 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3690 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3691 test for C++11/14/17 as well.
3692 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3695 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3698 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3699 _GLIBCXX_PURE to the alias declaration.
3701 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3703 * testsuite/21_strings/basic_string/literals/types.cc
3704 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3705 * testsuite/21_strings/basic_string/literals/values.cc
3706 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3707 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3708 potentially having different type.
3709 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3710 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3712 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3713 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3714 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3715 string literals only using basic character set.
3716 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3717 u8 literals to char.
3718 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3719 Test ATOMIC_CHAR8_T_LOCK_FREE.
3720 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3721 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3722 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3723 * testsuite/experimental/string_view/literals/types.cc
3724 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3726 * testsuite/experimental/string_view/literals/values.cc
3727 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3729 2019-02-19 Tom Honermann <tom@honermann.net>
3731 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3732 from char16_32_t.cc; validates numeric_limits<char8_t>.
3733 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3734 test cloned from types.cc; validates operator""s for char8_t
3736 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3737 test cloned from values.cc; validates construction and comparison
3739 * testsuite/21_strings/basic_string/requirements/
3740 /explicit_instantiation/char8_t/1.cc: New test cloned from
3741 char16_t/1.cc; validates explicit instantiation of
3742 basic_string<char8_t>.
3743 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3744 New test cloned from types.cc; validates operator""sv for char8_t
3745 returns u8string_view.
3746 * testsuite/21_strings/basic_string_view/literals/
3747 values-char8_t.cc: New test cloned from values.cc; validates
3748 construction and comparison of u8string_view values.
3749 * testsuite/21_strings/basic_string_view/requirements/
3750 explicit_instantiation/char8_t/1.cc: New test cloned from
3751 char16_t/1.cc; validates explicit instantiation of
3752 basic_string_view<char8_t>.
3753 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3754 New test cloned from char16_t/65049.cc; validates that
3755 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3756 * testsuite/21_strings/char_traits/requirements/char8_t/
3757 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3758 that char_traits<char8_t> member typedefs are present and correct.
3759 * testsuite/21_strings/char_traits/requirements/
3760 explicit_instantiation/char8_t/1.cc: New test cloned from
3761 char16_t/1.cc; validates explicit instantiation of
3762 char_traits<char8_t>.
3763 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3764 from char16_t.cc: validates
3765 codecvt<char16_t, char8_t, mbstate_t>.
3766 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3767 from char32_t.cc: validates
3768 codecvt<char32_t, char8_t, mbstate_t>.
3769 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3770 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3771 codecvt<char32_t, char8_t, std::mbstate_t>.
3772 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3773 test cloned from string.cc; validates filesystem::path construction
3775 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3776 the __cpp_lib_char8_t feature test macro is defined with the
3778 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3779 New test cloned from string.cc; validates filesystem::path
3780 construction from char8_t input.
3781 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3782 test cloned from types.cc; validates operator""sv for char8_t
3783 returns u8string_view.
3784 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3785 New test cloned from values.cc; validates construction and
3786 comparison of u8string_view values.
3787 * testsuite/experimental/string_view/requirements/
3788 explicit_instantiation/char8_t/1.cc: New test cloned from
3789 char16_t/1.cc; validates explicit instantiation of
3790 basic_string_view<char8_t>.
3791 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3792 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3795 2019-02-19 Tom Honermann <tom@honermann.net>
3797 P0482R5 char8_t: Standard library support
3798 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3799 typeinfo symbols for char8_t.
3800 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3801 (GLIBCXX_3.4.26): Add symbols for specializations of
3802 numeric_limits and codecvt that involve char8_t.
3803 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3804 * include/bits/atomic_base.h: Add atomic_char8_t.
3805 * include/bits/basic_string.h: Add std::hash<u8string> and
3806 operator""s(const char8_t*, size_t).
3807 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3809 * include/bits/char_traits.h: Add char_traits<char8_t>.
3810 * include/bits/codecvt.h: Add
3811 codecvt<char16_t, char8_t, mbstate_t>,
3812 codecvt<char32_t, char8_t, mbstate_t>,
3813 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3814 codecvt_byname<char32_t, char8_t, mbstate_t>.
3815 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3816 recognize char8_t as an integral type.
3817 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3819 (path::u8string): Return std::u8string when char8_t support is
3821 (path::generic_u8string): Likewise.
3822 (path::_S_convert): Handle conversion from char8_t input.
3823 (path::_S_str_convert): Likewise.
3824 * include/bits/functional_hash.h: Add hash<char8_t>.
3825 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3827 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3828 for new char8_t specializations.
3829 * include/bits/localefwd.h: Add missing declarations of
3830 codecvt<char16_t, char, mbstate_t> and
3831 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3832 codecvt<char16_t, char8_t, mbstate_t> and
3833 codecvt<char32_t, char8_t, mbstate_t>.
3834 * include/bits/postypes.h: Add u8streampos
3835 * include/bits/stringfwd.h: Add declarations of
3836 char_traits<char8_t> and u8string.
3837 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3838 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3840 (path::u8string): Return std::u8string when char8_t support is
3842 (path::generic_u8string): Likewise.
3843 (path::_S_convert): Handle conversion from char8_t input.
3844 (path::_S_str_convert): Likewise.
3845 * include/experimental/string: Add u8string.
3846 * include/experimental/string_view: Add u8string_view,
3847 hash<experimental::u8string_view>, and
3848 operator""sv(const char8_t*, size_t).
3849 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3850 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3851 as a character type.
3852 * include/std/limits: Add numeric_limits<char8_t>.
3853 * include/std/string_view: Add u8string_view,
3854 hash<experimental::u8string_view>, and
3855 operator""sv(const char8_t*, size_t).
3856 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3857 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3858 * libsupc++/atomic_lockfree_defines.h: Define
3859 ATOMIC_CHAR8_T_LOCK_FREE.
3860 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3861 codecvt.cc and limits.cc so that char8_t specializations of
3862 numeric_limits and codecvt and emitted.
3863 * src/c++11/Makefile.in: Likewise.
3864 * src/c++11/codecvt.cc: Define members of
3865 codecvt<char16_t, char8_t, mbstate_t>,
3866 codecvt<char32_t, char8_t, mbstate_t>,
3867 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3868 codecvt_byname<char32_t, char8_t, mbstate_t>.
3869 * src/c++11/limits.cc: Define members of
3870 numeric_limits<char8_t>.
3871 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3872 locale_init.cc and localename.cc.
3873 * src/c++98/Makefile.in: Likewise.
3874 * src/c++98/locale_init.cc: Add initialization for the
3875 codecvt<char16_t, char8_t, mbstate_t> and
3876 codecvt<char32_t, char8_t, mbstate_t> facets.
3877 * src/c++98/localename.cc: Likewise.
3878 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3880 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3882 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3883 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3884 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3886 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3888 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3889 * doc/html/*: Regenerate.
3891 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3892 * doc/html/*: Regenerate.
3894 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3895 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3896 allocator type in is_constructible checks.
3897 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3898 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3899 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3900 problematic type from LWG 2586 discussion.
3901 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3902 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3904 * configure.ac: Check for C11 timespec_get function.
3905 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3907 * config.h.in: Regenerate.
3908 * configure: Regenerate.
3909 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3910 std for C++17 and up.
3912 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3913 * include/bits/stl_queue.h
3914 (priority_queue(const Compare&, const Container&, const Alloc&))
3915 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3917 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3919 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3920 * include/bits/stl_queue.h (queue, priority_queue): Add static
3921 assertions to enforce LWG 2566 requirement on value_type.
3922 * include/bits/stl_stack.h (stack): Likewise.
3925 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
3927 * doc/xml/manual/intro.xml: Document LWG 2735 status.
3928 * include/bits/std_abs.h: Add comment about LWG 2735.
3929 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
3931 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
3934 * include/std/version [__cpp_impl_destroying_delete]
3935 (__cpp_lib_destroying_delete): Only define for C++2a and later.
3936 * libsupc++/new [__cpp_impl_destroying_delete]
3937 (__cpp_lib_destroying_delete): Likewise.
3938 (destroying_delete_t, destroying_delete): Likewise, but define even
3939 when __cpp_impl_destroying_delete is not defined.
3940 * testsuite/18_support/destroying_delete.cc: New test.
3942 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
3945 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
3946 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
3947 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
3948 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
3950 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
3953 * include/bits/fs_path.h (path::has_root_name)
3954 (path::has_root_directory, path::has_root_path)
3955 (path::has_relative_path, path::has_parent_path)
3956 (path::has_filename, path::has_stem, path::has_extension)
3957 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
3959 * src/c++17/fs_path.cc (path::has_root_name)
3960 (path::has_root_directory, path::has_root_path)
3961 (path::has_relative_path, path::has_parent_path)
3962 (path::has_filename, path::_M_find_extension): Add noexcept.
3964 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
3966 PR libstdc++/89102 (partial)
3967 * include/std/type_traits (common_type<>): Define.
3968 (common_type<T>): Derive from common_type<T, T>.
3969 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3970 Test zero-length template argument list.
3971 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3972 Test additional single argument cases.
3973 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3974 Adjust expected error.
3976 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
3979 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
3981 * include/bits/stl_stack.h (stack): Likewise.
3982 * testsuite/23_containers/priority_queue/deduction.cc: New test.
3983 * testsuite/23_containers/queue/deduction.cc: New test.
3984 * testsuite/23_containers/stack/deduction.cc: New test.
3987 * include/std/type_traits (__is_convertible_helper)
3988 (__is_convertible_helper<_From, _To, false>): Revert changes to
3989 support is_nothrow_convertible.
3990 (__is_nt_convertible_helper): New helper.
3991 (is_nothrow_convertible): Use __is_nt_convertible_helper.
3993 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
3994 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
3997 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
3998 __is_alloc_insertable_impl. Replace single type member with two
3999 members, one for each of copy and move insertable.
4000 (__is_move_insertable): New trait for internal use.
4001 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4002 (vector::_S_nothrow_relocate(true_type)): New functions to
4003 conditionally check if __relocate_a can throw.
4004 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4005 on __is_move_insertable.
4006 (vector::_S_do_relocate): New overloaded functions to conditionally
4008 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4009 based on _S_use_relocate.
4010 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4011 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4012 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4015 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4016 parameter unnamed. Add message to static assertion.
4017 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4018 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4021 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4024 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4026 (__is_bitwise_relocatable): ... to this.
4027 (__relocate_a_1): Adapt.
4028 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4029 (__is_bitwise_relocatable): ... to this.
4031 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4034 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4035 final component as well as from _M_pathname. Append the dot using
4036 operator+= instead of only to _M_pathname.
4037 (path::_M_find_extension): Reformat slightly.
4038 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4039 Add more test cases.
4041 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4043 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4045 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4047 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4048 constexpr specifiers from arg and proj.
4050 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4051 __shared_ptr instantiations used by gcc4-compatible ABI.
4053 * include/experimental/forward_list (experimental::erase): Qualify
4055 * include/experimental/list (experimental::erase): Likewise.
4056 * include/std/forward_list (std::erase): Likewise.
4057 * include/std/list (std::erase): Likewise.
4059 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4061 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4062 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4063 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4064 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4065 * testsuite/ext/array_allocator/26875.cc: Likewise.
4066 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4067 * testsuite/util/replacement_memory_operators.h: Likewise.
4068 * testsuite/util/testsuite_allocator.h: Likewise.
4070 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4071 normal mode vector, even for debug mode.
4072 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4073 Define alias template for normal mode vector.
4075 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4078 * config/locale/generic/c_locale.h (__convert_from_v)
4079 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4080 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4081 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4082 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4084 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4087 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4088 data member with static member function _S_use_relocate().
4089 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4090 (vector::_M_default_append): Use _S_use_relocate() instead of
4093 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4096 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4099 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4100 write to stderr instead of using printf.
4102 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4105 * include/bits/char_traits.h (__constant_string_p,
4106 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4109 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4111 Implement C++20 P0600r1.
4112 * include/backward/hash_map: Add nodiscard attribute to empty.
4113 * include/backward/hash_set: Likewise.
4114 * backward/hashtable.h: Likewise.
4115 * include/bits/basic_string.h: Likewise.
4116 * include/bits/forward_list.h: Likewise.
4117 * include/bits/hashtable.h: Likewise.
4118 * include/bits/regex.h: Likewise.
4119 * include/bits/stl_deque.h: Likewise.
4120 * include/bits/stl_list.h: Likewise.
4121 * include/bits/stl_map.h: Likewise.
4122 * include/bits/stl_multimap.h: Likewise.
4123 * include/bits/stl_multiset.h: Likewise.
4124 * include/bits/stl_queue.h: Likewise.
4125 * include/bits/stl_set.h: Likewise.
4126 * include/bits/stl_stack.h: Likewise.
4127 * include/bits/stl_tree.h: Likewise.
4128 * include/bits/stl_vector.h: Likewise.
4129 * include/bits/unordered_map.h: Likewise.
4130 * include/bits/unordered_set.h: Likewise.
4131 * include/debug/array: Likewise.
4132 * include/experimental/any: Likewise.
4133 * include/experimental/bits/fs_path.h: Likewise.
4134 * include/experimental/internet: Likewise.
4135 * include/experimental/string_view: Likewise.
4136 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4138 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4140 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4142 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4144 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4146 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4148 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4150 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4152 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4153 info_fn_imps.hpp: Likewise.
4154 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4155 left_child_next_sibling_heap_.hpp: Likewise.
4156 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4158 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4160 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4162 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4164 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4166 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4168 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4170 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4171 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4172 * include/ext/rope: Likewise.
4173 * include/ext/slist: Likewise.
4174 * include/ext/vstring.h: Likewise.
4175 * include/profile/array: Likewise.
4176 * include/std/array: Likewise.
4177 * include/tr1/array: Likewise.
4178 * include/tr1/hashtable.h: Likewise.
4179 * include/tr1/regex: Likewise.
4180 * include/tr2/dynamic_bitset: Likewise.
4181 * include/bits/alloc_traits.h: Add nodiscard attribute to
4183 * include/experimental/memory_resource: Likewise.
4184 * include/ext/alloc_traits.h: Likewise.
4185 * include/ext/array_allocator.h: Likewise.
4186 * include/ext/bitmap_allocator.h: Likewise.
4187 * include/ext/debug_allocator.h: Likewise.
4188 * include/ext/extptr_allocator.h: Likewise.
4189 * include/ext/mt_allocator.h: Likewise.
4190 * include/ext/new_allocator.h: Likewise.
4191 * include/ext/pool_allocator.h: Likewise.
4192 * include/ext/throw_allocator.h: Likewise.
4193 * include/std/scoped_allocator: Likewise.
4194 * libsupc++/eh_alloc.cc: Likewise.
4195 * include/std/future: Add nodiscard attribute to async.
4196 * libsupc++/new: Add nodiscard attribute to new.
4198 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4203 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4204 * include/bits/shared_ptr.h
4205 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4206 (allocate_shared): Change to use new tag type.
4207 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4208 Declare new member function.
4209 (_Sp_alloc_shared_tag): Define new type.
4210 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4211 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4212 _Sp_make_shared_tag::_S_eq to check type_info.
4213 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4214 Constrain to prevent being called with _Sp_alloc_shared_tag.
4215 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4216 Replace constructor with ...
4217 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4218 reference parameter so address of the new object can be returned to
4219 the caller. Obtain the allocator from the tag type.
4220 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4221 constructor with ...
4222 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4223 to the __shared_count constructor.
4224 (__allocate_shared): Change to use new tag type.
4225 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4227 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4229 * src/c++17/fs_ops.cc
4230 (equivalent(const path&, const path&, error_code&))
4231 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4232 compare files instead of relying on incomplete info returned by stat.
4235 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4236 if the path is already absolute.
4237 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4238 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4241 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4242 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4243 of filesystem::exists.
4244 (create_directories(const path&, error_code&)): Add assertions.
4245 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4246 Add workaround for bug in _wstat for paths with trailing slash.
4247 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4248 for expected behaviour on mingw.
4249 * testsuite/experimental/filesystem/operations/create_directories.cc:
4251 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4252 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4253 not test permissions on mingw targets.
4255 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4257 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4258 constructors and open members taking wide strings. Fix patterns for
4259 filesystem::path members to match wstring_view parameters. Add
4260 exports for shared_ptr members used by directory iterators.
4261 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4262 error code parameter if the file doesn't exist.
4263 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4265 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4266 values for mingw targets, where "/" is not an absolute path. Do not
4267 test symlinks on mingw targets.
4268 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4269 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4271 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4272 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4273 that each component of the path is created.
4274 * testsuite/experimental/filesystem/operations/create_directories.cc:
4276 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4277 permissions on mingw targets.
4278 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4279 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4280 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4281 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4283 * testsuite/experimental/filesystem/operations/permissions.cc:
4285 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4286 symlinks or permissions on mingw targets.
4287 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4288 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4289 symlinks on mingw targets.
4290 * testsuite/experimental/filesystem/operations/remove_all.cc:
4292 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4293 permissions on mingw targets.
4294 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4295 test symlinks on mingw targets.
4296 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4299 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4302 Warn about unused comparisons of shared_ptr/unique_ptr
4303 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4304 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4305 <, <=, >, >= for shared_ptr.
4306 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4308 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4310 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4311 as 201611L, because P0497R0 changes are supported.
4312 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4314 * include/bits/erase_if.h [__cplusplus > 201703L]
4315 (__cpp_lib_erase_if): Only define for C++2a.
4316 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4317 (__cpp_lib_null_iterators): Define.
4318 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4319 (__cpp_lib_null_iterators): Define.
4320 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4322 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4324 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4326 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4327 changes are supported.
4328 * include/std/optional (__cpp_lib_optional): Likewise.
4329 * include/std/variant (__cpp_lib_variant): Likewise.
4330 * include/std/version [!__STRICT_ANSI__]
4331 (__cpp_lib_uncaught_exceptions): Define as long integer.
4332 [__cplusplus >= 201703L] (__cpp_lib_any)
4333 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4334 (__cpp_lib_variant): Define for C++17.
4335 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4337 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4340 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4342 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4346 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4348 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4351 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4353 * doc/xml/manual/intro.xml: Include new section.
4354 * doc/xml/manual/status_cxx2017.xml: Document more
4355 implementation-defined properties of the library.
4356 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4357 * doc/html/*: Regenerate.
4359 * include/bits/refwrap.h [__cplusplus > 201703L]
4360 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4361 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4362 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4364 (reference_wrapper::operator()): Add static assertion.
4365 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4367 * include/std/chrono (duration_values::zero(), duration_values::min())
4368 (duration_values::max()): Add noexcept.
4369 (duration::zero(), duration::min(), duration::max()): Likewise.
4370 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4371 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4372 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4374 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4376 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4378 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4379 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4381 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4384 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4385 specialization for C++17 (P0513R0, LWG 2817).
4386 * testsuite/20_util/hash/nullptr.cc: New test.
4389 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4390 pattern for std::basic_stringbuf::str().
4392 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4393 basic_ostream::operator<< patterns.
4395 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4397 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4398 test failures on targets with 32-bit time_t.
4400 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4401 * include/std/deque: Likewise.
4402 * include/std/forward_list: Likewise.
4403 * include/std/list: Likewise.
4404 * include/std/string: Likewise.
4405 * include/std/vector: Likewise.
4406 * include/std/version: Likewise.
4407 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4408 * testsuite/23_containers/deque/erasure.cc: Likewise.
4409 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4410 * testsuite/23_containers/list/erasure.cc: Likewise.
4411 * testsuite/23_containers/map/erasure.cc: Likewise.
4412 * testsuite/23_containers/set/erasure.cc: Likewise.
4413 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4414 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4415 * testsuite/23_containers/vector/erasure.cc: Likewise.
4417 * include/experimental/internet [AI_NUMERICSERV]
4418 (resolver_base::numeric_service): Define conditionally.
4419 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4421 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4424 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4425 Jonathan Wakely <jwakely@redhat.com>
4428 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4429 (GLIBCXX_3.4.26): Add new exports.
4430 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4431 correct list of sources.
4432 * include/Makefile.in: Regenerate.
4433 * include/std/ostream (operator<<(nullptr_t)): New member function.
4434 * src/c++17/ostream-inst.cc: New file.
4435 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4438 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4440 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4441 of the source file containing the caller.
4442 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4443 directories created by test.
4444 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4446 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4448 * testsuite/experimental/filesystem/iterators/
4449 recursive_directory_iterator.cc: Likewise.
4451 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4453 PR tree-optimization/88775
4454 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4455 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4456 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4457 instead of __builtin_constant_p if available. Don't bother with
4458 the pointer comparison in C++11 and earlier.
4460 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4464 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4467 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4469 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4470 for filesystem::path. Give variables more distinctive names.
4472 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4473 member function to perform non-trivial assignment.
4474 (_Optional_payload_base::_M_move_assign): Likewise.
4475 (_Optional_payload<T, true, false, true>::operator=)
4476 (_Optional_payload<T, true, true, false>::operator=)
4477 (_Optional_payload<T, true, false, false>::operator=): Call
4478 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4481 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4482 test std::complex<long double> if long double format is IBM128.
4483 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4486 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4488 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4489 for old std::unique_ptr layout.
4490 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4491 to become valueless. Add filesystem::path tests.
4494 * include/std/optional (_Optional_payload_base): New class template
4495 for common code hoisted from _Optional_payload specializations. Use
4496 a template for the union, to allow a partial specialization for
4497 types with non-trivial destructors. Add constructors for in-place
4498 initialization to the union.
4499 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4500 to perform non-trivial copy construction, instead of relying on
4501 non-standard copy elision in a delegating constructor.
4502 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4503 non-trivial move construction.
4504 (_Optional_payload): Derive from _Optional_payload_base and use it
4505 for everything except the non-trivial assignment operators, which are
4507 (_Optional_payload<false, C, M>): Derive from the specialization
4508 _Optional_payload<true, false, false> and add a destructor.
4509 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4510 Forward to corresponding members of _Optional_payload.
4511 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4512 Hoist common members from _Optional_base.
4513 (_Optional_base): Make all members and base class public.
4514 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4515 _Optional_base_impl.
4516 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4517 support for new std::optional layout.
4518 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4521 * include/bits/locale_conv.h: Use <> for includes not "".
4522 * include/ext/random: Likewise.
4523 * include/ext/vstring.h: Likewise.
4525 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4527 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4528 (GLIBCXX_3.4.21): Likewise.
4530 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4533 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4534 to match the one that controls whether utimbuf and utime are declared.
4536 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4539 * include/bits/char_traits.h (char_traits::move): Do not pass null
4540 pointers to memmove.
4541 * include/bits/locale_facets.h
4542 (ctype<char>::widen(const char*, const char*, char*)): Do not
4543 pass null pointers to memcpy.
4544 (ctype<char>::narrow(const char*, const char*, char, char*)):
4546 (ctype<char>::do_widen(const char*, const char*, char*)):
4548 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4551 * doc/xml/manual/spine.xml: Update copyright years.
4552 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4553 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4554 for C++17 filesystem library.
4555 * doc/html/*: Regenerate.
4557 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4558 * config.h.in: Regenerate.
4559 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4560 alphabetically and add missing entries for copy_symlink,
4561 hard_link_count, rename, and resize_file.
4562 * configure: Regenerate.
4563 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4564 used unconditionally.
4565 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4566 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4567 supports truncating to zero length.
4568 * testsuite/27_io/filesystem/operations/all.cc: New test.
4569 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4571 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4574 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4575 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4576 * config.h.in: Regenerate.
4577 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4578 remaining std::filesystem types and functions.
4579 * configure: Regenerate.
4580 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4581 * src/c++17/Makefile.in: Regenerate.
4582 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4583 here, and change name of included file.
4584 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4585 here, and change name of included file.
4586 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4587 path to dir-common.h.
4588 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4589 path to ops-common.h. Disable -Wunused-parameter warnings.
4590 (internal_file_clock): Define unconditionally.
4591 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4593 (do_copy_file, do_space): Move definitions to ops.common.h.
4594 (copy, file_size, hard_link_count, last_write_time, space): Only
4595 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4597 (last_write_time, read_symlink): Remove unused attributes from
4599 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4600 * src/filesystem/Makefile.in: Regenerate.
4601 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4602 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4603 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4604 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4605 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4606 dummy types and functions instead of using #error.
4607 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4608 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4610 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4611 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4612 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4613 to account for new namespace.
4614 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4615 -lstdc++fs from dg-options.
4616 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4617 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4618 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4619 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4620 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4622 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4623 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4625 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4626 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4627 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4628 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4629 * testsuite/27_io/filesystem/operations/create_directories.cc:
4631 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4632 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4633 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4634 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4635 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4636 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4637 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4638 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4639 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4640 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4641 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4642 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4643 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4644 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4645 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4646 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4647 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4648 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4650 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4654 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4655 typeinfo and vtables less greedy.
4656 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4657 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4658 * src/c++17/Makefile.in: Regenerate.
4659 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4660 here, and change name of included file.
4661 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4662 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4664 * src/filesystem/Makefile.in: Regenerate.
4665 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4666 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4667 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4668 from dg-options and remove dg-require-filesystem-ts.
4669 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4670 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4671 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4672 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4673 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4674 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4675 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4676 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4677 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4678 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4679 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4680 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4681 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4682 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4683 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4684 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4685 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4686 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4687 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4688 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4689 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4691 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4692 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4693 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4694 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4695 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4696 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4697 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4698 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4699 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4700 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4701 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4702 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4704 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4706 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4708 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4710 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4711 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4712 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4713 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4714 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4715 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4716 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4717 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4718 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4719 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4721 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4722 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4723 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4724 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4725 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4728 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4729 Check is_trivially_copyable instead of is_scalar.
4730 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4731 contained value can throw and its type is trivially copyable then
4732 construct into a temporary variant and move from it, to provide the
4733 strong exception safety guarantee.
4734 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4736 * testsuite/20_util/variant/87431.cc: New test.
4737 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4738 conversion causes valueless state.
4741 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4742 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4743 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4744 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4745 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4747 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4749 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4750 (file_time_type): Redefine in terms of __file_clock.
4751 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4753 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4755 (internal_file_lock): New helper type for accessing __file_clock.
4756 (do_copy_file): Use internal_file_lock to convert system time to
4758 (last_write_time(const path&, error_code&)): Likewise.
4759 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4761 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4763 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4764 for const member functions of std::basic_string.
4765 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4767 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4768 Make non-standard constructor private.
4769 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4771 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4772 explicit instantiations for C++17 as well as earlier dialects.
4773 * src/c++17/Makefile.am: Add new source files.
4774 * src/c++17/Makefile.in: Regenerate.
4775 * src/c++17/cow-string-inst.cc: New file defining explicit
4776 instantiations for basic_string member functions added in C++17.
4777 * src/c++17/string-inst.cc: Likewise.
4779 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4780 copy/move constructors for old std::basic_string.
4781 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4782 (basic_string::reference, basic_string::const_reference): Define
4783 as plain references for C++11 and later.
4784 (basic_string::basic_string()): Put constructor body outside
4785 preprocessor conditional groups.
4786 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4787 instead of copying it.
4788 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4790 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4792 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4793 cases for old basic_string.
4794 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4795 allocator-extended constructors unconditionally. Add extra members to
4796 allocator type when using old string ABI.
4797 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4799 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4801 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4802 -fno-inline added to test flags.
4804 * testsuite/21_strings/basic_string/requirements/
4805 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4807 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4808 assertion failures with old std::string ABI.
4810 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4812 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4813 functions that will only erase elements at the end.
4814 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4815 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4816 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4818 (path::_List::pop_back()): Define.
4819 (path::_List::_M_erase_from(const_iterator)): Define.
4820 (path::operator/=(const path&)): Use pop_back to remove last component
4821 and _M_erase_from to remove multiple components.
4822 (path::_M_append(basic_string_view<value_type>)): Likewise.
4823 (path::operator+=(const path&)): Likewise.
4824 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4825 (path::remove_filename()): Likewise.
4826 (path::lexically_normal()): Use _List::_Impl iterators instead of
4827 path::iterator. Use pop_back to remove components from the end. Clear
4828 trailing filename, instead of using erase(const_iterator) to remove
4829 a non-final component.
4830 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4832 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4834 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4835 incorrect treatment of empty filename after trailing slash.
4836 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4838 * testsuite/21_strings/basic_string/modifiers/assign/char/
4839 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4841 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4842 move_assign_optim.cc: Likewise.
4844 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4845 Jakub Jelinek <jakub@redhat.com>
4848 * include/experimental/memory: Replace UTF-8 quote characters.
4849 * include/std/future: Replace UTF-8 "em dash" characters.
4851 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4854 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4855 * include/debug/forward_list: Likewise.
4856 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4858 * include/experimental/chrono: Likewise.
4859 * include/experimental/functional: Likewise.
4860 * include/experimental/ratio: Likewise.
4861 * include/experimental/system_error: Likewise.
4862 * include/experimental/tuple: Likewise.
4863 * include/experimental/type_traits: Likewise.
4864 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4865 * include/parallel/multiseq_selection.h: Likewise.
4868 * config/abi/pre/gnu.ver: Add missing exports.
4869 * testsuite/22_locale/collate_byname/88681.cc: New test.
4870 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4871 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4873 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4875 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4876 initializer_list<value_type> and from input iterator ranges.
4877 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4879 * testsuite/experimental/string_view/element_access/char/empty.cc:
4880 Fix year range in copyright header.
4882 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4884 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4885 Fix year range in copyright header.
4887 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4889 Update copyright years.
4891 Copyright (C) 2019 Free Software Foundation, Inc.
4893 Copying and distribution of this file, with or without modification,
4894 are permitted in any medium without royalty provided the copyright
4895 notice and this notice are preserved.