1 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
4 * include/std/type_traits (is_function): Simplify definition. Remove
5 partial specializations for function types.
6 (__is_referenceable): Simplify definition.
7 * testsuite/20_util/bind/91371.cc: New test.
8 * testsuite/20_util/is_function/91371.cc: New test.
9 * testsuite/20_util/is_function/value.cc: Check more pointer types.
10 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
11 * testsuite/20_util/is_object/91371.cc: New test.
13 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
15 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
17 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
20 * include/bits/std_function.h (__check_func_return_type): Remove.
21 (function::_Callable): Use std::__is_invocable_impl instead of
22 __check_func_return_type.
23 * include/std/type_traits (__is_invocable_impl): Add another defaulted
24 template parameter. Define a separate partial specialization for
25 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
26 with a check that models delayed temporary materialization.
27 * testsuite/20_util/function/91456.cc: New test.
28 * testsuite/20_util/is_invocable/91456.cc: New test.
30 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
32 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
34 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
36 Implement C++20 p0879 - Constexpr for swap and swap related functions.
37 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
38 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
40 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
41 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
42 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
43 * include/bits/move.h (swap): Add constexpr.
44 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
45 (__gcd, __rotate, rotate, __partition, __heap_select)
46 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
47 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
48 (__introselect, __chunk_insertion_sort, next_permutation)
49 (prev_permutation, partition, partial_sort, nth_element, sort)
50 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
51 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
52 (swap_ranges): Add constexpr.
53 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
54 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
56 * include/std/type_traits (swap): Add constexpr.
57 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
58 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
59 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
60 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
61 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
62 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
63 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
64 * testsuite/25_algorithms/partition/constexpr.cc: New test.
65 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
66 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
67 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
68 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
69 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
70 * testsuite/25_algorithms/sort/constexpr.cc: New test.
71 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
72 * testsuite/25_algorithms/swap/constexpr.cc: New test.
73 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
75 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
78 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
80 * include/std/tuple (__unpack_std_tuple): New variable template and
81 partial specializations.
82 (apply, make_from_tuple): Add noexcept-specifier.
83 * testsuite/20_util/tuple/apply/2.cc: New test.
84 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
86 2019-08-09 Corentin Gay <gay@adacore.com>
88 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
89 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
90 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
91 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
92 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
95 2019-08-09 Alexandre Oliva <oliva@adacore.com>
98 (normal_mv_distribution::param_type::param_type): New private
99 ctor taking a decomposed varcov matrix, for use by...
100 (operator>>): ... this, befriended.
101 * include/ext/random.tcc (operator>>): Use it.
102 (normal_mv_distribution::param_type::_M_init_lower): Adjust
103 member function name in exception message.
105 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
107 P0325R4 to_array from LFTS with updates
108 * include/experimental/array (to_array): Qualify call to __to_array.
109 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
110 * include/std/version (__cpp_lib_to_array): Likewise.
111 * testsuite/23_containers/array/creation/1.cc: New test.
112 * testsuite/23_containers/array/creation/2.cc: New test.
113 * testsuite/23_containers/array/creation/3_neg.cc: New test.
114 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
115 Use zero for dg-error line number.
117 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
119 P1651R0 bind_front should not unwrap reference_wrapper
120 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
121 * include/std/version (__cpp_lib_bind_front): Update value.
122 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
124 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
126 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
127 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
128 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
129 specializations for __float128.
130 * testsuite/26_numerics/numbers/float128.cc: New test.
132 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
134 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
137 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
139 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
140 in <algorithm> and <utility> Headers.
141 Implement C++20 p1023 - constexpr comparison operators for std::array.
142 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
143 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
144 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
145 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
146 none_of, partition_copy, partition_point, remove, remove_if,
147 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
148 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
149 count_if, equal, find, find_first_of, find_if, for_each, generate,
150 generate_n, lexicographical_compare, merge, mismatch, replace,
151 replace_if, search, search_n, set_difference, set_intersection,
152 set_symmetric_difference, set_union, transform, unique_copy):
154 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
155 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
156 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
157 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
158 Use const ref instead of ref arg;
159 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
160 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
161 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
162 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
163 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
164 __iter_comp_iter): Mark constexpr.
165 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
166 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
167 none_of, any_of, find_if_not, is_partitioned, partition_point,
168 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
169 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
170 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
171 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
172 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
173 __equal_range, equal_range, binary_search, __includes, includes,
174 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
175 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
176 is_sorted_until, __is_permutation, is_permutation, for_each, find,
177 find_if, find_first_of, adjacent_find, count, count_if, search,
178 search_n, transform, replace, replace_if, generate, generate_n,
179 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
180 set_intersection, __set_difference, set_difference,
181 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
182 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
183 wrappers around __builtin_memmove and __builtin_memcmp
185 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
186 copy, move, __copy_move_b, __copy_move_backward_a,
187 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
188 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
189 __lexicographical_compare_impl, __lexicographical_compare,
190 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
191 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
192 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
193 is_heap): Mark constexpr.
194 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
195 is_heap): Mark constexpr.
196 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
197 * include/std/array: Make comparison ops constexpr.
198 * include/std/utility: Make exchange constexpr.
199 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
200 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
201 * testsuite/23_containers/array/tuple_interface/
202 tuple_element_neg.cc: Adjust.
203 * testsuite/20_util/exchange/constexpr.cc: New.
204 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
205 * testsuite/25_algorithms/constexpr_macro.cc: New.
206 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
207 * testsuite/25_algorithms/all_of/constexpr.cc: New.
208 * testsuite/25_algorithms/any_of/constexpr.cc: New.
209 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
210 * testsuite/25_algorithms/copy/constexpr.cc: New.
211 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
212 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
213 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
214 * testsuite/25_algorithms/count/constexpr.cc: New.
215 * testsuite/25_algorithms/count_if/constexpr.cc: New.
216 * testsuite/25_algorithms/equal/constexpr.cc: New.
217 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
218 * testsuite/25_algorithms/fill/constexpr.cc: New.
219 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
220 * testsuite/25_algorithms/find/constexpr.cc: New.
221 * testsuite/25_algorithms/find_end/constexpr.cc: New.
222 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
223 * testsuite/25_algorithms/find_if/constexpr.cc: New.
224 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
225 * testsuite/25_algorithms/for_each/constexpr.cc: New.
226 * testsuite/25_algorithms/generate/constexpr.cc: New.
227 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
228 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
229 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
230 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
231 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
232 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
233 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
234 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
235 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
236 * testsuite/25_algorithms/merge/constexpr.cc: New.
237 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
238 * testsuite/25_algorithms/none_of/constexpr.cc: New.
239 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
240 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
241 * testsuite/25_algorithms/remove/constexpr.cc: New.
242 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
243 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
244 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
245 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
246 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
247 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
248 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
249 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
250 * testsuite/25_algorithms/search/constexpr.cc: New.
251 * testsuite/25_algorithms/search_n/constexpr.cc: New.
252 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
253 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
254 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
255 * testsuite/25_algorithms/set_union/constexpr.cc: New.
256 * testsuite/25_algorithms/transform/constexpr.cc: New.
257 * testsuite/25_algorithms/unique/constexpr.cc: New.
258 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
259 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
261 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
263 * include/std/memory (make_obj_using_allocator): Qualify call to
264 uses_allocator_construction_args.
266 P0631R4 Math Constants
267 * include/Makefile.am: Add new header.
268 * include/Makefile.in: Regenerate.
269 * include/precompiled/stdc++.h: Include new header.
270 * include/std/numbers: New header.
271 * include/std/version (__cpp_lib_math_constants): Define.
272 * testsuite/26_numerics/numbers/1.cc: New test.
273 * testsuite/26_numerics/numbers/2.cc: New test.
274 * testsuite/26_numerics/numbers/3.cc: New test.
275 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
277 * include/std/bit: Add Doxygen comments.
280 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
281 constraints on deleter that should only apply to the constructor.
282 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
283 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
284 constraints on deleter here.
285 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
287 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
290 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
292 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
294 * testsuite/18_support/51333.cc: New test.
296 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
298 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
299 to the Doxygen manual. Avoid a "here" link on the way.
300 Fix another broken link to Doxygen docblocks.
302 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
304 * include/std/bit (__cpp_lib_endian): Define.
305 * include/std/version (__cpp_lib_endian): Define.
306 * testsuite/26_numerics/endian/2.cc: New.
307 * testsuite/26_numerics/endian/3.cc: New.
308 * testsuite/26_numerics/endian/4.cc: New.
310 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
312 * testsuite/util/testsuite_iterators.h
313 (bidirectional_iterator_wrapper): Fix type comment.
314 (random_access_iterator_wrapper): Likewise.
316 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
318 * include/std/bit (endian): Move definition here as per P1612R1.
319 * include/std/type_traits (endian): Remove definition from here.
320 * testsuite/20_util/endian/1.cc: Rename to ...
321 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
323 2019-07-25 Martin Liska <mliska@suse.cz>
324 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
327 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
329 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
330 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
331 * testsuite/ext/new_allocator/check_new.cc: Likewise.
333 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
335 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
336 * testsuite/26_numerics/bit/bit.count/*: Here.
338 * include/std/bit (__rotl, __rotr): Change second parameter from
339 unsigned int to int and handle negative values.
340 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
341 parameter from unsigned int to int. Add nodiscard attribute.
342 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
343 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
345 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
346 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
349 * include/std/bit (__ceil2): Make unrepresentable results undefined,
350 as per P1355R2. Add debug assertion. Perform one left shift, not two,
351 so that out of range values cause undefined behaviour. Ensure that
352 shift will still be undefined if left operand is promoted.
353 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
354 unrepresentable values with checks that they are not core constant
356 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
358 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
360 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
361 sized deallocation size computation.
363 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
365 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
367 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
369 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
370 (~_Temporary_buffer()): Use latter.
371 (_Temporary_buffer(_FIterator, size_type)): Likewise.
373 2019-07-17 Andreas Schwab <schwab@suse.de>
375 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
377 2019-07-16 Jason Merrill <jason@redhat.com>
379 * include/std/memory (uses_allocator_construction_args): Add parens
382 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
384 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
386 * include/experimental/string_view (__detail::__idt): Remove.
387 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
388 Use __type_identity_t instead of __detail::__idt;
389 * include/std/string_view (__detail::__idt): Remove.
390 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
391 Use __type_identity_t instead of __detail::__idt;
392 * include/std/type_traits (__type_identity_t): New alias template.
394 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
395 and floating point atomics.
397 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
399 * doc/xml/manual/configure.xml: Improve documentation of
400 --enable-libstdcxx-time option.
402 * include/bits/atomic_base.h (__atomic_impl): New namespace for
403 wrappers around atomic built-ins.
404 (__atomic_float, __atomic_ref): New class templates for use as base
406 * include/std/atomic (atomic<float>, atomic<double>)
407 (atomic<long double>): New explicit specializations.
408 (atomic_ref): New class template.
409 (__cpp_lib_atomic_ref): Define.
410 * include/std/version (__cpp_lib_atomic_ref): Define.
411 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
412 * testsuite/29_atomics/atomic_float/1.cc: New test.
413 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
414 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
415 * testsuite/29_atomics/atomic_ref/float.cc: New test.
416 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
417 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
418 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
419 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
421 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
423 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
424 throw() with _GLIBCXX_NOTHROW.
425 (__atomic_add_dispatch): Return after performing atomic increment.
427 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
429 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
430 (__exchange_and_add): Replace static specifier with always_inline
432 (__exchange_and_add_single, __atomic_add_single): Likewise.
433 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
434 combine !__gthread_active_p() and !__GTHREADS branches.
436 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
439 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
440 * configure: Regenerate.
441 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
443 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
444 * testsuite/util/testsuite_abi.cc: Add new symbol version.
446 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
448 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
449 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
450 instead of __is_identifier to detect Clang support.
452 2019-07-02 Jim Wilson <jimw@sifive.com>
454 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
456 * configure: Regenerate.
458 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
461 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
462 for the what_arg parameters.
463 (filesystem_error::filesystem_error): Pass system_error::what() to
464 the _Impl constructor.
465 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
466 filesystem_error::what() contains system_error::what().
468 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
470 * include/std/charconv (chars_format): Define bitmask type.
471 * testsuite/20_util/to_chars/chars_format.cc: New test.
473 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
474 * include/std/bit (_If_is_unsigned_integer_type): Remove.
475 (_If_is_unsigned_integer): Use __is_unsigned_integer.
476 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
477 (countl_one(byte), countr_zero(byte), countr_one(byte))
478 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
479 (log2p1(byte)): Remove.
480 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
481 (__detail::__is_int_to_chars_type): Remove.
482 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
483 and __is_unsigned_integer.
484 * include/std/type_traits (__is_one_of): Move here from <charconv>.
485 (__is_signed_integer, __is_unsigned_integer): New helpers.
486 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
488 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
489 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
490 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
491 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
492 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
493 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
494 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
495 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
496 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
497 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
499 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
501 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
504 2019-06-25 Jakub Jelinek <jakub@redhat.com>
506 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
507 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
508 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
509 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
511 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
513 * include/std/numeric (midpoint(T, T)): Change implementation for
514 floating-point types to avoid incorrect rounding of denormals.
515 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
516 rounding with denormals.
517 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
518 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
520 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
522 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
524 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
526 * configure: Regenerate.
528 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
529 Qualify calls to __never_valueless.
531 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
534 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
535 vector<bool> for test.
536 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
538 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
540 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
542 (istream_iterator::_M_read()): Do not check stream state before
543 attempting extraction. Set stream pointer to null when extraction
545 (operator==(const istream_iterator&, const istream_iterator&)): Change
546 to be a hidden friend of istream_iterator.
547 (operator!=(const istream_iterator&, const istream_iterator&)):
549 (ostream_iterator::ostream_iterator()): Add default constructor.
550 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
552 * testsuite/24_iterators/istream_iterator/1.cc: New test.
553 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
554 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
555 constructor taking a string.
556 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
559 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
560 Jonathan Wakely <jwakely@redhat.com>
563 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
564 values of type bool for vector<bool> elements.
565 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
566 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
568 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
570 PR libstdc++/90920 partially revert r263433
571 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
572 (rotate): Remove checks.
573 * testsuite/25_algorithms/rotate/90920.cc: New test.
575 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
576 category used in invocable check.
577 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
578 * testsuite/26_numerics/reduce/2.cc: New test.
580 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
582 * include/bits/algorithmfwd.h: Change title of doc group.
583 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
585 * include/bits/stl_numeric.h: Define doc group and add algos to it.
586 * include/std/numeric (__is_random_access_iter): New internal trait.
587 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
588 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
589 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
590 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
591 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
592 * testsuite/26_numerics/reduce/1.cc: New test.
593 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
594 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
595 * testsuite/26_numerics/transform_reduce/1.cc: New test.
596 * testsuite/util/testsuite_iterators.h (test_container::size()): New
599 * include/c_global/cstddef (std::byte): Perform arithmetic operations
600 in unsigned int to avoid promotion (LWG 2950).
602 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
604 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
607 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
609 PR libstdc++/90281 Fix string conversions for filesystem::path
610 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
611 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
612 __str_codecvt_in_all to fail for partial conversions and throw on
614 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
615 (path::_Cvt<char8_t>): Add explicit specialization.
616 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
618 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
619 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
620 instead of codecvt_utf8. Use __str_codecvt_in_all and
621 __str_codecvt_out_all.
622 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
623 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
624 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
625 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
626 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
627 after converting to UTF-8.
628 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
629 __str_codecvt_in_all.
630 (path::string): Fix initialization of string types with different
632 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
633 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
634 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
636 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
637 return false for partial conversions.
638 * include/experimental/bits/fs_path.h (u8path):
639 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
640 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
641 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
642 instead of codecvt_utf8. Use __str_codecvt_in_all and
643 __str_codecvt_out_all.
644 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
645 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
646 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
647 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
648 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
649 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
650 __str_codecvt_in_all.
651 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
652 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
653 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
654 __str_codecvt_in_all.
655 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
656 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
657 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
658 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
659 strings and with Unicode characters outside the basic multilingual
661 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
662 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
663 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
664 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
665 * testsuite/experimental/filesystem/path/native/string.cc: Test with
666 empty strings and with Unicode characters outside the basic
669 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
670 Jonathan Wakely <jwakely@redhat.com>
672 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
673 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
674 deallocate node if insertion fails.
675 (_Hashtable::_M_insert_multi_node): Likewise.
676 (_Hashtable::_M_reinsert_node): Pass additional key argument.
677 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
678 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
679 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
680 (_Hashtable::extract(const _Key&)): Likewise.
681 (_Hashtable::_M_merge_unique): Pass additional key argument.
682 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
684 (_Hashtable::_M_insert): Likewise.
685 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
686 (_Hashtable_alloc): Add comments to functions with misleading names.
688 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
690 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
692 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
693 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
694 header for std::allocator.
695 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
696 using-declaration for std::size_t.
697 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
699 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
701 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
702 * testsuite/experimental/map/erasure.cc: Include <string> for
704 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
706 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
708 * include/experimental/type_traits (experimental::nonesuch): Use
709 pragma to disable -Wctor-dtor-privacy warnings.
710 * include/std/type_traits (__is_convertible_helper<From, To, false>)
711 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
713 * include/std/version (__cpp_lib_bind_front): Add missing macro.
715 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
717 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
718 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
719 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
720 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
722 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
723 (variant::emplace): Change static_assert messages from "should be"
725 (hash<monostate>::operator()): Remove name of unused parameter.
727 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
730 * include/Makefile.am: Add new <bits/charconv.h> header.
731 * include/Makefile.in: Regenerate.
732 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
733 (to_string(long), to_string(unsigned long), to_string(long long))
734 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
735 * include/bits/charconv.h: New header.
736 (__detail::__to_chars_len): Move here from <charconv>.
737 (__detail::__to_chars_10_impl): New function extracted from
738 __detail::__to_chars_10.
739 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
740 (__to_chars_unsigned_type): New class template that reuses
741 __make_unsigned_selector_base::__select to pick a type.
742 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
743 (__detail::__to_chars_len): Move to new header.
744 (__detail::__to_chars_10): Add inline specifier. Move code doing the
745 output to __detail::__to_chars_10_impl and call that.
746 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
747 * testsuite/21_strings/basic_string/numeric_conversions/char/
748 to_string.cc: Fix reference in comment. Remove unused variable.
749 * testsuite/21_strings/basic_string/numeric_conversions/char/
750 to_string_int.cc: New test.
752 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
754 Fix ConstexprIterator requirements tests - No constexpr algorithms!
755 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
756 Replace copy with hand-rolled loop.
757 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
760 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
762 Test for C++20 p0858 - ConstexprIterator requirements.
763 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
765 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
768 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
770 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
772 * include/bits/c++config: Rename all macros of the form __PSTL* to
774 * include/std/algorithm: Likewise.
775 * include/std/execution: Likewise.
776 * include/std/numeric: Likewise.
777 * include/std/memory: Likewise.
778 * include/pstl/glue_memory_impl.h: Likewise.
779 * include/pstl/numeric_impl.h: Likewise.
780 * include/pstl/glue_memory_defs.h: Likewise.
781 * include/pstl/execution_defs.h: Likewise.
782 * include/pstl/utils.h: Likewise.
783 * include/pstl/algorithm_fwd.h: Likewise.
784 * include/pstl/unseq_backend_simd.h: Likewise.
785 * include/pstl/glue_execution_defs.h: Likewise.
786 * include/pstl/algorithm_impl.h: Likewise.
787 * include/pstl/parallel_impl.h: Likewise.
788 * include/pstl/memory_impl.h: Likewise.
789 * include/pstl/glue_numeric_defs.h: Likewise.
790 * include/pstl/parallel_backend_utils.h: Likewise.
791 * include/pstl/glue_algorithm_defs.h: Likewise.
792 * include/pstl/parallel_backend.h: Likewise.
793 * include/pstl/glue_numeric_impl.h: Likewise.
794 * include/pstl/parallel_backend_tbb.h: Likewise.
795 * include/pstl/numeric_fwd.h: Likewise.
796 * include/pstl/glue_algorithm_impl.h: Likewise.
797 * include/pstl/execution_impl.h: Likewise.
798 * include/pstl/pstl_config.h: Likewise.
799 * testsuite/util/pstl/pstl_test_config.h: Likewise.
800 * testsuite/util/pstl/test_utils.h: Likewise.
801 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
803 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
805 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
807 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
808 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
809 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
810 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
811 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
813 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
814 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
815 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
816 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
817 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
819 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
820 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
821 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
822 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
823 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
825 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
826 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
827 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
829 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
831 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
832 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
833 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
835 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
837 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
839 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
841 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
843 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
845 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
847 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
849 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
851 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
853 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
855 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
857 Rename header guards to be consistent with upstream project's
859 * include/pstl/glue_memory_impl.h: Rename all macros of the form
860 _PSTL_(.*)_H to _PSTL_\U\1_H.
861 * include/pstl/numeric_impl.h: Likewise.
862 * include/pstl/glue_memory_defs.h: Likewise.
863 * include/pstl/execution_defs.h: Likewise.
864 * include/pstl/utils.h: Likewise.
865 * include/pstl/algorithm_fwd.h: Likewise.
866 * include/pstl/unseq_backend_simd.h: Likewise.
867 * include/pstl/glue_execution_defs.h: Likewise.
868 * include/pstl/algorithm_impl.h: Likewise.
869 * include/pstl/parallel_impl.h: Likewise.
870 * include/pstl/memory_impl.h: Likewise.
871 * include/pstl/glue_numeric_defs.h: Likewise.
872 * include/pstl/parallel_backend_utils.h: Likewise.
873 * include/pstl/glue_algorithm_defs.h: Likewise.
874 * include/pstl/parallel_backend.h: Likewise.
875 * include/pstl/glue_numeric_impl.h: Likewise.
876 * include/pstl/parallel_backend_tbb.h: Likewise.
877 * include/pstl/numeric_fwd.h: Likewise.
878 * include/pstl/glue_algorithm_impl.h: Likewise.
879 * include/pstl/execution_impl.h: Likewise.
880 * include/pstl/pstl_config.h: Likewise.
881 * testsuite/util/pstl/pstl_test_config.h: Likewise.
883 Synchronize libstdc++ parallel algorithms with upstream
885 * include/pstl/algorithm_fwd.h: Synchronize with
886 upstream PSTL project.
887 * include/pstl/algorithm_impl.h: Likewise.
888 * include/pstl/execution_defs.h: Likewise.
889 * include/pstl/execution_impl.h: Likewise.
890 * include/pstl/glue_algorithm_impl.h: Likewise.
891 * include/pstl/glue_execution_defs.h: Likewise.
892 * include/pstl/numeric_fwd.h: Likewise.
893 * include/pstl/numeric_impl.h: Likewise.
894 * include/pstl/parallel_backend.h: Likewise.
895 * include/pstl/pstl_config.h: Likewise.
896 * include/pstl/unseq_backend_simd.h: Likewise.
897 * include/pstl/parallel_backend_serial.h: New file.
898 * include/Makefile.am (pstl_headers): Add
899 parallel_backend_serial.h.
900 * include/Makefile.in: Regenerate.
902 Clean up non-conforming names
903 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
904 Uglfiy copy_range1 and copy_range2
905 (__pattern_walk2_n): Rename local n to __n
906 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
907 Rename parameter _T to _Tp.
909 Integrate non-TBB serial backend support
910 * include/bits/c++config: Adjust TBB detection logic to select serial
911 PSTL backend if no TBB present.
912 * testsuite/utils/pstl/test_utils.h: Remove check for
913 _PSTL_USE_PAR_POLICIES
915 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
917 * testsuite/24_iterators/container_access.cc: Move dg-options before
918 dg-do directive so the target check uses the -std option.
921 * configure: Regenerate.
922 * src/Makefile.am (stamp-debug): Also test for missing makefile.
923 * src/Makefile.in: Regenerate.
925 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
927 * include/std/array: Do not include <stdexcept>.
928 * include/std/optional: Include <exception> and
929 <bits/exception_defines.h> instead of <stdexcept>.
930 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
932 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
934 * testsuite/23_containers/map/erasure.cc: Include <string>.
935 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
937 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
938 dg-prune-output for different C++98 diagnostic.
939 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
941 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
943 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
945 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
947 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
949 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
951 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
953 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
955 * testsuite/23_containers/vector/requirements/dr438/
956 constructor_1_neg.cc: Likewise.
957 * testsuite/23_containers/vector/requirements/dr438/
958 constructor_2_neg.cc: Likewise.
959 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
961 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
963 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
964 Do not test allocator rebinding extension for C++2a.
965 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
966 dg-do directive for C++17 and C++2a.
968 * testsuite/23_containers/deque/requirements/explicit_instantiation/
969 1_c++0x.cc: Remove redundant test.
970 * testsuite/23_containers/deque/requirements/explicit_instantiation/
971 2.cc: Use target selector instead of preprocessor condition.
972 * testsuite/23_containers/deque/requirements/explicit_instantiation/
973 3.cc: Do not run test for C++2a.
974 * testsuite/23_containers/forward_list/requirements/
975 explicit_instantiation/3.cc: Likewise.
976 * testsuite/23_containers/forward_list/requirements/
977 explicit_instantiation/5.cc: Do not test allocator rebinding extension
979 * testsuite/23_containers/list/requirements/explicit_instantiation/
980 1_c++0x.cc: Remove redundant test.
981 * testsuite/23_containers/list/requirements/explicit_instantiation/
982 2.cc: Use target selector instead of preprocessor condition.
983 * testsuite/23_containers/list/requirements/explicit_instantiation/
984 3.cc: Do not run test for C++2a.
985 * testsuite/23_containers/list/requirements/explicit_instantiation/
986 5.cc: Do not test allocator rebinding extension for C++2a.
987 * testsuite/23_containers/map/requirements/explicit_instantiation/
988 1_c++0x.cc: Remove redundant test.
989 * testsuite/23_containers/map/requirements/explicit_instantiation/
990 2.cc: Adjust comment.
991 * testsuite/23_containers/map/requirements/explicit_instantiation/
992 3.cc: Do not run test for C++2a.
993 * testsuite/23_containers/map/requirements/explicit_instantiation/
994 5.cc: Do not test allocator rebinding extension for C++2a.
995 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
996 1_c++0x.cc: Remove redundant test.
997 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
998 3.cc: Do not run test for C++2a.
999 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1000 5.cc: Do not test allocator rebinding extension for C++2a.
1001 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1002 3.cc: Do not run test for C++2a.
1003 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1004 5.cc: Do not test allocator rebinding extension for C++2a.
1005 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1006 Do not run test for C++2a.
1007 * testsuite/23_containers/set/requirements/explicit_instantiation/
1008 1_c++0x.cc: Remove redundant test.
1009 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1010 Do not test allocator rebinding extension for C++2a.
1011 * testsuite/23_containers/unordered_map/requirements/
1012 explicit_instantiation/3.cc: Likewise.
1013 * testsuite/23_containers/unordered_map/requirements/
1014 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1016 * testsuite/23_containers/unordered_multimap/requirements/
1017 explicit_instantiation/3.cc: Do not run test for C++2a.
1018 * testsuite/23_containers/unordered_multimap/requirements/
1019 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1021 * testsuite/23_containers/unordered_multiset/requirements/
1022 explicit_instantiation/3.cc: Do not run test for C++2a.
1023 * testsuite/23_containers/unordered_multiset/requirements/
1024 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1026 * testsuite/23_containers/unordered_set/requirements/
1027 explicit_instantiation/3.cc: Do not run test for C++2a.
1028 * testsuite/23_containers/unordered_set/requirements/
1029 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1031 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1032 2.cc: Remove redundant test.
1033 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1034 3.cc: Do not run test for C++2a.
1035 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1038 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1039 (is_abstract, is_aggregate): Remove static_assert.
1040 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1042 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1043 missing -std=gnu++17 option.
1044 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1045 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1046 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1049 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1050 * testsuite/18_support/set_unexpected.cc: Likewise.
1051 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1053 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1054 function to be valid in C++11.
1055 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1056 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1057 include Library Fundamentals or Networking headers in C++11 mode.
1058 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1060 * include/std/tuple (_TC): Replace with _TupleConstraints.
1061 (_TupleConstraints): New helper for SFINAE constraints, with more
1062 expressive member functions to reduce duplication when used.
1063 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1064 (tuple::_TCC): Replace dummy type parameter with bool non-type
1065 parameter that can be used to check the pack size.
1066 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1067 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1068 checking constraints in constructors.
1069 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1071 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1072 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1073 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1074 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1075 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1076 constraints in constructors.
1077 (tuple::__is_alloc_arg()): New SFINAE helpers.
1078 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1080 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1081 * testsuite/20_util/tuple/cons/90700.cc: New test.
1082 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1083 to meet new constraint on allocator-extended default constructor.
1085 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1087 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1088 * include/bits/stl_multimap.h (multimap): Likewise.
1090 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1092 Rename variables and cleanup comments.
1093 * include/bits/hashtable_policy.h
1094 * include/bits/hashtable.h
1096 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1098 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1099 Fix bgcolor for P0340R3.
1100 * doc/html/*: Regenerate.
1103 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1104 <experimental/memory_resource>.
1105 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1106 P0339R6, P0340R3, P1164R1 and P1357R1.
1107 * doc/html/*: Regenerate.
1109 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1110 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1111 allocator::value_type assertion for C++2a.
1112 * include/bits/hashtable.h: Likewise.
1113 * include/bits/stl_deque.h: Likewise.
1114 * include/bits/stl_list.h: Likewise.
1115 * include/bits/stl_map.h: Likewise.
1116 * include/bits/stl_multimap.h: Likewise.
1117 * include/bits/stl_multiset.h: Likewise.
1118 * include/bits/stl_set.h: Likewise.
1119 * include/bits/stl_vector.h: Likewise.
1120 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1121 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1122 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1123 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1124 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1125 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1126 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1127 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1128 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1129 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1130 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1131 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1133 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1135 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1137 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1139 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1141 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1143 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1145 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1147 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1150 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1151 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1152 * libsupc++/eh_term_handler.h: New header defining
1153 _GLIBCXX_DEFAULT_TERM_HANDLER.
1154 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1155 (set_terminate): Restore default handler when argument is null.
1156 (set_unexpected): Likewise.
1157 * testsuite/18_support/set_terminate.cc: New test.
1158 * testsuite/18_support/set_unexpected.cc: New test.
1160 * include/backward/hashtable.h (size_t, ptrdiff_t)
1161 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1162 (distance, vector, pair, __iterator_category): Remove
1163 using-declarations that add these names to namespace __gnu_cxx.
1164 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1165 * include/ext/debug_allocator.h (size_t): Likewise.
1166 * include/ext/functional (size_t, unary_function, binary_function)
1167 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1169 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1170 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1171 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1172 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1173 * include/ext/numeric (iota): Fix outdated comment.
1174 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1175 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1176 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1177 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1178 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1180 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1181 (allocator, __true_type, __false_type): Likewise.
1183 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1186 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1187 New helpers for checking preconditions in traits.
1188 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1189 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1190 (is_destructible, is_nothrow_destructible, is_constructible)
1191 (is_default_constructible, is_copy_constructible)
1192 (is_move_constructible, is_nothrow_default_constructible)
1193 (is_nothrow_constructible, is_nothrow_copy_constructible)
1194 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1195 (is_nothrow_assignable, is_nothrow_copy_assignable)
1196 (is_nothrow_move_assignable, is_trivially_constructible)
1197 (is_trivially_copy_constructible, is_trivially_move_constructible)
1198 is_trivially_assignable, is_trivially_copy_assignable)
1199 (is_trivially_move_assignable, is_trivially_destructible)
1200 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1201 (is_invocable_r, is_nothrow_invocable)
1202 (has_unique_object_representations, is_aggregate): Add static_asserts
1203 to make sure that type traits are not misused with incomplete types.
1204 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1205 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1206 base characteristics without assertions that can be reused in other
1208 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1209 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1211 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1212 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1213 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1214 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1215 * testsuite/20_util/is_function/value.cc: Likewise.
1216 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1217 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1219 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1220 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1221 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1222 * testsuite/20_util/is_union/value.cc: Likewise.
1223 * testsuite/20_util/is_void/value.cc: Likewise.
1224 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1226 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1228 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1229 Add new private member function.
1230 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1231 (random_device::_M_init_pretr1(const string&)): Call new private
1232 member with string data.
1233 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1235 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1236 test using COW strings.
1237 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1238 a value from the device.
1239 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1240 Fix typo in token string.
1242 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1244 LWG2788 basic_string spurious use of a default constructible allocator
1245 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1246 (basic_string::_M_replace_dispatch): Construct temporary string with
1247 the current allocator.
1248 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1249 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1251 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1253 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1255 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1256 section about new/delete overloads. Improve section on verbose
1258 * doc/html/*: Regenerate.
1260 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1261 P0811R3. Change status of P1353R0.
1262 * doc/html/*: Regenerate.
1264 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1265 documentation of implementation-defined types for [thread.req.native].
1266 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1267 implementation-defined strings for [variant.bad.access]. Fix typo in
1268 documentation of implementation-defined support for [fs.conform.9945].
1269 * doc/html/*: Regenerate.
1271 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1274 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1275 that fails on mingw-w64.
1278 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1279 (status(const path&, error_code&)): Use parent_path() to remove
1281 (symlink_status(const path&, error_code&)): Duplicate workaround for
1282 bug in _wstat for paths with trailing slash.
1283 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1284 with trailing slash.
1285 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1286 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1288 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1289 once instead of building it iteratively.
1291 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1293 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1294 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1295 the assembler supports rdseed.
1296 * config.h.in: Regenerate.
1297 * configure: Regenerate.
1298 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1299 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1300 * doc/html/*: Regenerate.
1301 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1302 * include/bits/random.h (random_device::random_device()): Always call
1303 _M_init rather than _M_init_pretr1.
1304 (random_device::random_device(const string&)): Likewise.
1305 (random_device::operator()()): Always call _M_getval().
1306 (random_device::_M_file): Replace first member of union with an
1307 anonymous struct, with _M_file as its first member.
1308 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1309 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1310 (USE_MT19937): Define if none of the above are defined.
1311 (USE_POSIX_FILE_IO): Define.
1312 (_M_strtoul): Remove.
1313 [USE_RDSEED] (__x86_rdseed): Define new function.
1314 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1315 (random_device::_M_init(const string&)): Initialize new union members.
1316 Add support for "rdseed" and "rand_s" tokens. Decide what the
1317 "default" token does according to which USE_* macros are defined.
1318 [USE_POSIX_FILE_IO]: Store a file descriptor.
1319 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1320 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1321 code from _M_strtoul.
1322 [!USE_MT19937]: Call _M_init, transforming the old default token or
1323 numeric tokens to "default".
1324 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1325 (random_device::_M_getval()): Use new union members to obtain a
1326 random number from the stored function pointer or file descriptor.
1327 [USE_MT19937]: Obtain a value from the mt19937 engine.
1328 (random_device::_M_getval_pretr1()): Call _M_getval().
1329 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1331 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1332 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1334 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1337 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1338 _M_split_cmpts() for a path with multiple components.
1339 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1340 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1341 components and reserve space in vector. Return early when there is
1343 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1344 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1346 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1347 form of std::equals for C++11 compatibility.
1349 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1351 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1352 C++ standard at ansi.org.
1354 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1356 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1357 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1360 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1361 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1363 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1365 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1367 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1368 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1369 "compile" test to "run".
1371 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1372 * doc/html/*: Regenerate.
1373 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1374 rvalue aliasing constructor.
1375 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1376 (reinterpret_pointer_cast): Add overloads taking rvalues.
1377 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1378 Add rvalue aliasing constructor.
1379 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1380 "run" and check return values as well as types.
1381 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1382 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1383 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1384 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1387 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1388 * doc/xml/manual/intro.xml: Likewise.
1389 * include/std/future (__create_task_state): Add default arguments
1390 to make providing an allocator optional.
1391 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1392 instead of delegating to another constructor.
1393 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1394 define allocator-extended constructors for C++17 and later.
1395 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1397 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1398 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1399 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1401 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1403 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1404 Don't run the libstdc++/83237 part on simulator targets.
1406 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1408 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1410 * doc/html/*: Regenerate.
1412 * include/experimental/any (__any_caster): Use RTTI if comparing
1413 addresses fails, to support non-unique addresses in shared libraries.
1414 * include/std/any (__any_caster): Likewise.
1417 * include/experimental/any (__any_caster): Constrain to only be
1418 callable for object types. Use remove_cv_t instead of decay_t.
1419 If the type decays or isn't copy constructible, compare the manager
1420 function to a dummy specialization.
1421 (__any_caster): Add overload constrained for non-object types.
1422 (any::_Manager_internal<_Op>): Add dummy specialization.
1423 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1426 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1429 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1430 reversed arguments to uninitialized_copy_n.
1431 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1432 is unchanged by copy assignment.
1433 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1434 compare path components.
1437 * include/experimental/memory_resource: Add system header pragma and
1438 do not define anything unless compiled as C++14 or later.
1439 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1440 (__resource_adaptor_imp::do_allocate): If the requested alignment
1441 is a fundamental alignment then either allocate directly from _M_alloc
1442 or call the new _M_allocate function.
1443 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1444 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1445 of the allocator rebound to a POD type with the specified alignment.
1446 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1447 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1448 Adjust expected allocation sizes.
1449 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1450 xfail for Solaris x86.
1452 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1454 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1455 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1456 Use std::__remove_cvref_t when building with GCC.
1458 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1461 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1462 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1463 Use check_v3_target_prop_cached to cache the result of the test.
1465 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1467 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1470 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1471 Changed v3_target_compile check from preprocess to executable.
1472 Added "-ltbb" to v3_target_compile flags.
1474 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1476 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1477 Add check for Thread Building Blocks 2018 or later.
1479 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1481 * testsuite/experimental/names.cc: Only include Networking TS headers
1482 on targets with the necessary Gthreads support.
1484 2019-05-20 Marek Polacek <polacek@redhat.com>
1486 CWG 2094 - volatile scalars are trivially copyable.
1488 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1489 result for volatile int.
1491 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1493 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1494 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1497 PR c++/90532 Ensure __is_constructible(T[]) is false
1498 * include/std/type_traits (__do_is_default_constructible_impl)
1499 (__is_default_constructible_atom, __is_default_constructible_safe):
1501 (is_default_constructible): Use is_constructible.
1502 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1503 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1504 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1505 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1508 2019-05-20 Pádraig Brady <pbrady@fb.com>
1510 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1511 to the deallocator with -fsized-deallocation.
1513 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1515 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1516 test by passing correct alignment to deallocate function.
1518 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1521 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1522 Raise exception if unique_ptr tuple member has unknown structure.
1523 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1524 Adjust worker to support new __uniq_ptr_data base class. Do not
1525 assume field called _M_head_impl is the first tuple element.
1527 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1529 * include/bits/stl_deque.h
1530 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1531 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1532 (_Deque_base::_Deque_impl_data): New.
1533 (_Deque_base::_Deque_impl): Inherit latter.
1534 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1535 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1536 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1537 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1538 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1539 (deque<>::deque()): Default.
1540 (deque<>::deque(deque&&)): Default.
1541 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1542 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1543 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1544 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1545 _M_range_initialize.
1546 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1547 (deque<>::resize(size_type, const value_type&)): Share a single
1549 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1550 _M_range_insert_aux.
1551 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1552 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1553 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1554 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1556 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1559 * include/std/variant (holds_alternative, get, get_if): Improve
1560 static assertion messages.
1561 (bad_variant_access::bad_variant_access()): Change default message.
1562 (__throw_bad_variant_access(bool)): New overload.
1563 (get): Use new overload.
1564 (visit, visit<R>): Improve exception message.
1566 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1567 targets. Add more cases from P0608R3.
1568 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1570 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1571 * include/experimental/type_traits (is_detected_exact)
1572 (is_detected_exact_v): Likewise.
1573 * include/pstl/execution_defs.h (is_execution_policy)
1574 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1575 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1576 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1577 * testsuite/experimental/names.cc: New test.
1580 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1581 assertions from the destructor.
1582 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1583 Move static_assert for hash function to here.
1584 (_Hash_table_base::_M_equals): Move static_assert for equality
1586 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1588 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1589 the value directly instead of calling _S_value.
1590 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1591 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1592 _S_key(_Const_Link_type).
1593 * testsuite/23_containers/set/85965.cc: Check construction,
1594 destruction, assignment and size() do not trigger the assertions.
1595 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1596 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1598 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1599 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1600 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1601 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1602 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1603 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1604 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1606 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1607 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1610 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1612 * doc/html/*: Regenerate.
1613 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1614 of decay_t (P0777R1).
1616 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1618 Move from state of allocators (LWG2593)
1619 * include/bits/stl_deque.h
1620 (_Deque_base(_Deque_base&&, false_type)): Remove.
1621 (_Deque_base(_Deque_base&&, true_type)): Remove.
1622 (_Deque_base(_Deque_base&&)): Adapt.
1623 (_Deque_base::_M_move_impl()): Remove.
1624 * testsuite/util/testsuite_allocator.h
1625 (propagating_allocator(propagating_allocator&&)): Preserve move from
1627 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1629 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1631 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1632 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1633 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1635 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1637 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1638 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1640 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1642 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1644 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1646 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1648 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1650 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1652 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1655 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1657 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1658 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1660 * include/std/variant (__overload_set): Remove.
1662 (_Build_FUN): New class template to define a single FUN overload,
1663 with specializations to prevent unwanted conversions, as per P0608R3.
1664 (_Build_FUNs): New class template to build an overload set of FUN.
1665 (_FUN_type): New alias template to perform overload resolution.
1666 (__accepted_type): Use integer_constant base for failure case. Use
1667 _FUN_type for successful case.
1668 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1669 (variant::variant(_Tp&&)): Likewise.
1670 (variant::operator=(_Tp&&)): Likewise.
1672 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1673 Replace raw visitation with a runtime check for the valueless state
1674 and a non-raw visitor.
1675 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1676 (variant::index()): Remove branch.
1677 (variant::swap(variant&)): Use valueless_by_exception() instead of
1678 comparing the index to variant_npos, and add likelihood attribute.
1680 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1681 (_Hashtable_base::_Equal_hash_code): Define new class template.
1682 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1685 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1686 Replace with _M_get non-static member function.
1687 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1689 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1690 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1692 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1693 _S_get accessors for members in EBO helpers.
1694 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1695 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1697 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1699 (_Hashtable_base::_M_eq()): Remove non-const overload.
1701 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1703 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1705 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1707 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1710 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1712 * config/os/solaris/solaris2.10: Move to ...
1713 * config/os/solaris: ... this.
1714 * configure.host (os_include_dir): Adapt.
1715 (abi_baseline_pair): Remove Solaris 10 handling.
1716 * config/abi/post/i386-solaris2.10: Remove.
1717 * config/abi/post/sparc-solaris2.10: Remove.
1718 * config/abi/post/i386-solaris2.11: Rename to ...
1719 * config/abi/post/i386-solaris: ... this.
1720 * config/abi/post/sparc-solaris2.11: Rename to ...
1721 * config/abi/post/sparc-solaris: ... this.
1723 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1726 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1729 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1731 * include/std/variant (__visit_with_index): Remove typedef.
1732 (__deduce_visit_result): New tag type.
1733 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1734 visitation of possibly-valueless variants, forwarding to __do_visit
1735 with the relevant tag type.
1736 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1737 and make lambda return void.
1738 (__variant_construct): Likewise.
1739 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1740 __raw_idx_visit and make lambda return void.
1741 (_Multi_array::__untag_result): Add metafunction to check the function
1742 pointer type for a tag type that dictates the kind of visitation.
1743 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1744 Use decltype(auto) instead of tagged function pointer type.
1745 (__gen_vtable_impl): Remove bool non-type parameter and unused
1746 _Variant_tuple parameter.
1747 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1748 (__gen_vtable_impl::__do_visit_invoke): Remove.
1749 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1750 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1751 for the visit<R> case, rather than dispatching to separate functions.
1752 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1754 (variant::swap): Likewise.
1755 (__do_visit): Replace two non-type template parameters with a single
1756 type parameter, so that the caller must specify the visitor's return
1757 type (or one of the tag types).
1758 (visit): Deduce a return type from the visitor and use the
1759 __deduce_visit_result tag to enforce that all overloads return the
1761 (visit<R>): Call __do_visit<R> with explicit result type.
1762 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1765 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1767 nonesuch is insufficiently useless (lwg2996)
1768 * include/std/type_traits (struct __nonesuch): Added private base
1769 class to make __nonesuch not an aggregate and removed deleted default
1771 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1772 (operator=(const pair&)): Use __nonesuch instead of
1773 __nonesuch_no_braces.
1774 (operator=(pair&&)): Likewise
1775 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1776 of __nonesuch_no_braces.
1777 (operator=(tuple&&)): Likewise
1778 * include/experimental/type_traits (struct nonesuch): Added private
1779 base class to make nonesuch not an aggregate and removed deleted
1780 default constructor.
1781 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1782 * testsuite/experimental/type_traits/nonesuch.cc: New.
1784 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1786 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1787 (_Function_handler): Remove partial specializations for void return
1788 types and pointers to member.
1789 (_Function_handler::_M_manager): Adapt to removal of
1790 _Simple_type_wrapper.
1791 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1792 * include/std/functional (_Bind_result::__enable_if_void)
1793 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1794 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1796 * include/std/future (__future_base::_Task_state::_M_run)
1797 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1798 change return type of lambda expressions.
1800 * include/bits/invoke.h (__invoke_r): Define new function implementing
1801 the INVOKE<R> pseudo-function.
1802 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1803 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1805 * include/std/type_traits (__is_nt_convertible_helper): Define it
1806 unconditionally, not only for C++20.
1807 (__is_nothrow_convertible): Define internal trait for use in C++11.
1808 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1809 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1810 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1811 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1812 that has nothrow explicit conversion but potentially-throwing implicit
1814 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1815 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1816 function to only consider implicit conversions.
1817 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1819 * include/std/iterator: Include <iosfwd> instead of <istream> and
1822 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1823 Remove unused, non-standard function.
1825 * include/bits/regex.h (match_results::max_size()): Adjust return
1826 value to account for prefix/suffix/unmatched subs.
1827 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1828 reset the contained sub matches.
1829 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1830 function to set result state following a failed match.
1831 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1832 sub_match states after _M_resize. Use _M_establish_failed_match.
1835 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1836 Replace single _Callable parameter with variadic _Args pack, to
1837 forward them directly to the tuple of decayed copies.
1838 * testsuite/30_threads/thread/cons/69724.cc: New test.
1840 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1842 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1843 * include/bits/basic_string.h: (operator=(const basic_string&):
1844 Move allocator decision to assign.
1845 (assign(const basic_string&)): Move allocator decision here.
1846 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1848 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1851 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1853 * testsuite/util/testsuite_allocator.h (memory_resource)
1854 (default_resource_mgr): Fix indentation.
1856 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1857 Use operator-> to access raw pointer member.
1858 * testsuite/23_containers/vector/59829.cc: Likewise.
1859 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1860 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1861 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1863 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1864 its constructors and equality operators. Change converting
1865 constructors to use operator-> to access private member of the other
1867 (PointerBase_void::operator->()): Add, for access to private member.
1868 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1869 (operator==(PointerBase, PointerBase)): Remove.
1870 (operator!=(PointerBase, PointerBase)): Remove.
1872 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1873 not assume field called _M_head_impl is the first tuple element.
1874 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1875 implementation more accurate.
1876 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1877 empty pointer type and non-empty deleter.
1879 LWG 2899 - Make is_move_constructible correct for unique_ptr
1880 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1881 move assignment operator.
1882 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1883 (__uniq_ptr_data): New class template with conditionally deleted
1885 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1886 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1887 constructor and move assignment operator as defaulted.
1888 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1889 __uniq_ptr_impl::release().
1890 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1891 to __uniq_ptr_impl::reset(pointer).
1892 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1893 Check for new __uniq_ptr_data type.
1894 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1896 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1898 PR libstdc++/90454.cc path construction from void*
1899 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1900 pointers to void are rejected as well as void.
1901 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1902 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1904 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1906 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1907 <remark> elements. Fix formatting of bibliography references.
1909 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1911 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1913 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1915 Remove Profile Mode, deprecated since 7.1.0
1916 * doc/Makefile.am: Remove XML file for profile mode docs.
1917 * doc/Makefile.in: Regenerate.
1918 * doc/xml/authors.xml: Remove authors of profile mode docs.
1919 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1921 * doc/xml/manual/debug.xml: Likewise.
1922 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1923 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1924 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1925 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1927 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1929 * doc/html/*: Regenerate.
1930 * include/Makefile.am: Remove profile mode headers.
1931 * include/Makefile.in: Regenerate.
1932 * include/bits/c++config (std::__profile): Remove namespace.
1933 [_GLIBCXX_PROFILE]: Remove checks for macro.
1934 * include/profile/array: Remove.
1935 * include/profile/base.h: Remove.
1936 * include/profile/bitset: Remove.
1937 * include/profile/deque: Remove.
1938 * include/profile/forward_list: Remove.
1939 * include/profile/impl/profiler.h: Remove.
1940 * include/profile/impl/profiler_algos.h: Remove.
1941 * include/profile/impl/profiler_container_size.h: Remove.
1942 * include/profile/impl/profiler_hash_func.h: Remove.
1943 * include/profile/impl/profiler_hashtable_size.h: Remove.
1944 * include/profile/impl/profiler_list_to_slist.h: Remove.
1945 * include/profile/impl/profiler_list_to_vector.h: Remove.
1946 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1947 * include/profile/impl/profiler_node.h: Remove.
1948 * include/profile/impl/profiler_state.h: Remove.
1949 * include/profile/impl/profiler_trace.h: Remove.
1950 * include/profile/impl/profiler_vector_size.h: Remove.
1951 * include/profile/impl/profiler_vector_to_list.h: Remove.
1952 * include/profile/iterator_tracker.h: Remove.
1953 * include/profile/list: Remove.
1954 * include/profile/map: Remove.
1955 * include/profile/map.h: Remove.
1956 * include/profile/multimap.h: Remove.
1957 * include/profile/multiset.h: Remove.
1958 * include/profile/ordered_base.h: Remove.
1959 * include/profile/set: Remove.
1960 * include/profile/set.h: Remove.
1961 * include/profile/unordered_base.h: Remove.
1962 * include/profile/unordered_map: Remove.
1963 * include/profile/unordered_set: Remove.
1964 * include/profile/vector: Remove.
1965 * scripts/run_doxygen: Do not process profile mode headers.
1966 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1968 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1969 Remove dg-skip-if for profile mode.
1970 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1971 preprocessor check for profile mode.
1972 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1973 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1975 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1977 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1978 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1979 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1980 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1981 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1983 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1985 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1987 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1989 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1990 preprocessor check for profile mode.
1991 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1993 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1994 Remove dg-skip-if for profile mode.
1995 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1996 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1997 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1998 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1999 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2000 * testsuite/Makefile.am: Remove profile_flags variable and
2001 * testsuite/Makefile.am: Remove profile_flags variable and
2002 check-profile target.
2003 * testsuite/Makefile.in: Regenerate.
2004 * testsuite/ext/profile/all.cc: Remove.
2005 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2006 * testsuite/ext/profile/profiler_algos.cc: Remove.
2007 * testsuite/ext/profile/replace_new.cc: Remove.
2008 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2009 preprocessor check for profile mode.
2010 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2011 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2012 (check_v3_target_normal_mode): Do not check for profile mode macro.
2013 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2015 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2016 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2017 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2018 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2019 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2020 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2021 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2022 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2023 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2024 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2026 Remove array_allocator extension, deprecated since 4.9.0
2027 * doc/xml/manual/allocator.xml: Remove documentation for
2029 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2030 * doc/xml/manual/using.xml: Remove header from documentation.
2031 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2032 * include/Makefile.in: Regenerate.
2033 * include/ext/array_allocator.h: Remove.
2034 * include/precompiled/extc++.h: Do not include removed header.
2035 * testsuite/ext/array_allocator/1.cc: Remove.
2036 * testsuite/ext/array_allocator/2.cc: Remove.
2037 * testsuite/ext/array_allocator/26875.cc: Remove.
2038 * testsuite/ext/array_allocator/3.cc: Remove.
2039 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2040 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2041 * testsuite/ext/array_allocator/check_new.cc: Remove.
2042 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2043 * testsuite/ext/headers.cc: Do not include removed header.
2045 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2047 * include/bits/stl_bvector.h
2048 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2050 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2052 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2054 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2056 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2058 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2060 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2062 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2064 (_Bit_iterator::operator-(difference_type)): Likewise.
2065 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2066 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2068 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2069 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2071 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2074 * testsuite/util/thread/all.h: Do not use remove_pointer for
2075 std::thread::native_handle_type.
2078 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2079 (_Variant_storage<true, Types...>::_M_reset()))
2080 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2081 (__get_storage): Likewise.
2082 (variant): Add noexcept to friend declarations for __get and
2086 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2087 Use _Require for constraints.
2088 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2090 (__uniq_ptr_hash): New base class with conditionally-disabled call
2092 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2093 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2094 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2096 * include/bits/shared_ptr.h: Improve docs.
2097 * include/bits/shared_ptr_base.h: Likewise.
2098 * include/bits/stl_uninitialized.h: Likewise.
2099 * include/bits/unique_ptr.h: Likewise.
2100 * libsupc++/new: Likewise.
2102 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2104 * include/bits/stl_deque.h
2105 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2107 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2109 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2111 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2113 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2115 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2117 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2119 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2121 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2124 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2125 (test01): Reserve for number of insertions to avoid rehash during test.
2126 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2128 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2133 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2135 * include/experimental/bits/fs_path.h: Improve docs.
2136 * include/experimental/bits/net.h: Fix wrong header name in comment.
2137 Do not document implementation details.
2138 * include/experimental/netfwd: Fix doxygen grouping.
2140 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2142 * include/bits/stl_pair.h: Improve docs.
2143 * include/std/tuple: Likewise.
2145 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2147 * include/std/chrono: Improve docs.
2148 * include/std/ratio: Do not document implementation details.
2149 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2151 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2154 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2155 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2156 (__duration_common_type): New helper.
2157 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2158 __duration_common_type.
2159 (__timepoint_common_type_wrapper): Replace with ...
2160 (__timepoint_common_type): New helper.
2161 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2162 Use __time_point_common_type.
2163 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2164 (__common_type_impl): If either argument is transformed by decay,
2165 use the common_type of the decayed types.
2166 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2167 decayed, use __do_common_type_impl to get the common_type.
2168 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2169 (__do_member_type_wrapper, __member_type_wrapper)
2170 (__expanded_common_type_wrapper): Remove.
2171 (__common_type_pack, __common_type_fold): New helpers.
2172 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2173 __member_type_wrapper and __expanded_common_type_wrapper.
2174 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2175 Test zero-length template argument list.
2176 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2177 Test single argument cases and argument types that should decay.
2178 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2179 Adjust expected error.
2180 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2182 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2183 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2184 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2186 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2188 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2190 Make allocator propagation more consistent for
2191 operator+(basic_string) (P1165R1)
2192 * include/bits/basic_string.h
2193 (operator+(basic_string&&, basic_string&&): Changed resulting
2194 allocator to always be the one from the first parameter.
2195 * include/bits/basic_string.tcc
2196 (operator+(const _CharT*, const basic_string&)): Changed
2197 resulting allocator to be SOCCC on the second parameter's allocator.
2198 (operator+(_CharT, const basic_string&)): Likewise.
2199 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2201 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2204 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2206 * include/bits/regex.h: Improve docs.
2207 * include/bits/regex.tcc: Do not document implementation details.
2209 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2211 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2213 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2214 Add type printer for container types in std::__debug namespace.
2215 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2216 (gdb-tests): Use distinct parameters for the type of test and use of
2218 (gdb-test): Check for regex test even if 'whatis' test.
2219 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2221 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2222 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2223 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2224 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2225 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2226 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2227 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2229 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2231 * include/std/system_error (error_category): Fix comment.
2234 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2235 argument is an empty path.
2236 (absolute(const path&, error_code&)): Use invalid_argument as error
2237 code instead of no_such_file_or_directory.
2238 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2239 of non-existent paths and empty paths with both overloads of absolute.
2241 * include/std/system_error (error_category, error_code)
2242 (error_condition): Improve docs.
2243 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2244 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2245 to class documentation. Suppress documentation for implementation
2247 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2248 Suppress documentation for implementation details.
2250 * include/std/system_error (error_code): Remove friend declaration
2251 for hash<error_code>.
2252 (hash<error_code>::operator()): Use public member functions to access
2254 (hash<error_condition>::operator()): Use address of category, not
2255 its object representation.
2256 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2257 Use public member functions to access value and category.
2258 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2260 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2262 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2263 * include/bits/hashtable_policy.h
2264 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2265 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2266 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2267 smaller than input value rather than always greater. Preserve
2268 _M_next_resize if called with 0 input. Use __builtin_floorl.
2269 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2270 elements + number of insertions is greater than _M_next_resize. Start
2271 with 11 buckets if not told otherwise. Use __builtin_floorl.
2272 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2273 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2274 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2275 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2276 told otherwise. Use __builtin_floorl.
2277 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2278 to also validate _Power2_rehash_policy.
2279 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2282 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2285 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2289 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2290 overflow warning with -Wpedantic -Wsystem-headers.
2292 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2295 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2296 * include/bits/move.h (swap): Remove extra parentheses.
2298 * include/experimental/bits/lfts_config.h: Improve doc markup.
2299 * include/experimental/optional: Improve docs.
2300 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2301 (__constexpr_addressof): Remove.
2302 (optional::operator->()): Use std::__addressof().
2303 * include/std/optional (optional::operator->()): Adjust whitespace.
2304 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2305 that operator-> is still constexpr with overloaded operator&. Change
2306 to compile-only test.
2307 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2310 * include/bits/shared_ptr.h: Improve docs.
2311 * include/bits/shared_ptr_atomic.h: Likewise.
2312 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2314 * include/bits/basic_string.h: Fix iterator/index confusion in
2316 * include/bits/range_access.h: Fix Doxygen warnings.
2317 * include/bits/refwrap.h: Do not document implementation details.
2318 (ref, cref): Group docs with reference_wrapper.
2319 * include/std/fstream: Fix Doxygen markup.
2320 * libsupc++/initializer_list (begin, end): Group docs with
2323 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2325 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2326 * include/std/mutex: Likewise.
2327 * include/std/shared_mutex: Likewise.
2329 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2330 * include/bits/fs_fwd.h: Likewise.
2331 * include/bits/fs_ops.h: Likewise.
2332 * include/bits/fs_path.h: Likewise.
2333 * include/std/filesystem: Likewise.
2335 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2336 * include/experimental/buffer: Likewise.
2337 * include/experimental/executor: Likewise.
2338 * include/experimental/internet: Likewise.
2339 * include/experimental/io_context: Likewise.
2340 * include/experimental/net: Likewise.
2341 * include/experimental/netfwd: Likewise.
2342 * include/experimental/socket: Likewise.
2343 * include/experimental/timer: Likewise.
2345 * doc/doxygen/doxygroups.cc: Move description of experimental group
2347 * include/experimental/algorithm: Add to libfund-ts doc group.
2348 * include/experimental/any: Likewise. Do not document implementation
2350 * include/experimental/array: Add to libfund-ts doc group.
2351 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2352 for Library Fundamentals.
2353 * include/experimental/chrono: Add to libfund-ts doc group.
2354 * include/experimental/deque: Likewise.
2355 * include/experimental/forward_list: Likewise.
2356 * include/experimental/functional: Likewise.
2357 * include/experimental/iterator: Likewise.
2358 * include/experimental/list: Likewise.
2359 * include/experimental/map: Likewise.
2360 * include/experimental/memory: Likewise.
2361 * include/experimental/memory_resource: Likewise. Improve docs.
2363 * include/experimental/numeric: Add to libfund-ts doc group.
2364 * include/experimental/optional: Likewise.
2365 * include/experimental/propagate_const: Likewise.
2366 * include/experimental/random: Likewise.
2367 * include/experimental/ratio: Likewise.
2368 * include/experimental/regex: Likewise.
2369 * include/experimental/set: Likewise.
2370 * include/experimental/source_location: Likewise.
2371 * include/experimental/string: Likewise.
2372 * include/experimental/string_view: Likewise.
2373 * include/experimental/system_error: Likewise.
2374 * include/experimental/tuple: Likewise.
2375 * include/experimental/type_traits: Likewise.
2376 * include/experimental/unordered_map: Likewise.
2377 * include/experimental/unordered_set: Likewise.
2378 * include/experimental/utility: Likewise.
2379 * include/experimental/vector: Likewise.
2380 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2381 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2382 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2384 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2385 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2386 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2387 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2388 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2390 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2391 * include/experimental/bits/fs_fwd.h: Improve docs.
2392 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2393 * include/experimental/bits/fs_path.h: Likewise.
2394 (path, filesystem_error, u8path): Improve docs.
2395 * include/experimental/filesystem: Link to docs for TS.
2397 * config/allocator/new_allocator_base.h (__allocator_base): Add
2398 workaround for Doxygen bug #6945.
2399 * include/std/memory: Improve docs. Define group for pointer safety.
2400 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2401 conditional to suppress documentation for implementation details.
2403 * include/bits/specfun.h: Improve docs.
2404 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2407 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2408 (std::experimental): Add docs.
2409 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2410 namespace to nothing when generating docs.
2411 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2412 * include/std/chrono (std::chrono): Likewise.
2413 * include/std/functional (std::placeholders): Likewise.
2414 * include/std/thread (std::this_thread): Likewise.
2416 * include/parallel/settings.h: Fix Doxygen markup.
2418 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2419 anything unless PB_DS_CLASS_C_DEC is defined.
2420 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2421 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2422 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2423 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2424 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2425 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2426 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2428 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2429 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2430 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2431 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2432 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2433 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2434 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2435 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2436 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2437 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2438 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2440 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2441 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2443 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2446 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2447 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2448 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2451 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2453 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2454 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2455 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2456 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2457 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2458 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2460 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2461 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2464 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2467 * include/std/complex (__complex_proj): Return parameter unchanged.
2468 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2469 floating-point types to take std::complex arguments.
2470 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2471 floating-point types.
2472 * testsuite/26_numerics/complex/proj.cc: New test.
2474 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2476 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2477 to _Lock_policyE[012].
2478 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2480 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2482 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2483 macros accidentally left in.
2484 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2485 unnecessary -lstdc++fs option. Fix test for mingw.
2486 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2489 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2491 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2493 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2495 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2497 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2498 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2501 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2503 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2506 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2507 class template and partial specialization.
2510 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2512 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2513 functions to convert a value to an integral type.
2514 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2515 (fill_n): Convert _Size parameter to an integral type.
2516 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2517 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2518 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2519 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2520 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2521 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2523 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2525 Adding noexcept-specification on tuple constructors (LWG 2899)
2526 * libstdc++-v3/include/std/tuple:
2527 (tuple()): Add noexcept-specification.
2528 (tuple(const _Elements&...)): Likewise
2529 (tuple(_UElements&&...)): Likewise
2530 (tuple(const tuple<_UElements...>&)): Likewise
2531 (tuple(tuple<_UElements...>&&)): Likewise
2532 (tuple(const _T1&, const _T2&)): Likewise
2533 (tuple(_U1&&, _U2&&)): Likewise
2534 (tuple(const tuple<_U1, _U2>&): Likewise
2535 (tuple(tuple<_U1, _U2>&&): Likewise
2536 (tuple(const pair<_U1, _U2>&): Likewise
2537 (tuple(pair<_U1, _U2>&&): Likewise
2538 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2540 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2543 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2544 arguments with __restrict.
2546 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2548 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2550 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2552 * include/experimental/bits/fs_path.h
2553 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2554 avoid redundant call to _S_convert_loc with non-const pointers.
2556 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2557 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2558 * testsuite/21_strings/basic_string/hash/hash.cc
2559 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2560 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2561 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2563 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2564 wstring::_M_replace_dispatch with more specific patterns.
2565 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2566 Create const std::string to avoid redundant call to _S_convert_loc
2567 with non-const pointers.
2568 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2569 avoid unnecessary basic_string::assign instantiations.
2571 * include/std/memory (__uses_alloc_args): Add string-literal to
2572 static_assert, to match the one in __uses_alloc.
2573 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2574 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2575 for recursive uses-allocator construction of nested pairs.
2576 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2579 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2581 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2582 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2583 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2584 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2586 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2587 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2588 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2589 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2590 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2591 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2592 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2594 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2597 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2598 * include/std/scoped_allocator [__cplusplus > 201703L]
2599 (scoped_allocator_adaptor::construct): Define in terms of
2600 uses_allocator_construction_args, as per P0591R4.
2601 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2602 * testsuite/util/testsuite_allocator.h: Remove name of unused
2605 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2607 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2608 * doc/html/*: Regenerate.
2610 * include/bits/fs_path.h (operator<, operator<=, operator>)
2611 (operator>=, operator==, operator!=): Make hidden friends, as per
2613 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2614 string type in test.
2615 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2617 * include/std/any (any::any(ValueType&&)): Use __and_v.
2618 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2621 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2623 * include/std/type_traits (__result_of_memfun): Use remove_reference
2624 instead of __remove_cvref_t and remove redundant is_same check.
2625 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2627 * include/experimental/string_view (basic_string_view::pointer)
2628 (basic_string_view::reference): Fix to refer to non-const value_type.
2629 * include/bits/basic_string.h (basic_string): Use __sv_check and
2630 __sv_limit instead of basic_string_view::_M_check and
2631 basic_string_view::_M_limit.
2632 * include/std/string_view (__sv_check, __sv_limit): New
2633 helper functions to replace basic_string_view::_M_check and
2634 basic_string_view::_M_limit.
2635 (basic_string_view): Add static assertions to enforce ill-formed
2636 requirement for traits_type::char_type from P1148R0, and to enforce
2637 required properties of char-like types.
2638 (basic_string_view::pointer, basic_string_view::reference): Fix to
2639 refer to non-const value_type.
2640 (basic_string_view::operator[], basic_string_view::at)
2641 (basic_string_view::front, basic_string_view::back)
2642 (basic_string_view::data): Use const_reference and const_pointer
2643 typedefs for return types.
2644 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2645 (hash<wstring_view>): Fix argument_type typedef.
2646 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2647 char/1.cc: Fix expected return type of basic_string_view::data().
2648 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2649 wchar_t/1.cc: Likewise.
2650 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2651 char/1.cc: Likewise.
2652 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2653 wchar_t/1.cc: Likewise.
2654 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2656 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2657 Check reference and pointer typedefs.
2658 * testsuite/experimental/string_view/requirements/typedefs.cc:
2660 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2661 Fix expected return type of basic_string_view::data().
2662 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2664 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2666 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2670 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2671 Avoid a runtime check for types that can never be stored in std::any.
2672 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2675 PR libstdc++/90220 (partial)
2676 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2677 not attempt ill-formed static_cast to pointers to non-object types.
2678 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2681 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2682 prevent -Wcatch-value warning.
2684 * include/std/variant (__variant_construct): Use template parameter
2685 type instead of equivalent decltype-specifier.
2686 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2687 Replace forward with move.
2688 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2689 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2690 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2691 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2692 index after construction succeeds.
2693 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2694 if-constexpr checks that are always true. Use __remove_cvref_t instead
2695 of remove_reference so that is_nothrow_move_constructible check
2696 doesn't use a const rvalue parameter. In the potentially-throwing case
2697 construct a temporary and move assign it, as per LWG 2904.
2698 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2699 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2700 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2701 construct a temporary and move assign from it, as per LWG 2904.
2702 * testsuite/20_util/variant/exception_safety.cc: Check that
2703 assignment operators have strong exception safety guarantee.
2705 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2707 Document PSTL linker flags
2709 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2711 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2713 * include/std/variant (__detail::__variant::_Traits): Make
2714 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2715 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2717 (__detail::__variant::_Copy_assign_alias): Only depend on
2718 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2719 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2720 move assignment operators.
2723 * include/std/variant (variant::__not_self): New helper for the
2724 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2725 (variant::__to_type_impl): Remove.
2726 (variant::__to_type): Add default argument to check pack size, instead
2727 of using __to_type_impl.
2728 (variant::__accepted_type): Add default argument using __not_self.
2729 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2730 for variant(T&&) constructor constraint.
2731 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2732 Extract __accepted_type into a named template parameter for reuse in
2733 other constraints and in the exception specification.
2734 (variant::variant(in_place_type_t<T>, Args&&...))
2735 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2736 (variant::variant(in_place_index_t<T>, Args&&...))
2737 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2738 (variant::operator=T&&)): Remove redundant && from trait arguments.
2739 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2740 isn't used for in_place_type or in_place_index arguments.
2742 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2743 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2744 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2746 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2747 Bernd Edlinger <bernd.edlinger@hotmail.de>
2748 Jakub Jelinek <jakub@redhat.com>
2751 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2752 general-regs-only target attribute for ARM.
2754 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2757 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2758 specialization also depend on is_nothrow_move_constructible.
2759 * include/std/variant (__detail::__variant::__never_valueless()):
2760 Only true if the variant would have a move assignment operator.
2761 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2762 Check __never_valueless<T...>().
2763 (variant::emplace): Only perform non-throwing move assignments
2764 for never-valueless alternatives if the variant has a move assignment
2766 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2767 types can be emplaced into non-assignable variants.
2768 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2769 don't get copied when emplaced into non-assignable variants.
2771 * include/std/variant (__detail::__variant::__ref_cast): Remove
2773 (__detail::__variant::_Uninitialized::_M_get)
2774 (__detail::__variant::__get)
2775 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2777 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2779 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2781 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2782 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2783 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2784 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2786 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2788 Delegate PSTL configuration to pstl/pstl_config.h
2790 * include/bits/c++config: Remove explicit PSTL configuration
2791 macros and use definitions from <pstl/pstl_config.h>.
2793 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2795 Cleanup algorithm implementations
2796 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2798 (mismatch): Forward execution policy.
2799 (equal): Qualify call to std::equal().
2800 (partial_sort): Forward execution policy.
2801 (inplace_merge): Forward execution policy.
2803 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2805 Improve implementation of parallel equal()
2806 * include/pstl/algorithm_impl.h
2807 (__internal::__brick_equal): use "4 iterator" version of
2809 (__internal::__brick_equal): use simd for random access
2810 iterators on unsequenced execution policies.
2811 (__internal::__pattern_equal): add "4 iterator" version
2812 (__internal::__pattern_equal): dispatch to simd __brick_equal
2813 for vector-only execution policies.
2814 (__internal::__pattern_equal): dispatch to __parallel_or for
2815 parallel execution policies.
2816 * include/pstl/glue_algorithm_impl.h
2817 (std::equal): dispatch to "4 iterator" version of
2818 __internal::__pattern_equal().
2820 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2823 * include/bits/forward_list.h (operator==): Do not use operator!= to
2825 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2826 earlier in the list, so that sort is stable.
2827 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2828 * testsuite/23_containers/forward_list/comparable.cc: Test with
2829 types that meet the minimum EqualityComparable and LessThanComparable
2830 requirements. Remove irrelevant comment.
2832 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2833 Do not depend on whether all alternative types are move constructible.
2834 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2835 from the operand when deciding whether to perform the assignment.
2836 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2837 with deleted move constructor and deleted move assignment operator.
2838 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2839 behaviour of variants with DeletedMoves as an alternative.
2840 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2841 (move_ctor, move_assign): Check that moving a variant with a
2842 DeletedMoves alternative falls back to copying instead of moving.
2844 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2845 from static_assert declarations.
2847 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2848 actually match its name.
2849 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2850 (test_swap()): Fix result for MoveCtorOnly and check
2851 MoveCtorAndSwapOnly.
2853 * include/std/optional (optional::value_or(U&&) &&): Add missing
2854 constexpr specifier.
2855 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2856 for disengaged optionals and rvalue optionals.
2857 * testsuite/20_util/optional/observers/4.cc: Likewise.
2859 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2861 * include/pstl/algorithm_impl.h: Uglify identfiers.
2862 * include/pstl/numeric_impl.h: Uglify identfiers.
2863 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2865 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2867 * include/bits/c++config:
2868 Add definition for __PSTL_ASSERT.
2869 Add definition for __PSTL_ASSERT_MSG.
2870 * include/pstl/algorithm_impl.h: Replace use of assert().
2871 * include/pstl/numeric_impl.h: Replace use of assert().
2872 * include/pstl/parallel_backend_tbb.h:
2873 Replace use of assert().
2874 Replace use of __TBB_ASSERT().
2875 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2877 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2880 * src/c++17/memory_resource.cc
2881 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2882 needed to allow placing a _Chunk at the end of the buffer.
2883 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2885 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2887 * doc/xml/faq.xml: Add information about emergency EH pool.
2888 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2889 Move outdated information on mt_allocator to a separate section.
2890 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2891 doesn't affect the default allocator.
2893 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2897 * testsuite/20_util/variant/89851.cc: New test.
2899 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2901 * include/std/variant: Adjust whitespace. Add comments.
2902 (_Multi_array): Leave primary template undefined.
2903 (_Multi_array<_Tp>): Define partial specialization for base case of
2905 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2906 which is always a reference.
2907 (__gen_vtable::_S_apply()): Remove function, inline body into
2908 default member initializer.
2909 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2911 * include/std/variant (__variant_idx_cookie): Add member type.
2912 (__visitor_result_type): Remove.
2913 (__do_visit): Use invoke_result instead of __visitor_result_type.
2914 * testsuite/20_util/variant/visit.cc: New test.
2917 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2919 * testsuite/20_util/variant/90008.cc: New test.
2921 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2923 * include/pstl/algorithm_impl.h: Add namespace qualification.
2924 * include/pstl/execution_defs.h: Add namespace qualification.
2925 * include/pstl/execution_impl.h: Add namespace qualification.
2926 * include/pstl/numeric_impl.h: Add namespace qualification.
2927 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2928 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2929 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2931 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2933 Fix visit<R> for variant.
2934 * include/std/variant (__do_visit): Add a template parameter
2935 for enforcing same return types for visit.
2936 (__gen_vtable_impl): Likewise.
2937 (_S_apply_single_alt): Adjust.
2938 (__visit_invoke_impl): New. Handle casting to void.
2939 (__do_visit_invoke): New. Enforces same return types.
2940 (__do_visit_invoke_r): New. Converts return types.
2941 (__visit_invoke): Adjust.
2942 (__gen_vtable): Add a template parameter for enforcing
2943 same return types for visit.
2944 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2945 different return types.
2946 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2947 visitors with different return types don't accidentally
2948 compile with regular visitation.
2950 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2952 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2953 dg-require-filesystem-ts.
2955 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2957 * doc/xml/manual/status_cxx2020.xml: Update status.
2958 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2959 * testsuite/20_util/variant/visit_r.cc: New test.
2961 * include/bits/fs_dir.h (directory_iterator::operator*)
2962 (directory_iterator::operator->): Add noexcept.
2963 (operator==, operator!=): Replace namespace-scope equality operators
2964 for directory iterators with hidden friends.
2967 * config/abi/pre/gnu.ver: Add missing exports.
2968 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2971 * config/abi/pre/gnu.ver: Export new symbols.
2972 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2973 (recursive_directory_iterator::recursion_pending())
2974 (recursive_directory_iterator::disable_recursion_pending()): Remove
2975 inline definitions. Make noexcept.
2976 (recursive_directory_iterator::depth())
2977 (recursive_directory_iterator::operator*())
2978 (recursive_directory_iterator::operator->()): Make noexcept.
2979 (recursive_directory_iterator::_M_options)
2980 (recursive_directory_iterator::_M_pending): Remove data members.
2981 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2982 (recursive_directory_iterator::recursive_directory_iterator): Remove
2983 ctor-initializer. Use new constructor for _Dir_stack.
2984 (recursive_directory_iterator::options())
2985 (recursive_directory_iterator::recursion_pending())
2986 (recursive_directory_iterator::disable_recursion_pending()): Add
2987 non-inline definitions.
2988 (recursive_directory_iterator::depth()): Make noexcept.
2989 (recursive_directory_iterator::increment(error_code&))
2990 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2991 location of options and recursion_pending members.
2992 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2993 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2994 user-declared move constructor and assignment operator, to make the
2997 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
2998 d_type == DT_UNKNOWN immediately.
2999 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3001 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3003 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3005 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3006 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3009 PR libstdc++/87431 (again)
3010 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3011 Define partial specialization for basic_string.
3012 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3013 shared_ptr and weak_ptr.
3014 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3016 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3018 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3020 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3022 * include/std/any (_Never_valueless_alt): Define explicit
3023 specialization for any.
3024 * include/std/variant (_Never_valueless_alt): Define primary template.
3025 (__never_valueless): Use _Never_valueless_alt instead of
3026 is_trivially_copyable.
3027 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3028 initializations to avoid try-catch overhead. Add special case for
3029 scalars produced by potentially-throwing conversions. Use
3030 _Never_valueless_alt instead of is_trivially_copyable for the
3031 remaining strong exception-safety cases.
3032 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3033 * testsuite/20_util/variant/87431.cc: Run both test functions.
3034 * testsuite/20_util/variant/exception_safety.cc: New test.
3035 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3036 so the variant becomes valueless.
3038 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3041 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3043 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3045 * include/std/string (__hash_string_base): New class template defining
3046 operator() for hashing strings.
3047 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3048 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3049 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3050 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3052 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3054 Use single-visitation in variant assignment and swap and relops.
3055 Also use indices instead of types when checking whether
3056 variants hold the same thing.
3057 * include/std/variant (__do_visit): Add a template parameter
3058 for index visitation, invoke with indices if index visitation
3060 (__variant_idx_cookie): New.
3061 (__visit_with_index): Likewise.
3062 (_Copy_assign_base::operator=): Do single-visitation with
3064 (_Move_assign_base::operator=): Likewise.
3065 (_Extra_visit_slot_needed): Adjust.
3066 (__visit_invoke): Call with indices if it's an index visitor.
3067 (relops): Do single-visitation with an index visitor.
3069 (__visitor_result_type): New.
3071 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3073 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3075 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3077 Don't revisit a variant we are already visiting.
3078 * include/std/variant (__variant_construct_single): New.
3079 (__variant_construct): Use it.
3080 (_M_destructive_move): Likewise.
3081 (_M_destructive_copy): Likewise.
3082 (_Copy_assign_base::operator=): Adjust.
3083 (_Move_assign_base::operator=): Likewise.
3086 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3089 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3090 destructor so they are not evaluated until the _Key type is complete.
3091 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3092 * testsuite/23_containers/set/85965.cc: New test.
3093 * testsuite/23_containers/unordered_set/85965.cc: New test.
3094 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3095 with regexp matching the corresponding _Rb_tree specialization.
3096 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3097 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3098 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3099 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3100 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3101 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3102 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3104 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3107 Fix based on a suggestion by Antony Polukhin.
3108 * include/std/variant (__never_valueless): New.
3110 (_Extra_visit_slot_needed): New.
3111 (_Multi_array): Use it.
3112 (_S_apply_all_alts): Likewise.
3114 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3117 Fix based on a suggestion by Antony Polukhin.
3118 * include/std/variant (__gen_vtable): Don't reserve an
3119 additional table slot, _Multi_array already does that.
3121 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3124 Fix based on a suggestion by Antony Polukhin.
3125 * include/std/variant (__variant_construct): Capture a pointer
3126 to the storage and visit just one variant.
3128 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3130 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3131 Doxygen-generated pages with unstable URL.
3132 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3133 * doc/xml/manual/extensions.xml: Likewise.
3134 * doc/xml/manual/parallel_mode.xml: Likewise.
3135 * doc/xml/manual/support.xml: Likewise.
3137 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3138 avoid -Wconversion warnings.
3140 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3142 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3143 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3144 (allstamped): Add stamp-pstl.
3145 (install-headers): Add ptsl_builddir.
3146 * include/Makefile.in: Regenerate.
3147 * include/bits/c++config: Add pstl configuration.
3148 * include/pstl/LICENSE.txt: New file.
3149 * include/pstl/algorithm_fwd.h: New file.
3150 * include/pstl/algorithm_impl.h: New file.
3151 * include/pstl/execution_defs.h: New file.
3152 * include/pstl/execution_impl.h: New file.
3153 * include/pstl/glue_algorithm_defs.h: New file.
3154 * include/pstl/glue_algorithm_impl.h: New file.
3155 * include/pstl/glue_execution_defs.h: New file.
3156 * include/pstl/glue_memory_defs.h: New file.
3157 * include/pstl/glue_memory_impl.h: New file.
3158 * include/pstl/glue_numeric_defs.h: New file.
3159 * include/pstl/glue_numeric_impl.h: New file.
3160 * include/pstl/memory_impl.h: New file.
3161 * include/pstl/numeric_fwd.h: New file.
3162 * include/pstl/numeric_impl.h: New file.
3163 * include/pstl/parallel_backend.h: New file.
3164 * include/pstl/parallel_backend_tbb.h: New file.
3165 * include/pstl/parallel_backend_utils.h: New file.
3166 * include/pstl/parallel_impl.h: New file.
3167 * include/pstl/pstl_config.h: New file.
3168 * include/pstl/unseq_backend_simd.h: New file.
3169 * include/pstl/utils.h: New file.
3170 * include/std/algorithm: Include parallel algorithm implementations.
3171 * include/std/execution: New file.
3172 * include/std/memory: Include parallel algorithm implementations.
3173 * include/std/numeric: Include parallel algorithm implementations.
3174 * include/std/version: Add parallel algorithms feature test macro.
3175 * testsuite/util/pstl/pstl_test_config.h: New file.
3176 * testsuite/util/pstl/test_utils.h: New file.
3177 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3178 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3179 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3180 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3181 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3182 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3183 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3184 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3185 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3186 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3187 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3188 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3189 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3190 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3191 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3192 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3193 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3194 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3195 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3196 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3197 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3198 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3199 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3200 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3201 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3202 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3203 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3204 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3205 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3206 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3207 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3208 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3209 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3210 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3211 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3212 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3213 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3214 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3215 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3216 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3217 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3218 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3219 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3220 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3221 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3222 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3223 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3224 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3225 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3226 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3227 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3228 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3229 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3230 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3231 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3232 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3233 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3234 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3235 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3236 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3237 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3238 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3239 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3240 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3241 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3242 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3243 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3244 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3245 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3246 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3247 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3248 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3249 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3250 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3251 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3252 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3253 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3254 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3255 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3256 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3257 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3258 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3259 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3260 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3261 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3262 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3263 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3264 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3265 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3266 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3267 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3268 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3269 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3270 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3271 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3272 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3273 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3274 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3275 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3276 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3277 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3278 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3279 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3280 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3281 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3282 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3284 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3286 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3287 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3288 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3289 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3290 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3291 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3292 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3293 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3294 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3295 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3296 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3297 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3298 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3299 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3300 when the special functions IS is enabled, not for C++17.
3301 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3303 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3304 without checks for special functions in C++17.
3305 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3309 * include/backward/hash_map: Use <> for includes not "".
3310 * include/backward/hash_set: Likewise.
3311 * include/backward/strstream: Likewise.
3312 * include/tr1/bessel_function.tcc: Likewise.
3313 * include/tr1/exp_integral.tcc: Likewise.
3314 * include/tr1/legendre_function.tcc: Likewise.
3315 * include/tr1/modified_bessel_func.tcc: Likewise.
3316 * include/tr1/riemann_zeta.tcc: Likewise.
3318 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3320 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3321 of extension allocators.
3322 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3323 Document new headers in 7.2, 8.1 and 9.1 releases.
3324 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3325 * doc/html/*: Regenerate.
3327 2019-03-12 John David Anglin <dave.anglin@bell.net>
3330 * testsuite/lib/libstdc++.exp: Locate libatomic.
3331 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3332 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3334 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3335 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3336 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3337 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3339 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3342 * configure.ac: Check for sockatmark.
3343 * crossconfig.m4: Check for sockatmark.
3344 * config.h.in: Regenerate.
3345 * configure: Regenerate.
3346 * include/experimental/internet (address_v4::_S_hton): Rename
3347 overloaded functions to _S_hton_16 and _S_ntoh_16.
3348 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3349 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3350 * include/experimental/socket (basic_socket::at_mark): Check
3351 _GLIBCXX_HAVE_SOCKATMARK.
3353 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3354 const variables instead of macros.
3357 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3358 Use correct type for len_aligned.
3359 * testsuite/20_util/hash/89629.cc: New test.
3361 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3364 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3365 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3366 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3367 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3368 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3369 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3370 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3371 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3372 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3373 memory_order_seq_cst to int.
3375 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3377 * doc/xml/manual/using.xml: Use link element instead of xref.
3378 * doc/html/*: Regenerate.
3380 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3382 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3385 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3386 parameters in deduction guides.
3387 * include/debug/multimap.h (multimap): Likewise.
3388 * include/debug/set.h (multimap): Likewise.
3389 * include/debug/multiset.h (multimap): Likewise.
3390 * include/debug/unordered_map (unordered_map): Likewise.
3391 (unordered_multimap): Likewise.
3392 * include/debug/unordered_set (unordered_set): Likewise.
3393 (unordered_multiset): Likewise.
3396 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3397 Invalidate all iterators in case of rehash.
3398 (unordered_multimap<>::_M_check_rehashed): Likewise.
3399 * include/debug/unordered_set
3400 (unordered_set<>::_M_check_rehashed): Likewise.
3401 (unordered_multiset<>::_M_check_rehashed): Likewise.
3402 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3404 2019-03-07 Andreas Schwab <schwab@suse.de>
3406 * config/abi/post/riscv64-linux-gnu: New directory.
3407 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3409 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3411 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3412 compile test to run. Fix typo.
3414 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3415 * doc/html/*: Regenerate.
3417 P0356R5 Simplified partial function application
3418 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3419 helpers for bind_front.
3420 (bind_front, __cpp_lib_bind_front): Define.
3421 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3423 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3425 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3426 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3427 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3428 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3430 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3432 PR libstdc++/86655 - std::assoc_legendre should not constrain
3433 the value of m (or x).
3434 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3435 __sph_legendre): If degree > order Don't throw, return 0.
3436 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3437 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3438 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3439 * testsuite/tr1/5_numerical_facilities/special_functions/
3440 02_assoc_legendre/pr86655.cc: New test.
3441 * testsuite/tr1/5_numerical_facilities/special_functions/
3442 22_sph_legendre/pr86655.cc: New test.
3444 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3447 Also PR libstdc++/85517
3448 * include/std/variant (__do_visit): New.
3449 (__variant_cast): Likewise.
3450 (__variant_cookie): Likewise.
3451 (__erased_*): Remove.
3452 (_Variant_storage::_S_vtable): Likewise.
3453 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3454 (_Variant_storage::__M_reset): Adjust.
3455 (__variant_construct): New.
3456 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3457 __variant_construct.
3458 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3459 (_Move_ctor_base::__M_destructive_copy): New.
3460 (_Move_ctor_base::__M_destructive_move): Adjust to use
3461 __variant_construct.
3462 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3463 (_Copy_assign_alias): Adjust to check both copy assignment
3464 and copy construction for triviality.
3465 (_Move_assign_base::operator=): Adjust to use __do_visit.
3466 (_Multi_array): Add support for visitors that accept and return
3468 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3469 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3470 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3471 a __variant_cookie temporary for a variant that is valueless and..
3472 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3473 (__gen_vtable::_Array_type): Conditionally make space for
3474 the __variant_cookie visitor case.
3475 (__variant_construct_by_index): New.
3476 (get_if): Adjust to use std::addressof.
3477 (relops): Adjust to use __do_visit.
3478 (variant): Add __variant_cast and __variant_construct_by_index
3480 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3481 instead of self-destruction.
3482 (variant::swap): Adjust to use __do_visit.
3483 (visit): Reimplement in terms of __do_visit.
3484 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3485 * testsuite/20_util/variant/compile.cc: Adjust.
3486 * testsuite/20_util/variant/run.cc: Likewise.
3488 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3490 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3492 * testsuite/experimental/feat-char8_t.cc: Likewise.
3494 * include/std/type_traits [C++20] (is_bounded_array)
3495 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3497 * testsuite/20_util/is_bounded_array/requirements/
3498 explicit_instantiation.cc: New test.
3499 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3501 * testsuite/20_util/is_bounded_array/value.cc: New test.
3502 * testsuite/20_util/is_unbounded_array/requirements/
3503 explicit_instantiation.cc: New test.
3504 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3506 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3508 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3510 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3512 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3514 * include/c_compatibility/math.h [C++20] (lerp): Add using
3516 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3517 (__lerp): Define function template to implement lerp.
3518 (lerp(float, float, float), lerp(double, double, double))
3519 (lerp(long double, long double, long double)): Define for C++20.
3520 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3521 (midpoint(T, T), midpoint(T*, T*)): Define.
3522 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3523 * testsuite/26_numerics/lerp.cc: New test.
3524 * testsuite/26_numerics/midpoint/floating.cc: New test.
3525 * testsuite/26_numerics/midpoint/integral.cc: New test.
3526 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3528 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3530 PR libstdc++/88996 Implement P0439R0
3531 Make std::memory_order a scoped enumeration.
3532 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3533 add variables for the old enumerators. Adjust calls.
3534 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3535 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3537 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3539 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3542 * include/std/memory_resource (polymorphic_allocator): Add default
3543 template argument for C++20.
3544 (polymorphic_allocator::allocate_bytes)
3545 (polymorphic_allocator::deallocate_bytes)
3546 (polymorphic_allocator::allocate_object)
3547 (polymorphic_allocator::deallocate_object)
3548 (polymorphic_allocator::new_object)
3549 (polymorphic_allocator::delete_object): New member functions for
3551 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3554 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3557 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3560 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3562 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3563 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3565 * include/std/memory (uses_allocator_construction_args): New set of
3566 overloaded functions.
3567 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3569 * include/std/memory_resource (polymorphic_allocator::construct)
3570 [__cplusplus > 201703l]: Replace all overloads with a single function
3571 using uses_allocator_construction_args.
3572 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3574 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3576 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3579 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3580 stylesheet directories before check for xsltproc. Try to use
3581 xmlcatalog to find local stylesheet directory before trying hardcoded
3582 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3583 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3584 use xsltproc if xmlcatalog fails to find a local stylesheet.
3585 * configure.ac: Check for xmlcatalog.
3586 * Makefile.in: Regenerate.
3587 * configure: Likewise.
3588 * doc/Makefile.in: Likewise.
3589 * include/Makefile.in: Likewise.
3590 * libsupc++/Makefile.in: Likewise.
3591 * po/Makefile.in: Likewise.
3592 * python/Makefile.in: Likewise.
3593 * src/Makefile.in: Likewise.
3594 * src/c++11/Makefile.in: Likewise.
3595 * src/c++17/Makefile.in: Likewise.
3596 * src/c++98/Makefile.in: Likewise.
3597 * src/filesystem/Makefile.in: Likewise.
3598 * testsuite/Makefile.in: Likewise.
3600 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3603 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3604 container deduction guides.
3605 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3606 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3607 parameters in deduction guides.
3608 * include/bits/stl_multimap.h (multimap): Likewise.
3609 * include/bits/stl_multiset.h (multiset): Likewise.
3610 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3611 * include/bits/stl_set.h (set): Likewise.
3612 * include/bits/stl_stack.h (stack): Likewise.
3613 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3614 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3615 constrain parameters in deduction guides.
3616 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3618 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3620 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3621 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3622 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3623 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3625 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3627 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3630 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3631 to class template and partial specialization using void_t.
3632 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3634 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3637 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3638 copy and move members public.
3640 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3642 * include/std/type_traits (__underlying_type_impl): New helper to
3643 make underlying_type SFINAE-friendly.
3644 (underlying_type): Derive from __underlying_type_impl.
3645 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3649 * include/bits/char_traits.h (__constant_char_array): Check index is
3650 in range before dereferencing.
3651 (char_traits<char>::compare, char_traits<char>::find)
3652 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3653 immediately if n is zero.
3654 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3655 Remove workarounds for PR 67026.
3656 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3658 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3661 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3663 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3664 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3666 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3669 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3670 type to std::size_t and argument to type to long double.
3672 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3674 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3675 * config/abi/post/sparc64-linux-gnu: New directory.
3676 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3677 * config/abi/post/sparc64-linux-gnu/32: New directory.
3678 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3680 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3682 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3683 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3686 2019-02-22 Tom Honermann <tom@honermann.net>
3688 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3689 printers for u8string and u8string_view.
3691 2019-02-22 Tom Honermann <tom@honermann.net>
3693 * testsuite/18_support/byte/ops.cc: Validate
3694 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3695 std::to_integer<char32_t>.
3696 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3697 std::numeric_limits<char8_t>.
3698 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3699 std::numeric_limits<char8_t>::lowest().
3700 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3701 std::numeric_limits<char8_t>::max_digits10.
3702 * testsuite/18_support/type_info/fundamental.cc: Validate
3703 typeinfo for char8_t.
3704 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3705 std::from_chars with char8_t.
3706 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3707 Validate explicit instantiation of std::hash<char8_t>.
3708 * testsuite/20_util/is_integral/value.cc: Validate
3709 std::is_integral<char8_t>.
3710 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3711 Validate std::make_signed<char8_t>.
3712 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3713 Validate u8string construction from char8_t sources.
3714 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3716 * testsuite/21_strings/basic_string_view/operations/compare/
3717 char/70483.cc: Validate substr operations on u8string_view.
3718 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3719 the u8string_view typedef is defined.
3720 * testsuite/21_strings/char_traits/requirements/
3721 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3723 * testsuite/21_strings/char_traits/requirements/
3724 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3725 constexpr member functions.
3726 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3727 that the u8string typedef is defined.
3728 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3729 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3730 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3731 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3733 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3734 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3736 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3737 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3738 Validate std::atomic<char8_t>::is_always_lock_free
3739 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3740 Update line numbers.
3741 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3743 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3745 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3746 Validate std::experimental::pmr::u8string.
3747 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3748 u8string_view typedef is defined.
3749 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3750 char32_t to the typelists.
3752 2019-02-22 Tom Honermann <tom@honermann.net>
3754 * include/ext/typelist.h: Constrain a partial specialization of
3755 typelist::detail::append_ to only match chain<T1,T2>.
3757 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3760 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3761 class template with class. Replace move and copy member types with
3762 member alias templates, so they are only instantiated when needed.
3763 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3764 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3765 test for C++11/14/17 as well.
3766 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3769 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3772 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3773 _GLIBCXX_PURE to the alias declaration.
3775 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3777 * testsuite/21_strings/basic_string/literals/types.cc
3778 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3779 * testsuite/21_strings/basic_string/literals/values.cc
3780 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3781 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3782 potentially having different type.
3783 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3784 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3786 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3787 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3788 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3789 string literals only using basic character set.
3790 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3791 u8 literals to char.
3792 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3793 Test ATOMIC_CHAR8_T_LOCK_FREE.
3794 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3795 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3796 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3797 * testsuite/experimental/string_view/literals/types.cc
3798 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3800 * testsuite/experimental/string_view/literals/values.cc
3801 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3803 2019-02-19 Tom Honermann <tom@honermann.net>
3805 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3806 from char16_32_t.cc; validates numeric_limits<char8_t>.
3807 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3808 test cloned from types.cc; validates operator""s for char8_t
3810 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3811 test cloned from values.cc; validates construction and comparison
3813 * testsuite/21_strings/basic_string/requirements/
3814 /explicit_instantiation/char8_t/1.cc: New test cloned from
3815 char16_t/1.cc; validates explicit instantiation of
3816 basic_string<char8_t>.
3817 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3818 New test cloned from types.cc; validates operator""sv for char8_t
3819 returns u8string_view.
3820 * testsuite/21_strings/basic_string_view/literals/
3821 values-char8_t.cc: New test cloned from values.cc; validates
3822 construction and comparison of u8string_view values.
3823 * testsuite/21_strings/basic_string_view/requirements/
3824 explicit_instantiation/char8_t/1.cc: New test cloned from
3825 char16_t/1.cc; validates explicit instantiation of
3826 basic_string_view<char8_t>.
3827 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3828 New test cloned from char16_t/65049.cc; validates that
3829 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3830 * testsuite/21_strings/char_traits/requirements/char8_t/
3831 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3832 that char_traits<char8_t> member typedefs are present and correct.
3833 * testsuite/21_strings/char_traits/requirements/
3834 explicit_instantiation/char8_t/1.cc: New test cloned from
3835 char16_t/1.cc; validates explicit instantiation of
3836 char_traits<char8_t>.
3837 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3838 from char16_t.cc: validates
3839 codecvt<char16_t, char8_t, mbstate_t>.
3840 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3841 from char32_t.cc: validates
3842 codecvt<char32_t, char8_t, mbstate_t>.
3843 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3844 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3845 codecvt<char32_t, char8_t, std::mbstate_t>.
3846 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3847 test cloned from string.cc; validates filesystem::path construction
3849 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3850 the __cpp_lib_char8_t feature test macro is defined with the
3852 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3853 New test cloned from string.cc; validates filesystem::path
3854 construction from char8_t input.
3855 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3856 test cloned from types.cc; validates operator""sv for char8_t
3857 returns u8string_view.
3858 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3859 New test cloned from values.cc; validates construction and
3860 comparison of u8string_view values.
3861 * testsuite/experimental/string_view/requirements/
3862 explicit_instantiation/char8_t/1.cc: New test cloned from
3863 char16_t/1.cc; validates explicit instantiation of
3864 basic_string_view<char8_t>.
3865 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3866 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3869 2019-02-19 Tom Honermann <tom@honermann.net>
3871 P0482R5 char8_t: Standard library support
3872 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3873 typeinfo symbols for char8_t.
3874 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3875 (GLIBCXX_3.4.26): Add symbols for specializations of
3876 numeric_limits and codecvt that involve char8_t.
3877 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3878 * include/bits/atomic_base.h: Add atomic_char8_t.
3879 * include/bits/basic_string.h: Add std::hash<u8string> and
3880 operator""s(const char8_t*, size_t).
3881 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3883 * include/bits/char_traits.h: Add char_traits<char8_t>.
3884 * include/bits/codecvt.h: Add
3885 codecvt<char16_t, char8_t, mbstate_t>,
3886 codecvt<char32_t, char8_t, mbstate_t>,
3887 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3888 codecvt_byname<char32_t, char8_t, mbstate_t>.
3889 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3890 recognize char8_t as an integral type.
3891 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3893 (path::u8string): Return std::u8string when char8_t support is
3895 (path::generic_u8string): Likewise.
3896 (path::_S_convert): Handle conversion from char8_t input.
3897 (path::_S_str_convert): Likewise.
3898 * include/bits/functional_hash.h: Add hash<char8_t>.
3899 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3901 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3902 for new char8_t specializations.
3903 * include/bits/localefwd.h: Add missing declarations of
3904 codecvt<char16_t, char, mbstate_t> and
3905 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3906 codecvt<char16_t, char8_t, mbstate_t> and
3907 codecvt<char32_t, char8_t, mbstate_t>.
3908 * include/bits/postypes.h: Add u8streampos
3909 * include/bits/stringfwd.h: Add declarations of
3910 char_traits<char8_t> and u8string.
3911 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3912 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3914 (path::u8string): Return std::u8string when char8_t support is
3916 (path::generic_u8string): Likewise.
3917 (path::_S_convert): Handle conversion from char8_t input.
3918 (path::_S_str_convert): Likewise.
3919 * include/experimental/string: Add u8string.
3920 * include/experimental/string_view: Add u8string_view,
3921 hash<experimental::u8string_view>, and
3922 operator""sv(const char8_t*, size_t).
3923 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3924 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3925 as a character type.
3926 * include/std/limits: Add numeric_limits<char8_t>.
3927 * include/std/string_view: Add u8string_view,
3928 hash<experimental::u8string_view>, and
3929 operator""sv(const char8_t*, size_t).
3930 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3931 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3932 * libsupc++/atomic_lockfree_defines.h: Define
3933 ATOMIC_CHAR8_T_LOCK_FREE.
3934 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3935 codecvt.cc and limits.cc so that char8_t specializations of
3936 numeric_limits and codecvt and emitted.
3937 * src/c++11/Makefile.in: Likewise.
3938 * src/c++11/codecvt.cc: Define members of
3939 codecvt<char16_t, char8_t, mbstate_t>,
3940 codecvt<char32_t, char8_t, mbstate_t>,
3941 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3942 codecvt_byname<char32_t, char8_t, mbstate_t>.
3943 * src/c++11/limits.cc: Define members of
3944 numeric_limits<char8_t>.
3945 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3946 locale_init.cc and localename.cc.
3947 * src/c++98/Makefile.in: Likewise.
3948 * src/c++98/locale_init.cc: Add initialization for the
3949 codecvt<char16_t, char8_t, mbstate_t> and
3950 codecvt<char32_t, char8_t, mbstate_t> facets.
3951 * src/c++98/localename.cc: Likewise.
3952 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3954 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3956 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3957 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3958 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3960 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3962 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3963 * doc/html/*: Regenerate.
3965 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3966 * doc/html/*: Regenerate.
3968 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3969 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3970 allocator type in is_constructible checks.
3971 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3972 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3973 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3974 problematic type from LWG 2586 discussion.
3975 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3976 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3978 * configure.ac: Check for C11 timespec_get function.
3979 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3981 * config.h.in: Regenerate.
3982 * configure: Regenerate.
3983 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3984 std for C++17 and up.
3986 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3987 * include/bits/stl_queue.h
3988 (priority_queue(const Compare&, const Container&, const Alloc&))
3989 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3991 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3993 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3994 * include/bits/stl_queue.h (queue, priority_queue): Add static
3995 assertions to enforce LWG 2566 requirement on value_type.
3996 * include/bits/stl_stack.h (stack): Likewise.
3999 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4001 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4002 * include/bits/std_abs.h: Add comment about LWG 2735.
4003 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4005 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4008 * include/std/version [__cpp_impl_destroying_delete]
4009 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4010 * libsupc++/new [__cpp_impl_destroying_delete]
4011 (__cpp_lib_destroying_delete): Likewise.
4012 (destroying_delete_t, destroying_delete): Likewise, but define even
4013 when __cpp_impl_destroying_delete is not defined.
4014 * testsuite/18_support/destroying_delete.cc: New test.
4016 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4019 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4020 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4021 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4022 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4024 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4027 * include/bits/fs_path.h (path::has_root_name)
4028 (path::has_root_directory, path::has_root_path)
4029 (path::has_relative_path, path::has_parent_path)
4030 (path::has_filename, path::has_stem, path::has_extension)
4031 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4033 * src/c++17/fs_path.cc (path::has_root_name)
4034 (path::has_root_directory, path::has_root_path)
4035 (path::has_relative_path, path::has_parent_path)
4036 (path::has_filename, path::_M_find_extension): Add noexcept.
4038 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4040 PR libstdc++/89102 (partial)
4041 * include/std/type_traits (common_type<>): Define.
4042 (common_type<T>): Derive from common_type<T, T>.
4043 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4044 Test zero-length template argument list.
4045 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4046 Test additional single argument cases.
4047 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4048 Adjust expected error.
4050 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4053 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4055 * include/bits/stl_stack.h (stack): Likewise.
4056 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4057 * testsuite/23_containers/queue/deduction.cc: New test.
4058 * testsuite/23_containers/stack/deduction.cc: New test.
4061 * include/std/type_traits (__is_convertible_helper)
4062 (__is_convertible_helper<_From, _To, false>): Revert changes to
4063 support is_nothrow_convertible.
4064 (__is_nt_convertible_helper): New helper.
4065 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4067 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4068 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4071 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4072 __is_alloc_insertable_impl. Replace single type member with two
4073 members, one for each of copy and move insertable.
4074 (__is_move_insertable): New trait for internal use.
4075 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4076 (vector::_S_nothrow_relocate(true_type)): New functions to
4077 conditionally check if __relocate_a can throw.
4078 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4079 on __is_move_insertable.
4080 (vector::_S_do_relocate): New overloaded functions to conditionally
4082 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4083 based on _S_use_relocate.
4084 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4085 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4086 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4089 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4090 parameter unnamed. Add message to static assertion.
4091 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4092 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4095 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4098 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4100 (__is_bitwise_relocatable): ... to this.
4101 (__relocate_a_1): Adapt.
4102 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4103 (__is_bitwise_relocatable): ... to this.
4105 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4108 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4109 final component as well as from _M_pathname. Append the dot using
4110 operator+= instead of only to _M_pathname.
4111 (path::_M_find_extension): Reformat slightly.
4112 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4113 Add more test cases.
4115 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4117 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4119 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4121 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4122 constexpr specifiers from arg and proj.
4124 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4125 __shared_ptr instantiations used by gcc4-compatible ABI.
4127 * include/experimental/forward_list (experimental::erase): Qualify
4129 * include/experimental/list (experimental::erase): Likewise.
4130 * include/std/forward_list (std::erase): Likewise.
4131 * include/std/list (std::erase): Likewise.
4133 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4135 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4136 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4137 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4138 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4139 * testsuite/ext/array_allocator/26875.cc: Likewise.
4140 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4141 * testsuite/util/replacement_memory_operators.h: Likewise.
4142 * testsuite/util/testsuite_allocator.h: Likewise.
4144 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4145 normal mode vector, even for debug mode.
4146 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4147 Define alias template for normal mode vector.
4149 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4152 * config/locale/generic/c_locale.h (__convert_from_v)
4153 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4154 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4155 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4156 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4158 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4161 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4162 data member with static member function _S_use_relocate().
4163 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4164 (vector::_M_default_append): Use _S_use_relocate() instead of
4167 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4170 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4173 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4174 write to stderr instead of using printf.
4176 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4179 * include/bits/char_traits.h (__constant_string_p,
4180 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4183 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4185 Implement C++20 P0600r1.
4186 * include/backward/hash_map: Add nodiscard attribute to empty.
4187 * include/backward/hash_set: Likewise.
4188 * backward/hashtable.h: Likewise.
4189 * include/bits/basic_string.h: Likewise.
4190 * include/bits/forward_list.h: Likewise.
4191 * include/bits/hashtable.h: Likewise.
4192 * include/bits/regex.h: Likewise.
4193 * include/bits/stl_deque.h: Likewise.
4194 * include/bits/stl_list.h: Likewise.
4195 * include/bits/stl_map.h: Likewise.
4196 * include/bits/stl_multimap.h: Likewise.
4197 * include/bits/stl_multiset.h: Likewise.
4198 * include/bits/stl_queue.h: Likewise.
4199 * include/bits/stl_set.h: Likewise.
4200 * include/bits/stl_stack.h: Likewise.
4201 * include/bits/stl_tree.h: Likewise.
4202 * include/bits/stl_vector.h: Likewise.
4203 * include/bits/unordered_map.h: Likewise.
4204 * include/bits/unordered_set.h: Likewise.
4205 * include/debug/array: Likewise.
4206 * include/experimental/any: Likewise.
4207 * include/experimental/bits/fs_path.h: Likewise.
4208 * include/experimental/internet: Likewise.
4209 * include/experimental/string_view: Likewise.
4210 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4212 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4214 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4216 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4218 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4220 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4222 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4224 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4226 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4227 info_fn_imps.hpp: Likewise.
4228 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4229 left_child_next_sibling_heap_.hpp: Likewise.
4230 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4232 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4234 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4236 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4238 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4240 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4242 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4244 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4245 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4246 * include/ext/rope: Likewise.
4247 * include/ext/slist: Likewise.
4248 * include/ext/vstring.h: Likewise.
4249 * include/profile/array: Likewise.
4250 * include/std/array: Likewise.
4251 * include/tr1/array: Likewise.
4252 * include/tr1/hashtable.h: Likewise.
4253 * include/tr1/regex: Likewise.
4254 * include/tr2/dynamic_bitset: Likewise.
4255 * include/bits/alloc_traits.h: Add nodiscard attribute to
4257 * include/experimental/memory_resource: Likewise.
4258 * include/ext/alloc_traits.h: Likewise.
4259 * include/ext/array_allocator.h: Likewise.
4260 * include/ext/bitmap_allocator.h: Likewise.
4261 * include/ext/debug_allocator.h: Likewise.
4262 * include/ext/extptr_allocator.h: Likewise.
4263 * include/ext/mt_allocator.h: Likewise.
4264 * include/ext/new_allocator.h: Likewise.
4265 * include/ext/pool_allocator.h: Likewise.
4266 * include/ext/throw_allocator.h: Likewise.
4267 * include/std/scoped_allocator: Likewise.
4268 * libsupc++/eh_alloc.cc: Likewise.
4269 * include/std/future: Add nodiscard attribute to async.
4270 * libsupc++/new: Add nodiscard attribute to new.
4272 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4277 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4278 * include/bits/shared_ptr.h
4279 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4280 (allocate_shared): Change to use new tag type.
4281 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4282 Declare new member function.
4283 (_Sp_alloc_shared_tag): Define new type.
4284 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4285 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4286 _Sp_make_shared_tag::_S_eq to check type_info.
4287 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4288 Constrain to prevent being called with _Sp_alloc_shared_tag.
4289 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4290 Replace constructor with ...
4291 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4292 reference parameter so address of the new object can be returned to
4293 the caller. Obtain the allocator from the tag type.
4294 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4295 constructor with ...
4296 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4297 to the __shared_count constructor.
4298 (__allocate_shared): Change to use new tag type.
4299 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4301 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4303 * src/c++17/fs_ops.cc
4304 (equivalent(const path&, const path&, error_code&))
4305 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4306 compare files instead of relying on incomplete info returned by stat.
4309 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4310 if the path is already absolute.
4311 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4312 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4315 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4316 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4317 of filesystem::exists.
4318 (create_directories(const path&, error_code&)): Add assertions.
4319 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4320 Add workaround for bug in _wstat for paths with trailing slash.
4321 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4322 for expected behaviour on mingw.
4323 * testsuite/experimental/filesystem/operations/create_directories.cc:
4325 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4326 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4327 not test permissions on mingw targets.
4329 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4331 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4332 constructors and open members taking wide strings. Fix patterns for
4333 filesystem::path members to match wstring_view parameters. Add
4334 exports for shared_ptr members used by directory iterators.
4335 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4336 error code parameter if the file doesn't exist.
4337 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4339 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4340 values for mingw targets, where "/" is not an absolute path. Do not
4341 test symlinks on mingw targets.
4342 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4343 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4345 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4346 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4347 that each component of the path is created.
4348 * testsuite/experimental/filesystem/operations/create_directories.cc:
4350 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4351 permissions on mingw targets.
4352 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4353 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4354 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4355 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4357 * testsuite/experimental/filesystem/operations/permissions.cc:
4359 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4360 symlinks or permissions on mingw targets.
4361 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4362 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4363 symlinks on mingw targets.
4364 * testsuite/experimental/filesystem/operations/remove_all.cc:
4366 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4367 permissions on mingw targets.
4368 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4369 test symlinks on mingw targets.
4370 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4373 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4376 Warn about unused comparisons of shared_ptr/unique_ptr
4377 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4378 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4379 <, <=, >, >= for shared_ptr.
4380 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4382 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4384 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4385 as 201611L, because P0497R0 changes are supported.
4386 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4388 * include/bits/erase_if.h [__cplusplus > 201703L]
4389 (__cpp_lib_erase_if): Only define for C++2a.
4390 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4391 (__cpp_lib_null_iterators): Define.
4392 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4393 (__cpp_lib_null_iterators): Define.
4394 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4396 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4398 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4400 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4401 changes are supported.
4402 * include/std/optional (__cpp_lib_optional): Likewise.
4403 * include/std/variant (__cpp_lib_variant): Likewise.
4404 * include/std/version [!__STRICT_ANSI__]
4405 (__cpp_lib_uncaught_exceptions): Define as long integer.
4406 [__cplusplus >= 201703L] (__cpp_lib_any)
4407 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4408 (__cpp_lib_variant): Define for C++17.
4409 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4411 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4414 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4416 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4420 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4422 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4425 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4427 * doc/xml/manual/intro.xml: Include new section.
4428 * doc/xml/manual/status_cxx2017.xml: Document more
4429 implementation-defined properties of the library.
4430 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4431 * doc/html/*: Regenerate.
4433 * include/bits/refwrap.h [__cplusplus > 201703L]
4434 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4435 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4436 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4438 (reference_wrapper::operator()): Add static assertion.
4439 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4441 * include/std/chrono (duration_values::zero(), duration_values::min())
4442 (duration_values::max()): Add noexcept.
4443 (duration::zero(), duration::min(), duration::max()): Likewise.
4444 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4445 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4446 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4448 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4450 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4452 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4453 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4455 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4458 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4459 specialization for C++17 (P0513R0, LWG 2817).
4460 * testsuite/20_util/hash/nullptr.cc: New test.
4463 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4464 pattern for std::basic_stringbuf::str().
4466 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4467 basic_ostream::operator<< patterns.
4469 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4471 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4472 test failures on targets with 32-bit time_t.
4474 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4475 * include/std/deque: Likewise.
4476 * include/std/forward_list: Likewise.
4477 * include/std/list: Likewise.
4478 * include/std/string: Likewise.
4479 * include/std/vector: Likewise.
4480 * include/std/version: Likewise.
4481 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4482 * testsuite/23_containers/deque/erasure.cc: Likewise.
4483 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4484 * testsuite/23_containers/list/erasure.cc: Likewise.
4485 * testsuite/23_containers/map/erasure.cc: Likewise.
4486 * testsuite/23_containers/set/erasure.cc: Likewise.
4487 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4488 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4489 * testsuite/23_containers/vector/erasure.cc: Likewise.
4491 * include/experimental/internet [AI_NUMERICSERV]
4492 (resolver_base::numeric_service): Define conditionally.
4493 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4495 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4498 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4499 Jonathan Wakely <jwakely@redhat.com>
4502 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4503 (GLIBCXX_3.4.26): Add new exports.
4504 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4505 correct list of sources.
4506 * include/Makefile.in: Regenerate.
4507 * include/std/ostream (operator<<(nullptr_t)): New member function.
4508 * src/c++17/ostream-inst.cc: New file.
4509 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4512 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4514 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4515 of the source file containing the caller.
4516 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4517 directories created by test.
4518 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4520 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4522 * testsuite/experimental/filesystem/iterators/
4523 recursive_directory_iterator.cc: Likewise.
4525 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4527 PR tree-optimization/88775
4528 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4529 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4530 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4531 instead of __builtin_constant_p if available. Don't bother with
4532 the pointer comparison in C++11 and earlier.
4534 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4538 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4541 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4543 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4544 for filesystem::path. Give variables more distinctive names.
4546 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4547 member function to perform non-trivial assignment.
4548 (_Optional_payload_base::_M_move_assign): Likewise.
4549 (_Optional_payload<T, true, false, true>::operator=)
4550 (_Optional_payload<T, true, true, false>::operator=)
4551 (_Optional_payload<T, true, false, false>::operator=): Call
4552 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4555 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4556 test std::complex<long double> if long double format is IBM128.
4557 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4560 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4562 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4563 for old std::unique_ptr layout.
4564 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4565 to become valueless. Add filesystem::path tests.
4568 * include/std/optional (_Optional_payload_base): New class template
4569 for common code hoisted from _Optional_payload specializations. Use
4570 a template for the union, to allow a partial specialization for
4571 types with non-trivial destructors. Add constructors for in-place
4572 initialization to the union.
4573 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4574 to perform non-trivial copy construction, instead of relying on
4575 non-standard copy elision in a delegating constructor.
4576 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4577 non-trivial move construction.
4578 (_Optional_payload): Derive from _Optional_payload_base and use it
4579 for everything except the non-trivial assignment operators, which are
4581 (_Optional_payload<false, C, M>): Derive from the specialization
4582 _Optional_payload<true, false, false> and add a destructor.
4583 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4584 Forward to corresponding members of _Optional_payload.
4585 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4586 Hoist common members from _Optional_base.
4587 (_Optional_base): Make all members and base class public.
4588 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4589 _Optional_base_impl.
4590 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4591 support for new std::optional layout.
4592 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4595 * include/bits/locale_conv.h: Use <> for includes not "".
4596 * include/ext/random: Likewise.
4597 * include/ext/vstring.h: Likewise.
4599 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4601 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4602 (GLIBCXX_3.4.21): Likewise.
4604 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4607 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4608 to match the one that controls whether utimbuf and utime are declared.
4610 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4613 * include/bits/char_traits.h (char_traits::move): Do not pass null
4614 pointers to memmove.
4615 * include/bits/locale_facets.h
4616 (ctype<char>::widen(const char*, const char*, char*)): Do not
4617 pass null pointers to memcpy.
4618 (ctype<char>::narrow(const char*, const char*, char, char*)):
4620 (ctype<char>::do_widen(const char*, const char*, char*)):
4622 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4625 * doc/xml/manual/spine.xml: Update copyright years.
4626 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4627 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4628 for C++17 filesystem library.
4629 * doc/html/*: Regenerate.
4631 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4632 * config.h.in: Regenerate.
4633 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4634 alphabetically and add missing entries for copy_symlink,
4635 hard_link_count, rename, and resize_file.
4636 * configure: Regenerate.
4637 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4638 used unconditionally.
4639 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4640 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4641 supports truncating to zero length.
4642 * testsuite/27_io/filesystem/operations/all.cc: New test.
4643 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4645 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4648 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4649 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4650 * config.h.in: Regenerate.
4651 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4652 remaining std::filesystem types and functions.
4653 * configure: Regenerate.
4654 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4655 * src/c++17/Makefile.in: Regenerate.
4656 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4657 here, and change name of included file.
4658 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4659 here, and change name of included file.
4660 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4661 path to dir-common.h.
4662 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4663 path to ops-common.h. Disable -Wunused-parameter warnings.
4664 (internal_file_clock): Define unconditionally.
4665 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4667 (do_copy_file, do_space): Move definitions to ops.common.h.
4668 (copy, file_size, hard_link_count, last_write_time, space): Only
4669 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4671 (last_write_time, read_symlink): Remove unused attributes from
4673 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4674 * src/filesystem/Makefile.in: Regenerate.
4675 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4676 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4677 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4678 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4679 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4680 dummy types and functions instead of using #error.
4681 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4682 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4684 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4685 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4686 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4687 to account for new namespace.
4688 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4689 -lstdc++fs from dg-options.
4690 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4691 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4692 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4693 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4694 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4696 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4697 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4699 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4700 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4701 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4702 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4703 * testsuite/27_io/filesystem/operations/create_directories.cc:
4705 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4706 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4707 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4708 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4709 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4710 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4711 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4712 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4713 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4714 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4715 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4716 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4717 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4718 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4719 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4720 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4721 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4722 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4724 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4728 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4729 typeinfo and vtables less greedy.
4730 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4731 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4732 * src/c++17/Makefile.in: Regenerate.
4733 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4734 here, and change name of included file.
4735 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4736 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4738 * src/filesystem/Makefile.in: Regenerate.
4739 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4740 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4741 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4742 from dg-options and remove dg-require-filesystem-ts.
4743 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4744 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4745 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4746 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4747 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4748 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4749 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4750 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4751 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4752 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4753 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4754 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4755 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4756 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4757 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4758 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4759 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4760 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4761 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4762 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4763 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4765 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4766 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4767 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4768 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4769 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4770 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4771 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4772 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4773 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4774 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4775 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4776 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4778 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4780 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4782 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4784 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4785 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4786 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4787 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4788 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4789 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4790 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4791 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4792 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4793 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4795 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4796 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4797 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4798 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4799 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4802 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4803 Check is_trivially_copyable instead of is_scalar.
4804 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4805 contained value can throw and its type is trivially copyable then
4806 construct into a temporary variant and move from it, to provide the
4807 strong exception safety guarantee.
4808 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4810 * testsuite/20_util/variant/87431.cc: New test.
4811 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4812 conversion causes valueless state.
4815 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4816 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4817 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4818 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4819 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4821 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4823 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4824 (file_time_type): Redefine in terms of __file_clock.
4825 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4827 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4829 (internal_file_lock): New helper type for accessing __file_clock.
4830 (do_copy_file): Use internal_file_lock to convert system time to
4832 (last_write_time(const path&, error_code&)): Likewise.
4833 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4835 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4837 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4838 for const member functions of std::basic_string.
4839 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4841 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4842 Make non-standard constructor private.
4843 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4845 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4846 explicit instantiations for C++17 as well as earlier dialects.
4847 * src/c++17/Makefile.am: Add new source files.
4848 * src/c++17/Makefile.in: Regenerate.
4849 * src/c++17/cow-string-inst.cc: New file defining explicit
4850 instantiations for basic_string member functions added in C++17.
4851 * src/c++17/string-inst.cc: Likewise.
4853 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4854 copy/move constructors for old std::basic_string.
4855 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4856 (basic_string::reference, basic_string::const_reference): Define
4857 as plain references for C++11 and later.
4858 (basic_string::basic_string()): Put constructor body outside
4859 preprocessor conditional groups.
4860 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4861 instead of copying it.
4862 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4864 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4866 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4867 cases for old basic_string.
4868 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4869 allocator-extended constructors unconditionally. Add extra members to
4870 allocator type when using old string ABI.
4871 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4873 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4875 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4876 -fno-inline added to test flags.
4878 * testsuite/21_strings/basic_string/requirements/
4879 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4881 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4882 assertion failures with old std::string ABI.
4884 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4886 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4887 functions that will only erase elements at the end.
4888 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4889 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4890 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4892 (path::_List::pop_back()): Define.
4893 (path::_List::_M_erase_from(const_iterator)): Define.
4894 (path::operator/=(const path&)): Use pop_back to remove last component
4895 and _M_erase_from to remove multiple components.
4896 (path::_M_append(basic_string_view<value_type>)): Likewise.
4897 (path::operator+=(const path&)): Likewise.
4898 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4899 (path::remove_filename()): Likewise.
4900 (path::lexically_normal()): Use _List::_Impl iterators instead of
4901 path::iterator. Use pop_back to remove components from the end. Clear
4902 trailing filename, instead of using erase(const_iterator) to remove
4903 a non-final component.
4904 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4906 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4908 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4909 incorrect treatment of empty filename after trailing slash.
4910 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4912 * testsuite/21_strings/basic_string/modifiers/assign/char/
4913 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4915 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4916 move_assign_optim.cc: Likewise.
4918 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4919 Jakub Jelinek <jakub@redhat.com>
4922 * include/experimental/memory: Replace UTF-8 quote characters.
4923 * include/std/future: Replace UTF-8 "em dash" characters.
4925 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4928 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4929 * include/debug/forward_list: Likewise.
4930 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4932 * include/experimental/chrono: Likewise.
4933 * include/experimental/functional: Likewise.
4934 * include/experimental/ratio: Likewise.
4935 * include/experimental/system_error: Likewise.
4936 * include/experimental/tuple: Likewise.
4937 * include/experimental/type_traits: Likewise.
4938 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4939 * include/parallel/multiseq_selection.h: Likewise.
4942 * config/abi/pre/gnu.ver: Add missing exports.
4943 * testsuite/22_locale/collate_byname/88681.cc: New test.
4944 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4945 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4947 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4949 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4950 initializer_list<value_type> and from input iterator ranges.
4951 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4953 * testsuite/experimental/string_view/element_access/char/empty.cc:
4954 Fix year range in copyright header.
4956 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4958 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4959 Fix year range in copyright header.
4961 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4963 Update copyright years.
4965 Copyright (C) 2019 Free Software Foundation, Inc.
4967 Copying and distribution of this file, with or without modification,
4968 are permitted in any medium without royalty provided the copyright
4969 notice and this notice are preserved.