1 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
3 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
4 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
5 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
6 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
7 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
8 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
9 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
11 2019-08-23 Joseph Myers <joseph@codesourcery.com>
13 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
14 (std::filesystem::__gnu_posix::lstat): Add return type.
16 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
18 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
20 * include/std/numeric (reduce): Fix Doxygen markup.
23 * include/std/type_traits (is_function): Simplify definition. Remove
24 partial specializations for function types.
25 (__is_referenceable): Simplify definition.
26 * testsuite/20_util/bind/91371.cc: New test.
27 * testsuite/20_util/is_function/91371.cc: New test.
28 * testsuite/20_util/is_function/value.cc: Check more pointer types.
29 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
30 * testsuite/20_util/is_object/91371.cc: New test.
32 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
34 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
36 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
39 * include/bits/std_function.h (__check_func_return_type): Remove.
40 (function::_Callable): Use std::__is_invocable_impl instead of
41 __check_func_return_type.
42 * include/std/type_traits (__is_invocable_impl): Add another defaulted
43 template parameter. Define a separate partial specialization for
44 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
45 with a check that models delayed temporary materialization.
46 * testsuite/20_util/function/91456.cc: New test.
47 * testsuite/20_util/is_invocable/91456.cc: New test.
49 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
51 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
53 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
55 Implement C++20 p0879 - Constexpr for swap and swap related functions.
56 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
57 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
59 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
60 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
61 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
62 * include/bits/move.h (swap): Add constexpr.
63 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
64 (__gcd, __rotate, rotate, __partition, __heap_select)
65 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
66 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
67 (__introselect, __chunk_insertion_sort, next_permutation)
68 (prev_permutation, partition, partial_sort, nth_element, sort)
69 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
70 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
71 (swap_ranges): Add constexpr.
72 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
73 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
75 * include/std/type_traits (swap): Add constexpr.
76 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
77 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
78 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
79 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
80 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
81 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
82 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
83 * testsuite/25_algorithms/partition/constexpr.cc: New test.
84 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
85 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
86 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
87 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
88 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
89 * testsuite/25_algorithms/sort/constexpr.cc: New test.
90 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
91 * testsuite/25_algorithms/swap/constexpr.cc: New test.
92 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
94 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
97 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
99 * include/std/tuple (__unpack_std_tuple): New variable template and
100 partial specializations.
101 (apply, make_from_tuple): Add noexcept-specifier.
102 * testsuite/20_util/tuple/apply/2.cc: New test.
103 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
105 2019-08-09 Corentin Gay <gay@adacore.com>
107 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
108 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
109 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
110 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
111 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
112 Add call to `VERIFY`.
114 2019-08-09 Alexandre Oliva <oliva@adacore.com>
117 (normal_mv_distribution::param_type::param_type): New private
118 ctor taking a decomposed varcov matrix, for use by...
119 (operator>>): ... this, befriended.
120 * include/ext/random.tcc (operator>>): Use it.
121 (normal_mv_distribution::param_type::_M_init_lower): Adjust
122 member function name in exception message.
124 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
126 P0325R4 to_array from LFTS with updates
127 * include/experimental/array (to_array): Qualify call to __to_array.
128 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
129 * include/std/version (__cpp_lib_to_array): Likewise.
130 * testsuite/23_containers/array/creation/1.cc: New test.
131 * testsuite/23_containers/array/creation/2.cc: New test.
132 * testsuite/23_containers/array/creation/3_neg.cc: New test.
133 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
134 Use zero for dg-error line number.
136 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
138 P1651R0 bind_front should not unwrap reference_wrapper
139 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
140 * include/std/version (__cpp_lib_bind_front): Update value.
141 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
143 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
145 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
146 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
147 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
148 specializations for __float128.
149 * testsuite/26_numerics/numbers/float128.cc: New test.
151 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
153 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
156 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
158 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
159 in <algorithm> and <utility> Headers.
160 Implement C++20 p1023 - constexpr comparison operators for std::array.
161 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
162 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
163 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
164 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
165 none_of, partition_copy, partition_point, remove, remove_if,
166 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
167 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
168 count_if, equal, find, find_first_of, find_if, for_each, generate,
169 generate_n, lexicographical_compare, merge, mismatch, replace,
170 replace_if, search, search_n, set_difference, set_intersection,
171 set_symmetric_difference, set_union, transform, unique_copy):
173 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
174 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
175 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
176 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
177 Use const ref instead of ref arg;
178 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
179 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
180 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
181 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
182 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
183 __iter_comp_iter): Mark constexpr.
184 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
185 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
186 none_of, any_of, find_if_not, is_partitioned, partition_point,
187 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
188 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
189 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
190 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
191 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
192 __equal_range, equal_range, binary_search, __includes, includes,
193 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
194 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
195 is_sorted_until, __is_permutation, is_permutation, for_each, find,
196 find_if, find_first_of, adjacent_find, count, count_if, search,
197 search_n, transform, replace, replace_if, generate, generate_n,
198 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
199 set_intersection, __set_difference, set_difference,
200 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
201 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
202 wrappers around __builtin_memmove and __builtin_memcmp
204 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
205 copy, move, __copy_move_b, __copy_move_backward_a,
206 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
207 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
208 __lexicographical_compare_impl, __lexicographical_compare,
209 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
210 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
211 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
212 is_heap): Mark constexpr.
213 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
214 is_heap): Mark constexpr.
215 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
216 * include/std/array: Make comparison ops constexpr.
217 * include/std/utility: Make exchange constexpr.
218 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
219 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
220 * testsuite/23_containers/array/tuple_interface/
221 tuple_element_neg.cc: Adjust.
222 * testsuite/20_util/exchange/constexpr.cc: New.
223 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
224 * testsuite/25_algorithms/constexpr_macro.cc: New.
225 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
226 * testsuite/25_algorithms/all_of/constexpr.cc: New.
227 * testsuite/25_algorithms/any_of/constexpr.cc: New.
228 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
229 * testsuite/25_algorithms/copy/constexpr.cc: New.
230 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
231 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
232 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
233 * testsuite/25_algorithms/count/constexpr.cc: New.
234 * testsuite/25_algorithms/count_if/constexpr.cc: New.
235 * testsuite/25_algorithms/equal/constexpr.cc: New.
236 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
237 * testsuite/25_algorithms/fill/constexpr.cc: New.
238 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
239 * testsuite/25_algorithms/find/constexpr.cc: New.
240 * testsuite/25_algorithms/find_end/constexpr.cc: New.
241 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
242 * testsuite/25_algorithms/find_if/constexpr.cc: New.
243 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
244 * testsuite/25_algorithms/for_each/constexpr.cc: New.
245 * testsuite/25_algorithms/generate/constexpr.cc: New.
246 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
247 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
248 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
249 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
250 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
251 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
252 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
253 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
254 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
255 * testsuite/25_algorithms/merge/constexpr.cc: New.
256 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
257 * testsuite/25_algorithms/none_of/constexpr.cc: New.
258 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
259 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
260 * testsuite/25_algorithms/remove/constexpr.cc: New.
261 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
262 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
263 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
264 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
265 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
266 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
267 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
268 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
269 * testsuite/25_algorithms/search/constexpr.cc: New.
270 * testsuite/25_algorithms/search_n/constexpr.cc: New.
271 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
272 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
273 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
274 * testsuite/25_algorithms/set_union/constexpr.cc: New.
275 * testsuite/25_algorithms/transform/constexpr.cc: New.
276 * testsuite/25_algorithms/unique/constexpr.cc: New.
277 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
278 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
280 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
282 * include/std/memory (make_obj_using_allocator): Qualify call to
283 uses_allocator_construction_args.
285 P0631R4 Math Constants
286 * include/Makefile.am: Add new header.
287 * include/Makefile.in: Regenerate.
288 * include/precompiled/stdc++.h: Include new header.
289 * include/std/numbers: New header.
290 * include/std/version (__cpp_lib_math_constants): Define.
291 * testsuite/26_numerics/numbers/1.cc: New test.
292 * testsuite/26_numerics/numbers/2.cc: New test.
293 * testsuite/26_numerics/numbers/3.cc: New test.
294 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
296 * include/std/bit: Add Doxygen comments.
299 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
300 constraints on deleter that should only apply to the constructor.
301 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
302 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
303 constraints on deleter here.
304 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
306 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
309 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
311 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
313 * testsuite/18_support/51333.cc: New test.
315 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
317 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
318 to the Doxygen manual. Avoid a "here" link on the way.
319 Fix another broken link to Doxygen docblocks.
321 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
323 * include/std/bit (__cpp_lib_endian): Define.
324 * include/std/version (__cpp_lib_endian): Define.
325 * testsuite/26_numerics/endian/2.cc: New.
326 * testsuite/26_numerics/endian/3.cc: New.
327 * testsuite/26_numerics/endian/4.cc: New.
329 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
331 * testsuite/util/testsuite_iterators.h
332 (bidirectional_iterator_wrapper): Fix type comment.
333 (random_access_iterator_wrapper): Likewise.
335 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
337 * include/std/bit (endian): Move definition here as per P1612R1.
338 * include/std/type_traits (endian): Remove definition from here.
339 * testsuite/20_util/endian/1.cc: Rename to ...
340 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
342 2019-07-25 Martin Liska <mliska@suse.cz>
343 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
346 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
348 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
349 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
350 * testsuite/ext/new_allocator/check_new.cc: Likewise.
352 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
354 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
355 * testsuite/26_numerics/bit/bit.count/*: Here.
357 * include/std/bit (__rotl, __rotr): Change second parameter from
358 unsigned int to int and handle negative values.
359 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
360 parameter from unsigned int to int. Add nodiscard attribute.
361 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
362 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
364 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
365 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
368 * include/std/bit (__ceil2): Make unrepresentable results undefined,
369 as per P1355R2. Add debug assertion. Perform one left shift, not two,
370 so that out of range values cause undefined behaviour. Ensure that
371 shift will still be undefined if left operand is promoted.
372 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
373 unrepresentable values with checks that they are not core constant
375 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
377 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
379 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
380 sized deallocation size computation.
382 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
384 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
386 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
388 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
389 (~_Temporary_buffer()): Use latter.
390 (_Temporary_buffer(_FIterator, size_type)): Likewise.
392 2019-07-17 Andreas Schwab <schwab@suse.de>
394 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
396 2019-07-16 Jason Merrill <jason@redhat.com>
398 * include/std/memory (uses_allocator_construction_args): Add parens
401 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
403 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
405 * include/experimental/string_view (__detail::__idt): Remove.
406 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
407 Use __type_identity_t instead of __detail::__idt;
408 * include/std/string_view (__detail::__idt): Remove.
409 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
410 Use __type_identity_t instead of __detail::__idt;
411 * include/std/type_traits (__type_identity_t): New alias template.
413 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
414 and floating point atomics.
416 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
418 * doc/xml/manual/configure.xml: Improve documentation of
419 --enable-libstdcxx-time option.
421 * include/bits/atomic_base.h (__atomic_impl): New namespace for
422 wrappers around atomic built-ins.
423 (__atomic_float, __atomic_ref): New class templates for use as base
425 * include/std/atomic (atomic<float>, atomic<double>)
426 (atomic<long double>): New explicit specializations.
427 (atomic_ref): New class template.
428 (__cpp_lib_atomic_ref): Define.
429 * include/std/version (__cpp_lib_atomic_ref): Define.
430 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
431 * testsuite/29_atomics/atomic_float/1.cc: New test.
432 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
433 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
434 * testsuite/29_atomics/atomic_ref/float.cc: New test.
435 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
436 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
437 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
438 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
440 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
442 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
443 throw() with _GLIBCXX_NOTHROW.
444 (__atomic_add_dispatch): Return after performing atomic increment.
446 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
448 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
449 (__exchange_and_add): Replace static specifier with always_inline
451 (__exchange_and_add_single, __atomic_add_single): Likewise.
452 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
453 combine !__gthread_active_p() and !__GTHREADS branches.
455 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
458 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
459 * configure: Regenerate.
460 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
462 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
463 * testsuite/util/testsuite_abi.cc: Add new symbol version.
465 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
467 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
468 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
469 instead of __is_identifier to detect Clang support.
471 2019-07-02 Jim Wilson <jimw@sifive.com>
473 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
475 * configure: Regenerate.
477 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
480 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
481 for the what_arg parameters.
482 (filesystem_error::filesystem_error): Pass system_error::what() to
483 the _Impl constructor.
484 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
485 filesystem_error::what() contains system_error::what().
487 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
489 * include/std/charconv (chars_format): Define bitmask type.
490 * testsuite/20_util/to_chars/chars_format.cc: New test.
492 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
493 * include/std/bit (_If_is_unsigned_integer_type): Remove.
494 (_If_is_unsigned_integer): Use __is_unsigned_integer.
495 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
496 (countl_one(byte), countr_zero(byte), countr_one(byte))
497 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
498 (log2p1(byte)): Remove.
499 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
500 (__detail::__is_int_to_chars_type): Remove.
501 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
502 and __is_unsigned_integer.
503 * include/std/type_traits (__is_one_of): Move here from <charconv>.
504 (__is_signed_integer, __is_unsigned_integer): New helpers.
505 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
507 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
508 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
509 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
510 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
511 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
512 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
513 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
514 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
515 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
516 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
518 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
520 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
523 2019-06-25 Jakub Jelinek <jakub@redhat.com>
525 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
526 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
527 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
528 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
530 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
532 * include/std/numeric (midpoint(T, T)): Change implementation for
533 floating-point types to avoid incorrect rounding of denormals.
534 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
535 rounding with denormals.
536 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
537 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
539 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
541 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
543 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
545 * configure: Regenerate.
547 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
548 Qualify calls to __never_valueless.
550 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
553 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
554 vector<bool> for test.
555 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
557 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
559 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
561 (istream_iterator::_M_read()): Do not check stream state before
562 attempting extraction. Set stream pointer to null when extraction
564 (operator==(const istream_iterator&, const istream_iterator&)): Change
565 to be a hidden friend of istream_iterator.
566 (operator!=(const istream_iterator&, const istream_iterator&)):
568 (ostream_iterator::ostream_iterator()): Add default constructor.
569 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
571 * testsuite/24_iterators/istream_iterator/1.cc: New test.
572 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
573 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
574 constructor taking a string.
575 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
578 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
579 Jonathan Wakely <jwakely@redhat.com>
582 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
583 values of type bool for vector<bool> elements.
584 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
585 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
587 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
589 PR libstdc++/90920 partially revert r263433
590 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
591 (rotate): Remove checks.
592 * testsuite/25_algorithms/rotate/90920.cc: New test.
594 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
595 category used in invocable check.
596 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
597 * testsuite/26_numerics/reduce/2.cc: New test.
599 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
601 * include/bits/algorithmfwd.h: Change title of doc group.
602 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
604 * include/bits/stl_numeric.h: Define doc group and add algos to it.
605 * include/std/numeric (__is_random_access_iter): New internal trait.
606 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
607 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
608 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
609 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
610 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
611 * testsuite/26_numerics/reduce/1.cc: New test.
612 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
613 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
614 * testsuite/26_numerics/transform_reduce/1.cc: New test.
615 * testsuite/util/testsuite_iterators.h (test_container::size()): New
618 * include/c_global/cstddef (std::byte): Perform arithmetic operations
619 in unsigned int to avoid promotion (LWG 2950).
621 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
623 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
626 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
628 PR libstdc++/90281 Fix string conversions for filesystem::path
629 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
630 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
631 __str_codecvt_in_all to fail for partial conversions and throw on
633 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
634 (path::_Cvt<char8_t>): Add explicit specialization.
635 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
637 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
638 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
639 instead of codecvt_utf8. Use __str_codecvt_in_all and
640 __str_codecvt_out_all.
641 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
642 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
643 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
644 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
645 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
646 after converting to UTF-8.
647 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
648 __str_codecvt_in_all.
649 (path::string): Fix initialization of string types with different
651 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
652 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
653 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
655 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
656 return false for partial conversions.
657 * include/experimental/bits/fs_path.h (u8path):
658 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
659 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
660 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
661 instead of codecvt_utf8. Use __str_codecvt_in_all and
662 __str_codecvt_out_all.
663 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
664 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
665 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
666 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
667 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
668 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
669 __str_codecvt_in_all.
670 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
671 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
672 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
673 __str_codecvt_in_all.
674 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
675 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
676 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
677 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
678 strings and with Unicode characters outside the basic multilingual
680 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
681 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
682 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
683 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
684 * testsuite/experimental/filesystem/path/native/string.cc: Test with
685 empty strings and with Unicode characters outside the basic
688 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
689 Jonathan Wakely <jwakely@redhat.com>
691 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
692 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
693 deallocate node if insertion fails.
694 (_Hashtable::_M_insert_multi_node): Likewise.
695 (_Hashtable::_M_reinsert_node): Pass additional key argument.
696 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
697 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
698 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
699 (_Hashtable::extract(const _Key&)): Likewise.
700 (_Hashtable::_M_merge_unique): Pass additional key argument.
701 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
703 (_Hashtable::_M_insert): Likewise.
704 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
705 (_Hashtable_alloc): Add comments to functions with misleading names.
707 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
709 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
711 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
712 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
713 header for std::allocator.
714 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
715 using-declaration for std::size_t.
716 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
718 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
720 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
721 * testsuite/experimental/map/erasure.cc: Include <string> for
723 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
725 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
727 * include/experimental/type_traits (experimental::nonesuch): Use
728 pragma to disable -Wctor-dtor-privacy warnings.
729 * include/std/type_traits (__is_convertible_helper<From, To, false>)
730 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
732 * include/std/version (__cpp_lib_bind_front): Add missing macro.
734 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
736 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
737 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
738 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
739 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
741 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
742 (variant::emplace): Change static_assert messages from "should be"
744 (hash<monostate>::operator()): Remove name of unused parameter.
746 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
749 * include/Makefile.am: Add new <bits/charconv.h> header.
750 * include/Makefile.in: Regenerate.
751 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
752 (to_string(long), to_string(unsigned long), to_string(long long))
753 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
754 * include/bits/charconv.h: New header.
755 (__detail::__to_chars_len): Move here from <charconv>.
756 (__detail::__to_chars_10_impl): New function extracted from
757 __detail::__to_chars_10.
758 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
759 (__to_chars_unsigned_type): New class template that reuses
760 __make_unsigned_selector_base::__select to pick a type.
761 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
762 (__detail::__to_chars_len): Move to new header.
763 (__detail::__to_chars_10): Add inline specifier. Move code doing the
764 output to __detail::__to_chars_10_impl and call that.
765 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
766 * testsuite/21_strings/basic_string/numeric_conversions/char/
767 to_string.cc: Fix reference in comment. Remove unused variable.
768 * testsuite/21_strings/basic_string/numeric_conversions/char/
769 to_string_int.cc: New test.
771 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
773 Fix ConstexprIterator requirements tests - No constexpr algorithms!
774 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
775 Replace copy with hand-rolled loop.
776 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
779 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
781 Test for C++20 p0858 - ConstexprIterator requirements.
782 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
784 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
787 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
789 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
791 * include/bits/c++config: Rename all macros of the form __PSTL* to
793 * include/std/algorithm: Likewise.
794 * include/std/execution: Likewise.
795 * include/std/numeric: Likewise.
796 * include/std/memory: Likewise.
797 * include/pstl/glue_memory_impl.h: Likewise.
798 * include/pstl/numeric_impl.h: Likewise.
799 * include/pstl/glue_memory_defs.h: Likewise.
800 * include/pstl/execution_defs.h: Likewise.
801 * include/pstl/utils.h: Likewise.
802 * include/pstl/algorithm_fwd.h: Likewise.
803 * include/pstl/unseq_backend_simd.h: Likewise.
804 * include/pstl/glue_execution_defs.h: Likewise.
805 * include/pstl/algorithm_impl.h: Likewise.
806 * include/pstl/parallel_impl.h: Likewise.
807 * include/pstl/memory_impl.h: Likewise.
808 * include/pstl/glue_numeric_defs.h: Likewise.
809 * include/pstl/parallel_backend_utils.h: Likewise.
810 * include/pstl/glue_algorithm_defs.h: Likewise.
811 * include/pstl/parallel_backend.h: Likewise.
812 * include/pstl/glue_numeric_impl.h: Likewise.
813 * include/pstl/parallel_backend_tbb.h: Likewise.
814 * include/pstl/numeric_fwd.h: Likewise.
815 * include/pstl/glue_algorithm_impl.h: Likewise.
816 * include/pstl/execution_impl.h: Likewise.
817 * include/pstl/pstl_config.h: Likewise.
818 * testsuite/util/pstl/pstl_test_config.h: Likewise.
819 * testsuite/util/pstl/test_utils.h: Likewise.
820 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
822 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
824 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
826 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
827 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
828 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
829 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
830 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
832 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
833 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
834 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
835 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
836 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
838 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
839 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
840 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
841 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
842 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
844 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
845 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
846 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
848 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
850 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
851 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
852 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
854 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
856 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
858 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
860 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
862 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
864 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
866 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
868 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
870 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
872 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
874 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
876 Rename header guards to be consistent with upstream project's
878 * include/pstl/glue_memory_impl.h: Rename all macros of the form
879 _PSTL_(.*)_H to _PSTL_\U\1_H.
880 * include/pstl/numeric_impl.h: Likewise.
881 * include/pstl/glue_memory_defs.h: Likewise.
882 * include/pstl/execution_defs.h: Likewise.
883 * include/pstl/utils.h: Likewise.
884 * include/pstl/algorithm_fwd.h: Likewise.
885 * include/pstl/unseq_backend_simd.h: Likewise.
886 * include/pstl/glue_execution_defs.h: Likewise.
887 * include/pstl/algorithm_impl.h: Likewise.
888 * include/pstl/parallel_impl.h: Likewise.
889 * include/pstl/memory_impl.h: Likewise.
890 * include/pstl/glue_numeric_defs.h: Likewise.
891 * include/pstl/parallel_backend_utils.h: Likewise.
892 * include/pstl/glue_algorithm_defs.h: Likewise.
893 * include/pstl/parallel_backend.h: Likewise.
894 * include/pstl/glue_numeric_impl.h: Likewise.
895 * include/pstl/parallel_backend_tbb.h: Likewise.
896 * include/pstl/numeric_fwd.h: Likewise.
897 * include/pstl/glue_algorithm_impl.h: Likewise.
898 * include/pstl/execution_impl.h: Likewise.
899 * include/pstl/pstl_config.h: Likewise.
900 * testsuite/util/pstl/pstl_test_config.h: Likewise.
902 Synchronize libstdc++ parallel algorithms with upstream
904 * include/pstl/algorithm_fwd.h: Synchronize with
905 upstream PSTL project.
906 * include/pstl/algorithm_impl.h: Likewise.
907 * include/pstl/execution_defs.h: Likewise.
908 * include/pstl/execution_impl.h: Likewise.
909 * include/pstl/glue_algorithm_impl.h: Likewise.
910 * include/pstl/glue_execution_defs.h: Likewise.
911 * include/pstl/numeric_fwd.h: Likewise.
912 * include/pstl/numeric_impl.h: Likewise.
913 * include/pstl/parallel_backend.h: Likewise.
914 * include/pstl/pstl_config.h: Likewise.
915 * include/pstl/unseq_backend_simd.h: Likewise.
916 * include/pstl/parallel_backend_serial.h: New file.
917 * include/Makefile.am (pstl_headers): Add
918 parallel_backend_serial.h.
919 * include/Makefile.in: Regenerate.
921 Clean up non-conforming names
922 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
923 Uglfiy copy_range1 and copy_range2
924 (__pattern_walk2_n): Rename local n to __n
925 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
926 Rename parameter _T to _Tp.
928 Integrate non-TBB serial backend support
929 * include/bits/c++config: Adjust TBB detection logic to select serial
930 PSTL backend if no TBB present.
931 * testsuite/utils/pstl/test_utils.h: Remove check for
932 _PSTL_USE_PAR_POLICIES
934 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
936 * testsuite/24_iterators/container_access.cc: Move dg-options before
937 dg-do directive so the target check uses the -std option.
940 * configure: Regenerate.
941 * src/Makefile.am (stamp-debug): Also test for missing makefile.
942 * src/Makefile.in: Regenerate.
944 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
946 * include/std/array: Do not include <stdexcept>.
947 * include/std/optional: Include <exception> and
948 <bits/exception_defines.h> instead of <stdexcept>.
949 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
951 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
953 * testsuite/23_containers/map/erasure.cc: Include <string>.
954 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
956 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
957 dg-prune-output for different C++98 diagnostic.
958 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
960 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
962 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
964 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
966 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
968 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
970 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
972 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
974 * testsuite/23_containers/vector/requirements/dr438/
975 constructor_1_neg.cc: Likewise.
976 * testsuite/23_containers/vector/requirements/dr438/
977 constructor_2_neg.cc: Likewise.
978 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
980 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
982 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
983 Do not test allocator rebinding extension for C++2a.
984 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
985 dg-do directive for C++17 and C++2a.
987 * testsuite/23_containers/deque/requirements/explicit_instantiation/
988 1_c++0x.cc: Remove redundant test.
989 * testsuite/23_containers/deque/requirements/explicit_instantiation/
990 2.cc: Use target selector instead of preprocessor condition.
991 * testsuite/23_containers/deque/requirements/explicit_instantiation/
992 3.cc: Do not run test for C++2a.
993 * testsuite/23_containers/forward_list/requirements/
994 explicit_instantiation/3.cc: Likewise.
995 * testsuite/23_containers/forward_list/requirements/
996 explicit_instantiation/5.cc: Do not test allocator rebinding extension
998 * testsuite/23_containers/list/requirements/explicit_instantiation/
999 1_c++0x.cc: Remove redundant test.
1000 * testsuite/23_containers/list/requirements/explicit_instantiation/
1001 2.cc: Use target selector instead of preprocessor condition.
1002 * testsuite/23_containers/list/requirements/explicit_instantiation/
1003 3.cc: Do not run test for C++2a.
1004 * testsuite/23_containers/list/requirements/explicit_instantiation/
1005 5.cc: Do not test allocator rebinding extension for C++2a.
1006 * testsuite/23_containers/map/requirements/explicit_instantiation/
1007 1_c++0x.cc: Remove redundant test.
1008 * testsuite/23_containers/map/requirements/explicit_instantiation/
1009 2.cc: Adjust comment.
1010 * testsuite/23_containers/map/requirements/explicit_instantiation/
1011 3.cc: Do not run test for C++2a.
1012 * testsuite/23_containers/map/requirements/explicit_instantiation/
1013 5.cc: Do not test allocator rebinding extension for C++2a.
1014 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1015 1_c++0x.cc: Remove redundant test.
1016 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1017 3.cc: Do not run test for C++2a.
1018 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1019 5.cc: Do not test allocator rebinding extension for C++2a.
1020 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1021 3.cc: Do not run test for C++2a.
1022 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1023 5.cc: Do not test allocator rebinding extension for C++2a.
1024 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1025 Do not run test for C++2a.
1026 * testsuite/23_containers/set/requirements/explicit_instantiation/
1027 1_c++0x.cc: Remove redundant test.
1028 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1029 Do not test allocator rebinding extension for C++2a.
1030 * testsuite/23_containers/unordered_map/requirements/
1031 explicit_instantiation/3.cc: Likewise.
1032 * testsuite/23_containers/unordered_map/requirements/
1033 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1035 * testsuite/23_containers/unordered_multimap/requirements/
1036 explicit_instantiation/3.cc: Do not run test for C++2a.
1037 * testsuite/23_containers/unordered_multimap/requirements/
1038 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1040 * testsuite/23_containers/unordered_multiset/requirements/
1041 explicit_instantiation/3.cc: Do not run test for C++2a.
1042 * testsuite/23_containers/unordered_multiset/requirements/
1043 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1045 * testsuite/23_containers/unordered_set/requirements/
1046 explicit_instantiation/3.cc: Do not run test for C++2a.
1047 * testsuite/23_containers/unordered_set/requirements/
1048 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1050 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1051 2.cc: Remove redundant test.
1052 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1053 3.cc: Do not run test for C++2a.
1054 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1057 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1058 (is_abstract, is_aggregate): Remove static_assert.
1059 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1061 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1062 missing -std=gnu++17 option.
1063 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1064 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1065 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1068 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1069 * testsuite/18_support/set_unexpected.cc: Likewise.
1070 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1072 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1073 function to be valid in C++11.
1074 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1075 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1076 include Library Fundamentals or Networking headers in C++11 mode.
1077 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1079 * include/std/tuple (_TC): Replace with _TupleConstraints.
1080 (_TupleConstraints): New helper for SFINAE constraints, with more
1081 expressive member functions to reduce duplication when used.
1082 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1083 (tuple::_TCC): Replace dummy type parameter with bool non-type
1084 parameter that can be used to check the pack size.
1085 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1086 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1087 checking constraints in constructors.
1088 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1090 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1091 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1092 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1093 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1094 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1095 constraints in constructors.
1096 (tuple::__is_alloc_arg()): New SFINAE helpers.
1097 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1099 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1100 * testsuite/20_util/tuple/cons/90700.cc: New test.
1101 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1102 to meet new constraint on allocator-extended default constructor.
1104 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1106 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1107 * include/bits/stl_multimap.h (multimap): Likewise.
1109 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1111 Rename variables and cleanup comments.
1112 * include/bits/hashtable_policy.h
1113 * include/bits/hashtable.h
1115 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1117 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1118 Fix bgcolor for P0340R3.
1119 * doc/html/*: Regenerate.
1122 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1123 <experimental/memory_resource>.
1124 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1125 P0339R6, P0340R3, P1164R1 and P1357R1.
1126 * doc/html/*: Regenerate.
1128 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1129 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1130 allocator::value_type assertion for C++2a.
1131 * include/bits/hashtable.h: Likewise.
1132 * include/bits/stl_deque.h: Likewise.
1133 * include/bits/stl_list.h: Likewise.
1134 * include/bits/stl_map.h: Likewise.
1135 * include/bits/stl_multimap.h: Likewise.
1136 * include/bits/stl_multiset.h: Likewise.
1137 * include/bits/stl_set.h: Likewise.
1138 * include/bits/stl_vector.h: Likewise.
1139 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1140 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1141 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1142 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1143 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1144 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1145 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1146 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1147 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1148 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1149 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1150 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1152 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1154 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1156 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1158 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1160 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1162 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1164 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1166 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1169 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1170 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1171 * libsupc++/eh_term_handler.h: New header defining
1172 _GLIBCXX_DEFAULT_TERM_HANDLER.
1173 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1174 (set_terminate): Restore default handler when argument is null.
1175 (set_unexpected): Likewise.
1176 * testsuite/18_support/set_terminate.cc: New test.
1177 * testsuite/18_support/set_unexpected.cc: New test.
1179 * include/backward/hashtable.h (size_t, ptrdiff_t)
1180 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1181 (distance, vector, pair, __iterator_category): Remove
1182 using-declarations that add these names to namespace __gnu_cxx.
1183 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1184 * include/ext/debug_allocator.h (size_t): Likewise.
1185 * include/ext/functional (size_t, unary_function, binary_function)
1186 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1188 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1189 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1190 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1191 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1192 * include/ext/numeric (iota): Fix outdated comment.
1193 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1194 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1195 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1196 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1197 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1199 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1200 (allocator, __true_type, __false_type): Likewise.
1202 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1205 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1206 New helpers for checking preconditions in traits.
1207 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1208 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1209 (is_destructible, is_nothrow_destructible, is_constructible)
1210 (is_default_constructible, is_copy_constructible)
1211 (is_move_constructible, is_nothrow_default_constructible)
1212 (is_nothrow_constructible, is_nothrow_copy_constructible)
1213 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1214 (is_nothrow_assignable, is_nothrow_copy_assignable)
1215 (is_nothrow_move_assignable, is_trivially_constructible)
1216 (is_trivially_copy_constructible, is_trivially_move_constructible)
1217 is_trivially_assignable, is_trivially_copy_assignable)
1218 (is_trivially_move_assignable, is_trivially_destructible)
1219 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1220 (is_invocable_r, is_nothrow_invocable)
1221 (has_unique_object_representations, is_aggregate): Add static_asserts
1222 to make sure that type traits are not misused with incomplete types.
1223 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1224 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1225 base characteristics without assertions that can be reused in other
1227 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1228 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1230 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1231 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1232 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1233 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1234 * testsuite/20_util/is_function/value.cc: Likewise.
1235 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1236 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1238 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1239 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1240 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1241 * testsuite/20_util/is_union/value.cc: Likewise.
1242 * testsuite/20_util/is_void/value.cc: Likewise.
1243 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1245 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1247 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1248 Add new private member function.
1249 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1250 (random_device::_M_init_pretr1(const string&)): Call new private
1251 member with string data.
1252 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1254 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1255 test using COW strings.
1256 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1257 a value from the device.
1258 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1259 Fix typo in token string.
1261 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1263 LWG2788 basic_string spurious use of a default constructible allocator
1264 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1265 (basic_string::_M_replace_dispatch): Construct temporary string with
1266 the current allocator.
1267 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1268 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1270 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1272 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1274 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1275 section about new/delete overloads. Improve section on verbose
1277 * doc/html/*: Regenerate.
1279 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1280 P0811R3. Change status of P1353R0.
1281 * doc/html/*: Regenerate.
1283 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1284 documentation of implementation-defined types for [thread.req.native].
1285 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1286 implementation-defined strings for [variant.bad.access]. Fix typo in
1287 documentation of implementation-defined support for [fs.conform.9945].
1288 * doc/html/*: Regenerate.
1290 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1293 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1294 that fails on mingw-w64.
1297 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1298 (status(const path&, error_code&)): Use parent_path() to remove
1300 (symlink_status(const path&, error_code&)): Duplicate workaround for
1301 bug in _wstat for paths with trailing slash.
1302 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1303 with trailing slash.
1304 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1305 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1307 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1308 once instead of building it iteratively.
1310 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1312 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1313 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1314 the assembler supports rdseed.
1315 * config.h.in: Regenerate.
1316 * configure: Regenerate.
1317 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1318 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1319 * doc/html/*: Regenerate.
1320 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1321 * include/bits/random.h (random_device::random_device()): Always call
1322 _M_init rather than _M_init_pretr1.
1323 (random_device::random_device(const string&)): Likewise.
1324 (random_device::operator()()): Always call _M_getval().
1325 (random_device::_M_file): Replace first member of union with an
1326 anonymous struct, with _M_file as its first member.
1327 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1328 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1329 (USE_MT19937): Define if none of the above are defined.
1330 (USE_POSIX_FILE_IO): Define.
1331 (_M_strtoul): Remove.
1332 [USE_RDSEED] (__x86_rdseed): Define new function.
1333 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1334 (random_device::_M_init(const string&)): Initialize new union members.
1335 Add support for "rdseed" and "rand_s" tokens. Decide what the
1336 "default" token does according to which USE_* macros are defined.
1337 [USE_POSIX_FILE_IO]: Store a file descriptor.
1338 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1339 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1340 code from _M_strtoul.
1341 [!USE_MT19937]: Call _M_init, transforming the old default token or
1342 numeric tokens to "default".
1343 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1344 (random_device::_M_getval()): Use new union members to obtain a
1345 random number from the stored function pointer or file descriptor.
1346 [USE_MT19937]: Obtain a value from the mt19937 engine.
1347 (random_device::_M_getval_pretr1()): Call _M_getval().
1348 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1350 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1351 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1353 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1356 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1357 _M_split_cmpts() for a path with multiple components.
1358 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1359 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1360 components and reserve space in vector. Return early when there is
1362 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1363 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1365 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1366 form of std::equals for C++11 compatibility.
1368 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1370 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1371 C++ standard at ansi.org.
1373 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1375 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1376 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1379 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1380 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1382 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1384 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1386 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1387 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1388 "compile" test to "run".
1390 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1391 * doc/html/*: Regenerate.
1392 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1393 rvalue aliasing constructor.
1394 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1395 (reinterpret_pointer_cast): Add overloads taking rvalues.
1396 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1397 Add rvalue aliasing constructor.
1398 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1399 "run" and check return values as well as types.
1400 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1401 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1402 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1403 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1406 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1407 * doc/xml/manual/intro.xml: Likewise.
1408 * include/std/future (__create_task_state): Add default arguments
1409 to make providing an allocator optional.
1410 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1411 instead of delegating to another constructor.
1412 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1413 define allocator-extended constructors for C++17 and later.
1414 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1416 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1417 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1418 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1420 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1422 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1423 Don't run the libstdc++/83237 part on simulator targets.
1425 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1427 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1429 * doc/html/*: Regenerate.
1431 * include/experimental/any (__any_caster): Use RTTI if comparing
1432 addresses fails, to support non-unique addresses in shared libraries.
1433 * include/std/any (__any_caster): Likewise.
1436 * include/experimental/any (__any_caster): Constrain to only be
1437 callable for object types. Use remove_cv_t instead of decay_t.
1438 If the type decays or isn't copy constructible, compare the manager
1439 function to a dummy specialization.
1440 (__any_caster): Add overload constrained for non-object types.
1441 (any::_Manager_internal<_Op>): Add dummy specialization.
1442 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1445 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1448 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1449 reversed arguments to uninitialized_copy_n.
1450 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1451 is unchanged by copy assignment.
1452 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1453 compare path components.
1456 * include/experimental/memory_resource: Add system header pragma and
1457 do not define anything unless compiled as C++14 or later.
1458 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1459 (__resource_adaptor_imp::do_allocate): If the requested alignment
1460 is a fundamental alignment then either allocate directly from _M_alloc
1461 or call the new _M_allocate function.
1462 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1463 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1464 of the allocator rebound to a POD type with the specified alignment.
1465 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1466 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1467 Adjust expected allocation sizes.
1468 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1469 xfail for Solaris x86.
1471 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1473 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1474 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1475 Use std::__remove_cvref_t when building with GCC.
1477 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1480 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1481 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1482 Use check_v3_target_prop_cached to cache the result of the test.
1484 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1486 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1489 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1490 Changed v3_target_compile check from preprocess to executable.
1491 Added "-ltbb" to v3_target_compile flags.
1493 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1495 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1496 Add check for Thread Building Blocks 2018 or later.
1498 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1500 * testsuite/experimental/names.cc: Only include Networking TS headers
1501 on targets with the necessary Gthreads support.
1503 2019-05-20 Marek Polacek <polacek@redhat.com>
1505 CWG 2094 - volatile scalars are trivially copyable.
1507 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1508 result for volatile int.
1510 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1512 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1513 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1516 PR c++/90532 Ensure __is_constructible(T[]) is false
1517 * include/std/type_traits (__do_is_default_constructible_impl)
1518 (__is_default_constructible_atom, __is_default_constructible_safe):
1520 (is_default_constructible): Use is_constructible.
1521 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1522 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1523 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1524 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1527 2019-05-20 Pádraig Brady <pbrady@fb.com>
1529 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1530 to the deallocator with -fsized-deallocation.
1532 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1534 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1535 test by passing correct alignment to deallocate function.
1537 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1540 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1541 Raise exception if unique_ptr tuple member has unknown structure.
1542 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1543 Adjust worker to support new __uniq_ptr_data base class. Do not
1544 assume field called _M_head_impl is the first tuple element.
1546 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1548 * include/bits/stl_deque.h
1549 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1550 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1551 (_Deque_base::_Deque_impl_data): New.
1552 (_Deque_base::_Deque_impl): Inherit latter.
1553 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1554 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1555 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1556 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1557 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1558 (deque<>::deque()): Default.
1559 (deque<>::deque(deque&&)): Default.
1560 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1561 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1562 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1563 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1564 _M_range_initialize.
1565 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1566 (deque<>::resize(size_type, const value_type&)): Share a single
1568 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1569 _M_range_insert_aux.
1570 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1571 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1572 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1573 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1575 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1578 * include/std/variant (holds_alternative, get, get_if): Improve
1579 static assertion messages.
1580 (bad_variant_access::bad_variant_access()): Change default message.
1581 (__throw_bad_variant_access(bool)): New overload.
1582 (get): Use new overload.
1583 (visit, visit<R>): Improve exception message.
1585 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1586 targets. Add more cases from P0608R3.
1587 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1589 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1590 * include/experimental/type_traits (is_detected_exact)
1591 (is_detected_exact_v): Likewise.
1592 * include/pstl/execution_defs.h (is_execution_policy)
1593 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1594 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1595 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1596 * testsuite/experimental/names.cc: New test.
1599 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1600 assertions from the destructor.
1601 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1602 Move static_assert for hash function to here.
1603 (_Hash_table_base::_M_equals): Move static_assert for equality
1605 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1607 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1608 the value directly instead of calling _S_value.
1609 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1610 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1611 _S_key(_Const_Link_type).
1612 * testsuite/23_containers/set/85965.cc: Check construction,
1613 destruction, assignment and size() do not trigger the assertions.
1614 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1615 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1617 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1618 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1619 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1620 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1621 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1622 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1623 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1625 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1626 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1629 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1631 * doc/html/*: Regenerate.
1632 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1633 of decay_t (P0777R1).
1635 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1637 Move from state of allocators (LWG2593)
1638 * include/bits/stl_deque.h
1639 (_Deque_base(_Deque_base&&, false_type)): Remove.
1640 (_Deque_base(_Deque_base&&, true_type)): Remove.
1641 (_Deque_base(_Deque_base&&)): Adapt.
1642 (_Deque_base::_M_move_impl()): Remove.
1643 * testsuite/util/testsuite_allocator.h
1644 (propagating_allocator(propagating_allocator&&)): Preserve move from
1646 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1648 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1650 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1651 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1652 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1654 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1656 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1657 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1659 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1661 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1663 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1665 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1667 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1669 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1671 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1674 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1676 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1677 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1679 * include/std/variant (__overload_set): Remove.
1681 (_Build_FUN): New class template to define a single FUN overload,
1682 with specializations to prevent unwanted conversions, as per P0608R3.
1683 (_Build_FUNs): New class template to build an overload set of FUN.
1684 (_FUN_type): New alias template to perform overload resolution.
1685 (__accepted_type): Use integer_constant base for failure case. Use
1686 _FUN_type for successful case.
1687 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1688 (variant::variant(_Tp&&)): Likewise.
1689 (variant::operator=(_Tp&&)): Likewise.
1691 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1692 Replace raw visitation with a runtime check for the valueless state
1693 and a non-raw visitor.
1694 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1695 (variant::index()): Remove branch.
1696 (variant::swap(variant&)): Use valueless_by_exception() instead of
1697 comparing the index to variant_npos, and add likelihood attribute.
1699 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1700 (_Hashtable_base::_Equal_hash_code): Define new class template.
1701 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1704 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1705 Replace with _M_get non-static member function.
1706 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1708 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1709 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1711 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1712 _S_get accessors for members in EBO helpers.
1713 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1714 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1716 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1718 (_Hashtable_base::_M_eq()): Remove non-const overload.
1720 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1722 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1724 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1726 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1729 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1731 * config/os/solaris/solaris2.10: Move to ...
1732 * config/os/solaris: ... this.
1733 * configure.host (os_include_dir): Adapt.
1734 (abi_baseline_pair): Remove Solaris 10 handling.
1735 * config/abi/post/i386-solaris2.10: Remove.
1736 * config/abi/post/sparc-solaris2.10: Remove.
1737 * config/abi/post/i386-solaris2.11: Rename to ...
1738 * config/abi/post/i386-solaris: ... this.
1739 * config/abi/post/sparc-solaris2.11: Rename to ...
1740 * config/abi/post/sparc-solaris: ... this.
1742 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1745 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1748 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1750 * include/std/variant (__visit_with_index): Remove typedef.
1751 (__deduce_visit_result): New tag type.
1752 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1753 visitation of possibly-valueless variants, forwarding to __do_visit
1754 with the relevant tag type.
1755 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1756 and make lambda return void.
1757 (__variant_construct): Likewise.
1758 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1759 __raw_idx_visit and make lambda return void.
1760 (_Multi_array::__untag_result): Add metafunction to check the function
1761 pointer type for a tag type that dictates the kind of visitation.
1762 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1763 Use decltype(auto) instead of tagged function pointer type.
1764 (__gen_vtable_impl): Remove bool non-type parameter and unused
1765 _Variant_tuple parameter.
1766 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1767 (__gen_vtable_impl::__do_visit_invoke): Remove.
1768 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1769 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1770 for the visit<R> case, rather than dispatching to separate functions.
1771 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1773 (variant::swap): Likewise.
1774 (__do_visit): Replace two non-type template parameters with a single
1775 type parameter, so that the caller must specify the visitor's return
1776 type (or one of the tag types).
1777 (visit): Deduce a return type from the visitor and use the
1778 __deduce_visit_result tag to enforce that all overloads return the
1780 (visit<R>): Call __do_visit<R> with explicit result type.
1781 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1784 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1786 nonesuch is insufficiently useless (lwg2996)
1787 * include/std/type_traits (struct __nonesuch): Added private base
1788 class to make __nonesuch not an aggregate and removed deleted default
1790 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1791 (operator=(const pair&)): Use __nonesuch instead of
1792 __nonesuch_no_braces.
1793 (operator=(pair&&)): Likewise
1794 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1795 of __nonesuch_no_braces.
1796 (operator=(tuple&&)): Likewise
1797 * include/experimental/type_traits (struct nonesuch): Added private
1798 base class to make nonesuch not an aggregate and removed deleted
1799 default constructor.
1800 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1801 * testsuite/experimental/type_traits/nonesuch.cc: New.
1803 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1805 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1806 (_Function_handler): Remove partial specializations for void return
1807 types and pointers to member.
1808 (_Function_handler::_M_manager): Adapt to removal of
1809 _Simple_type_wrapper.
1810 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1811 * include/std/functional (_Bind_result::__enable_if_void)
1812 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1813 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1815 * include/std/future (__future_base::_Task_state::_M_run)
1816 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1817 change return type of lambda expressions.
1819 * include/bits/invoke.h (__invoke_r): Define new function implementing
1820 the INVOKE<R> pseudo-function.
1821 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1822 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1824 * include/std/type_traits (__is_nt_convertible_helper): Define it
1825 unconditionally, not only for C++20.
1826 (__is_nothrow_convertible): Define internal trait for use in C++11.
1827 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1828 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1829 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1830 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1831 that has nothrow explicit conversion but potentially-throwing implicit
1833 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1834 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1835 function to only consider implicit conversions.
1836 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1838 * include/std/iterator: Include <iosfwd> instead of <istream> and
1841 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1842 Remove unused, non-standard function.
1844 * include/bits/regex.h (match_results::max_size()): Adjust return
1845 value to account for prefix/suffix/unmatched subs.
1846 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1847 reset the contained sub matches.
1848 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1849 function to set result state following a failed match.
1850 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1851 sub_match states after _M_resize. Use _M_establish_failed_match.
1854 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1855 Replace single _Callable parameter with variadic _Args pack, to
1856 forward them directly to the tuple of decayed copies.
1857 * testsuite/30_threads/thread/cons/69724.cc: New test.
1859 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1861 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1862 * include/bits/basic_string.h: (operator=(const basic_string&):
1863 Move allocator decision to assign.
1864 (assign(const basic_string&)): Move allocator decision here.
1865 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1867 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1870 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1872 * testsuite/util/testsuite_allocator.h (memory_resource)
1873 (default_resource_mgr): Fix indentation.
1875 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1876 Use operator-> to access raw pointer member.
1877 * testsuite/23_containers/vector/59829.cc: Likewise.
1878 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1879 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1880 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1882 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1883 its constructors and equality operators. Change converting
1884 constructors to use operator-> to access private member of the other
1886 (PointerBase_void::operator->()): Add, for access to private member.
1887 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1888 (operator==(PointerBase, PointerBase)): Remove.
1889 (operator!=(PointerBase, PointerBase)): Remove.
1891 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1892 not assume field called _M_head_impl is the first tuple element.
1893 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1894 implementation more accurate.
1895 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1896 empty pointer type and non-empty deleter.
1898 LWG 2899 - Make is_move_constructible correct for unique_ptr
1899 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1900 move assignment operator.
1901 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1902 (__uniq_ptr_data): New class template with conditionally deleted
1904 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1905 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1906 constructor and move assignment operator as defaulted.
1907 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1908 __uniq_ptr_impl::release().
1909 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1910 to __uniq_ptr_impl::reset(pointer).
1911 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1912 Check for new __uniq_ptr_data type.
1913 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1915 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1917 PR libstdc++/90454.cc path construction from void*
1918 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1919 pointers to void are rejected as well as void.
1920 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1921 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1923 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1925 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1926 <remark> elements. Fix formatting of bibliography references.
1928 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1930 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1932 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1934 Remove Profile Mode, deprecated since 7.1.0
1935 * doc/Makefile.am: Remove XML file for profile mode docs.
1936 * doc/Makefile.in: Regenerate.
1937 * doc/xml/authors.xml: Remove authors of profile mode docs.
1938 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1940 * doc/xml/manual/debug.xml: Likewise.
1941 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1942 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1943 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1944 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1946 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1948 * doc/html/*: Regenerate.
1949 * include/Makefile.am: Remove profile mode headers.
1950 * include/Makefile.in: Regenerate.
1951 * include/bits/c++config (std::__profile): Remove namespace.
1952 [_GLIBCXX_PROFILE]: Remove checks for macro.
1953 * include/profile/array: Remove.
1954 * include/profile/base.h: Remove.
1955 * include/profile/bitset: Remove.
1956 * include/profile/deque: Remove.
1957 * include/profile/forward_list: Remove.
1958 * include/profile/impl/profiler.h: Remove.
1959 * include/profile/impl/profiler_algos.h: Remove.
1960 * include/profile/impl/profiler_container_size.h: Remove.
1961 * include/profile/impl/profiler_hash_func.h: Remove.
1962 * include/profile/impl/profiler_hashtable_size.h: Remove.
1963 * include/profile/impl/profiler_list_to_slist.h: Remove.
1964 * include/profile/impl/profiler_list_to_vector.h: Remove.
1965 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1966 * include/profile/impl/profiler_node.h: Remove.
1967 * include/profile/impl/profiler_state.h: Remove.
1968 * include/profile/impl/profiler_trace.h: Remove.
1969 * include/profile/impl/profiler_vector_size.h: Remove.
1970 * include/profile/impl/profiler_vector_to_list.h: Remove.
1971 * include/profile/iterator_tracker.h: Remove.
1972 * include/profile/list: Remove.
1973 * include/profile/map: Remove.
1974 * include/profile/map.h: Remove.
1975 * include/profile/multimap.h: Remove.
1976 * include/profile/multiset.h: Remove.
1977 * include/profile/ordered_base.h: Remove.
1978 * include/profile/set: Remove.
1979 * include/profile/set.h: Remove.
1980 * include/profile/unordered_base.h: Remove.
1981 * include/profile/unordered_map: Remove.
1982 * include/profile/unordered_set: Remove.
1983 * include/profile/vector: Remove.
1984 * scripts/run_doxygen: Do not process profile mode headers.
1985 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1987 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1988 Remove dg-skip-if for profile mode.
1989 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1990 preprocessor check for profile mode.
1991 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1992 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1994 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1996 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1997 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1998 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1999 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2000 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2002 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2004 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2006 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2008 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2009 preprocessor check for profile mode.
2010 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2012 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2013 Remove dg-skip-if for profile mode.
2014 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2015 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2016 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2017 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2018 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2019 * testsuite/Makefile.am: Remove profile_flags variable and
2020 * testsuite/Makefile.am: Remove profile_flags variable and
2021 check-profile target.
2022 * testsuite/Makefile.in: Regenerate.
2023 * testsuite/ext/profile/all.cc: Remove.
2024 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2025 * testsuite/ext/profile/profiler_algos.cc: Remove.
2026 * testsuite/ext/profile/replace_new.cc: Remove.
2027 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2028 preprocessor check for profile mode.
2029 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2030 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2031 (check_v3_target_normal_mode): Do not check for profile mode macro.
2032 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2034 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2035 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2036 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2037 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2038 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2039 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2040 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2041 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2042 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2043 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2045 Remove array_allocator extension, deprecated since 4.9.0
2046 * doc/xml/manual/allocator.xml: Remove documentation for
2048 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2049 * doc/xml/manual/using.xml: Remove header from documentation.
2050 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2051 * include/Makefile.in: Regenerate.
2052 * include/ext/array_allocator.h: Remove.
2053 * include/precompiled/extc++.h: Do not include removed header.
2054 * testsuite/ext/array_allocator/1.cc: Remove.
2055 * testsuite/ext/array_allocator/2.cc: Remove.
2056 * testsuite/ext/array_allocator/26875.cc: Remove.
2057 * testsuite/ext/array_allocator/3.cc: Remove.
2058 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2059 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2060 * testsuite/ext/array_allocator/check_new.cc: Remove.
2061 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2062 * testsuite/ext/headers.cc: Do not include removed header.
2064 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2066 * include/bits/stl_bvector.h
2067 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2069 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2071 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2073 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2075 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2077 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2079 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2081 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2083 (_Bit_iterator::operator-(difference_type)): Likewise.
2084 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2085 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2087 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2088 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2090 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2093 * testsuite/util/thread/all.h: Do not use remove_pointer for
2094 std::thread::native_handle_type.
2097 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2098 (_Variant_storage<true, Types...>::_M_reset()))
2099 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2100 (__get_storage): Likewise.
2101 (variant): Add noexcept to friend declarations for __get and
2105 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2106 Use _Require for constraints.
2107 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2109 (__uniq_ptr_hash): New base class with conditionally-disabled call
2111 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2112 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2113 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2115 * include/bits/shared_ptr.h: Improve docs.
2116 * include/bits/shared_ptr_base.h: Likewise.
2117 * include/bits/stl_uninitialized.h: Likewise.
2118 * include/bits/unique_ptr.h: Likewise.
2119 * libsupc++/new: Likewise.
2121 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2123 * include/bits/stl_deque.h
2124 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2126 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2128 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2130 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2132 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2134 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2136 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2138 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2140 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2143 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2144 (test01): Reserve for number of insertions to avoid rehash during test.
2145 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2147 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2152 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2154 * include/experimental/bits/fs_path.h: Improve docs.
2155 * include/experimental/bits/net.h: Fix wrong header name in comment.
2156 Do not document implementation details.
2157 * include/experimental/netfwd: Fix doxygen grouping.
2159 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2161 * include/bits/stl_pair.h: Improve docs.
2162 * include/std/tuple: Likewise.
2164 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2166 * include/std/chrono: Improve docs.
2167 * include/std/ratio: Do not document implementation details.
2168 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2170 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2173 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2174 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2175 (__duration_common_type): New helper.
2176 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2177 __duration_common_type.
2178 (__timepoint_common_type_wrapper): Replace with ...
2179 (__timepoint_common_type): New helper.
2180 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2181 Use __time_point_common_type.
2182 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2183 (__common_type_impl): If either argument is transformed by decay,
2184 use the common_type of the decayed types.
2185 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2186 decayed, use __do_common_type_impl to get the common_type.
2187 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2188 (__do_member_type_wrapper, __member_type_wrapper)
2189 (__expanded_common_type_wrapper): Remove.
2190 (__common_type_pack, __common_type_fold): New helpers.
2191 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2192 __member_type_wrapper and __expanded_common_type_wrapper.
2193 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2194 Test zero-length template argument list.
2195 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2196 Test single argument cases and argument types that should decay.
2197 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2198 Adjust expected error.
2199 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2201 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2202 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2203 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2205 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2207 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2209 Make allocator propagation more consistent for
2210 operator+(basic_string) (P1165R1)
2211 * include/bits/basic_string.h
2212 (operator+(basic_string&&, basic_string&&): Changed resulting
2213 allocator to always be the one from the first parameter.
2214 * include/bits/basic_string.tcc
2215 (operator+(const _CharT*, const basic_string&)): Changed
2216 resulting allocator to be SOCCC on the second parameter's allocator.
2217 (operator+(_CharT, const basic_string&)): Likewise.
2218 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2220 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2223 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2225 * include/bits/regex.h: Improve docs.
2226 * include/bits/regex.tcc: Do not document implementation details.
2228 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2230 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2232 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2233 Add type printer for container types in std::__debug namespace.
2234 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2235 (gdb-tests): Use distinct parameters for the type of test and use of
2237 (gdb-test): Check for regex test even if 'whatis' test.
2238 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2240 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2241 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2242 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2243 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2244 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2245 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2246 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2248 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2250 * include/std/system_error (error_category): Fix comment.
2253 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2254 argument is an empty path.
2255 (absolute(const path&, error_code&)): Use invalid_argument as error
2256 code instead of no_such_file_or_directory.
2257 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2258 of non-existent paths and empty paths with both overloads of absolute.
2260 * include/std/system_error (error_category, error_code)
2261 (error_condition): Improve docs.
2262 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2263 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2264 to class documentation. Suppress documentation for implementation
2266 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2267 Suppress documentation for implementation details.
2269 * include/std/system_error (error_code): Remove friend declaration
2270 for hash<error_code>.
2271 (hash<error_code>::operator()): Use public member functions to access
2273 (hash<error_condition>::operator()): Use address of category, not
2274 its object representation.
2275 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2276 Use public member functions to access value and category.
2277 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2279 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2281 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2282 * include/bits/hashtable_policy.h
2283 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2284 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2285 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2286 smaller than input value rather than always greater. Preserve
2287 _M_next_resize if called with 0 input. Use __builtin_floorl.
2288 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2289 elements + number of insertions is greater than _M_next_resize. Start
2290 with 11 buckets if not told otherwise. Use __builtin_floorl.
2291 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2292 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2293 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2294 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2295 told otherwise. Use __builtin_floorl.
2296 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2297 to also validate _Power2_rehash_policy.
2298 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2301 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2304 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2308 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2309 overflow warning with -Wpedantic -Wsystem-headers.
2311 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2314 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2315 * include/bits/move.h (swap): Remove extra parentheses.
2317 * include/experimental/bits/lfts_config.h: Improve doc markup.
2318 * include/experimental/optional: Improve docs.
2319 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2320 (__constexpr_addressof): Remove.
2321 (optional::operator->()): Use std::__addressof().
2322 * include/std/optional (optional::operator->()): Adjust whitespace.
2323 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2324 that operator-> is still constexpr with overloaded operator&. Change
2325 to compile-only test.
2326 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2329 * include/bits/shared_ptr.h: Improve docs.
2330 * include/bits/shared_ptr_atomic.h: Likewise.
2331 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2333 * include/bits/basic_string.h: Fix iterator/index confusion in
2335 * include/bits/range_access.h: Fix Doxygen warnings.
2336 * include/bits/refwrap.h: Do not document implementation details.
2337 (ref, cref): Group docs with reference_wrapper.
2338 * include/std/fstream: Fix Doxygen markup.
2339 * libsupc++/initializer_list (begin, end): Group docs with
2342 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2344 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2345 * include/std/mutex: Likewise.
2346 * include/std/shared_mutex: Likewise.
2348 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2349 * include/bits/fs_fwd.h: Likewise.
2350 * include/bits/fs_ops.h: Likewise.
2351 * include/bits/fs_path.h: Likewise.
2352 * include/std/filesystem: Likewise.
2354 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2355 * include/experimental/buffer: Likewise.
2356 * include/experimental/executor: Likewise.
2357 * include/experimental/internet: Likewise.
2358 * include/experimental/io_context: Likewise.
2359 * include/experimental/net: Likewise.
2360 * include/experimental/netfwd: Likewise.
2361 * include/experimental/socket: Likewise.
2362 * include/experimental/timer: Likewise.
2364 * doc/doxygen/doxygroups.cc: Move description of experimental group
2366 * include/experimental/algorithm: Add to libfund-ts doc group.
2367 * include/experimental/any: Likewise. Do not document implementation
2369 * include/experimental/array: Add to libfund-ts doc group.
2370 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2371 for Library Fundamentals.
2372 * include/experimental/chrono: Add to libfund-ts doc group.
2373 * include/experimental/deque: Likewise.
2374 * include/experimental/forward_list: Likewise.
2375 * include/experimental/functional: Likewise.
2376 * include/experimental/iterator: Likewise.
2377 * include/experimental/list: Likewise.
2378 * include/experimental/map: Likewise.
2379 * include/experimental/memory: Likewise.
2380 * include/experimental/memory_resource: Likewise. Improve docs.
2382 * include/experimental/numeric: Add to libfund-ts doc group.
2383 * include/experimental/optional: Likewise.
2384 * include/experimental/propagate_const: Likewise.
2385 * include/experimental/random: Likewise.
2386 * include/experimental/ratio: Likewise.
2387 * include/experimental/regex: Likewise.
2388 * include/experimental/set: Likewise.
2389 * include/experimental/source_location: Likewise.
2390 * include/experimental/string: Likewise.
2391 * include/experimental/string_view: Likewise.
2392 * include/experimental/system_error: Likewise.
2393 * include/experimental/tuple: Likewise.
2394 * include/experimental/type_traits: Likewise.
2395 * include/experimental/unordered_map: Likewise.
2396 * include/experimental/unordered_set: Likewise.
2397 * include/experimental/utility: Likewise.
2398 * include/experimental/vector: Likewise.
2399 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2400 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2401 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2403 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2404 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2405 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2406 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2407 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2409 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2410 * include/experimental/bits/fs_fwd.h: Improve docs.
2411 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2412 * include/experimental/bits/fs_path.h: Likewise.
2413 (path, filesystem_error, u8path): Improve docs.
2414 * include/experimental/filesystem: Link to docs for TS.
2416 * config/allocator/new_allocator_base.h (__allocator_base): Add
2417 workaround for Doxygen bug #6945.
2418 * include/std/memory: Improve docs. Define group for pointer safety.
2419 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2420 conditional to suppress documentation for implementation details.
2422 * include/bits/specfun.h: Improve docs.
2423 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2426 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2427 (std::experimental): Add docs.
2428 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2429 namespace to nothing when generating docs.
2430 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2431 * include/std/chrono (std::chrono): Likewise.
2432 * include/std/functional (std::placeholders): Likewise.
2433 * include/std/thread (std::this_thread): Likewise.
2435 * include/parallel/settings.h: Fix Doxygen markup.
2437 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2438 anything unless PB_DS_CLASS_C_DEC is defined.
2439 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2440 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2441 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2442 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2443 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2444 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2445 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2447 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2448 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2449 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2450 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2451 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2452 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2453 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2454 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2455 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2456 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2457 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2459 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2460 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2462 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2465 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2466 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2467 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2470 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2472 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2473 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2474 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2475 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2476 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2477 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2479 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2480 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2483 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2486 * include/std/complex (__complex_proj): Return parameter unchanged.
2487 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2488 floating-point types to take std::complex arguments.
2489 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2490 floating-point types.
2491 * testsuite/26_numerics/complex/proj.cc: New test.
2493 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2495 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2496 to _Lock_policyE[012].
2497 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2499 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2501 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2502 macros accidentally left in.
2503 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2504 unnecessary -lstdc++fs option. Fix test for mingw.
2505 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2508 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2510 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2512 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2514 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2516 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2517 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2520 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2522 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2525 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2526 class template and partial specialization.
2529 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2531 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2532 functions to convert a value to an integral type.
2533 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2534 (fill_n): Convert _Size parameter to an integral type.
2535 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2536 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2537 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2538 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2539 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2540 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2542 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2544 Adding noexcept-specification on tuple constructors (LWG 2899)
2545 * libstdc++-v3/include/std/tuple:
2546 (tuple()): Add noexcept-specification.
2547 (tuple(const _Elements&...)): Likewise
2548 (tuple(_UElements&&...)): Likewise
2549 (tuple(const tuple<_UElements...>&)): Likewise
2550 (tuple(tuple<_UElements...>&&)): Likewise
2551 (tuple(const _T1&, const _T2&)): Likewise
2552 (tuple(_U1&&, _U2&&)): Likewise
2553 (tuple(const tuple<_U1, _U2>&): Likewise
2554 (tuple(tuple<_U1, _U2>&&): Likewise
2555 (tuple(const pair<_U1, _U2>&): Likewise
2556 (tuple(pair<_U1, _U2>&&): Likewise
2557 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2559 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2562 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2563 arguments with __restrict.
2565 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2567 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2569 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2571 * include/experimental/bits/fs_path.h
2572 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2573 avoid redundant call to _S_convert_loc with non-const pointers.
2575 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2576 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2577 * testsuite/21_strings/basic_string/hash/hash.cc
2578 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2579 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2580 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2582 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2583 wstring::_M_replace_dispatch with more specific patterns.
2584 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2585 Create const std::string to avoid redundant call to _S_convert_loc
2586 with non-const pointers.
2587 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2588 avoid unnecessary basic_string::assign instantiations.
2590 * include/std/memory (__uses_alloc_args): Add string-literal to
2591 static_assert, to match the one in __uses_alloc.
2592 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2593 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2594 for recursive uses-allocator construction of nested pairs.
2595 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2598 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2600 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2601 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2602 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2603 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2605 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2606 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2607 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2608 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2609 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2610 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2611 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2613 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2616 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2617 * include/std/scoped_allocator [__cplusplus > 201703L]
2618 (scoped_allocator_adaptor::construct): Define in terms of
2619 uses_allocator_construction_args, as per P0591R4.
2620 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2621 * testsuite/util/testsuite_allocator.h: Remove name of unused
2624 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2626 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2627 * doc/html/*: Regenerate.
2629 * include/bits/fs_path.h (operator<, operator<=, operator>)
2630 (operator>=, operator==, operator!=): Make hidden friends, as per
2632 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2633 string type in test.
2634 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2636 * include/std/any (any::any(ValueType&&)): Use __and_v.
2637 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2640 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2642 * include/std/type_traits (__result_of_memfun): Use remove_reference
2643 instead of __remove_cvref_t and remove redundant is_same check.
2644 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2646 * include/experimental/string_view (basic_string_view::pointer)
2647 (basic_string_view::reference): Fix to refer to non-const value_type.
2648 * include/bits/basic_string.h (basic_string): Use __sv_check and
2649 __sv_limit instead of basic_string_view::_M_check and
2650 basic_string_view::_M_limit.
2651 * include/std/string_view (__sv_check, __sv_limit): New
2652 helper functions to replace basic_string_view::_M_check and
2653 basic_string_view::_M_limit.
2654 (basic_string_view): Add static assertions to enforce ill-formed
2655 requirement for traits_type::char_type from P1148R0, and to enforce
2656 required properties of char-like types.
2657 (basic_string_view::pointer, basic_string_view::reference): Fix to
2658 refer to non-const value_type.
2659 (basic_string_view::operator[], basic_string_view::at)
2660 (basic_string_view::front, basic_string_view::back)
2661 (basic_string_view::data): Use const_reference and const_pointer
2662 typedefs for return types.
2663 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2664 (hash<wstring_view>): Fix argument_type typedef.
2665 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2666 char/1.cc: Fix expected return type of basic_string_view::data().
2667 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2668 wchar_t/1.cc: Likewise.
2669 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2670 char/1.cc: Likewise.
2671 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2672 wchar_t/1.cc: Likewise.
2673 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2675 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2676 Check reference and pointer typedefs.
2677 * testsuite/experimental/string_view/requirements/typedefs.cc:
2679 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2680 Fix expected return type of basic_string_view::data().
2681 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2683 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2685 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2689 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2690 Avoid a runtime check for types that can never be stored in std::any.
2691 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2694 PR libstdc++/90220 (partial)
2695 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2696 not attempt ill-formed static_cast to pointers to non-object types.
2697 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2700 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2701 prevent -Wcatch-value warning.
2703 * include/std/variant (__variant_construct): Use template parameter
2704 type instead of equivalent decltype-specifier.
2705 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2706 Replace forward with move.
2707 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2708 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2709 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2710 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2711 index after construction succeeds.
2712 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2713 if-constexpr checks that are always true. Use __remove_cvref_t instead
2714 of remove_reference so that is_nothrow_move_constructible check
2715 doesn't use a const rvalue parameter. In the potentially-throwing case
2716 construct a temporary and move assign it, as per LWG 2904.
2717 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2718 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2719 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2720 construct a temporary and move assign from it, as per LWG 2904.
2721 * testsuite/20_util/variant/exception_safety.cc: Check that
2722 assignment operators have strong exception safety guarantee.
2724 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2726 Document PSTL linker flags
2728 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2730 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2732 * include/std/variant (__detail::__variant::_Traits): Make
2733 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2734 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2736 (__detail::__variant::_Copy_assign_alias): Only depend on
2737 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2738 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2739 move assignment operators.
2742 * include/std/variant (variant::__not_self): New helper for the
2743 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2744 (variant::__to_type_impl): Remove.
2745 (variant::__to_type): Add default argument to check pack size, instead
2746 of using __to_type_impl.
2747 (variant::__accepted_type): Add default argument using __not_self.
2748 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2749 for variant(T&&) constructor constraint.
2750 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2751 Extract __accepted_type into a named template parameter for reuse in
2752 other constraints and in the exception specification.
2753 (variant::variant(in_place_type_t<T>, Args&&...))
2754 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2755 (variant::variant(in_place_index_t<T>, Args&&...))
2756 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2757 (variant::operator=T&&)): Remove redundant && from trait arguments.
2758 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2759 isn't used for in_place_type or in_place_index arguments.
2761 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2762 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2763 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2765 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2766 Bernd Edlinger <bernd.edlinger@hotmail.de>
2767 Jakub Jelinek <jakub@redhat.com>
2770 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2771 general-regs-only target attribute for ARM.
2773 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2776 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2777 specialization also depend on is_nothrow_move_constructible.
2778 * include/std/variant (__detail::__variant::__never_valueless()):
2779 Only true if the variant would have a move assignment operator.
2780 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2781 Check __never_valueless<T...>().
2782 (variant::emplace): Only perform non-throwing move assignments
2783 for never-valueless alternatives if the variant has a move assignment
2785 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2786 types can be emplaced into non-assignable variants.
2787 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2788 don't get copied when emplaced into non-assignable variants.
2790 * include/std/variant (__detail::__variant::__ref_cast): Remove
2792 (__detail::__variant::_Uninitialized::_M_get)
2793 (__detail::__variant::__get)
2794 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2796 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2798 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2800 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2801 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2802 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2803 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2805 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2807 Delegate PSTL configuration to pstl/pstl_config.h
2809 * include/bits/c++config: Remove explicit PSTL configuration
2810 macros and use definitions from <pstl/pstl_config.h>.
2812 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2814 Cleanup algorithm implementations
2815 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2817 (mismatch): Forward execution policy.
2818 (equal): Qualify call to std::equal().
2819 (partial_sort): Forward execution policy.
2820 (inplace_merge): Forward execution policy.
2822 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2824 Improve implementation of parallel equal()
2825 * include/pstl/algorithm_impl.h
2826 (__internal::__brick_equal): use "4 iterator" version of
2828 (__internal::__brick_equal): use simd for random access
2829 iterators on unsequenced execution policies.
2830 (__internal::__pattern_equal): add "4 iterator" version
2831 (__internal::__pattern_equal): dispatch to simd __brick_equal
2832 for vector-only execution policies.
2833 (__internal::__pattern_equal): dispatch to __parallel_or for
2834 parallel execution policies.
2835 * include/pstl/glue_algorithm_impl.h
2836 (std::equal): dispatch to "4 iterator" version of
2837 __internal::__pattern_equal().
2839 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2842 * include/bits/forward_list.h (operator==): Do not use operator!= to
2844 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2845 earlier in the list, so that sort is stable.
2846 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2847 * testsuite/23_containers/forward_list/comparable.cc: Test with
2848 types that meet the minimum EqualityComparable and LessThanComparable
2849 requirements. Remove irrelevant comment.
2851 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2852 Do not depend on whether all alternative types are move constructible.
2853 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2854 from the operand when deciding whether to perform the assignment.
2855 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2856 with deleted move constructor and deleted move assignment operator.
2857 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2858 behaviour of variants with DeletedMoves as an alternative.
2859 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2860 (move_ctor, move_assign): Check that moving a variant with a
2861 DeletedMoves alternative falls back to copying instead of moving.
2863 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2864 from static_assert declarations.
2866 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2867 actually match its name.
2868 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2869 (test_swap()): Fix result for MoveCtorOnly and check
2870 MoveCtorAndSwapOnly.
2872 * include/std/optional (optional::value_or(U&&) &&): Add missing
2873 constexpr specifier.
2874 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2875 for disengaged optionals and rvalue optionals.
2876 * testsuite/20_util/optional/observers/4.cc: Likewise.
2878 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2880 * include/pstl/algorithm_impl.h: Uglify identfiers.
2881 * include/pstl/numeric_impl.h: Uglify identfiers.
2882 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2884 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2886 * include/bits/c++config:
2887 Add definition for __PSTL_ASSERT.
2888 Add definition for __PSTL_ASSERT_MSG.
2889 * include/pstl/algorithm_impl.h: Replace use of assert().
2890 * include/pstl/numeric_impl.h: Replace use of assert().
2891 * include/pstl/parallel_backend_tbb.h:
2892 Replace use of assert().
2893 Replace use of __TBB_ASSERT().
2894 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2896 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2899 * src/c++17/memory_resource.cc
2900 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2901 needed to allow placing a _Chunk at the end of the buffer.
2902 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2904 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2906 * doc/xml/faq.xml: Add information about emergency EH pool.
2907 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2908 Move outdated information on mt_allocator to a separate section.
2909 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2910 doesn't affect the default allocator.
2912 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2916 * testsuite/20_util/variant/89851.cc: New test.
2918 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2920 * include/std/variant: Adjust whitespace. Add comments.
2921 (_Multi_array): Leave primary template undefined.
2922 (_Multi_array<_Tp>): Define partial specialization for base case of
2924 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2925 which is always a reference.
2926 (__gen_vtable::_S_apply()): Remove function, inline body into
2927 default member initializer.
2928 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2930 * include/std/variant (__variant_idx_cookie): Add member type.
2931 (__visitor_result_type): Remove.
2932 (__do_visit): Use invoke_result instead of __visitor_result_type.
2933 * testsuite/20_util/variant/visit.cc: New test.
2936 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2938 * testsuite/20_util/variant/90008.cc: New test.
2940 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2942 * include/pstl/algorithm_impl.h: Add namespace qualification.
2943 * include/pstl/execution_defs.h: Add namespace qualification.
2944 * include/pstl/execution_impl.h: Add namespace qualification.
2945 * include/pstl/numeric_impl.h: Add namespace qualification.
2946 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2947 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2948 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2950 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2952 Fix visit<R> for variant.
2953 * include/std/variant (__do_visit): Add a template parameter
2954 for enforcing same return types for visit.
2955 (__gen_vtable_impl): Likewise.
2956 (_S_apply_single_alt): Adjust.
2957 (__visit_invoke_impl): New. Handle casting to void.
2958 (__do_visit_invoke): New. Enforces same return types.
2959 (__do_visit_invoke_r): New. Converts return types.
2960 (__visit_invoke): Adjust.
2961 (__gen_vtable): Add a template parameter for enforcing
2962 same return types for visit.
2963 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2964 different return types.
2965 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2966 visitors with different return types don't accidentally
2967 compile with regular visitation.
2969 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2971 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2972 dg-require-filesystem-ts.
2974 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2976 * doc/xml/manual/status_cxx2020.xml: Update status.
2977 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2978 * testsuite/20_util/variant/visit_r.cc: New test.
2980 * include/bits/fs_dir.h (directory_iterator::operator*)
2981 (directory_iterator::operator->): Add noexcept.
2982 (operator==, operator!=): Replace namespace-scope equality operators
2983 for directory iterators with hidden friends.
2986 * config/abi/pre/gnu.ver: Add missing exports.
2987 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2990 * config/abi/pre/gnu.ver: Export new symbols.
2991 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2992 (recursive_directory_iterator::recursion_pending())
2993 (recursive_directory_iterator::disable_recursion_pending()): Remove
2994 inline definitions. Make noexcept.
2995 (recursive_directory_iterator::depth())
2996 (recursive_directory_iterator::operator*())
2997 (recursive_directory_iterator::operator->()): Make noexcept.
2998 (recursive_directory_iterator::_M_options)
2999 (recursive_directory_iterator::_M_pending): Remove data members.
3000 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3001 (recursive_directory_iterator::recursive_directory_iterator): Remove
3002 ctor-initializer. Use new constructor for _Dir_stack.
3003 (recursive_directory_iterator::options())
3004 (recursive_directory_iterator::recursion_pending())
3005 (recursive_directory_iterator::disable_recursion_pending()): Add
3006 non-inline definitions.
3007 (recursive_directory_iterator::depth()): Make noexcept.
3008 (recursive_directory_iterator::increment(error_code&))
3009 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3010 location of options and recursion_pending members.
3011 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3012 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3013 user-declared move constructor and assignment operator, to make the
3016 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3017 d_type == DT_UNKNOWN immediately.
3018 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3020 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3022 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3024 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3025 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3028 PR libstdc++/87431 (again)
3029 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3030 Define partial specialization for basic_string.
3031 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3032 shared_ptr and weak_ptr.
3033 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3035 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3037 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3039 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3041 * include/std/any (_Never_valueless_alt): Define explicit
3042 specialization for any.
3043 * include/std/variant (_Never_valueless_alt): Define primary template.
3044 (__never_valueless): Use _Never_valueless_alt instead of
3045 is_trivially_copyable.
3046 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3047 initializations to avoid try-catch overhead. Add special case for
3048 scalars produced by potentially-throwing conversions. Use
3049 _Never_valueless_alt instead of is_trivially_copyable for the
3050 remaining strong exception-safety cases.
3051 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3052 * testsuite/20_util/variant/87431.cc: Run both test functions.
3053 * testsuite/20_util/variant/exception_safety.cc: New test.
3054 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3055 so the variant becomes valueless.
3057 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3060 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3062 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3064 * include/std/string (__hash_string_base): New class template defining
3065 operator() for hashing strings.
3066 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3067 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3068 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3069 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3071 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3073 Use single-visitation in variant assignment and swap and relops.
3074 Also use indices instead of types when checking whether
3075 variants hold the same thing.
3076 * include/std/variant (__do_visit): Add a template parameter
3077 for index visitation, invoke with indices if index visitation
3079 (__variant_idx_cookie): New.
3080 (__visit_with_index): Likewise.
3081 (_Copy_assign_base::operator=): Do single-visitation with
3083 (_Move_assign_base::operator=): Likewise.
3084 (_Extra_visit_slot_needed): Adjust.
3085 (__visit_invoke): Call with indices if it's an index visitor.
3086 (relops): Do single-visitation with an index visitor.
3088 (__visitor_result_type): New.
3090 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3092 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3094 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3096 Don't revisit a variant we are already visiting.
3097 * include/std/variant (__variant_construct_single): New.
3098 (__variant_construct): Use it.
3099 (_M_destructive_move): Likewise.
3100 (_M_destructive_copy): Likewise.
3101 (_Copy_assign_base::operator=): Adjust.
3102 (_Move_assign_base::operator=): Likewise.
3105 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3108 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3109 destructor so they are not evaluated until the _Key type is complete.
3110 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3111 * testsuite/23_containers/set/85965.cc: New test.
3112 * testsuite/23_containers/unordered_set/85965.cc: New test.
3113 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3114 with regexp matching the corresponding _Rb_tree specialization.
3115 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3116 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3117 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3118 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3119 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3120 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3121 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3123 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3126 Fix based on a suggestion by Antony Polukhin.
3127 * include/std/variant (__never_valueless): New.
3129 (_Extra_visit_slot_needed): New.
3130 (_Multi_array): Use it.
3131 (_S_apply_all_alts): Likewise.
3133 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3136 Fix based on a suggestion by Antony Polukhin.
3137 * include/std/variant (__gen_vtable): Don't reserve an
3138 additional table slot, _Multi_array already does that.
3140 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3143 Fix based on a suggestion by Antony Polukhin.
3144 * include/std/variant (__variant_construct): Capture a pointer
3145 to the storage and visit just one variant.
3147 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3149 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3150 Doxygen-generated pages with unstable URL.
3151 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3152 * doc/xml/manual/extensions.xml: Likewise.
3153 * doc/xml/manual/parallel_mode.xml: Likewise.
3154 * doc/xml/manual/support.xml: Likewise.
3156 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3157 avoid -Wconversion warnings.
3159 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3161 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3162 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3163 (allstamped): Add stamp-pstl.
3164 (install-headers): Add ptsl_builddir.
3165 * include/Makefile.in: Regenerate.
3166 * include/bits/c++config: Add pstl configuration.
3167 * include/pstl/LICENSE.txt: New file.
3168 * include/pstl/algorithm_fwd.h: New file.
3169 * include/pstl/algorithm_impl.h: New file.
3170 * include/pstl/execution_defs.h: New file.
3171 * include/pstl/execution_impl.h: New file.
3172 * include/pstl/glue_algorithm_defs.h: New file.
3173 * include/pstl/glue_algorithm_impl.h: New file.
3174 * include/pstl/glue_execution_defs.h: New file.
3175 * include/pstl/glue_memory_defs.h: New file.
3176 * include/pstl/glue_memory_impl.h: New file.
3177 * include/pstl/glue_numeric_defs.h: New file.
3178 * include/pstl/glue_numeric_impl.h: New file.
3179 * include/pstl/memory_impl.h: New file.
3180 * include/pstl/numeric_fwd.h: New file.
3181 * include/pstl/numeric_impl.h: New file.
3182 * include/pstl/parallel_backend.h: New file.
3183 * include/pstl/parallel_backend_tbb.h: New file.
3184 * include/pstl/parallel_backend_utils.h: New file.
3185 * include/pstl/parallel_impl.h: New file.
3186 * include/pstl/pstl_config.h: New file.
3187 * include/pstl/unseq_backend_simd.h: New file.
3188 * include/pstl/utils.h: New file.
3189 * include/std/algorithm: Include parallel algorithm implementations.
3190 * include/std/execution: New file.
3191 * include/std/memory: Include parallel algorithm implementations.
3192 * include/std/numeric: Include parallel algorithm implementations.
3193 * include/std/version: Add parallel algorithms feature test macro.
3194 * testsuite/util/pstl/pstl_test_config.h: New file.
3195 * testsuite/util/pstl/test_utils.h: New file.
3196 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3197 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3198 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3199 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3200 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3201 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3202 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3203 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3204 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3205 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3206 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3207 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3208 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3209 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3210 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3211 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3212 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3213 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3214 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3215 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3216 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3217 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3218 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3219 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3220 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3221 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3222 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3223 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3224 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3225 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3226 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3227 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3228 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3229 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3230 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3231 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3232 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3233 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3234 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3235 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3236 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3237 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3238 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3239 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3240 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3241 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3242 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3243 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3244 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3245 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3246 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3247 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3248 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3249 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3250 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3251 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3252 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3253 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3254 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3255 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3256 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3257 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3258 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3259 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3260 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3261 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3262 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3263 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3264 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3265 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3266 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3267 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3268 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3269 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3270 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3271 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3272 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3273 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3274 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3275 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3276 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3277 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3278 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3279 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3280 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3281 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3282 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3283 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3284 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3285 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3286 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3287 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3288 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3289 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3290 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3291 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3292 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3293 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3294 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3295 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3296 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3297 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3298 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3299 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3300 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3301 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3303 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3305 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3306 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3307 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3308 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3309 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3310 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3311 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3312 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3313 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3314 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3315 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3316 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3317 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3318 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3319 when the special functions IS is enabled, not for C++17.
3320 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3322 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3323 without checks for special functions in C++17.
3324 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3328 * include/backward/hash_map: Use <> for includes not "".
3329 * include/backward/hash_set: Likewise.
3330 * include/backward/strstream: Likewise.
3331 * include/tr1/bessel_function.tcc: Likewise.
3332 * include/tr1/exp_integral.tcc: Likewise.
3333 * include/tr1/legendre_function.tcc: Likewise.
3334 * include/tr1/modified_bessel_func.tcc: Likewise.
3335 * include/tr1/riemann_zeta.tcc: Likewise.
3337 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3339 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3340 of extension allocators.
3341 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3342 Document new headers in 7.2, 8.1 and 9.1 releases.
3343 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3344 * doc/html/*: Regenerate.
3346 2019-03-12 John David Anglin <dave.anglin@bell.net>
3349 * testsuite/lib/libstdc++.exp: Locate libatomic.
3350 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3351 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3353 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3354 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3355 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3356 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3358 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3361 * configure.ac: Check for sockatmark.
3362 * crossconfig.m4: Check for sockatmark.
3363 * config.h.in: Regenerate.
3364 * configure: Regenerate.
3365 * include/experimental/internet (address_v4::_S_hton): Rename
3366 overloaded functions to _S_hton_16 and _S_ntoh_16.
3367 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3368 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3369 * include/experimental/socket (basic_socket::at_mark): Check
3370 _GLIBCXX_HAVE_SOCKATMARK.
3372 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3373 const variables instead of macros.
3376 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3377 Use correct type for len_aligned.
3378 * testsuite/20_util/hash/89629.cc: New test.
3380 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3383 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3384 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3385 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3386 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3387 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3388 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3389 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3390 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3391 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3392 memory_order_seq_cst to int.
3394 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3396 * doc/xml/manual/using.xml: Use link element instead of xref.
3397 * doc/html/*: Regenerate.
3399 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3401 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3404 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3405 parameters in deduction guides.
3406 * include/debug/multimap.h (multimap): Likewise.
3407 * include/debug/set.h (multimap): Likewise.
3408 * include/debug/multiset.h (multimap): Likewise.
3409 * include/debug/unordered_map (unordered_map): Likewise.
3410 (unordered_multimap): Likewise.
3411 * include/debug/unordered_set (unordered_set): Likewise.
3412 (unordered_multiset): Likewise.
3415 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3416 Invalidate all iterators in case of rehash.
3417 (unordered_multimap<>::_M_check_rehashed): Likewise.
3418 * include/debug/unordered_set
3419 (unordered_set<>::_M_check_rehashed): Likewise.
3420 (unordered_multiset<>::_M_check_rehashed): Likewise.
3421 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3423 2019-03-07 Andreas Schwab <schwab@suse.de>
3425 * config/abi/post/riscv64-linux-gnu: New directory.
3426 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3428 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3430 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3431 compile test to run. Fix typo.
3433 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3434 * doc/html/*: Regenerate.
3436 P0356R5 Simplified partial function application
3437 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3438 helpers for bind_front.
3439 (bind_front, __cpp_lib_bind_front): Define.
3440 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3442 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3444 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3445 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3446 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3447 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3449 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3451 PR libstdc++/86655 - std::assoc_legendre should not constrain
3452 the value of m (or x).
3453 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3454 __sph_legendre): If degree > order Don't throw, return 0.
3455 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3456 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3457 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3458 * testsuite/tr1/5_numerical_facilities/special_functions/
3459 02_assoc_legendre/pr86655.cc: New test.
3460 * testsuite/tr1/5_numerical_facilities/special_functions/
3461 22_sph_legendre/pr86655.cc: New test.
3463 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3466 Also PR libstdc++/85517
3467 * include/std/variant (__do_visit): New.
3468 (__variant_cast): Likewise.
3469 (__variant_cookie): Likewise.
3470 (__erased_*): Remove.
3471 (_Variant_storage::_S_vtable): Likewise.
3472 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3473 (_Variant_storage::__M_reset): Adjust.
3474 (__variant_construct): New.
3475 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3476 __variant_construct.
3477 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3478 (_Move_ctor_base::__M_destructive_copy): New.
3479 (_Move_ctor_base::__M_destructive_move): Adjust to use
3480 __variant_construct.
3481 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3482 (_Copy_assign_alias): Adjust to check both copy assignment
3483 and copy construction for triviality.
3484 (_Move_assign_base::operator=): Adjust to use __do_visit.
3485 (_Multi_array): Add support for visitors that accept and return
3487 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3488 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3489 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3490 a __variant_cookie temporary for a variant that is valueless and..
3491 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3492 (__gen_vtable::_Array_type): Conditionally make space for
3493 the __variant_cookie visitor case.
3494 (__variant_construct_by_index): New.
3495 (get_if): Adjust to use std::addressof.
3496 (relops): Adjust to use __do_visit.
3497 (variant): Add __variant_cast and __variant_construct_by_index
3499 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3500 instead of self-destruction.
3501 (variant::swap): Adjust to use __do_visit.
3502 (visit): Reimplement in terms of __do_visit.
3503 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3504 * testsuite/20_util/variant/compile.cc: Adjust.
3505 * testsuite/20_util/variant/run.cc: Likewise.
3507 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3509 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3511 * testsuite/experimental/feat-char8_t.cc: Likewise.
3513 * include/std/type_traits [C++20] (is_bounded_array)
3514 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3516 * testsuite/20_util/is_bounded_array/requirements/
3517 explicit_instantiation.cc: New test.
3518 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3520 * testsuite/20_util/is_bounded_array/value.cc: New test.
3521 * testsuite/20_util/is_unbounded_array/requirements/
3522 explicit_instantiation.cc: New test.
3523 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3525 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3527 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3529 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3531 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3533 * include/c_compatibility/math.h [C++20] (lerp): Add using
3535 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3536 (__lerp): Define function template to implement lerp.
3537 (lerp(float, float, float), lerp(double, double, double))
3538 (lerp(long double, long double, long double)): Define for C++20.
3539 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3540 (midpoint(T, T), midpoint(T*, T*)): Define.
3541 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3542 * testsuite/26_numerics/lerp.cc: New test.
3543 * testsuite/26_numerics/midpoint/floating.cc: New test.
3544 * testsuite/26_numerics/midpoint/integral.cc: New test.
3545 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3547 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3549 PR libstdc++/88996 Implement P0439R0
3550 Make std::memory_order a scoped enumeration.
3551 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3552 add variables for the old enumerators. Adjust calls.
3553 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3554 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3556 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3558 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3561 * include/std/memory_resource (polymorphic_allocator): Add default
3562 template argument for C++20.
3563 (polymorphic_allocator::allocate_bytes)
3564 (polymorphic_allocator::deallocate_bytes)
3565 (polymorphic_allocator::allocate_object)
3566 (polymorphic_allocator::deallocate_object)
3567 (polymorphic_allocator::new_object)
3568 (polymorphic_allocator::delete_object): New member functions for
3570 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3573 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3576 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3579 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3581 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3582 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3584 * include/std/memory (uses_allocator_construction_args): New set of
3585 overloaded functions.
3586 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3588 * include/std/memory_resource (polymorphic_allocator::construct)
3589 [__cplusplus > 201703l]: Replace all overloads with a single function
3590 using uses_allocator_construction_args.
3591 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3593 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3595 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3598 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3599 stylesheet directories before check for xsltproc. Try to use
3600 xmlcatalog to find local stylesheet directory before trying hardcoded
3601 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3602 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3603 use xsltproc if xmlcatalog fails to find a local stylesheet.
3604 * configure.ac: Check for xmlcatalog.
3605 * Makefile.in: Regenerate.
3606 * configure: Likewise.
3607 * doc/Makefile.in: Likewise.
3608 * include/Makefile.in: Likewise.
3609 * libsupc++/Makefile.in: Likewise.
3610 * po/Makefile.in: Likewise.
3611 * python/Makefile.in: Likewise.
3612 * src/Makefile.in: Likewise.
3613 * src/c++11/Makefile.in: Likewise.
3614 * src/c++17/Makefile.in: Likewise.
3615 * src/c++98/Makefile.in: Likewise.
3616 * src/filesystem/Makefile.in: Likewise.
3617 * testsuite/Makefile.in: Likewise.
3619 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3622 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3623 container deduction guides.
3624 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3625 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3626 parameters in deduction guides.
3627 * include/bits/stl_multimap.h (multimap): Likewise.
3628 * include/bits/stl_multiset.h (multiset): Likewise.
3629 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3630 * include/bits/stl_set.h (set): Likewise.
3631 * include/bits/stl_stack.h (stack): Likewise.
3632 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3633 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3634 constrain parameters in deduction guides.
3635 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3637 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3639 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3640 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3641 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3642 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3644 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3646 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3649 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3650 to class template and partial specialization using void_t.
3651 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3653 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3656 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3657 copy and move members public.
3659 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3661 * include/std/type_traits (__underlying_type_impl): New helper to
3662 make underlying_type SFINAE-friendly.
3663 (underlying_type): Derive from __underlying_type_impl.
3664 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3668 * include/bits/char_traits.h (__constant_char_array): Check index is
3669 in range before dereferencing.
3670 (char_traits<char>::compare, char_traits<char>::find)
3671 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3672 immediately if n is zero.
3673 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3674 Remove workarounds for PR 67026.
3675 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3677 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3680 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3682 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3683 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3685 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3688 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3689 type to std::size_t and argument to type to long double.
3691 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3693 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3694 * config/abi/post/sparc64-linux-gnu: New directory.
3695 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3696 * config/abi/post/sparc64-linux-gnu/32: New directory.
3697 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3699 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3701 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3702 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3705 2019-02-22 Tom Honermann <tom@honermann.net>
3707 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3708 printers for u8string and u8string_view.
3710 2019-02-22 Tom Honermann <tom@honermann.net>
3712 * testsuite/18_support/byte/ops.cc: Validate
3713 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3714 std::to_integer<char32_t>.
3715 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3716 std::numeric_limits<char8_t>.
3717 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3718 std::numeric_limits<char8_t>::lowest().
3719 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3720 std::numeric_limits<char8_t>::max_digits10.
3721 * testsuite/18_support/type_info/fundamental.cc: Validate
3722 typeinfo for char8_t.
3723 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3724 std::from_chars with char8_t.
3725 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3726 Validate explicit instantiation of std::hash<char8_t>.
3727 * testsuite/20_util/is_integral/value.cc: Validate
3728 std::is_integral<char8_t>.
3729 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3730 Validate std::make_signed<char8_t>.
3731 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3732 Validate u8string construction from char8_t sources.
3733 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3735 * testsuite/21_strings/basic_string_view/operations/compare/
3736 char/70483.cc: Validate substr operations on u8string_view.
3737 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3738 the u8string_view typedef is defined.
3739 * testsuite/21_strings/char_traits/requirements/
3740 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3742 * testsuite/21_strings/char_traits/requirements/
3743 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3744 constexpr member functions.
3745 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3746 that the u8string typedef is defined.
3747 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3748 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3749 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3750 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3752 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3753 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3755 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3756 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3757 Validate std::atomic<char8_t>::is_always_lock_free
3758 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3759 Update line numbers.
3760 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3762 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3764 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3765 Validate std::experimental::pmr::u8string.
3766 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3767 u8string_view typedef is defined.
3768 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3769 char32_t to the typelists.
3771 2019-02-22 Tom Honermann <tom@honermann.net>
3773 * include/ext/typelist.h: Constrain a partial specialization of
3774 typelist::detail::append_ to only match chain<T1,T2>.
3776 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3779 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3780 class template with class. Replace move and copy member types with
3781 member alias templates, so they are only instantiated when needed.
3782 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3783 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3784 test for C++11/14/17 as well.
3785 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3788 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3791 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3792 _GLIBCXX_PURE to the alias declaration.
3794 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3796 * testsuite/21_strings/basic_string/literals/types.cc
3797 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3798 * testsuite/21_strings/basic_string/literals/values.cc
3799 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3800 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3801 potentially having different type.
3802 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3803 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3805 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3806 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3807 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3808 string literals only using basic character set.
3809 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3810 u8 literals to char.
3811 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3812 Test ATOMIC_CHAR8_T_LOCK_FREE.
3813 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3814 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3815 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3816 * testsuite/experimental/string_view/literals/types.cc
3817 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3819 * testsuite/experimental/string_view/literals/values.cc
3820 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3822 2019-02-19 Tom Honermann <tom@honermann.net>
3824 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3825 from char16_32_t.cc; validates numeric_limits<char8_t>.
3826 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3827 test cloned from types.cc; validates operator""s for char8_t
3829 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3830 test cloned from values.cc; validates construction and comparison
3832 * testsuite/21_strings/basic_string/requirements/
3833 /explicit_instantiation/char8_t/1.cc: New test cloned from
3834 char16_t/1.cc; validates explicit instantiation of
3835 basic_string<char8_t>.
3836 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3837 New test cloned from types.cc; validates operator""sv for char8_t
3838 returns u8string_view.
3839 * testsuite/21_strings/basic_string_view/literals/
3840 values-char8_t.cc: New test cloned from values.cc; validates
3841 construction and comparison of u8string_view values.
3842 * testsuite/21_strings/basic_string_view/requirements/
3843 explicit_instantiation/char8_t/1.cc: New test cloned from
3844 char16_t/1.cc; validates explicit instantiation of
3845 basic_string_view<char8_t>.
3846 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3847 New test cloned from char16_t/65049.cc; validates that
3848 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3849 * testsuite/21_strings/char_traits/requirements/char8_t/
3850 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3851 that char_traits<char8_t> member typedefs are present and correct.
3852 * testsuite/21_strings/char_traits/requirements/
3853 explicit_instantiation/char8_t/1.cc: New test cloned from
3854 char16_t/1.cc; validates explicit instantiation of
3855 char_traits<char8_t>.
3856 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3857 from char16_t.cc: validates
3858 codecvt<char16_t, char8_t, mbstate_t>.
3859 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3860 from char32_t.cc: validates
3861 codecvt<char32_t, char8_t, mbstate_t>.
3862 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3863 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3864 codecvt<char32_t, char8_t, std::mbstate_t>.
3865 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3866 test cloned from string.cc; validates filesystem::path construction
3868 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3869 the __cpp_lib_char8_t feature test macro is defined with the
3871 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3872 New test cloned from string.cc; validates filesystem::path
3873 construction from char8_t input.
3874 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3875 test cloned from types.cc; validates operator""sv for char8_t
3876 returns u8string_view.
3877 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3878 New test cloned from values.cc; validates construction and
3879 comparison of u8string_view values.
3880 * testsuite/experimental/string_view/requirements/
3881 explicit_instantiation/char8_t/1.cc: New test cloned from
3882 char16_t/1.cc; validates explicit instantiation of
3883 basic_string_view<char8_t>.
3884 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3885 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3888 2019-02-19 Tom Honermann <tom@honermann.net>
3890 P0482R5 char8_t: Standard library support
3891 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3892 typeinfo symbols for char8_t.
3893 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3894 (GLIBCXX_3.4.26): Add symbols for specializations of
3895 numeric_limits and codecvt that involve char8_t.
3896 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3897 * include/bits/atomic_base.h: Add atomic_char8_t.
3898 * include/bits/basic_string.h: Add std::hash<u8string> and
3899 operator""s(const char8_t*, size_t).
3900 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3902 * include/bits/char_traits.h: Add char_traits<char8_t>.
3903 * include/bits/codecvt.h: Add
3904 codecvt<char16_t, char8_t, mbstate_t>,
3905 codecvt<char32_t, char8_t, mbstate_t>,
3906 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3907 codecvt_byname<char32_t, char8_t, mbstate_t>.
3908 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3909 recognize char8_t as an integral type.
3910 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3912 (path::u8string): Return std::u8string when char8_t support is
3914 (path::generic_u8string): Likewise.
3915 (path::_S_convert): Handle conversion from char8_t input.
3916 (path::_S_str_convert): Likewise.
3917 * include/bits/functional_hash.h: Add hash<char8_t>.
3918 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3920 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3921 for new char8_t specializations.
3922 * include/bits/localefwd.h: Add missing declarations of
3923 codecvt<char16_t, char, mbstate_t> and
3924 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3925 codecvt<char16_t, char8_t, mbstate_t> and
3926 codecvt<char32_t, char8_t, mbstate_t>.
3927 * include/bits/postypes.h: Add u8streampos
3928 * include/bits/stringfwd.h: Add declarations of
3929 char_traits<char8_t> and u8string.
3930 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3931 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3933 (path::u8string): Return std::u8string when char8_t support is
3935 (path::generic_u8string): Likewise.
3936 (path::_S_convert): Handle conversion from char8_t input.
3937 (path::_S_str_convert): Likewise.
3938 * include/experimental/string: Add u8string.
3939 * include/experimental/string_view: Add u8string_view,
3940 hash<experimental::u8string_view>, and
3941 operator""sv(const char8_t*, size_t).
3942 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3943 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3944 as a character type.
3945 * include/std/limits: Add numeric_limits<char8_t>.
3946 * include/std/string_view: Add u8string_view,
3947 hash<experimental::u8string_view>, and
3948 operator""sv(const char8_t*, size_t).
3949 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3950 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3951 * libsupc++/atomic_lockfree_defines.h: Define
3952 ATOMIC_CHAR8_T_LOCK_FREE.
3953 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3954 codecvt.cc and limits.cc so that char8_t specializations of
3955 numeric_limits and codecvt and emitted.
3956 * src/c++11/Makefile.in: Likewise.
3957 * src/c++11/codecvt.cc: Define members of
3958 codecvt<char16_t, char8_t, mbstate_t>,
3959 codecvt<char32_t, char8_t, mbstate_t>,
3960 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3961 codecvt_byname<char32_t, char8_t, mbstate_t>.
3962 * src/c++11/limits.cc: Define members of
3963 numeric_limits<char8_t>.
3964 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3965 locale_init.cc and localename.cc.
3966 * src/c++98/Makefile.in: Likewise.
3967 * src/c++98/locale_init.cc: Add initialization for the
3968 codecvt<char16_t, char8_t, mbstate_t> and
3969 codecvt<char32_t, char8_t, mbstate_t> facets.
3970 * src/c++98/localename.cc: Likewise.
3971 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3973 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3975 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3976 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3977 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3979 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3981 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3982 * doc/html/*: Regenerate.
3984 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3985 * doc/html/*: Regenerate.
3987 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3988 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3989 allocator type in is_constructible checks.
3990 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3991 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3992 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3993 problematic type from LWG 2586 discussion.
3994 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3995 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3997 * configure.ac: Check for C11 timespec_get function.
3998 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4000 * config.h.in: Regenerate.
4001 * configure: Regenerate.
4002 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4003 std for C++17 and up.
4005 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4006 * include/bits/stl_queue.h
4007 (priority_queue(const Compare&, const Container&, const Alloc&))
4008 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4010 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4012 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4013 * include/bits/stl_queue.h (queue, priority_queue): Add static
4014 assertions to enforce LWG 2566 requirement on value_type.
4015 * include/bits/stl_stack.h (stack): Likewise.
4018 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4020 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4021 * include/bits/std_abs.h: Add comment about LWG 2735.
4022 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4024 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4027 * include/std/version [__cpp_impl_destroying_delete]
4028 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4029 * libsupc++/new [__cpp_impl_destroying_delete]
4030 (__cpp_lib_destroying_delete): Likewise.
4031 (destroying_delete_t, destroying_delete): Likewise, but define even
4032 when __cpp_impl_destroying_delete is not defined.
4033 * testsuite/18_support/destroying_delete.cc: New test.
4035 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4038 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4039 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4040 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4041 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4043 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4046 * include/bits/fs_path.h (path::has_root_name)
4047 (path::has_root_directory, path::has_root_path)
4048 (path::has_relative_path, path::has_parent_path)
4049 (path::has_filename, path::has_stem, path::has_extension)
4050 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4052 * src/c++17/fs_path.cc (path::has_root_name)
4053 (path::has_root_directory, path::has_root_path)
4054 (path::has_relative_path, path::has_parent_path)
4055 (path::has_filename, path::_M_find_extension): Add noexcept.
4057 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4059 PR libstdc++/89102 (partial)
4060 * include/std/type_traits (common_type<>): Define.
4061 (common_type<T>): Derive from common_type<T, T>.
4062 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4063 Test zero-length template argument list.
4064 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4065 Test additional single argument cases.
4066 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4067 Adjust expected error.
4069 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4072 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4074 * include/bits/stl_stack.h (stack): Likewise.
4075 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4076 * testsuite/23_containers/queue/deduction.cc: New test.
4077 * testsuite/23_containers/stack/deduction.cc: New test.
4080 * include/std/type_traits (__is_convertible_helper)
4081 (__is_convertible_helper<_From, _To, false>): Revert changes to
4082 support is_nothrow_convertible.
4083 (__is_nt_convertible_helper): New helper.
4084 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4086 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4087 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4090 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4091 __is_alloc_insertable_impl. Replace single type member with two
4092 members, one for each of copy and move insertable.
4093 (__is_move_insertable): New trait for internal use.
4094 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4095 (vector::_S_nothrow_relocate(true_type)): New functions to
4096 conditionally check if __relocate_a can throw.
4097 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4098 on __is_move_insertable.
4099 (vector::_S_do_relocate): New overloaded functions to conditionally
4101 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4102 based on _S_use_relocate.
4103 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4104 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4105 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4108 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4109 parameter unnamed. Add message to static assertion.
4110 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4111 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4114 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4117 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4119 (__is_bitwise_relocatable): ... to this.
4120 (__relocate_a_1): Adapt.
4121 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4122 (__is_bitwise_relocatable): ... to this.
4124 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4127 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4128 final component as well as from _M_pathname. Append the dot using
4129 operator+= instead of only to _M_pathname.
4130 (path::_M_find_extension): Reformat slightly.
4131 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4132 Add more test cases.
4134 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4136 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4138 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4140 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4141 constexpr specifiers from arg and proj.
4143 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4144 __shared_ptr instantiations used by gcc4-compatible ABI.
4146 * include/experimental/forward_list (experimental::erase): Qualify
4148 * include/experimental/list (experimental::erase): Likewise.
4149 * include/std/forward_list (std::erase): Likewise.
4150 * include/std/list (std::erase): Likewise.
4152 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4154 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4155 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4156 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4157 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4158 * testsuite/ext/array_allocator/26875.cc: Likewise.
4159 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4160 * testsuite/util/replacement_memory_operators.h: Likewise.
4161 * testsuite/util/testsuite_allocator.h: Likewise.
4163 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4164 normal mode vector, even for debug mode.
4165 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4166 Define alias template for normal mode vector.
4168 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4171 * config/locale/generic/c_locale.h (__convert_from_v)
4172 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4173 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4174 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4175 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4177 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4180 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4181 data member with static member function _S_use_relocate().
4182 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4183 (vector::_M_default_append): Use _S_use_relocate() instead of
4186 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4189 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4192 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4193 write to stderr instead of using printf.
4195 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4198 * include/bits/char_traits.h (__constant_string_p,
4199 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4202 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4204 Implement C++20 P0600r1.
4205 * include/backward/hash_map: Add nodiscard attribute to empty.
4206 * include/backward/hash_set: Likewise.
4207 * backward/hashtable.h: Likewise.
4208 * include/bits/basic_string.h: Likewise.
4209 * include/bits/forward_list.h: Likewise.
4210 * include/bits/hashtable.h: Likewise.
4211 * include/bits/regex.h: Likewise.
4212 * include/bits/stl_deque.h: Likewise.
4213 * include/bits/stl_list.h: Likewise.
4214 * include/bits/stl_map.h: Likewise.
4215 * include/bits/stl_multimap.h: Likewise.
4216 * include/bits/stl_multiset.h: Likewise.
4217 * include/bits/stl_queue.h: Likewise.
4218 * include/bits/stl_set.h: Likewise.
4219 * include/bits/stl_stack.h: Likewise.
4220 * include/bits/stl_tree.h: Likewise.
4221 * include/bits/stl_vector.h: Likewise.
4222 * include/bits/unordered_map.h: Likewise.
4223 * include/bits/unordered_set.h: Likewise.
4224 * include/debug/array: Likewise.
4225 * include/experimental/any: Likewise.
4226 * include/experimental/bits/fs_path.h: Likewise.
4227 * include/experimental/internet: Likewise.
4228 * include/experimental/string_view: Likewise.
4229 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4231 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4233 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4235 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4237 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4239 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4241 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4243 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4245 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4246 info_fn_imps.hpp: Likewise.
4247 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4248 left_child_next_sibling_heap_.hpp: Likewise.
4249 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4251 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4253 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4255 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4257 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4259 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4261 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4263 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4264 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4265 * include/ext/rope: Likewise.
4266 * include/ext/slist: Likewise.
4267 * include/ext/vstring.h: Likewise.
4268 * include/profile/array: Likewise.
4269 * include/std/array: Likewise.
4270 * include/tr1/array: Likewise.
4271 * include/tr1/hashtable.h: Likewise.
4272 * include/tr1/regex: Likewise.
4273 * include/tr2/dynamic_bitset: Likewise.
4274 * include/bits/alloc_traits.h: Add nodiscard attribute to
4276 * include/experimental/memory_resource: Likewise.
4277 * include/ext/alloc_traits.h: Likewise.
4278 * include/ext/array_allocator.h: Likewise.
4279 * include/ext/bitmap_allocator.h: Likewise.
4280 * include/ext/debug_allocator.h: Likewise.
4281 * include/ext/extptr_allocator.h: Likewise.
4282 * include/ext/mt_allocator.h: Likewise.
4283 * include/ext/new_allocator.h: Likewise.
4284 * include/ext/pool_allocator.h: Likewise.
4285 * include/ext/throw_allocator.h: Likewise.
4286 * include/std/scoped_allocator: Likewise.
4287 * libsupc++/eh_alloc.cc: Likewise.
4288 * include/std/future: Add nodiscard attribute to async.
4289 * libsupc++/new: Add nodiscard attribute to new.
4291 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4296 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4297 * include/bits/shared_ptr.h
4298 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4299 (allocate_shared): Change to use new tag type.
4300 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4301 Declare new member function.
4302 (_Sp_alloc_shared_tag): Define new type.
4303 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4304 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4305 _Sp_make_shared_tag::_S_eq to check type_info.
4306 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4307 Constrain to prevent being called with _Sp_alloc_shared_tag.
4308 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4309 Replace constructor with ...
4310 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4311 reference parameter so address of the new object can be returned to
4312 the caller. Obtain the allocator from the tag type.
4313 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4314 constructor with ...
4315 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4316 to the __shared_count constructor.
4317 (__allocate_shared): Change to use new tag type.
4318 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4320 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4322 * src/c++17/fs_ops.cc
4323 (equivalent(const path&, const path&, error_code&))
4324 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4325 compare files instead of relying on incomplete info returned by stat.
4328 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4329 if the path is already absolute.
4330 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4331 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4334 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4335 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4336 of filesystem::exists.
4337 (create_directories(const path&, error_code&)): Add assertions.
4338 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4339 Add workaround for bug in _wstat for paths with trailing slash.
4340 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4341 for expected behaviour on mingw.
4342 * testsuite/experimental/filesystem/operations/create_directories.cc:
4344 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4345 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4346 not test permissions on mingw targets.
4348 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4350 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4351 constructors and open members taking wide strings. Fix patterns for
4352 filesystem::path members to match wstring_view parameters. Add
4353 exports for shared_ptr members used by directory iterators.
4354 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4355 error code parameter if the file doesn't exist.
4356 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4358 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4359 values for mingw targets, where "/" is not an absolute path. Do not
4360 test symlinks on mingw targets.
4361 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4362 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4364 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4365 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4366 that each component of the path is created.
4367 * testsuite/experimental/filesystem/operations/create_directories.cc:
4369 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4370 permissions on mingw targets.
4371 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4372 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4373 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4374 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4376 * testsuite/experimental/filesystem/operations/permissions.cc:
4378 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4379 symlinks or permissions on mingw targets.
4380 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4381 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4382 symlinks on mingw targets.
4383 * testsuite/experimental/filesystem/operations/remove_all.cc:
4385 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4386 permissions on mingw targets.
4387 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4388 test symlinks on mingw targets.
4389 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4392 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4395 Warn about unused comparisons of shared_ptr/unique_ptr
4396 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4397 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4398 <, <=, >, >= for shared_ptr.
4399 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4401 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4403 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4404 as 201611L, because P0497R0 changes are supported.
4405 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4407 * include/bits/erase_if.h [__cplusplus > 201703L]
4408 (__cpp_lib_erase_if): Only define for C++2a.
4409 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4410 (__cpp_lib_null_iterators): Define.
4411 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4412 (__cpp_lib_null_iterators): Define.
4413 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4415 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4417 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4419 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4420 changes are supported.
4421 * include/std/optional (__cpp_lib_optional): Likewise.
4422 * include/std/variant (__cpp_lib_variant): Likewise.
4423 * include/std/version [!__STRICT_ANSI__]
4424 (__cpp_lib_uncaught_exceptions): Define as long integer.
4425 [__cplusplus >= 201703L] (__cpp_lib_any)
4426 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4427 (__cpp_lib_variant): Define for C++17.
4428 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4430 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4433 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4435 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4439 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4441 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4444 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4446 * doc/xml/manual/intro.xml: Include new section.
4447 * doc/xml/manual/status_cxx2017.xml: Document more
4448 implementation-defined properties of the library.
4449 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4450 * doc/html/*: Regenerate.
4452 * include/bits/refwrap.h [__cplusplus > 201703L]
4453 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4454 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4455 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4457 (reference_wrapper::operator()): Add static assertion.
4458 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4460 * include/std/chrono (duration_values::zero(), duration_values::min())
4461 (duration_values::max()): Add noexcept.
4462 (duration::zero(), duration::min(), duration::max()): Likewise.
4463 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4464 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4465 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4467 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4469 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4471 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4472 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4474 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4477 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4478 specialization for C++17 (P0513R0, LWG 2817).
4479 * testsuite/20_util/hash/nullptr.cc: New test.
4482 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4483 pattern for std::basic_stringbuf::str().
4485 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4486 basic_ostream::operator<< patterns.
4488 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4490 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4491 test failures on targets with 32-bit time_t.
4493 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4494 * include/std/deque: Likewise.
4495 * include/std/forward_list: Likewise.
4496 * include/std/list: Likewise.
4497 * include/std/string: Likewise.
4498 * include/std/vector: Likewise.
4499 * include/std/version: Likewise.
4500 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4501 * testsuite/23_containers/deque/erasure.cc: Likewise.
4502 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4503 * testsuite/23_containers/list/erasure.cc: Likewise.
4504 * testsuite/23_containers/map/erasure.cc: Likewise.
4505 * testsuite/23_containers/set/erasure.cc: Likewise.
4506 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4507 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4508 * testsuite/23_containers/vector/erasure.cc: Likewise.
4510 * include/experimental/internet [AI_NUMERICSERV]
4511 (resolver_base::numeric_service): Define conditionally.
4512 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4514 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4517 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4518 Jonathan Wakely <jwakely@redhat.com>
4521 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4522 (GLIBCXX_3.4.26): Add new exports.
4523 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4524 correct list of sources.
4525 * include/Makefile.in: Regenerate.
4526 * include/std/ostream (operator<<(nullptr_t)): New member function.
4527 * src/c++17/ostream-inst.cc: New file.
4528 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4531 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4533 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4534 of the source file containing the caller.
4535 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4536 directories created by test.
4537 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4539 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4541 * testsuite/experimental/filesystem/iterators/
4542 recursive_directory_iterator.cc: Likewise.
4544 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4546 PR tree-optimization/88775
4547 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4548 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4549 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4550 instead of __builtin_constant_p if available. Don't bother with
4551 the pointer comparison in C++11 and earlier.
4553 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4557 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4560 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4562 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4563 for filesystem::path. Give variables more distinctive names.
4565 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4566 member function to perform non-trivial assignment.
4567 (_Optional_payload_base::_M_move_assign): Likewise.
4568 (_Optional_payload<T, true, false, true>::operator=)
4569 (_Optional_payload<T, true, true, false>::operator=)
4570 (_Optional_payload<T, true, false, false>::operator=): Call
4571 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4574 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4575 test std::complex<long double> if long double format is IBM128.
4576 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4579 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4581 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4582 for old std::unique_ptr layout.
4583 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4584 to become valueless. Add filesystem::path tests.
4587 * include/std/optional (_Optional_payload_base): New class template
4588 for common code hoisted from _Optional_payload specializations. Use
4589 a template for the union, to allow a partial specialization for
4590 types with non-trivial destructors. Add constructors for in-place
4591 initialization to the union.
4592 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4593 to perform non-trivial copy construction, instead of relying on
4594 non-standard copy elision in a delegating constructor.
4595 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4596 non-trivial move construction.
4597 (_Optional_payload): Derive from _Optional_payload_base and use it
4598 for everything except the non-trivial assignment operators, which are
4600 (_Optional_payload<false, C, M>): Derive from the specialization
4601 _Optional_payload<true, false, false> and add a destructor.
4602 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4603 Forward to corresponding members of _Optional_payload.
4604 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4605 Hoist common members from _Optional_base.
4606 (_Optional_base): Make all members and base class public.
4607 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4608 _Optional_base_impl.
4609 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4610 support for new std::optional layout.
4611 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4614 * include/bits/locale_conv.h: Use <> for includes not "".
4615 * include/ext/random: Likewise.
4616 * include/ext/vstring.h: Likewise.
4618 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4620 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4621 (GLIBCXX_3.4.21): Likewise.
4623 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4626 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4627 to match the one that controls whether utimbuf and utime are declared.
4629 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4632 * include/bits/char_traits.h (char_traits::move): Do not pass null
4633 pointers to memmove.
4634 * include/bits/locale_facets.h
4635 (ctype<char>::widen(const char*, const char*, char*)): Do not
4636 pass null pointers to memcpy.
4637 (ctype<char>::narrow(const char*, const char*, char, char*)):
4639 (ctype<char>::do_widen(const char*, const char*, char*)):
4641 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4644 * doc/xml/manual/spine.xml: Update copyright years.
4645 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4646 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4647 for C++17 filesystem library.
4648 * doc/html/*: Regenerate.
4650 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4651 * config.h.in: Regenerate.
4652 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4653 alphabetically and add missing entries for copy_symlink,
4654 hard_link_count, rename, and resize_file.
4655 * configure: Regenerate.
4656 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4657 used unconditionally.
4658 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4659 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4660 supports truncating to zero length.
4661 * testsuite/27_io/filesystem/operations/all.cc: New test.
4662 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4664 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4667 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4668 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4669 * config.h.in: Regenerate.
4670 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4671 remaining std::filesystem types and functions.
4672 * configure: Regenerate.
4673 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4674 * src/c++17/Makefile.in: Regenerate.
4675 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4676 here, and change name of included file.
4677 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4678 here, and change name of included file.
4679 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4680 path to dir-common.h.
4681 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4682 path to ops-common.h. Disable -Wunused-parameter warnings.
4683 (internal_file_clock): Define unconditionally.
4684 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4686 (do_copy_file, do_space): Move definitions to ops.common.h.
4687 (copy, file_size, hard_link_count, last_write_time, space): Only
4688 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4690 (last_write_time, read_symlink): Remove unused attributes from
4692 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4693 * src/filesystem/Makefile.in: Regenerate.
4694 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4695 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4696 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4697 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4698 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4699 dummy types and functions instead of using #error.
4700 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4701 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4703 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4704 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4705 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4706 to account for new namespace.
4707 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4708 -lstdc++fs from dg-options.
4709 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4710 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4711 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4712 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4713 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4715 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4716 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4718 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4719 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4720 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4721 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4722 * testsuite/27_io/filesystem/operations/create_directories.cc:
4724 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4725 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4726 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4727 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4728 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4729 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4730 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4731 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4732 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4733 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4734 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4735 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4736 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4737 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4738 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4739 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4740 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4741 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4743 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4747 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4748 typeinfo and vtables less greedy.
4749 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4750 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4751 * src/c++17/Makefile.in: Regenerate.
4752 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4753 here, and change name of included file.
4754 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4755 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4757 * src/filesystem/Makefile.in: Regenerate.
4758 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4759 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4760 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4761 from dg-options and remove dg-require-filesystem-ts.
4762 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4763 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4764 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4765 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4766 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4767 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4768 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4769 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4770 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4771 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4772 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4773 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4774 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4775 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4776 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4777 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4778 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4779 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4780 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4781 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4782 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4784 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4785 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4786 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4787 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4788 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4789 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4790 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4791 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4792 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4793 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4794 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4795 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4797 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4799 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4801 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4803 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4804 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4805 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4806 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4807 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4808 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4809 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4810 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4811 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4812 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4814 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4815 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4816 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4817 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4818 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4821 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4822 Check is_trivially_copyable instead of is_scalar.
4823 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4824 contained value can throw and its type is trivially copyable then
4825 construct into a temporary variant and move from it, to provide the
4826 strong exception safety guarantee.
4827 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4829 * testsuite/20_util/variant/87431.cc: New test.
4830 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4831 conversion causes valueless state.
4834 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4835 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4836 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4837 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4838 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4840 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4842 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4843 (file_time_type): Redefine in terms of __file_clock.
4844 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4846 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4848 (internal_file_lock): New helper type for accessing __file_clock.
4849 (do_copy_file): Use internal_file_lock to convert system time to
4851 (last_write_time(const path&, error_code&)): Likewise.
4852 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4854 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4856 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4857 for const member functions of std::basic_string.
4858 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4860 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4861 Make non-standard constructor private.
4862 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4864 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4865 explicit instantiations for C++17 as well as earlier dialects.
4866 * src/c++17/Makefile.am: Add new source files.
4867 * src/c++17/Makefile.in: Regenerate.
4868 * src/c++17/cow-string-inst.cc: New file defining explicit
4869 instantiations for basic_string member functions added in C++17.
4870 * src/c++17/string-inst.cc: Likewise.
4872 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4873 copy/move constructors for old std::basic_string.
4874 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4875 (basic_string::reference, basic_string::const_reference): Define
4876 as plain references for C++11 and later.
4877 (basic_string::basic_string()): Put constructor body outside
4878 preprocessor conditional groups.
4879 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4880 instead of copying it.
4881 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4883 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4885 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4886 cases for old basic_string.
4887 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4888 allocator-extended constructors unconditionally. Add extra members to
4889 allocator type when using old string ABI.
4890 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4892 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4894 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4895 -fno-inline added to test flags.
4897 * testsuite/21_strings/basic_string/requirements/
4898 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4900 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4901 assertion failures with old std::string ABI.
4903 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4905 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4906 functions that will only erase elements at the end.
4907 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4908 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4909 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4911 (path::_List::pop_back()): Define.
4912 (path::_List::_M_erase_from(const_iterator)): Define.
4913 (path::operator/=(const path&)): Use pop_back to remove last component
4914 and _M_erase_from to remove multiple components.
4915 (path::_M_append(basic_string_view<value_type>)): Likewise.
4916 (path::operator+=(const path&)): Likewise.
4917 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4918 (path::remove_filename()): Likewise.
4919 (path::lexically_normal()): Use _List::_Impl iterators instead of
4920 path::iterator. Use pop_back to remove components from the end. Clear
4921 trailing filename, instead of using erase(const_iterator) to remove
4922 a non-final component.
4923 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4925 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4927 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4928 incorrect treatment of empty filename after trailing slash.
4929 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4931 * testsuite/21_strings/basic_string/modifiers/assign/char/
4932 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4934 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4935 move_assign_optim.cc: Likewise.
4937 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4938 Jakub Jelinek <jakub@redhat.com>
4941 * include/experimental/memory: Replace UTF-8 quote characters.
4942 * include/std/future: Replace UTF-8 "em dash" characters.
4944 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4947 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4948 * include/debug/forward_list: Likewise.
4949 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4951 * include/experimental/chrono: Likewise.
4952 * include/experimental/functional: Likewise.
4953 * include/experimental/ratio: Likewise.
4954 * include/experimental/system_error: Likewise.
4955 * include/experimental/tuple: Likewise.
4956 * include/experimental/type_traits: Likewise.
4957 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4958 * include/parallel/multiseq_selection.h: Likewise.
4961 * config/abi/pre/gnu.ver: Add missing exports.
4962 * testsuite/22_locale/collate_byname/88681.cc: New test.
4963 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4964 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4966 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4968 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4969 initializer_list<value_type> and from input iterator ranges.
4970 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4972 * testsuite/experimental/string_view/element_access/char/empty.cc:
4973 Fix year range in copyright header.
4975 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4977 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4978 Fix year range in copyright header.
4980 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4982 Update copyright years.
4984 Copyright (C) 2019 Free Software Foundation, Inc.
4986 Copying and distribution of this file, with or without modification,
4987 are permitted in any medium without royalty provided the copyright
4988 notice and this notice are preserved.