1 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
3 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
5 * include/std/numeric (reduce): Fix Doxygen markup.
8 * include/std/type_traits (is_function): Simplify definition. Remove
9 partial specializations for function types.
10 (__is_referenceable): Simplify definition.
11 * testsuite/20_util/bind/91371.cc: New test.
12 * testsuite/20_util/is_function/91371.cc: New test.
13 * testsuite/20_util/is_function/value.cc: Check more pointer types.
14 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
15 * testsuite/20_util/is_object/91371.cc: New test.
17 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
19 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
21 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
24 * include/bits/std_function.h (__check_func_return_type): Remove.
25 (function::_Callable): Use std::__is_invocable_impl instead of
26 __check_func_return_type.
27 * include/std/type_traits (__is_invocable_impl): Add another defaulted
28 template parameter. Define a separate partial specialization for
29 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
30 with a check that models delayed temporary materialization.
31 * testsuite/20_util/function/91456.cc: New test.
32 * testsuite/20_util/is_invocable/91456.cc: New test.
34 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
36 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
38 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
40 Implement C++20 p0879 - Constexpr for swap and swap related functions.
41 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
42 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
44 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
45 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
46 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
47 * include/bits/move.h (swap): Add constexpr.
48 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
49 (__gcd, __rotate, rotate, __partition, __heap_select)
50 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
51 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
52 (__introselect, __chunk_insertion_sort, next_permutation)
53 (prev_permutation, partition, partial_sort, nth_element, sort)
54 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
55 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
56 (swap_ranges): Add constexpr.
57 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
58 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
60 * include/std/type_traits (swap): Add constexpr.
61 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
62 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
63 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
64 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
65 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
66 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
67 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
68 * testsuite/25_algorithms/partition/constexpr.cc: New test.
69 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
70 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
71 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
72 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
73 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
74 * testsuite/25_algorithms/sort/constexpr.cc: New test.
75 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
76 * testsuite/25_algorithms/swap/constexpr.cc: New test.
77 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
79 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
82 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
84 * include/std/tuple (__unpack_std_tuple): New variable template and
85 partial specializations.
86 (apply, make_from_tuple): Add noexcept-specifier.
87 * testsuite/20_util/tuple/apply/2.cc: New test.
88 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
90 2019-08-09 Corentin Gay <gay@adacore.com>
92 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
93 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
94 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
95 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
96 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
99 2019-08-09 Alexandre Oliva <oliva@adacore.com>
102 (normal_mv_distribution::param_type::param_type): New private
103 ctor taking a decomposed varcov matrix, for use by...
104 (operator>>): ... this, befriended.
105 * include/ext/random.tcc (operator>>): Use it.
106 (normal_mv_distribution::param_type::_M_init_lower): Adjust
107 member function name in exception message.
109 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
111 P0325R4 to_array from LFTS with updates
112 * include/experimental/array (to_array): Qualify call to __to_array.
113 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
114 * include/std/version (__cpp_lib_to_array): Likewise.
115 * testsuite/23_containers/array/creation/1.cc: New test.
116 * testsuite/23_containers/array/creation/2.cc: New test.
117 * testsuite/23_containers/array/creation/3_neg.cc: New test.
118 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
119 Use zero for dg-error line number.
121 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
123 P1651R0 bind_front should not unwrap reference_wrapper
124 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
125 * include/std/version (__cpp_lib_bind_front): Update value.
126 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
128 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
130 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
131 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
132 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
133 specializations for __float128.
134 * testsuite/26_numerics/numbers/float128.cc: New test.
136 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
138 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
141 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
143 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
144 in <algorithm> and <utility> Headers.
145 Implement C++20 p1023 - constexpr comparison operators for std::array.
146 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
147 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
148 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
149 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
150 none_of, partition_copy, partition_point, remove, remove_if,
151 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
152 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
153 count_if, equal, find, find_first_of, find_if, for_each, generate,
154 generate_n, lexicographical_compare, merge, mismatch, replace,
155 replace_if, search, search_n, set_difference, set_intersection,
156 set_symmetric_difference, set_union, transform, unique_copy):
158 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
159 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
160 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
161 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
162 Use const ref instead of ref arg;
163 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
164 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
165 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
166 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
167 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
168 __iter_comp_iter): Mark constexpr.
169 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
170 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
171 none_of, any_of, find_if_not, is_partitioned, partition_point,
172 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
173 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
174 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
175 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
176 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
177 __equal_range, equal_range, binary_search, __includes, includes,
178 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
179 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
180 is_sorted_until, __is_permutation, is_permutation, for_each, find,
181 find_if, find_first_of, adjacent_find, count, count_if, search,
182 search_n, transform, replace, replace_if, generate, generate_n,
183 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
184 set_intersection, __set_difference, set_difference,
185 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
186 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
187 wrappers around __builtin_memmove and __builtin_memcmp
189 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
190 copy, move, __copy_move_b, __copy_move_backward_a,
191 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
192 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
193 __lexicographical_compare_impl, __lexicographical_compare,
194 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
195 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
196 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
197 is_heap): Mark constexpr.
198 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
199 is_heap): Mark constexpr.
200 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
201 * include/std/array: Make comparison ops constexpr.
202 * include/std/utility: Make exchange constexpr.
203 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
204 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
205 * testsuite/23_containers/array/tuple_interface/
206 tuple_element_neg.cc: Adjust.
207 * testsuite/20_util/exchange/constexpr.cc: New.
208 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
209 * testsuite/25_algorithms/constexpr_macro.cc: New.
210 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
211 * testsuite/25_algorithms/all_of/constexpr.cc: New.
212 * testsuite/25_algorithms/any_of/constexpr.cc: New.
213 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
214 * testsuite/25_algorithms/copy/constexpr.cc: New.
215 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
216 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
217 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
218 * testsuite/25_algorithms/count/constexpr.cc: New.
219 * testsuite/25_algorithms/count_if/constexpr.cc: New.
220 * testsuite/25_algorithms/equal/constexpr.cc: New.
221 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
222 * testsuite/25_algorithms/fill/constexpr.cc: New.
223 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
224 * testsuite/25_algorithms/find/constexpr.cc: New.
225 * testsuite/25_algorithms/find_end/constexpr.cc: New.
226 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
227 * testsuite/25_algorithms/find_if/constexpr.cc: New.
228 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
229 * testsuite/25_algorithms/for_each/constexpr.cc: New.
230 * testsuite/25_algorithms/generate/constexpr.cc: New.
231 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
232 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
233 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
234 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
235 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
236 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
237 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
238 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
239 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
240 * testsuite/25_algorithms/merge/constexpr.cc: New.
241 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
242 * testsuite/25_algorithms/none_of/constexpr.cc: New.
243 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
244 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
245 * testsuite/25_algorithms/remove/constexpr.cc: New.
246 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
247 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
248 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
249 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
250 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
251 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
252 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
253 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
254 * testsuite/25_algorithms/search/constexpr.cc: New.
255 * testsuite/25_algorithms/search_n/constexpr.cc: New.
256 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
257 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
258 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
259 * testsuite/25_algorithms/set_union/constexpr.cc: New.
260 * testsuite/25_algorithms/transform/constexpr.cc: New.
261 * testsuite/25_algorithms/unique/constexpr.cc: New.
262 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
263 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
265 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
267 * include/std/memory (make_obj_using_allocator): Qualify call to
268 uses_allocator_construction_args.
270 P0631R4 Math Constants
271 * include/Makefile.am: Add new header.
272 * include/Makefile.in: Regenerate.
273 * include/precompiled/stdc++.h: Include new header.
274 * include/std/numbers: New header.
275 * include/std/version (__cpp_lib_math_constants): Define.
276 * testsuite/26_numerics/numbers/1.cc: New test.
277 * testsuite/26_numerics/numbers/2.cc: New test.
278 * testsuite/26_numerics/numbers/3.cc: New test.
279 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
281 * include/std/bit: Add Doxygen comments.
284 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
285 constraints on deleter that should only apply to the constructor.
286 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
287 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
288 constraints on deleter here.
289 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
291 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
294 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
296 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
298 * testsuite/18_support/51333.cc: New test.
300 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
302 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
303 to the Doxygen manual. Avoid a "here" link on the way.
304 Fix another broken link to Doxygen docblocks.
306 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
308 * include/std/bit (__cpp_lib_endian): Define.
309 * include/std/version (__cpp_lib_endian): Define.
310 * testsuite/26_numerics/endian/2.cc: New.
311 * testsuite/26_numerics/endian/3.cc: New.
312 * testsuite/26_numerics/endian/4.cc: New.
314 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
316 * testsuite/util/testsuite_iterators.h
317 (bidirectional_iterator_wrapper): Fix type comment.
318 (random_access_iterator_wrapper): Likewise.
320 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
322 * include/std/bit (endian): Move definition here as per P1612R1.
323 * include/std/type_traits (endian): Remove definition from here.
324 * testsuite/20_util/endian/1.cc: Rename to ...
325 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
327 2019-07-25 Martin Liska <mliska@suse.cz>
328 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
331 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
333 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
334 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
335 * testsuite/ext/new_allocator/check_new.cc: Likewise.
337 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
339 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
340 * testsuite/26_numerics/bit/bit.count/*: Here.
342 * include/std/bit (__rotl, __rotr): Change second parameter from
343 unsigned int to int and handle negative values.
344 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
345 parameter from unsigned int to int. Add nodiscard attribute.
346 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
347 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
349 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
350 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
353 * include/std/bit (__ceil2): Make unrepresentable results undefined,
354 as per P1355R2. Add debug assertion. Perform one left shift, not two,
355 so that out of range values cause undefined behaviour. Ensure that
356 shift will still be undefined if left operand is promoted.
357 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
358 unrepresentable values with checks that they are not core constant
360 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
362 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
364 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
365 sized deallocation size computation.
367 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
369 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
371 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
373 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
374 (~_Temporary_buffer()): Use latter.
375 (_Temporary_buffer(_FIterator, size_type)): Likewise.
377 2019-07-17 Andreas Schwab <schwab@suse.de>
379 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
381 2019-07-16 Jason Merrill <jason@redhat.com>
383 * include/std/memory (uses_allocator_construction_args): Add parens
386 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
388 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
390 * include/experimental/string_view (__detail::__idt): Remove.
391 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
392 Use __type_identity_t instead of __detail::__idt;
393 * include/std/string_view (__detail::__idt): Remove.
394 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
395 Use __type_identity_t instead of __detail::__idt;
396 * include/std/type_traits (__type_identity_t): New alias template.
398 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
399 and floating point atomics.
401 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
403 * doc/xml/manual/configure.xml: Improve documentation of
404 --enable-libstdcxx-time option.
406 * include/bits/atomic_base.h (__atomic_impl): New namespace for
407 wrappers around atomic built-ins.
408 (__atomic_float, __atomic_ref): New class templates for use as base
410 * include/std/atomic (atomic<float>, atomic<double>)
411 (atomic<long double>): New explicit specializations.
412 (atomic_ref): New class template.
413 (__cpp_lib_atomic_ref): Define.
414 * include/std/version (__cpp_lib_atomic_ref): Define.
415 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
416 * testsuite/29_atomics/atomic_float/1.cc: New test.
417 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
418 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
419 * testsuite/29_atomics/atomic_ref/float.cc: New test.
420 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
421 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
422 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
423 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
425 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
427 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
428 throw() with _GLIBCXX_NOTHROW.
429 (__atomic_add_dispatch): Return after performing atomic increment.
431 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
433 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
434 (__exchange_and_add): Replace static specifier with always_inline
436 (__exchange_and_add_single, __atomic_add_single): Likewise.
437 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
438 combine !__gthread_active_p() and !__GTHREADS branches.
440 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
443 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
444 * configure: Regenerate.
445 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
447 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
448 * testsuite/util/testsuite_abi.cc: Add new symbol version.
450 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
452 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
453 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
454 instead of __is_identifier to detect Clang support.
456 2019-07-02 Jim Wilson <jimw@sifive.com>
458 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
460 * configure: Regenerate.
462 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
465 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
466 for the what_arg parameters.
467 (filesystem_error::filesystem_error): Pass system_error::what() to
468 the _Impl constructor.
469 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
470 filesystem_error::what() contains system_error::what().
472 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
474 * include/std/charconv (chars_format): Define bitmask type.
475 * testsuite/20_util/to_chars/chars_format.cc: New test.
477 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
478 * include/std/bit (_If_is_unsigned_integer_type): Remove.
479 (_If_is_unsigned_integer): Use __is_unsigned_integer.
480 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
481 (countl_one(byte), countr_zero(byte), countr_one(byte))
482 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
483 (log2p1(byte)): Remove.
484 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
485 (__detail::__is_int_to_chars_type): Remove.
486 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
487 and __is_unsigned_integer.
488 * include/std/type_traits (__is_one_of): Move here from <charconv>.
489 (__is_signed_integer, __is_unsigned_integer): New helpers.
490 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
492 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
493 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
494 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
495 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
496 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
497 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
498 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
499 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
500 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
501 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
503 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
505 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
508 2019-06-25 Jakub Jelinek <jakub@redhat.com>
510 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
511 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
512 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
513 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
515 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
517 * include/std/numeric (midpoint(T, T)): Change implementation for
518 floating-point types to avoid incorrect rounding of denormals.
519 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
520 rounding with denormals.
521 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
522 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
524 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
526 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
528 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
530 * configure: Regenerate.
532 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
533 Qualify calls to __never_valueless.
535 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
538 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
539 vector<bool> for test.
540 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
542 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
544 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
546 (istream_iterator::_M_read()): Do not check stream state before
547 attempting extraction. Set stream pointer to null when extraction
549 (operator==(const istream_iterator&, const istream_iterator&)): Change
550 to be a hidden friend of istream_iterator.
551 (operator!=(const istream_iterator&, const istream_iterator&)):
553 (ostream_iterator::ostream_iterator()): Add default constructor.
554 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
556 * testsuite/24_iterators/istream_iterator/1.cc: New test.
557 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
558 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
559 constructor taking a string.
560 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
563 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
564 Jonathan Wakely <jwakely@redhat.com>
567 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
568 values of type bool for vector<bool> elements.
569 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
570 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
572 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
574 PR libstdc++/90920 partially revert r263433
575 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
576 (rotate): Remove checks.
577 * testsuite/25_algorithms/rotate/90920.cc: New test.
579 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
580 category used in invocable check.
581 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
582 * testsuite/26_numerics/reduce/2.cc: New test.
584 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
586 * include/bits/algorithmfwd.h: Change title of doc group.
587 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
589 * include/bits/stl_numeric.h: Define doc group and add algos to it.
590 * include/std/numeric (__is_random_access_iter): New internal trait.
591 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
592 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
593 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
594 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
595 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
596 * testsuite/26_numerics/reduce/1.cc: New test.
597 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
598 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
599 * testsuite/26_numerics/transform_reduce/1.cc: New test.
600 * testsuite/util/testsuite_iterators.h (test_container::size()): New
603 * include/c_global/cstddef (std::byte): Perform arithmetic operations
604 in unsigned int to avoid promotion (LWG 2950).
606 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
608 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
611 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
613 PR libstdc++/90281 Fix string conversions for filesystem::path
614 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
615 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
616 __str_codecvt_in_all to fail for partial conversions and throw on
618 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
619 (path::_Cvt<char8_t>): Add explicit specialization.
620 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
622 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
623 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
624 instead of codecvt_utf8. Use __str_codecvt_in_all and
625 __str_codecvt_out_all.
626 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
627 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
628 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
629 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
630 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
631 after converting to UTF-8.
632 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
633 __str_codecvt_in_all.
634 (path::string): Fix initialization of string types with different
636 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
637 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
638 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
640 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
641 return false for partial conversions.
642 * include/experimental/bits/fs_path.h (u8path):
643 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
644 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
645 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
646 instead of codecvt_utf8. Use __str_codecvt_in_all and
647 __str_codecvt_out_all.
648 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
649 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
650 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
651 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
652 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
653 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
654 __str_codecvt_in_all.
655 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
656 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
657 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
658 __str_codecvt_in_all.
659 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
660 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
661 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
662 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
663 strings and with Unicode characters outside the basic multilingual
665 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
666 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
667 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
668 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
669 * testsuite/experimental/filesystem/path/native/string.cc: Test with
670 empty strings and with Unicode characters outside the basic
673 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
674 Jonathan Wakely <jwakely@redhat.com>
676 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
677 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
678 deallocate node if insertion fails.
679 (_Hashtable::_M_insert_multi_node): Likewise.
680 (_Hashtable::_M_reinsert_node): Pass additional key argument.
681 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
682 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
683 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
684 (_Hashtable::extract(const _Key&)): Likewise.
685 (_Hashtable::_M_merge_unique): Pass additional key argument.
686 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
688 (_Hashtable::_M_insert): Likewise.
689 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
690 (_Hashtable_alloc): Add comments to functions with misleading names.
692 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
694 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
696 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
697 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
698 header for std::allocator.
699 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
700 using-declaration for std::size_t.
701 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
703 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
705 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
706 * testsuite/experimental/map/erasure.cc: Include <string> for
708 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
710 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
712 * include/experimental/type_traits (experimental::nonesuch): Use
713 pragma to disable -Wctor-dtor-privacy warnings.
714 * include/std/type_traits (__is_convertible_helper<From, To, false>)
715 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
717 * include/std/version (__cpp_lib_bind_front): Add missing macro.
719 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
721 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
722 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
723 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
724 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
726 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
727 (variant::emplace): Change static_assert messages from "should be"
729 (hash<monostate>::operator()): Remove name of unused parameter.
731 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
734 * include/Makefile.am: Add new <bits/charconv.h> header.
735 * include/Makefile.in: Regenerate.
736 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
737 (to_string(long), to_string(unsigned long), to_string(long long))
738 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
739 * include/bits/charconv.h: New header.
740 (__detail::__to_chars_len): Move here from <charconv>.
741 (__detail::__to_chars_10_impl): New function extracted from
742 __detail::__to_chars_10.
743 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
744 (__to_chars_unsigned_type): New class template that reuses
745 __make_unsigned_selector_base::__select to pick a type.
746 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
747 (__detail::__to_chars_len): Move to new header.
748 (__detail::__to_chars_10): Add inline specifier. Move code doing the
749 output to __detail::__to_chars_10_impl and call that.
750 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
751 * testsuite/21_strings/basic_string/numeric_conversions/char/
752 to_string.cc: Fix reference in comment. Remove unused variable.
753 * testsuite/21_strings/basic_string/numeric_conversions/char/
754 to_string_int.cc: New test.
756 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
758 Fix ConstexprIterator requirements tests - No constexpr algorithms!
759 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
760 Replace copy with hand-rolled loop.
761 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
764 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
766 Test for C++20 p0858 - ConstexprIterator requirements.
767 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
769 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
772 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
774 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
776 * include/bits/c++config: Rename all macros of the form __PSTL* to
778 * include/std/algorithm: Likewise.
779 * include/std/execution: Likewise.
780 * include/std/numeric: Likewise.
781 * include/std/memory: Likewise.
782 * include/pstl/glue_memory_impl.h: Likewise.
783 * include/pstl/numeric_impl.h: Likewise.
784 * include/pstl/glue_memory_defs.h: Likewise.
785 * include/pstl/execution_defs.h: Likewise.
786 * include/pstl/utils.h: Likewise.
787 * include/pstl/algorithm_fwd.h: Likewise.
788 * include/pstl/unseq_backend_simd.h: Likewise.
789 * include/pstl/glue_execution_defs.h: Likewise.
790 * include/pstl/algorithm_impl.h: Likewise.
791 * include/pstl/parallel_impl.h: Likewise.
792 * include/pstl/memory_impl.h: Likewise.
793 * include/pstl/glue_numeric_defs.h: Likewise.
794 * include/pstl/parallel_backend_utils.h: Likewise.
795 * include/pstl/glue_algorithm_defs.h: Likewise.
796 * include/pstl/parallel_backend.h: Likewise.
797 * include/pstl/glue_numeric_impl.h: Likewise.
798 * include/pstl/parallel_backend_tbb.h: Likewise.
799 * include/pstl/numeric_fwd.h: Likewise.
800 * include/pstl/glue_algorithm_impl.h: Likewise.
801 * include/pstl/execution_impl.h: Likewise.
802 * include/pstl/pstl_config.h: Likewise.
803 * testsuite/util/pstl/pstl_test_config.h: Likewise.
804 * testsuite/util/pstl/test_utils.h: Likewise.
805 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
807 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
809 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
811 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
812 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
813 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
814 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
815 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
817 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
818 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
819 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
820 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
821 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
823 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
824 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
825 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
826 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
827 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
829 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
830 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
831 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
833 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
835 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
836 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
837 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
839 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
841 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
843 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
845 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
847 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
849 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
851 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
853 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
855 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
857 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
859 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
861 Rename header guards to be consistent with upstream project's
863 * include/pstl/glue_memory_impl.h: Rename all macros of the form
864 _PSTL_(.*)_H to _PSTL_\U\1_H.
865 * include/pstl/numeric_impl.h: Likewise.
866 * include/pstl/glue_memory_defs.h: Likewise.
867 * include/pstl/execution_defs.h: Likewise.
868 * include/pstl/utils.h: Likewise.
869 * include/pstl/algorithm_fwd.h: Likewise.
870 * include/pstl/unseq_backend_simd.h: Likewise.
871 * include/pstl/glue_execution_defs.h: Likewise.
872 * include/pstl/algorithm_impl.h: Likewise.
873 * include/pstl/parallel_impl.h: Likewise.
874 * include/pstl/memory_impl.h: Likewise.
875 * include/pstl/glue_numeric_defs.h: Likewise.
876 * include/pstl/parallel_backend_utils.h: Likewise.
877 * include/pstl/glue_algorithm_defs.h: Likewise.
878 * include/pstl/parallel_backend.h: Likewise.
879 * include/pstl/glue_numeric_impl.h: Likewise.
880 * include/pstl/parallel_backend_tbb.h: Likewise.
881 * include/pstl/numeric_fwd.h: Likewise.
882 * include/pstl/glue_algorithm_impl.h: Likewise.
883 * include/pstl/execution_impl.h: Likewise.
884 * include/pstl/pstl_config.h: Likewise.
885 * testsuite/util/pstl/pstl_test_config.h: Likewise.
887 Synchronize libstdc++ parallel algorithms with upstream
889 * include/pstl/algorithm_fwd.h: Synchronize with
890 upstream PSTL project.
891 * include/pstl/algorithm_impl.h: Likewise.
892 * include/pstl/execution_defs.h: Likewise.
893 * include/pstl/execution_impl.h: Likewise.
894 * include/pstl/glue_algorithm_impl.h: Likewise.
895 * include/pstl/glue_execution_defs.h: Likewise.
896 * include/pstl/numeric_fwd.h: Likewise.
897 * include/pstl/numeric_impl.h: Likewise.
898 * include/pstl/parallel_backend.h: Likewise.
899 * include/pstl/pstl_config.h: Likewise.
900 * include/pstl/unseq_backend_simd.h: Likewise.
901 * include/pstl/parallel_backend_serial.h: New file.
902 * include/Makefile.am (pstl_headers): Add
903 parallel_backend_serial.h.
904 * include/Makefile.in: Regenerate.
906 Clean up non-conforming names
907 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
908 Uglfiy copy_range1 and copy_range2
909 (__pattern_walk2_n): Rename local n to __n
910 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
911 Rename parameter _T to _Tp.
913 Integrate non-TBB serial backend support
914 * include/bits/c++config: Adjust TBB detection logic to select serial
915 PSTL backend if no TBB present.
916 * testsuite/utils/pstl/test_utils.h: Remove check for
917 _PSTL_USE_PAR_POLICIES
919 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
921 * testsuite/24_iterators/container_access.cc: Move dg-options before
922 dg-do directive so the target check uses the -std option.
925 * configure: Regenerate.
926 * src/Makefile.am (stamp-debug): Also test for missing makefile.
927 * src/Makefile.in: Regenerate.
929 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
931 * include/std/array: Do not include <stdexcept>.
932 * include/std/optional: Include <exception> and
933 <bits/exception_defines.h> instead of <stdexcept>.
934 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
936 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
938 * testsuite/23_containers/map/erasure.cc: Include <string>.
939 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
941 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
942 dg-prune-output for different C++98 diagnostic.
943 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
945 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
947 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
949 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
951 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
953 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
955 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
957 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
959 * testsuite/23_containers/vector/requirements/dr438/
960 constructor_1_neg.cc: Likewise.
961 * testsuite/23_containers/vector/requirements/dr438/
962 constructor_2_neg.cc: Likewise.
963 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
965 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
967 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
968 Do not test allocator rebinding extension for C++2a.
969 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
970 dg-do directive for C++17 and C++2a.
972 * testsuite/23_containers/deque/requirements/explicit_instantiation/
973 1_c++0x.cc: Remove redundant test.
974 * testsuite/23_containers/deque/requirements/explicit_instantiation/
975 2.cc: Use target selector instead of preprocessor condition.
976 * testsuite/23_containers/deque/requirements/explicit_instantiation/
977 3.cc: Do not run test for C++2a.
978 * testsuite/23_containers/forward_list/requirements/
979 explicit_instantiation/3.cc: Likewise.
980 * testsuite/23_containers/forward_list/requirements/
981 explicit_instantiation/5.cc: Do not test allocator rebinding extension
983 * testsuite/23_containers/list/requirements/explicit_instantiation/
984 1_c++0x.cc: Remove redundant test.
985 * testsuite/23_containers/list/requirements/explicit_instantiation/
986 2.cc: Use target selector instead of preprocessor condition.
987 * testsuite/23_containers/list/requirements/explicit_instantiation/
988 3.cc: Do not run test for C++2a.
989 * testsuite/23_containers/list/requirements/explicit_instantiation/
990 5.cc: Do not test allocator rebinding extension for C++2a.
991 * testsuite/23_containers/map/requirements/explicit_instantiation/
992 1_c++0x.cc: Remove redundant test.
993 * testsuite/23_containers/map/requirements/explicit_instantiation/
994 2.cc: Adjust comment.
995 * testsuite/23_containers/map/requirements/explicit_instantiation/
996 3.cc: Do not run test for C++2a.
997 * testsuite/23_containers/map/requirements/explicit_instantiation/
998 5.cc: Do not test allocator rebinding extension for C++2a.
999 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1000 1_c++0x.cc: Remove redundant test.
1001 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1002 3.cc: Do not run test for C++2a.
1003 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1004 5.cc: Do not test allocator rebinding extension for C++2a.
1005 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1006 3.cc: Do not run test for C++2a.
1007 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1008 5.cc: Do not test allocator rebinding extension for C++2a.
1009 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1010 Do not run test for C++2a.
1011 * testsuite/23_containers/set/requirements/explicit_instantiation/
1012 1_c++0x.cc: Remove redundant test.
1013 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1014 Do not test allocator rebinding extension for C++2a.
1015 * testsuite/23_containers/unordered_map/requirements/
1016 explicit_instantiation/3.cc: Likewise.
1017 * testsuite/23_containers/unordered_map/requirements/
1018 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1020 * testsuite/23_containers/unordered_multimap/requirements/
1021 explicit_instantiation/3.cc: Do not run test for C++2a.
1022 * testsuite/23_containers/unordered_multimap/requirements/
1023 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1025 * testsuite/23_containers/unordered_multiset/requirements/
1026 explicit_instantiation/3.cc: Do not run test for C++2a.
1027 * testsuite/23_containers/unordered_multiset/requirements/
1028 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1030 * testsuite/23_containers/unordered_set/requirements/
1031 explicit_instantiation/3.cc: Do not run test for C++2a.
1032 * testsuite/23_containers/unordered_set/requirements/
1033 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1035 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1036 2.cc: Remove redundant test.
1037 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1038 3.cc: Do not run test for C++2a.
1039 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1042 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1043 (is_abstract, is_aggregate): Remove static_assert.
1044 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1046 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1047 missing -std=gnu++17 option.
1048 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1049 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1050 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1053 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1054 * testsuite/18_support/set_unexpected.cc: Likewise.
1055 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1057 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1058 function to be valid in C++11.
1059 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1060 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1061 include Library Fundamentals or Networking headers in C++11 mode.
1062 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1064 * include/std/tuple (_TC): Replace with _TupleConstraints.
1065 (_TupleConstraints): New helper for SFINAE constraints, with more
1066 expressive member functions to reduce duplication when used.
1067 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1068 (tuple::_TCC): Replace dummy type parameter with bool non-type
1069 parameter that can be used to check the pack size.
1070 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1071 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1072 checking constraints in constructors.
1073 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1075 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1076 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1077 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1078 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1079 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1080 constraints in constructors.
1081 (tuple::__is_alloc_arg()): New SFINAE helpers.
1082 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1084 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1085 * testsuite/20_util/tuple/cons/90700.cc: New test.
1086 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1087 to meet new constraint on allocator-extended default constructor.
1089 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1091 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1092 * include/bits/stl_multimap.h (multimap): Likewise.
1094 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1096 Rename variables and cleanup comments.
1097 * include/bits/hashtable_policy.h
1098 * include/bits/hashtable.h
1100 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1102 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1103 Fix bgcolor for P0340R3.
1104 * doc/html/*: Regenerate.
1107 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1108 <experimental/memory_resource>.
1109 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1110 P0339R6, P0340R3, P1164R1 and P1357R1.
1111 * doc/html/*: Regenerate.
1113 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1114 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1115 allocator::value_type assertion for C++2a.
1116 * include/bits/hashtable.h: Likewise.
1117 * include/bits/stl_deque.h: Likewise.
1118 * include/bits/stl_list.h: Likewise.
1119 * include/bits/stl_map.h: Likewise.
1120 * include/bits/stl_multimap.h: Likewise.
1121 * include/bits/stl_multiset.h: Likewise.
1122 * include/bits/stl_set.h: Likewise.
1123 * include/bits/stl_vector.h: Likewise.
1124 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1125 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1126 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1127 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1128 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1129 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1130 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1131 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1132 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1133 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1134 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1135 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1137 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1139 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1141 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1143 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1145 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1147 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1149 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1151 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1154 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1155 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1156 * libsupc++/eh_term_handler.h: New header defining
1157 _GLIBCXX_DEFAULT_TERM_HANDLER.
1158 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1159 (set_terminate): Restore default handler when argument is null.
1160 (set_unexpected): Likewise.
1161 * testsuite/18_support/set_terminate.cc: New test.
1162 * testsuite/18_support/set_unexpected.cc: New test.
1164 * include/backward/hashtable.h (size_t, ptrdiff_t)
1165 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1166 (distance, vector, pair, __iterator_category): Remove
1167 using-declarations that add these names to namespace __gnu_cxx.
1168 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1169 * include/ext/debug_allocator.h (size_t): Likewise.
1170 * include/ext/functional (size_t, unary_function, binary_function)
1171 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1173 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1174 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1175 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1176 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1177 * include/ext/numeric (iota): Fix outdated comment.
1178 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1179 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1180 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1181 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1182 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1184 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1185 (allocator, __true_type, __false_type): Likewise.
1187 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1190 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1191 New helpers for checking preconditions in traits.
1192 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1193 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1194 (is_destructible, is_nothrow_destructible, is_constructible)
1195 (is_default_constructible, is_copy_constructible)
1196 (is_move_constructible, is_nothrow_default_constructible)
1197 (is_nothrow_constructible, is_nothrow_copy_constructible)
1198 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1199 (is_nothrow_assignable, is_nothrow_copy_assignable)
1200 (is_nothrow_move_assignable, is_trivially_constructible)
1201 (is_trivially_copy_constructible, is_trivially_move_constructible)
1202 is_trivially_assignable, is_trivially_copy_assignable)
1203 (is_trivially_move_assignable, is_trivially_destructible)
1204 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1205 (is_invocable_r, is_nothrow_invocable)
1206 (has_unique_object_representations, is_aggregate): Add static_asserts
1207 to make sure that type traits are not misused with incomplete types.
1208 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1209 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1210 base characteristics without assertions that can be reused in other
1212 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1213 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1215 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1216 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1217 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1218 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1219 * testsuite/20_util/is_function/value.cc: Likewise.
1220 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1221 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1223 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1224 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1225 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1226 * testsuite/20_util/is_union/value.cc: Likewise.
1227 * testsuite/20_util/is_void/value.cc: Likewise.
1228 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1230 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1232 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1233 Add new private member function.
1234 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1235 (random_device::_M_init_pretr1(const string&)): Call new private
1236 member with string data.
1237 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1239 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1240 test using COW strings.
1241 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1242 a value from the device.
1243 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1244 Fix typo in token string.
1246 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1248 LWG2788 basic_string spurious use of a default constructible allocator
1249 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1250 (basic_string::_M_replace_dispatch): Construct temporary string with
1251 the current allocator.
1252 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1253 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1255 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1257 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1259 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1260 section about new/delete overloads. Improve section on verbose
1262 * doc/html/*: Regenerate.
1264 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1265 P0811R3. Change status of P1353R0.
1266 * doc/html/*: Regenerate.
1268 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1269 documentation of implementation-defined types for [thread.req.native].
1270 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1271 implementation-defined strings for [variant.bad.access]. Fix typo in
1272 documentation of implementation-defined support for [fs.conform.9945].
1273 * doc/html/*: Regenerate.
1275 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1278 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1279 that fails on mingw-w64.
1282 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1283 (status(const path&, error_code&)): Use parent_path() to remove
1285 (symlink_status(const path&, error_code&)): Duplicate workaround for
1286 bug in _wstat for paths with trailing slash.
1287 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1288 with trailing slash.
1289 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1290 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1292 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1293 once instead of building it iteratively.
1295 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1297 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1298 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1299 the assembler supports rdseed.
1300 * config.h.in: Regenerate.
1301 * configure: Regenerate.
1302 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1303 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1304 * doc/html/*: Regenerate.
1305 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1306 * include/bits/random.h (random_device::random_device()): Always call
1307 _M_init rather than _M_init_pretr1.
1308 (random_device::random_device(const string&)): Likewise.
1309 (random_device::operator()()): Always call _M_getval().
1310 (random_device::_M_file): Replace first member of union with an
1311 anonymous struct, with _M_file as its first member.
1312 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1313 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1314 (USE_MT19937): Define if none of the above are defined.
1315 (USE_POSIX_FILE_IO): Define.
1316 (_M_strtoul): Remove.
1317 [USE_RDSEED] (__x86_rdseed): Define new function.
1318 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1319 (random_device::_M_init(const string&)): Initialize new union members.
1320 Add support for "rdseed" and "rand_s" tokens. Decide what the
1321 "default" token does according to which USE_* macros are defined.
1322 [USE_POSIX_FILE_IO]: Store a file descriptor.
1323 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1324 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1325 code from _M_strtoul.
1326 [!USE_MT19937]: Call _M_init, transforming the old default token or
1327 numeric tokens to "default".
1328 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1329 (random_device::_M_getval()): Use new union members to obtain a
1330 random number from the stored function pointer or file descriptor.
1331 [USE_MT19937]: Obtain a value from the mt19937 engine.
1332 (random_device::_M_getval_pretr1()): Call _M_getval().
1333 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1335 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1336 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1338 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1341 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1342 _M_split_cmpts() for a path with multiple components.
1343 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1344 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1345 components and reserve space in vector. Return early when there is
1347 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1348 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1350 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1351 form of std::equals for C++11 compatibility.
1353 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1355 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1356 C++ standard at ansi.org.
1358 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1360 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1361 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1364 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1365 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1367 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1369 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1371 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1372 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1373 "compile" test to "run".
1375 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1376 * doc/html/*: Regenerate.
1377 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1378 rvalue aliasing constructor.
1379 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1380 (reinterpret_pointer_cast): Add overloads taking rvalues.
1381 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1382 Add rvalue aliasing constructor.
1383 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1384 "run" and check return values as well as types.
1385 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1386 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1387 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1388 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1391 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1392 * doc/xml/manual/intro.xml: Likewise.
1393 * include/std/future (__create_task_state): Add default arguments
1394 to make providing an allocator optional.
1395 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1396 instead of delegating to another constructor.
1397 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1398 define allocator-extended constructors for C++17 and later.
1399 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1401 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1402 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1403 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1405 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1407 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1408 Don't run the libstdc++/83237 part on simulator targets.
1410 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1412 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1414 * doc/html/*: Regenerate.
1416 * include/experimental/any (__any_caster): Use RTTI if comparing
1417 addresses fails, to support non-unique addresses in shared libraries.
1418 * include/std/any (__any_caster): Likewise.
1421 * include/experimental/any (__any_caster): Constrain to only be
1422 callable for object types. Use remove_cv_t instead of decay_t.
1423 If the type decays or isn't copy constructible, compare the manager
1424 function to a dummy specialization.
1425 (__any_caster): Add overload constrained for non-object types.
1426 (any::_Manager_internal<_Op>): Add dummy specialization.
1427 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1430 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1433 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1434 reversed arguments to uninitialized_copy_n.
1435 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1436 is unchanged by copy assignment.
1437 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1438 compare path components.
1441 * include/experimental/memory_resource: Add system header pragma and
1442 do not define anything unless compiled as C++14 or later.
1443 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1444 (__resource_adaptor_imp::do_allocate): If the requested alignment
1445 is a fundamental alignment then either allocate directly from _M_alloc
1446 or call the new _M_allocate function.
1447 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1448 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1449 of the allocator rebound to a POD type with the specified alignment.
1450 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1451 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1452 Adjust expected allocation sizes.
1453 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1454 xfail for Solaris x86.
1456 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1458 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1459 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1460 Use std::__remove_cvref_t when building with GCC.
1462 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1465 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1466 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1467 Use check_v3_target_prop_cached to cache the result of the test.
1469 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1471 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1474 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1475 Changed v3_target_compile check from preprocess to executable.
1476 Added "-ltbb" to v3_target_compile flags.
1478 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1480 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1481 Add check for Thread Building Blocks 2018 or later.
1483 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1485 * testsuite/experimental/names.cc: Only include Networking TS headers
1486 on targets with the necessary Gthreads support.
1488 2019-05-20 Marek Polacek <polacek@redhat.com>
1490 CWG 2094 - volatile scalars are trivially copyable.
1492 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1493 result for volatile int.
1495 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1497 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1498 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1501 PR c++/90532 Ensure __is_constructible(T[]) is false
1502 * include/std/type_traits (__do_is_default_constructible_impl)
1503 (__is_default_constructible_atom, __is_default_constructible_safe):
1505 (is_default_constructible): Use is_constructible.
1506 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1507 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1508 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1509 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1512 2019-05-20 Pádraig Brady <pbrady@fb.com>
1514 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1515 to the deallocator with -fsized-deallocation.
1517 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1519 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1520 test by passing correct alignment to deallocate function.
1522 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1525 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1526 Raise exception if unique_ptr tuple member has unknown structure.
1527 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1528 Adjust worker to support new __uniq_ptr_data base class. Do not
1529 assume field called _M_head_impl is the first tuple element.
1531 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1533 * include/bits/stl_deque.h
1534 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1535 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1536 (_Deque_base::_Deque_impl_data): New.
1537 (_Deque_base::_Deque_impl): Inherit latter.
1538 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1539 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1540 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1541 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1542 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1543 (deque<>::deque()): Default.
1544 (deque<>::deque(deque&&)): Default.
1545 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1546 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1547 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1548 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1549 _M_range_initialize.
1550 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1551 (deque<>::resize(size_type, const value_type&)): Share a single
1553 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1554 _M_range_insert_aux.
1555 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1556 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1557 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1558 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1560 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1563 * include/std/variant (holds_alternative, get, get_if): Improve
1564 static assertion messages.
1565 (bad_variant_access::bad_variant_access()): Change default message.
1566 (__throw_bad_variant_access(bool)): New overload.
1567 (get): Use new overload.
1568 (visit, visit<R>): Improve exception message.
1570 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1571 targets. Add more cases from P0608R3.
1572 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1574 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1575 * include/experimental/type_traits (is_detected_exact)
1576 (is_detected_exact_v): Likewise.
1577 * include/pstl/execution_defs.h (is_execution_policy)
1578 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1579 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1580 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1581 * testsuite/experimental/names.cc: New test.
1584 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1585 assertions from the destructor.
1586 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1587 Move static_assert for hash function to here.
1588 (_Hash_table_base::_M_equals): Move static_assert for equality
1590 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1592 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1593 the value directly instead of calling _S_value.
1594 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1595 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1596 _S_key(_Const_Link_type).
1597 * testsuite/23_containers/set/85965.cc: Check construction,
1598 destruction, assignment and size() do not trigger the assertions.
1599 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1600 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1602 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1603 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1604 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1605 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1606 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1607 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1608 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1610 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1611 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1614 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1616 * doc/html/*: Regenerate.
1617 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1618 of decay_t (P0777R1).
1620 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1622 Move from state of allocators (LWG2593)
1623 * include/bits/stl_deque.h
1624 (_Deque_base(_Deque_base&&, false_type)): Remove.
1625 (_Deque_base(_Deque_base&&, true_type)): Remove.
1626 (_Deque_base(_Deque_base&&)): Adapt.
1627 (_Deque_base::_M_move_impl()): Remove.
1628 * testsuite/util/testsuite_allocator.h
1629 (propagating_allocator(propagating_allocator&&)): Preserve move from
1631 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1633 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1635 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1636 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1637 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1639 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1641 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1642 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1644 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1646 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1648 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1650 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1652 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1654 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1656 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1659 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1661 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1662 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1664 * include/std/variant (__overload_set): Remove.
1666 (_Build_FUN): New class template to define a single FUN overload,
1667 with specializations to prevent unwanted conversions, as per P0608R3.
1668 (_Build_FUNs): New class template to build an overload set of FUN.
1669 (_FUN_type): New alias template to perform overload resolution.
1670 (__accepted_type): Use integer_constant base for failure case. Use
1671 _FUN_type for successful case.
1672 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1673 (variant::variant(_Tp&&)): Likewise.
1674 (variant::operator=(_Tp&&)): Likewise.
1676 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1677 Replace raw visitation with a runtime check for the valueless state
1678 and a non-raw visitor.
1679 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1680 (variant::index()): Remove branch.
1681 (variant::swap(variant&)): Use valueless_by_exception() instead of
1682 comparing the index to variant_npos, and add likelihood attribute.
1684 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1685 (_Hashtable_base::_Equal_hash_code): Define new class template.
1686 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1689 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1690 Replace with _M_get non-static member function.
1691 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1693 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1694 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1696 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1697 _S_get accessors for members in EBO helpers.
1698 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1699 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1701 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1703 (_Hashtable_base::_M_eq()): Remove non-const overload.
1705 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1707 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1709 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1711 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1714 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1716 * config/os/solaris/solaris2.10: Move to ...
1717 * config/os/solaris: ... this.
1718 * configure.host (os_include_dir): Adapt.
1719 (abi_baseline_pair): Remove Solaris 10 handling.
1720 * config/abi/post/i386-solaris2.10: Remove.
1721 * config/abi/post/sparc-solaris2.10: Remove.
1722 * config/abi/post/i386-solaris2.11: Rename to ...
1723 * config/abi/post/i386-solaris: ... this.
1724 * config/abi/post/sparc-solaris2.11: Rename to ...
1725 * config/abi/post/sparc-solaris: ... this.
1727 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1730 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1733 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1735 * include/std/variant (__visit_with_index): Remove typedef.
1736 (__deduce_visit_result): New tag type.
1737 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1738 visitation of possibly-valueless variants, forwarding to __do_visit
1739 with the relevant tag type.
1740 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1741 and make lambda return void.
1742 (__variant_construct): Likewise.
1743 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1744 __raw_idx_visit and make lambda return void.
1745 (_Multi_array::__untag_result): Add metafunction to check the function
1746 pointer type for a tag type that dictates the kind of visitation.
1747 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1748 Use decltype(auto) instead of tagged function pointer type.
1749 (__gen_vtable_impl): Remove bool non-type parameter and unused
1750 _Variant_tuple parameter.
1751 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1752 (__gen_vtable_impl::__do_visit_invoke): Remove.
1753 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1754 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1755 for the visit<R> case, rather than dispatching to separate functions.
1756 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1758 (variant::swap): Likewise.
1759 (__do_visit): Replace two non-type template parameters with a single
1760 type parameter, so that the caller must specify the visitor's return
1761 type (or one of the tag types).
1762 (visit): Deduce a return type from the visitor and use the
1763 __deduce_visit_result tag to enforce that all overloads return the
1765 (visit<R>): Call __do_visit<R> with explicit result type.
1766 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1769 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1771 nonesuch is insufficiently useless (lwg2996)
1772 * include/std/type_traits (struct __nonesuch): Added private base
1773 class to make __nonesuch not an aggregate and removed deleted default
1775 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1776 (operator=(const pair&)): Use __nonesuch instead of
1777 __nonesuch_no_braces.
1778 (operator=(pair&&)): Likewise
1779 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1780 of __nonesuch_no_braces.
1781 (operator=(tuple&&)): Likewise
1782 * include/experimental/type_traits (struct nonesuch): Added private
1783 base class to make nonesuch not an aggregate and removed deleted
1784 default constructor.
1785 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1786 * testsuite/experimental/type_traits/nonesuch.cc: New.
1788 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1790 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1791 (_Function_handler): Remove partial specializations for void return
1792 types and pointers to member.
1793 (_Function_handler::_M_manager): Adapt to removal of
1794 _Simple_type_wrapper.
1795 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1796 * include/std/functional (_Bind_result::__enable_if_void)
1797 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1798 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1800 * include/std/future (__future_base::_Task_state::_M_run)
1801 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1802 change return type of lambda expressions.
1804 * include/bits/invoke.h (__invoke_r): Define new function implementing
1805 the INVOKE<R> pseudo-function.
1806 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1807 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1809 * include/std/type_traits (__is_nt_convertible_helper): Define it
1810 unconditionally, not only for C++20.
1811 (__is_nothrow_convertible): Define internal trait for use in C++11.
1812 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1813 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1814 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1815 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1816 that has nothrow explicit conversion but potentially-throwing implicit
1818 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1819 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1820 function to only consider implicit conversions.
1821 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1823 * include/std/iterator: Include <iosfwd> instead of <istream> and
1826 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1827 Remove unused, non-standard function.
1829 * include/bits/regex.h (match_results::max_size()): Adjust return
1830 value to account for prefix/suffix/unmatched subs.
1831 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1832 reset the contained sub matches.
1833 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1834 function to set result state following a failed match.
1835 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1836 sub_match states after _M_resize. Use _M_establish_failed_match.
1839 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1840 Replace single _Callable parameter with variadic _Args pack, to
1841 forward them directly to the tuple of decayed copies.
1842 * testsuite/30_threads/thread/cons/69724.cc: New test.
1844 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1846 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1847 * include/bits/basic_string.h: (operator=(const basic_string&):
1848 Move allocator decision to assign.
1849 (assign(const basic_string&)): Move allocator decision here.
1850 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1852 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1855 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1857 * testsuite/util/testsuite_allocator.h (memory_resource)
1858 (default_resource_mgr): Fix indentation.
1860 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1861 Use operator-> to access raw pointer member.
1862 * testsuite/23_containers/vector/59829.cc: Likewise.
1863 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1864 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1865 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1867 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1868 its constructors and equality operators. Change converting
1869 constructors to use operator-> to access private member of the other
1871 (PointerBase_void::operator->()): Add, for access to private member.
1872 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1873 (operator==(PointerBase, PointerBase)): Remove.
1874 (operator!=(PointerBase, PointerBase)): Remove.
1876 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1877 not assume field called _M_head_impl is the first tuple element.
1878 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1879 implementation more accurate.
1880 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1881 empty pointer type and non-empty deleter.
1883 LWG 2899 - Make is_move_constructible correct for unique_ptr
1884 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1885 move assignment operator.
1886 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1887 (__uniq_ptr_data): New class template with conditionally deleted
1889 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1890 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1891 constructor and move assignment operator as defaulted.
1892 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1893 __uniq_ptr_impl::release().
1894 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1895 to __uniq_ptr_impl::reset(pointer).
1896 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1897 Check for new __uniq_ptr_data type.
1898 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
1900 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1902 PR libstdc++/90454.cc path construction from void*
1903 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
1904 pointers to void are rejected as well as void.
1905 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
1906 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
1908 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
1910 * doc/xml/manual/policy_data_structures.xml: Comment out stray
1911 <remark> elements. Fix formatting of bibliography references.
1913 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1915 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
1917 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
1919 Remove Profile Mode, deprecated since 7.1.0
1920 * doc/Makefile.am: Remove XML file for profile mode docs.
1921 * doc/Makefile.in: Regenerate.
1922 * doc/xml/authors.xml: Remove authors of profile mode docs.
1923 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
1925 * doc/xml/manual/debug.xml: Likewise.
1926 * doc/xml/manual/evolution.xml: Document removal of profile mode.
1927 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
1928 * doc/xml/manual/spine.xml: Remove profile mode author credit.
1929 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
1931 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
1933 * doc/html/*: Regenerate.
1934 * include/Makefile.am: Remove profile mode headers.
1935 * include/Makefile.in: Regenerate.
1936 * include/bits/c++config (std::__profile): Remove namespace.
1937 [_GLIBCXX_PROFILE]: Remove checks for macro.
1938 * include/profile/array: Remove.
1939 * include/profile/base.h: Remove.
1940 * include/profile/bitset: Remove.
1941 * include/profile/deque: Remove.
1942 * include/profile/forward_list: Remove.
1943 * include/profile/impl/profiler.h: Remove.
1944 * include/profile/impl/profiler_algos.h: Remove.
1945 * include/profile/impl/profiler_container_size.h: Remove.
1946 * include/profile/impl/profiler_hash_func.h: Remove.
1947 * include/profile/impl/profiler_hashtable_size.h: Remove.
1948 * include/profile/impl/profiler_list_to_slist.h: Remove.
1949 * include/profile/impl/profiler_list_to_vector.h: Remove.
1950 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
1951 * include/profile/impl/profiler_node.h: Remove.
1952 * include/profile/impl/profiler_state.h: Remove.
1953 * include/profile/impl/profiler_trace.h: Remove.
1954 * include/profile/impl/profiler_vector_size.h: Remove.
1955 * include/profile/impl/profiler_vector_to_list.h: Remove.
1956 * include/profile/iterator_tracker.h: Remove.
1957 * include/profile/list: Remove.
1958 * include/profile/map: Remove.
1959 * include/profile/map.h: Remove.
1960 * include/profile/multimap.h: Remove.
1961 * include/profile/multiset.h: Remove.
1962 * include/profile/ordered_base.h: Remove.
1963 * include/profile/set: Remove.
1964 * include/profile/set.h: Remove.
1965 * include/profile/unordered_base.h: Remove.
1966 * include/profile/unordered_map: Remove.
1967 * include/profile/unordered_set: Remove.
1968 * include/profile/vector: Remove.
1969 * scripts/run_doxygen: Do not process profile mode headers.
1970 * testsuite/23_containers/array/element_access/60497.cc: Don't use
1972 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1973 Remove dg-skip-if for profile mode.
1974 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
1975 preprocessor check for profile mode.
1976 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1977 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
1979 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1981 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1982 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1983 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1984 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1985 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1987 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1989 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1991 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1993 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
1994 preprocessor check for profile mode.
1995 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1997 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1998 Remove dg-skip-if for profile mode.
1999 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2000 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2001 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2002 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2003 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2004 * testsuite/Makefile.am: Remove profile_flags variable and
2005 * testsuite/Makefile.am: Remove profile_flags variable and
2006 check-profile target.
2007 * testsuite/Makefile.in: Regenerate.
2008 * testsuite/ext/profile/all.cc: Remove.
2009 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2010 * testsuite/ext/profile/profiler_algos.cc: Remove.
2011 * testsuite/ext/profile/replace_new.cc: Remove.
2012 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2013 preprocessor check for profile mode.
2014 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2015 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2016 (check_v3_target_normal_mode): Do not check for profile mode macro.
2017 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2019 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2020 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2021 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2022 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2023 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2024 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2025 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2026 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2027 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2028 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2030 Remove array_allocator extension, deprecated since 4.9.0
2031 * doc/xml/manual/allocator.xml: Remove documentation for
2033 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2034 * doc/xml/manual/using.xml: Remove header from documentation.
2035 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2036 * include/Makefile.in: Regenerate.
2037 * include/ext/array_allocator.h: Remove.
2038 * include/precompiled/extc++.h: Do not include removed header.
2039 * testsuite/ext/array_allocator/1.cc: Remove.
2040 * testsuite/ext/array_allocator/2.cc: Remove.
2041 * testsuite/ext/array_allocator/26875.cc: Remove.
2042 * testsuite/ext/array_allocator/3.cc: Remove.
2043 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2044 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2045 * testsuite/ext/array_allocator/check_new.cc: Remove.
2046 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2047 * testsuite/ext/headers.cc: Do not include removed header.
2049 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2051 * include/bits/stl_bvector.h
2052 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2054 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2056 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2058 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2060 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2062 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2064 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2066 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2068 (_Bit_iterator::operator-(difference_type)): Likewise.
2069 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2070 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2072 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2073 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2075 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2078 * testsuite/util/thread/all.h: Do not use remove_pointer for
2079 std::thread::native_handle_type.
2082 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2083 (_Variant_storage<true, Types...>::_M_reset()))
2084 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2085 (__get_storage): Likewise.
2086 (variant): Add noexcept to friend declarations for __get and
2090 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2091 Use _Require for constraints.
2092 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2094 (__uniq_ptr_hash): New base class with conditionally-disabled call
2096 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2097 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2098 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2100 * include/bits/shared_ptr.h: Improve docs.
2101 * include/bits/shared_ptr_base.h: Likewise.
2102 * include/bits/stl_uninitialized.h: Likewise.
2103 * include/bits/unique_ptr.h: Likewise.
2104 * libsupc++/new: Likewise.
2106 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2108 * include/bits/stl_deque.h
2109 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2111 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2113 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2115 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2117 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2119 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2121 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2123 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2125 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2128 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2129 (test01): Reserve for number of insertions to avoid rehash during test.
2130 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2132 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2137 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2139 * include/experimental/bits/fs_path.h: Improve docs.
2140 * include/experimental/bits/net.h: Fix wrong header name in comment.
2141 Do not document implementation details.
2142 * include/experimental/netfwd: Fix doxygen grouping.
2144 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2146 * include/bits/stl_pair.h: Improve docs.
2147 * include/std/tuple: Likewise.
2149 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2151 * include/std/chrono: Improve docs.
2152 * include/std/ratio: Do not document implementation details.
2153 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2155 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2158 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2159 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2160 (__duration_common_type): New helper.
2161 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2162 __duration_common_type.
2163 (__timepoint_common_type_wrapper): Replace with ...
2164 (__timepoint_common_type): New helper.
2165 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2166 Use __time_point_common_type.
2167 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2168 (__common_type_impl): If either argument is transformed by decay,
2169 use the common_type of the decayed types.
2170 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2171 decayed, use __do_common_type_impl to get the common_type.
2172 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2173 (__do_member_type_wrapper, __member_type_wrapper)
2174 (__expanded_common_type_wrapper): Remove.
2175 (__common_type_pack, __common_type_fold): New helpers.
2176 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2177 __member_type_wrapper and __expanded_common_type_wrapper.
2178 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2179 Test zero-length template argument list.
2180 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2181 Test single argument cases and argument types that should decay.
2182 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2183 Adjust expected error.
2184 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2186 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2187 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2188 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2190 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2192 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2194 Make allocator propagation more consistent for
2195 operator+(basic_string) (P1165R1)
2196 * include/bits/basic_string.h
2197 (operator+(basic_string&&, basic_string&&): Changed resulting
2198 allocator to always be the one from the first parameter.
2199 * include/bits/basic_string.tcc
2200 (operator+(const _CharT*, const basic_string&)): Changed
2201 resulting allocator to be SOCCC on the second parameter's allocator.
2202 (operator+(_CharT, const basic_string&)): Likewise.
2203 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2205 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2208 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2210 * include/bits/regex.h: Improve docs.
2211 * include/bits/regex.tcc: Do not document implementation details.
2213 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2215 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2217 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2218 Add type printer for container types in std::__debug namespace.
2219 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2220 (gdb-tests): Use distinct parameters for the type of test and use of
2222 (gdb-test): Check for regex test even if 'whatis' test.
2223 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2225 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2226 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2227 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2228 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2229 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2230 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2231 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2233 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2235 * include/std/system_error (error_category): Fix comment.
2238 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2239 argument is an empty path.
2240 (absolute(const path&, error_code&)): Use invalid_argument as error
2241 code instead of no_such_file_or_directory.
2242 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2243 of non-existent paths and empty paths with both overloads of absolute.
2245 * include/std/system_error (error_category, error_code)
2246 (error_condition): Improve docs.
2247 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2248 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2249 to class documentation. Suppress documentation for implementation
2251 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2252 Suppress documentation for implementation details.
2254 * include/std/system_error (error_code): Remove friend declaration
2255 for hash<error_code>.
2256 (hash<error_code>::operator()): Use public member functions to access
2258 (hash<error_condition>::operator()): Use address of category, not
2259 its object representation.
2260 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2261 Use public member functions to access value and category.
2262 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2264 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2266 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2267 * include/bits/hashtable_policy.h
2268 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2269 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2270 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2271 smaller than input value rather than always greater. Preserve
2272 _M_next_resize if called with 0 input. Use __builtin_floorl.
2273 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2274 elements + number of insertions is greater than _M_next_resize. Start
2275 with 11 buckets if not told otherwise. Use __builtin_floorl.
2276 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2277 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2278 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2279 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2280 told otherwise. Use __builtin_floorl.
2281 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2282 to also validate _Power2_rehash_policy.
2283 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2286 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2289 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2293 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2294 overflow warning with -Wpedantic -Wsystem-headers.
2296 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2299 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2300 * include/bits/move.h (swap): Remove extra parentheses.
2302 * include/experimental/bits/lfts_config.h: Improve doc markup.
2303 * include/experimental/optional: Improve docs.
2304 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2305 (__constexpr_addressof): Remove.
2306 (optional::operator->()): Use std::__addressof().
2307 * include/std/optional (optional::operator->()): Adjust whitespace.
2308 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2309 that operator-> is still constexpr with overloaded operator&. Change
2310 to compile-only test.
2311 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2314 * include/bits/shared_ptr.h: Improve docs.
2315 * include/bits/shared_ptr_atomic.h: Likewise.
2316 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2318 * include/bits/basic_string.h: Fix iterator/index confusion in
2320 * include/bits/range_access.h: Fix Doxygen warnings.
2321 * include/bits/refwrap.h: Do not document implementation details.
2322 (ref, cref): Group docs with reference_wrapper.
2323 * include/std/fstream: Fix Doxygen markup.
2324 * libsupc++/initializer_list (begin, end): Group docs with
2327 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2329 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2330 * include/std/mutex: Likewise.
2331 * include/std/shared_mutex: Likewise.
2333 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2334 * include/bits/fs_fwd.h: Likewise.
2335 * include/bits/fs_ops.h: Likewise.
2336 * include/bits/fs_path.h: Likewise.
2337 * include/std/filesystem: Likewise.
2339 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2340 * include/experimental/buffer: Likewise.
2341 * include/experimental/executor: Likewise.
2342 * include/experimental/internet: Likewise.
2343 * include/experimental/io_context: Likewise.
2344 * include/experimental/net: Likewise.
2345 * include/experimental/netfwd: Likewise.
2346 * include/experimental/socket: Likewise.
2347 * include/experimental/timer: Likewise.
2349 * doc/doxygen/doxygroups.cc: Move description of experimental group
2351 * include/experimental/algorithm: Add to libfund-ts doc group.
2352 * include/experimental/any: Likewise. Do not document implementation
2354 * include/experimental/array: Add to libfund-ts doc group.
2355 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2356 for Library Fundamentals.
2357 * include/experimental/chrono: Add to libfund-ts doc group.
2358 * include/experimental/deque: Likewise.
2359 * include/experimental/forward_list: Likewise.
2360 * include/experimental/functional: Likewise.
2361 * include/experimental/iterator: Likewise.
2362 * include/experimental/list: Likewise.
2363 * include/experimental/map: Likewise.
2364 * include/experimental/memory: Likewise.
2365 * include/experimental/memory_resource: Likewise. Improve docs.
2367 * include/experimental/numeric: Add to libfund-ts doc group.
2368 * include/experimental/optional: Likewise.
2369 * include/experimental/propagate_const: Likewise.
2370 * include/experimental/random: Likewise.
2371 * include/experimental/ratio: Likewise.
2372 * include/experimental/regex: Likewise.
2373 * include/experimental/set: Likewise.
2374 * include/experimental/source_location: Likewise.
2375 * include/experimental/string: Likewise.
2376 * include/experimental/string_view: Likewise.
2377 * include/experimental/system_error: Likewise.
2378 * include/experimental/tuple: Likewise.
2379 * include/experimental/type_traits: Likewise.
2380 * include/experimental/unordered_map: Likewise.
2381 * include/experimental/unordered_set: Likewise.
2382 * include/experimental/utility: Likewise.
2383 * include/experimental/vector: Likewise.
2384 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2385 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2386 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2388 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2389 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2390 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2391 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2392 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2394 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2395 * include/experimental/bits/fs_fwd.h: Improve docs.
2396 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2397 * include/experimental/bits/fs_path.h: Likewise.
2398 (path, filesystem_error, u8path): Improve docs.
2399 * include/experimental/filesystem: Link to docs for TS.
2401 * config/allocator/new_allocator_base.h (__allocator_base): Add
2402 workaround for Doxygen bug #6945.
2403 * include/std/memory: Improve docs. Define group for pointer safety.
2404 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2405 conditional to suppress documentation for implementation details.
2407 * include/bits/specfun.h: Improve docs.
2408 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2411 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2412 (std::experimental): Add docs.
2413 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2414 namespace to nothing when generating docs.
2415 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2416 * include/std/chrono (std::chrono): Likewise.
2417 * include/std/functional (std::placeholders): Likewise.
2418 * include/std/thread (std::this_thread): Likewise.
2420 * include/parallel/settings.h: Fix Doxygen markup.
2422 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2423 anything unless PB_DS_CLASS_C_DEC is defined.
2424 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2425 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2426 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2427 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2428 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2429 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2430 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2432 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2433 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2434 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2435 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2436 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2437 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2438 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2439 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2440 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2441 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2442 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2444 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2445 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2447 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2450 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2451 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2452 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2455 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2457 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2458 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2459 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2460 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2461 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2462 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2464 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2465 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2468 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2471 * include/std/complex (__complex_proj): Return parameter unchanged.
2472 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2473 floating-point types to take std::complex arguments.
2474 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2475 floating-point types.
2476 * testsuite/26_numerics/complex/proj.cc: New test.
2478 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2480 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2481 to _Lock_policyE[012].
2482 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2484 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2486 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2487 macros accidentally left in.
2488 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2489 unnecessary -lstdc++fs option. Fix test for mingw.
2490 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2493 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2495 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2497 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2499 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2501 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2502 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2505 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2507 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2510 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2511 class template and partial specialization.
2514 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2516 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2517 functions to convert a value to an integral type.
2518 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2519 (fill_n): Convert _Size parameter to an integral type.
2520 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2521 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2522 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2523 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2524 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2525 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2527 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2529 Adding noexcept-specification on tuple constructors (LWG 2899)
2530 * libstdc++-v3/include/std/tuple:
2531 (tuple()): Add noexcept-specification.
2532 (tuple(const _Elements&...)): Likewise
2533 (tuple(_UElements&&...)): Likewise
2534 (tuple(const tuple<_UElements...>&)): Likewise
2535 (tuple(tuple<_UElements...>&&)): Likewise
2536 (tuple(const _T1&, const _T2&)): Likewise
2537 (tuple(_U1&&, _U2&&)): Likewise
2538 (tuple(const tuple<_U1, _U2>&): Likewise
2539 (tuple(tuple<_U1, _U2>&&): Likewise
2540 (tuple(const pair<_U1, _U2>&): Likewise
2541 (tuple(pair<_U1, _U2>&&): Likewise
2542 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2544 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2547 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2548 arguments with __restrict.
2550 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2552 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2554 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2556 * include/experimental/bits/fs_path.h
2557 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2558 avoid redundant call to _S_convert_loc with non-const pointers.
2560 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2561 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2562 * testsuite/21_strings/basic_string/hash/hash.cc
2563 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2564 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2565 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2567 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2568 wstring::_M_replace_dispatch with more specific patterns.
2569 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2570 Create const std::string to avoid redundant call to _S_convert_loc
2571 with non-const pointers.
2572 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2573 avoid unnecessary basic_string::assign instantiations.
2575 * include/std/memory (__uses_alloc_args): Add string-literal to
2576 static_assert, to match the one in __uses_alloc.
2577 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2578 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2579 for recursive uses-allocator construction of nested pairs.
2580 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2583 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2585 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2586 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2587 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2588 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2590 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2591 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2592 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2593 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2594 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2595 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2596 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2598 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2601 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2602 * include/std/scoped_allocator [__cplusplus > 201703L]
2603 (scoped_allocator_adaptor::construct): Define in terms of
2604 uses_allocator_construction_args, as per P0591R4.
2605 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2606 * testsuite/util/testsuite_allocator.h: Remove name of unused
2609 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2611 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2612 * doc/html/*: Regenerate.
2614 * include/bits/fs_path.h (operator<, operator<=, operator>)
2615 (operator>=, operator==, operator!=): Make hidden friends, as per
2617 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2618 string type in test.
2619 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2621 * include/std/any (any::any(ValueType&&)): Use __and_v.
2622 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2625 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2627 * include/std/type_traits (__result_of_memfun): Use remove_reference
2628 instead of __remove_cvref_t and remove redundant is_same check.
2629 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2631 * include/experimental/string_view (basic_string_view::pointer)
2632 (basic_string_view::reference): Fix to refer to non-const value_type.
2633 * include/bits/basic_string.h (basic_string): Use __sv_check and
2634 __sv_limit instead of basic_string_view::_M_check and
2635 basic_string_view::_M_limit.
2636 * include/std/string_view (__sv_check, __sv_limit): New
2637 helper functions to replace basic_string_view::_M_check and
2638 basic_string_view::_M_limit.
2639 (basic_string_view): Add static assertions to enforce ill-formed
2640 requirement for traits_type::char_type from P1148R0, and to enforce
2641 required properties of char-like types.
2642 (basic_string_view::pointer, basic_string_view::reference): Fix to
2643 refer to non-const value_type.
2644 (basic_string_view::operator[], basic_string_view::at)
2645 (basic_string_view::front, basic_string_view::back)
2646 (basic_string_view::data): Use const_reference and const_pointer
2647 typedefs for return types.
2648 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2649 (hash<wstring_view>): Fix argument_type typedef.
2650 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2651 char/1.cc: Fix expected return type of basic_string_view::data().
2652 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2653 wchar_t/1.cc: Likewise.
2654 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2655 char/1.cc: Likewise.
2656 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2657 wchar_t/1.cc: Likewise.
2658 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2660 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2661 Check reference and pointer typedefs.
2662 * testsuite/experimental/string_view/requirements/typedefs.cc:
2664 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2665 Fix expected return type of basic_string_view::data().
2666 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2668 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2670 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2674 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2675 Avoid a runtime check for types that can never be stored in std::any.
2676 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2679 PR libstdc++/90220 (partial)
2680 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2681 not attempt ill-formed static_cast to pointers to non-object types.
2682 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2685 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2686 prevent -Wcatch-value warning.
2688 * include/std/variant (__variant_construct): Use template parameter
2689 type instead of equivalent decltype-specifier.
2690 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2691 Replace forward with move.
2692 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2693 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2694 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2695 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2696 index after construction succeeds.
2697 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2698 if-constexpr checks that are always true. Use __remove_cvref_t instead
2699 of remove_reference so that is_nothrow_move_constructible check
2700 doesn't use a const rvalue parameter. In the potentially-throwing case
2701 construct a temporary and move assign it, as per LWG 2904.
2702 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2703 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2704 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2705 construct a temporary and move assign from it, as per LWG 2904.
2706 * testsuite/20_util/variant/exception_safety.cc: Check that
2707 assignment operators have strong exception safety guarantee.
2709 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2711 Document PSTL linker flags
2713 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2715 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2717 * include/std/variant (__detail::__variant::_Traits): Make
2718 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2719 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2721 (__detail::__variant::_Copy_assign_alias): Only depend on
2722 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2723 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2724 move assignment operators.
2727 * include/std/variant (variant::__not_self): New helper for the
2728 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2729 (variant::__to_type_impl): Remove.
2730 (variant::__to_type): Add default argument to check pack size, instead
2731 of using __to_type_impl.
2732 (variant::__accepted_type): Add default argument using __not_self.
2733 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2734 for variant(T&&) constructor constraint.
2735 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2736 Extract __accepted_type into a named template parameter for reuse in
2737 other constraints and in the exception specification.
2738 (variant::variant(in_place_type_t<T>, Args&&...))
2739 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2740 (variant::variant(in_place_index_t<T>, Args&&...))
2741 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2742 (variant::operator=T&&)): Remove redundant && from trait arguments.
2743 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2744 isn't used for in_place_type or in_place_index arguments.
2746 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2747 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2748 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2750 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2751 Bernd Edlinger <bernd.edlinger@hotmail.de>
2752 Jakub Jelinek <jakub@redhat.com>
2755 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2756 general-regs-only target attribute for ARM.
2758 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2761 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2762 specialization also depend on is_nothrow_move_constructible.
2763 * include/std/variant (__detail::__variant::__never_valueless()):
2764 Only true if the variant would have a move assignment operator.
2765 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2766 Check __never_valueless<T...>().
2767 (variant::emplace): Only perform non-throwing move assignments
2768 for never-valueless alternatives if the variant has a move assignment
2770 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2771 types can be emplaced into non-assignable variants.
2772 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2773 don't get copied when emplaced into non-assignable variants.
2775 * include/std/variant (__detail::__variant::__ref_cast): Remove
2777 (__detail::__variant::_Uninitialized::_M_get)
2778 (__detail::__variant::__get)
2779 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2781 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2783 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2785 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2786 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2787 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2788 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2790 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2792 Delegate PSTL configuration to pstl/pstl_config.h
2794 * include/bits/c++config: Remove explicit PSTL configuration
2795 macros and use definitions from <pstl/pstl_config.h>.
2797 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2799 Cleanup algorithm implementations
2800 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2802 (mismatch): Forward execution policy.
2803 (equal): Qualify call to std::equal().
2804 (partial_sort): Forward execution policy.
2805 (inplace_merge): Forward execution policy.
2807 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2809 Improve implementation of parallel equal()
2810 * include/pstl/algorithm_impl.h
2811 (__internal::__brick_equal): use "4 iterator" version of
2813 (__internal::__brick_equal): use simd for random access
2814 iterators on unsequenced execution policies.
2815 (__internal::__pattern_equal): add "4 iterator" version
2816 (__internal::__pattern_equal): dispatch to simd __brick_equal
2817 for vector-only execution policies.
2818 (__internal::__pattern_equal): dispatch to __parallel_or for
2819 parallel execution policies.
2820 * include/pstl/glue_algorithm_impl.h
2821 (std::equal): dispatch to "4 iterator" version of
2822 __internal::__pattern_equal().
2824 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2827 * include/bits/forward_list.h (operator==): Do not use operator!= to
2829 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2830 earlier in the list, so that sort is stable.
2831 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2832 * testsuite/23_containers/forward_list/comparable.cc: Test with
2833 types that meet the minimum EqualityComparable and LessThanComparable
2834 requirements. Remove irrelevant comment.
2836 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2837 Do not depend on whether all alternative types are move constructible.
2838 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2839 from the operand when deciding whether to perform the assignment.
2840 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2841 with deleted move constructor and deleted move assignment operator.
2842 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2843 behaviour of variants with DeletedMoves as an alternative.
2844 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2845 (move_ctor, move_assign): Check that moving a variant with a
2846 DeletedMoves alternative falls back to copying instead of moving.
2848 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2849 from static_assert declarations.
2851 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2852 actually match its name.
2853 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2854 (test_swap()): Fix result for MoveCtorOnly and check
2855 MoveCtorAndSwapOnly.
2857 * include/std/optional (optional::value_or(U&&) &&): Add missing
2858 constexpr specifier.
2859 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2860 for disengaged optionals and rvalue optionals.
2861 * testsuite/20_util/optional/observers/4.cc: Likewise.
2863 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2865 * include/pstl/algorithm_impl.h: Uglify identfiers.
2866 * include/pstl/numeric_impl.h: Uglify identfiers.
2867 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2869 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2871 * include/bits/c++config:
2872 Add definition for __PSTL_ASSERT.
2873 Add definition for __PSTL_ASSERT_MSG.
2874 * include/pstl/algorithm_impl.h: Replace use of assert().
2875 * include/pstl/numeric_impl.h: Replace use of assert().
2876 * include/pstl/parallel_backend_tbb.h:
2877 Replace use of assert().
2878 Replace use of __TBB_ASSERT().
2879 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2881 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2884 * src/c++17/memory_resource.cc
2885 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2886 needed to allow placing a _Chunk at the end of the buffer.
2887 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2889 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2891 * doc/xml/faq.xml: Add information about emergency EH pool.
2892 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2893 Move outdated information on mt_allocator to a separate section.
2894 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2895 doesn't affect the default allocator.
2897 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
2901 * testsuite/20_util/variant/89851.cc: New test.
2903 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
2905 * include/std/variant: Adjust whitespace. Add comments.
2906 (_Multi_array): Leave primary template undefined.
2907 (_Multi_array<_Tp>): Define partial specialization for base case of
2909 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
2910 which is always a reference.
2911 (__gen_vtable::_S_apply()): Remove function, inline body into
2912 default member initializer.
2913 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
2915 * include/std/variant (__variant_idx_cookie): Add member type.
2916 (__visitor_result_type): Remove.
2917 (__do_visit): Use invoke_result instead of __visitor_result_type.
2918 * testsuite/20_util/variant/visit.cc: New test.
2921 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
2923 * testsuite/20_util/variant/90008.cc: New test.
2925 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
2927 * include/pstl/algorithm_impl.h: Add namespace qualification.
2928 * include/pstl/execution_defs.h: Add namespace qualification.
2929 * include/pstl/execution_impl.h: Add namespace qualification.
2930 * include/pstl/numeric_impl.h: Add namespace qualification.
2931 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
2932 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
2933 * include/pstl/parallel_backend_utils.h: Include <cassert>.
2935 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
2937 Fix visit<R> for variant.
2938 * include/std/variant (__do_visit): Add a template parameter
2939 for enforcing same return types for visit.
2940 (__gen_vtable_impl): Likewise.
2941 (_S_apply_single_alt): Adjust.
2942 (__visit_invoke_impl): New. Handle casting to void.
2943 (__do_visit_invoke): New. Enforces same return types.
2944 (__do_visit_invoke_r): New. Converts return types.
2945 (__visit_invoke): Adjust.
2946 (__gen_vtable): Add a template parameter for enforcing
2947 same return types for visit.
2948 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
2949 different return types.
2950 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
2951 visitors with different return types don't accidentally
2952 compile with regular visitation.
2954 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
2956 * testsuite/27_io/filesystem/iterators/caching.cc: Add
2957 dg-require-filesystem-ts.
2959 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
2961 * doc/xml/manual/status_cxx2020.xml: Update status.
2962 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
2963 * testsuite/20_util/variant/visit_r.cc: New test.
2965 * include/bits/fs_dir.h (directory_iterator::operator*)
2966 (directory_iterator::operator->): Add noexcept.
2967 (operator==, operator!=): Replace namespace-scope equality operators
2968 for directory iterators with hidden friends.
2971 * config/abi/pre/gnu.ver: Add missing exports.
2972 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
2975 * config/abi/pre/gnu.ver: Export new symbols.
2976 * include/bits/fs_dir.h (recursive_directory_iterator::options())
2977 (recursive_directory_iterator::recursion_pending())
2978 (recursive_directory_iterator::disable_recursion_pending()): Remove
2979 inline definitions. Make noexcept.
2980 (recursive_directory_iterator::depth())
2981 (recursive_directory_iterator::operator*())
2982 (recursive_directory_iterator::operator->()): Make noexcept.
2983 (recursive_directory_iterator::_M_options)
2984 (recursive_directory_iterator::_M_pending): Remove data members.
2985 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
2986 (recursive_directory_iterator::recursive_directory_iterator): Remove
2987 ctor-initializer. Use new constructor for _Dir_stack.
2988 (recursive_directory_iterator::options())
2989 (recursive_directory_iterator::recursion_pending())
2990 (recursive_directory_iterator::disable_recursion_pending()): Add
2991 non-inline definitions.
2992 (recursive_directory_iterator::depth()): Make noexcept.
2993 (recursive_directory_iterator::increment(error_code&))
2994 (recursive_directory_iterator::pop(error_code&)): Adjust to new
2995 location of options and recursion_pending members.
2996 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
2997 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
2998 user-declared move constructor and assignment operator, to make the
3001 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3002 d_type == DT_UNKNOWN immediately.
3003 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3005 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3007 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3009 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3010 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3013 PR libstdc++/87431 (again)
3014 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3015 Define partial specialization for basic_string.
3016 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3017 shared_ptr and weak_ptr.
3018 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3020 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3022 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3024 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3026 * include/std/any (_Never_valueless_alt): Define explicit
3027 specialization for any.
3028 * include/std/variant (_Never_valueless_alt): Define primary template.
3029 (__never_valueless): Use _Never_valueless_alt instead of
3030 is_trivially_copyable.
3031 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3032 initializations to avoid try-catch overhead. Add special case for
3033 scalars produced by potentially-throwing conversions. Use
3034 _Never_valueless_alt instead of is_trivially_copyable for the
3035 remaining strong exception-safety cases.
3036 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3037 * testsuite/20_util/variant/87431.cc: Run both test functions.
3038 * testsuite/20_util/variant/exception_safety.cc: New test.
3039 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3040 so the variant becomes valueless.
3042 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3045 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3047 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3049 * include/std/string (__hash_string_base): New class template defining
3050 operator() for hashing strings.
3051 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3052 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3053 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3054 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3056 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3058 Use single-visitation in variant assignment and swap and relops.
3059 Also use indices instead of types when checking whether
3060 variants hold the same thing.
3061 * include/std/variant (__do_visit): Add a template parameter
3062 for index visitation, invoke with indices if index visitation
3064 (__variant_idx_cookie): New.
3065 (__visit_with_index): Likewise.
3066 (_Copy_assign_base::operator=): Do single-visitation with
3068 (_Move_assign_base::operator=): Likewise.
3069 (_Extra_visit_slot_needed): Adjust.
3070 (__visit_invoke): Call with indices if it's an index visitor.
3071 (relops): Do single-visitation with an index visitor.
3073 (__visitor_result_type): New.
3075 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3077 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3079 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3081 Don't revisit a variant we are already visiting.
3082 * include/std/variant (__variant_construct_single): New.
3083 (__variant_construct): Use it.
3084 (_M_destructive_move): Likewise.
3085 (_M_destructive_copy): Likewise.
3086 (_Copy_assign_base::operator=): Adjust.
3087 (_Move_assign_base::operator=): Likewise.
3090 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3093 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3094 destructor so they are not evaluated until the _Key type is complete.
3095 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3096 * testsuite/23_containers/set/85965.cc: New test.
3097 * testsuite/23_containers/unordered_set/85965.cc: New test.
3098 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3099 with regexp matching the corresponding _Rb_tree specialization.
3100 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3101 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3102 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3103 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3104 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3105 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3106 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3108 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3111 Fix based on a suggestion by Antony Polukhin.
3112 * include/std/variant (__never_valueless): New.
3114 (_Extra_visit_slot_needed): New.
3115 (_Multi_array): Use it.
3116 (_S_apply_all_alts): Likewise.
3118 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3121 Fix based on a suggestion by Antony Polukhin.
3122 * include/std/variant (__gen_vtable): Don't reserve an
3123 additional table slot, _Multi_array already does that.
3125 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3128 Fix based on a suggestion by Antony Polukhin.
3129 * include/std/variant (__variant_construct): Capture a pointer
3130 to the storage and visit just one variant.
3132 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3134 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3135 Doxygen-generated pages with unstable URL.
3136 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3137 * doc/xml/manual/extensions.xml: Likewise.
3138 * doc/xml/manual/parallel_mode.xml: Likewise.
3139 * doc/xml/manual/support.xml: Likewise.
3141 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3142 avoid -Wconversion warnings.
3144 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3146 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3147 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3148 (allstamped): Add stamp-pstl.
3149 (install-headers): Add ptsl_builddir.
3150 * include/Makefile.in: Regenerate.
3151 * include/bits/c++config: Add pstl configuration.
3152 * include/pstl/LICENSE.txt: New file.
3153 * include/pstl/algorithm_fwd.h: New file.
3154 * include/pstl/algorithm_impl.h: New file.
3155 * include/pstl/execution_defs.h: New file.
3156 * include/pstl/execution_impl.h: New file.
3157 * include/pstl/glue_algorithm_defs.h: New file.
3158 * include/pstl/glue_algorithm_impl.h: New file.
3159 * include/pstl/glue_execution_defs.h: New file.
3160 * include/pstl/glue_memory_defs.h: New file.
3161 * include/pstl/glue_memory_impl.h: New file.
3162 * include/pstl/glue_numeric_defs.h: New file.
3163 * include/pstl/glue_numeric_impl.h: New file.
3164 * include/pstl/memory_impl.h: New file.
3165 * include/pstl/numeric_fwd.h: New file.
3166 * include/pstl/numeric_impl.h: New file.
3167 * include/pstl/parallel_backend.h: New file.
3168 * include/pstl/parallel_backend_tbb.h: New file.
3169 * include/pstl/parallel_backend_utils.h: New file.
3170 * include/pstl/parallel_impl.h: New file.
3171 * include/pstl/pstl_config.h: New file.
3172 * include/pstl/unseq_backend_simd.h: New file.
3173 * include/pstl/utils.h: New file.
3174 * include/std/algorithm: Include parallel algorithm implementations.
3175 * include/std/execution: New file.
3176 * include/std/memory: Include parallel algorithm implementations.
3177 * include/std/numeric: Include parallel algorithm implementations.
3178 * include/std/version: Add parallel algorithms feature test macro.
3179 * testsuite/util/pstl/pstl_test_config.h: New file.
3180 * testsuite/util/pstl/test_utils.h: New file.
3181 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3182 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3183 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3184 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3185 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3186 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3187 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3188 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3189 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3190 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3191 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3192 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3193 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3194 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3195 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3196 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3197 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3198 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3199 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3200 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3201 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3202 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3203 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3204 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3205 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3206 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3207 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3208 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3209 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3210 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3211 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3212 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3213 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3214 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3215 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3216 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3217 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3218 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3219 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3220 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3221 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3222 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3223 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3224 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3225 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3226 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3227 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3228 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3229 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3230 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3231 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3232 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3233 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3234 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3235 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3236 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3237 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3238 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3239 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3240 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3241 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3242 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3243 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3244 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3245 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3246 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3247 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3248 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3249 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3250 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3251 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3252 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3253 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3254 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3255 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3256 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3257 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3258 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3259 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3260 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3261 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3262 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3263 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3264 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3265 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3266 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3267 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3268 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3269 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3270 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3271 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3272 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3273 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3274 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3275 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3276 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3277 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3278 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3279 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3280 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3281 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3282 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3283 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3284 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3285 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3286 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3288 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3290 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3291 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3292 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3293 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3294 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3295 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3296 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3297 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3298 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3299 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3300 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3301 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3302 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3303 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3304 when the special functions IS is enabled, not for C++17.
3305 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3307 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3308 without checks for special functions in C++17.
3309 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3313 * include/backward/hash_map: Use <> for includes not "".
3314 * include/backward/hash_set: Likewise.
3315 * include/backward/strstream: Likewise.
3316 * include/tr1/bessel_function.tcc: Likewise.
3317 * include/tr1/exp_integral.tcc: Likewise.
3318 * include/tr1/legendre_function.tcc: Likewise.
3319 * include/tr1/modified_bessel_func.tcc: Likewise.
3320 * include/tr1/riemann_zeta.tcc: Likewise.
3322 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3324 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3325 of extension allocators.
3326 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3327 Document new headers in 7.2, 8.1 and 9.1 releases.
3328 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3329 * doc/html/*: Regenerate.
3331 2019-03-12 John David Anglin <dave.anglin@bell.net>
3334 * testsuite/lib/libstdc++.exp: Locate libatomic.
3335 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3336 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3338 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3339 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3340 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3341 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3343 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3346 * configure.ac: Check for sockatmark.
3347 * crossconfig.m4: Check for sockatmark.
3348 * config.h.in: Regenerate.
3349 * configure: Regenerate.
3350 * include/experimental/internet (address_v4::_S_hton): Rename
3351 overloaded functions to _S_hton_16 and _S_ntoh_16.
3352 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3353 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3354 * include/experimental/socket (basic_socket::at_mark): Check
3355 _GLIBCXX_HAVE_SOCKATMARK.
3357 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3358 const variables instead of macros.
3361 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3362 Use correct type for len_aligned.
3363 * testsuite/20_util/hash/89629.cc: New test.
3365 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3368 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3369 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3370 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3371 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3372 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3373 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3374 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3375 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3376 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3377 memory_order_seq_cst to int.
3379 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3381 * doc/xml/manual/using.xml: Use link element instead of xref.
3382 * doc/html/*: Regenerate.
3384 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3386 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3389 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3390 parameters in deduction guides.
3391 * include/debug/multimap.h (multimap): Likewise.
3392 * include/debug/set.h (multimap): Likewise.
3393 * include/debug/multiset.h (multimap): Likewise.
3394 * include/debug/unordered_map (unordered_map): Likewise.
3395 (unordered_multimap): Likewise.
3396 * include/debug/unordered_set (unordered_set): Likewise.
3397 (unordered_multiset): Likewise.
3400 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3401 Invalidate all iterators in case of rehash.
3402 (unordered_multimap<>::_M_check_rehashed): Likewise.
3403 * include/debug/unordered_set
3404 (unordered_set<>::_M_check_rehashed): Likewise.
3405 (unordered_multiset<>::_M_check_rehashed): Likewise.
3406 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3408 2019-03-07 Andreas Schwab <schwab@suse.de>
3410 * config/abi/post/riscv64-linux-gnu: New directory.
3411 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3413 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3415 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3416 compile test to run. Fix typo.
3418 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3419 * doc/html/*: Regenerate.
3421 P0356R5 Simplified partial function application
3422 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3423 helpers for bind_front.
3424 (bind_front, __cpp_lib_bind_front): Define.
3425 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3427 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3429 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3430 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3431 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3432 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3434 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3436 PR libstdc++/86655 - std::assoc_legendre should not constrain
3437 the value of m (or x).
3438 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3439 __sph_legendre): If degree > order Don't throw, return 0.
3440 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3441 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3442 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3443 * testsuite/tr1/5_numerical_facilities/special_functions/
3444 02_assoc_legendre/pr86655.cc: New test.
3445 * testsuite/tr1/5_numerical_facilities/special_functions/
3446 22_sph_legendre/pr86655.cc: New test.
3448 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3451 Also PR libstdc++/85517
3452 * include/std/variant (__do_visit): New.
3453 (__variant_cast): Likewise.
3454 (__variant_cookie): Likewise.
3455 (__erased_*): Remove.
3456 (_Variant_storage::_S_vtable): Likewise.
3457 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3458 (_Variant_storage::__M_reset): Adjust.
3459 (__variant_construct): New.
3460 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3461 __variant_construct.
3462 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3463 (_Move_ctor_base::__M_destructive_copy): New.
3464 (_Move_ctor_base::__M_destructive_move): Adjust to use
3465 __variant_construct.
3466 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3467 (_Copy_assign_alias): Adjust to check both copy assignment
3468 and copy construction for triviality.
3469 (_Move_assign_base::operator=): Adjust to use __do_visit.
3470 (_Multi_array): Add support for visitors that accept and return
3472 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3473 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3474 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3475 a __variant_cookie temporary for a variant that is valueless and..
3476 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3477 (__gen_vtable::_Array_type): Conditionally make space for
3478 the __variant_cookie visitor case.
3479 (__variant_construct_by_index): New.
3480 (get_if): Adjust to use std::addressof.
3481 (relops): Adjust to use __do_visit.
3482 (variant): Add __variant_cast and __variant_construct_by_index
3484 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3485 instead of self-destruction.
3486 (variant::swap): Adjust to use __do_visit.
3487 (visit): Reimplement in terms of __do_visit.
3488 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3489 * testsuite/20_util/variant/compile.cc: Adjust.
3490 * testsuite/20_util/variant/run.cc: Likewise.
3492 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3494 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3496 * testsuite/experimental/feat-char8_t.cc: Likewise.
3498 * include/std/type_traits [C++20] (is_bounded_array)
3499 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3501 * testsuite/20_util/is_bounded_array/requirements/
3502 explicit_instantiation.cc: New test.
3503 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3505 * testsuite/20_util/is_bounded_array/value.cc: New test.
3506 * testsuite/20_util/is_unbounded_array/requirements/
3507 explicit_instantiation.cc: New test.
3508 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3510 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3512 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3514 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3516 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3518 * include/c_compatibility/math.h [C++20] (lerp): Add using
3520 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3521 (__lerp): Define function template to implement lerp.
3522 (lerp(float, float, float), lerp(double, double, double))
3523 (lerp(long double, long double, long double)): Define for C++20.
3524 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3525 (midpoint(T, T), midpoint(T*, T*)): Define.
3526 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3527 * testsuite/26_numerics/lerp.cc: New test.
3528 * testsuite/26_numerics/midpoint/floating.cc: New test.
3529 * testsuite/26_numerics/midpoint/integral.cc: New test.
3530 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3532 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3534 PR libstdc++/88996 Implement P0439R0
3535 Make std::memory_order a scoped enumeration.
3536 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3537 add variables for the old enumerators. Adjust calls.
3538 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3539 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3541 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3543 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3546 * include/std/memory_resource (polymorphic_allocator): Add default
3547 template argument for C++20.
3548 (polymorphic_allocator::allocate_bytes)
3549 (polymorphic_allocator::deallocate_bytes)
3550 (polymorphic_allocator::allocate_object)
3551 (polymorphic_allocator::deallocate_object)
3552 (polymorphic_allocator::new_object)
3553 (polymorphic_allocator::delete_object): New member functions for
3555 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3558 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3561 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3564 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3566 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3567 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3569 * include/std/memory (uses_allocator_construction_args): New set of
3570 overloaded functions.
3571 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3573 * include/std/memory_resource (polymorphic_allocator::construct)
3574 [__cplusplus > 201703l]: Replace all overloads with a single function
3575 using uses_allocator_construction_args.
3576 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3578 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3580 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3583 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3584 stylesheet directories before check for xsltproc. Try to use
3585 xmlcatalog to find local stylesheet directory before trying hardcoded
3586 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3587 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3588 use xsltproc if xmlcatalog fails to find a local stylesheet.
3589 * configure.ac: Check for xmlcatalog.
3590 * Makefile.in: Regenerate.
3591 * configure: Likewise.
3592 * doc/Makefile.in: Likewise.
3593 * include/Makefile.in: Likewise.
3594 * libsupc++/Makefile.in: Likewise.
3595 * po/Makefile.in: Likewise.
3596 * python/Makefile.in: Likewise.
3597 * src/Makefile.in: Likewise.
3598 * src/c++11/Makefile.in: Likewise.
3599 * src/c++17/Makefile.in: Likewise.
3600 * src/c++98/Makefile.in: Likewise.
3601 * src/filesystem/Makefile.in: Likewise.
3602 * testsuite/Makefile.in: Likewise.
3604 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3607 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3608 container deduction guides.
3609 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3610 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3611 parameters in deduction guides.
3612 * include/bits/stl_multimap.h (multimap): Likewise.
3613 * include/bits/stl_multiset.h (multiset): Likewise.
3614 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3615 * include/bits/stl_set.h (set): Likewise.
3616 * include/bits/stl_stack.h (stack): Likewise.
3617 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3618 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3619 constrain parameters in deduction guides.
3620 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3622 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3624 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3625 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3626 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3627 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3629 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3631 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3634 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3635 to class template and partial specialization using void_t.
3636 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3638 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3641 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3642 copy and move members public.
3644 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3646 * include/std/type_traits (__underlying_type_impl): New helper to
3647 make underlying_type SFINAE-friendly.
3648 (underlying_type): Derive from __underlying_type_impl.
3649 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3653 * include/bits/char_traits.h (__constant_char_array): Check index is
3654 in range before dereferencing.
3655 (char_traits<char>::compare, char_traits<char>::find)
3656 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3657 immediately if n is zero.
3658 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3659 Remove workarounds for PR 67026.
3660 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3662 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3665 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3667 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3668 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3670 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3673 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3674 type to std::size_t and argument to type to long double.
3676 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3678 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3679 * config/abi/post/sparc64-linux-gnu: New directory.
3680 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3681 * config/abi/post/sparc64-linux-gnu/32: New directory.
3682 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3684 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3686 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3687 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3690 2019-02-22 Tom Honermann <tom@honermann.net>
3692 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3693 printers for u8string and u8string_view.
3695 2019-02-22 Tom Honermann <tom@honermann.net>
3697 * testsuite/18_support/byte/ops.cc: Validate
3698 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3699 std::to_integer<char32_t>.
3700 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3701 std::numeric_limits<char8_t>.
3702 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3703 std::numeric_limits<char8_t>::lowest().
3704 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3705 std::numeric_limits<char8_t>::max_digits10.
3706 * testsuite/18_support/type_info/fundamental.cc: Validate
3707 typeinfo for char8_t.
3708 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3709 std::from_chars with char8_t.
3710 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3711 Validate explicit instantiation of std::hash<char8_t>.
3712 * testsuite/20_util/is_integral/value.cc: Validate
3713 std::is_integral<char8_t>.
3714 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3715 Validate std::make_signed<char8_t>.
3716 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3717 Validate u8string construction from char8_t sources.
3718 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3720 * testsuite/21_strings/basic_string_view/operations/compare/
3721 char/70483.cc: Validate substr operations on u8string_view.
3722 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3723 the u8string_view typedef is defined.
3724 * testsuite/21_strings/char_traits/requirements/
3725 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3727 * testsuite/21_strings/char_traits/requirements/
3728 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3729 constexpr member functions.
3730 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3731 that the u8string typedef is defined.
3732 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3733 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3734 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3735 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3737 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3738 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3740 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3741 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3742 Validate std::atomic<char8_t>::is_always_lock_free
3743 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3744 Update line numbers.
3745 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3747 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3749 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3750 Validate std::experimental::pmr::u8string.
3751 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3752 u8string_view typedef is defined.
3753 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3754 char32_t to the typelists.
3756 2019-02-22 Tom Honermann <tom@honermann.net>
3758 * include/ext/typelist.h: Constrain a partial specialization of
3759 typelist::detail::append_ to only match chain<T1,T2>.
3761 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3764 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3765 class template with class. Replace move and copy member types with
3766 member alias templates, so they are only instantiated when needed.
3767 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3768 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3769 test for C++11/14/17 as well.
3770 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3773 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3776 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3777 _GLIBCXX_PURE to the alias declaration.
3779 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3781 * testsuite/21_strings/basic_string/literals/types.cc
3782 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3783 * testsuite/21_strings/basic_string/literals/values.cc
3784 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3785 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3786 potentially having different type.
3787 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3788 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3790 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3791 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3792 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3793 string literals only using basic character set.
3794 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3795 u8 literals to char.
3796 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3797 Test ATOMIC_CHAR8_T_LOCK_FREE.
3798 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3799 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3800 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3801 * testsuite/experimental/string_view/literals/types.cc
3802 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3804 * testsuite/experimental/string_view/literals/values.cc
3805 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3807 2019-02-19 Tom Honermann <tom@honermann.net>
3809 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3810 from char16_32_t.cc; validates numeric_limits<char8_t>.
3811 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3812 test cloned from types.cc; validates operator""s for char8_t
3814 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3815 test cloned from values.cc; validates construction and comparison
3817 * testsuite/21_strings/basic_string/requirements/
3818 /explicit_instantiation/char8_t/1.cc: New test cloned from
3819 char16_t/1.cc; validates explicit instantiation of
3820 basic_string<char8_t>.
3821 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3822 New test cloned from types.cc; validates operator""sv for char8_t
3823 returns u8string_view.
3824 * testsuite/21_strings/basic_string_view/literals/
3825 values-char8_t.cc: New test cloned from values.cc; validates
3826 construction and comparison of u8string_view values.
3827 * testsuite/21_strings/basic_string_view/requirements/
3828 explicit_instantiation/char8_t/1.cc: New test cloned from
3829 char16_t/1.cc; validates explicit instantiation of
3830 basic_string_view<char8_t>.
3831 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3832 New test cloned from char16_t/65049.cc; validates that
3833 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3834 * testsuite/21_strings/char_traits/requirements/char8_t/
3835 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3836 that char_traits<char8_t> member typedefs are present and correct.
3837 * testsuite/21_strings/char_traits/requirements/
3838 explicit_instantiation/char8_t/1.cc: New test cloned from
3839 char16_t/1.cc; validates explicit instantiation of
3840 char_traits<char8_t>.
3841 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3842 from char16_t.cc: validates
3843 codecvt<char16_t, char8_t, mbstate_t>.
3844 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3845 from char32_t.cc: validates
3846 codecvt<char32_t, char8_t, mbstate_t>.
3847 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3848 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3849 codecvt<char32_t, char8_t, std::mbstate_t>.
3850 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3851 test cloned from string.cc; validates filesystem::path construction
3853 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3854 the __cpp_lib_char8_t feature test macro is defined with the
3856 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3857 New test cloned from string.cc; validates filesystem::path
3858 construction from char8_t input.
3859 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3860 test cloned from types.cc; validates operator""sv for char8_t
3861 returns u8string_view.
3862 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3863 New test cloned from values.cc; validates construction and
3864 comparison of u8string_view values.
3865 * testsuite/experimental/string_view/requirements/
3866 explicit_instantiation/char8_t/1.cc: New test cloned from
3867 char16_t/1.cc; validates explicit instantiation of
3868 basic_string_view<char8_t>.
3869 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3870 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3873 2019-02-19 Tom Honermann <tom@honermann.net>
3875 P0482R5 char8_t: Standard library support
3876 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3877 typeinfo symbols for char8_t.
3878 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3879 (GLIBCXX_3.4.26): Add symbols for specializations of
3880 numeric_limits and codecvt that involve char8_t.
3881 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3882 * include/bits/atomic_base.h: Add atomic_char8_t.
3883 * include/bits/basic_string.h: Add std::hash<u8string> and
3884 operator""s(const char8_t*, size_t).
3885 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3887 * include/bits/char_traits.h: Add char_traits<char8_t>.
3888 * include/bits/codecvt.h: Add
3889 codecvt<char16_t, char8_t, mbstate_t>,
3890 codecvt<char32_t, char8_t, mbstate_t>,
3891 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3892 codecvt_byname<char32_t, char8_t, mbstate_t>.
3893 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3894 recognize char8_t as an integral type.
3895 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
3897 (path::u8string): Return std::u8string when char8_t support is
3899 (path::generic_u8string): Likewise.
3900 (path::_S_convert): Handle conversion from char8_t input.
3901 (path::_S_str_convert): Likewise.
3902 * include/bits/functional_hash.h: Add hash<char8_t>.
3903 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
3905 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
3906 for new char8_t specializations.
3907 * include/bits/localefwd.h: Add missing declarations of
3908 codecvt<char16_t, char, mbstate_t> and
3909 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
3910 codecvt<char16_t, char8_t, mbstate_t> and
3911 codecvt<char32_t, char8_t, mbstate_t>.
3912 * include/bits/postypes.h: Add u8streampos
3913 * include/bits/stringfwd.h: Add declarations of
3914 char_traits<char8_t> and u8string.
3915 * include/c_global/cstddef: Add __byte_operand<char8_t>.
3916 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
3918 (path::u8string): Return std::u8string when char8_t support is
3920 (path::generic_u8string): Likewise.
3921 (path::_S_convert): Handle conversion from char8_t input.
3922 (path::_S_str_convert): Likewise.
3923 * include/experimental/string: Add u8string.
3924 * include/experimental/string_view: Add u8string_view,
3925 hash<experimental::u8string_view>, and
3926 operator""sv(const char8_t*, size_t).
3927 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
3928 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
3929 as a character type.
3930 * include/std/limits: Add numeric_limits<char8_t>.
3931 * include/std/string_view: Add u8string_view,
3932 hash<experimental::u8string_view>, and
3933 operator""sv(const char8_t*, size_t).
3934 * include/std/type_traits: Add __is_integral_helper<char8_t>,
3935 __make_unsigned<char8_t>, and __make_signed<char8_t>.
3936 * libsupc++/atomic_lockfree_defines.h: Define
3937 ATOMIC_CHAR8_T_LOCK_FREE.
3938 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
3939 codecvt.cc and limits.cc so that char8_t specializations of
3940 numeric_limits and codecvt and emitted.
3941 * src/c++11/Makefile.in: Likewise.
3942 * src/c++11/codecvt.cc: Define members of
3943 codecvt<char16_t, char8_t, mbstate_t>,
3944 codecvt<char32_t, char8_t, mbstate_t>,
3945 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3946 codecvt_byname<char32_t, char8_t, mbstate_t>.
3947 * src/c++11/limits.cc: Define members of
3948 numeric_limits<char8_t>.
3949 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
3950 locale_init.cc and localename.cc.
3951 * src/c++98/Makefile.in: Likewise.
3952 * src/c++98/locale_init.cc: Add initialization for the
3953 codecvt<char16_t, char8_t, mbstate_t> and
3954 codecvt<char32_t, char8_t, mbstate_t> facets.
3955 * src/c++98/localename.cc: Likewise.
3956 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
3958 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
3960 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
3961 * 27_io/filesystem/operations/resize_file.cc: Likewise.
3962 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
3964 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
3966 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
3967 * doc/html/*: Regenerate.
3969 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
3970 * doc/html/*: Regenerate.
3972 * doc/xml/manual/intro.xml: Document LWG 2586 status.
3973 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
3974 allocator type in is_constructible checks.
3975 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
3976 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
3977 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
3978 problematic type from LWG 2586 discussion.
3979 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
3980 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3982 * configure.ac: Check for C11 timespec_get function.
3983 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
3985 * config.h.in: Regenerate.
3986 * configure: Regenerate.
3987 * include/c_global/ctime (timespec, timespec_get): Add to namespace
3988 std for C++17 and up.
3990 * doc/xml/manual/intro.xml: Document LWG 2537 status.
3991 * include/bits/stl_queue.h
3992 (priority_queue(const Compare&, const Container&, const Alloc&))
3993 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
3995 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
3997 * doc/xml/manual/intro.xml: Document LWG 2566 status.
3998 * include/bits/stl_queue.h (queue, priority_queue): Add static
3999 assertions to enforce LWG 2566 requirement on value_type.
4000 * include/bits/stl_stack.h (stack): Likewise.
4003 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4005 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4006 * include/bits/std_abs.h: Add comment about LWG 2735.
4007 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4009 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4012 * include/std/version [__cpp_impl_destroying_delete]
4013 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4014 * libsupc++/new [__cpp_impl_destroying_delete]
4015 (__cpp_lib_destroying_delete): Likewise.
4016 (destroying_delete_t, destroying_delete): Likewise, but define even
4017 when __cpp_impl_destroying_delete is not defined.
4018 * testsuite/18_support/destroying_delete.cc: New test.
4020 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4023 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4024 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4025 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4026 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4028 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4031 * include/bits/fs_path.h (path::has_root_name)
4032 (path::has_root_directory, path::has_root_path)
4033 (path::has_relative_path, path::has_parent_path)
4034 (path::has_filename, path::has_stem, path::has_extension)
4035 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4037 * src/c++17/fs_path.cc (path::has_root_name)
4038 (path::has_root_directory, path::has_root_path)
4039 (path::has_relative_path, path::has_parent_path)
4040 (path::has_filename, path::_M_find_extension): Add noexcept.
4042 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4044 PR libstdc++/89102 (partial)
4045 * include/std/type_traits (common_type<>): Define.
4046 (common_type<T>): Derive from common_type<T, T>.
4047 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4048 Test zero-length template argument list.
4049 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4050 Test additional single argument cases.
4051 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4052 Adjust expected error.
4054 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4057 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4059 * include/bits/stl_stack.h (stack): Likewise.
4060 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4061 * testsuite/23_containers/queue/deduction.cc: New test.
4062 * testsuite/23_containers/stack/deduction.cc: New test.
4065 * include/std/type_traits (__is_convertible_helper)
4066 (__is_convertible_helper<_From, _To, false>): Revert changes to
4067 support is_nothrow_convertible.
4068 (__is_nt_convertible_helper): New helper.
4069 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4071 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4072 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4075 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4076 __is_alloc_insertable_impl. Replace single type member with two
4077 members, one for each of copy and move insertable.
4078 (__is_move_insertable): New trait for internal use.
4079 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4080 (vector::_S_nothrow_relocate(true_type)): New functions to
4081 conditionally check if __relocate_a can throw.
4082 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4083 on __is_move_insertable.
4084 (vector::_S_do_relocate): New overloaded functions to conditionally
4086 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4087 based on _S_use_relocate.
4088 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4089 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4090 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4093 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4094 parameter unnamed. Add message to static assertion.
4095 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4096 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4099 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4102 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4104 (__is_bitwise_relocatable): ... to this.
4105 (__relocate_a_1): Adapt.
4106 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4107 (__is_bitwise_relocatable): ... to this.
4109 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4112 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4113 final component as well as from _M_pathname. Append the dot using
4114 operator+= instead of only to _M_pathname.
4115 (path::_M_find_extension): Reformat slightly.
4116 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4117 Add more test cases.
4119 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4121 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4123 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4125 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4126 constexpr specifiers from arg and proj.
4128 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4129 __shared_ptr instantiations used by gcc4-compatible ABI.
4131 * include/experimental/forward_list (experimental::erase): Qualify
4133 * include/experimental/list (experimental::erase): Likewise.
4134 * include/std/forward_list (std::erase): Likewise.
4135 * include/std/list (std::erase): Likewise.
4137 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4139 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4140 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4141 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4142 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4143 * testsuite/ext/array_allocator/26875.cc: Likewise.
4144 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4145 * testsuite/util/replacement_memory_operators.h: Likewise.
4146 * testsuite/util/testsuite_allocator.h: Likewise.
4148 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4149 normal mode vector, even for debug mode.
4150 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4151 Define alias template for normal mode vector.
4153 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4156 * config/locale/generic/c_locale.h (__convert_from_v)
4157 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4158 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4159 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4160 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4162 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4165 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4166 data member with static member function _S_use_relocate().
4167 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4168 (vector::_M_default_append): Use _S_use_relocate() instead of
4171 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4174 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4177 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4178 write to stderr instead of using printf.
4180 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4183 * include/bits/char_traits.h (__constant_string_p,
4184 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4187 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4189 Implement C++20 P0600r1.
4190 * include/backward/hash_map: Add nodiscard attribute to empty.
4191 * include/backward/hash_set: Likewise.
4192 * backward/hashtable.h: Likewise.
4193 * include/bits/basic_string.h: Likewise.
4194 * include/bits/forward_list.h: Likewise.
4195 * include/bits/hashtable.h: Likewise.
4196 * include/bits/regex.h: Likewise.
4197 * include/bits/stl_deque.h: Likewise.
4198 * include/bits/stl_list.h: Likewise.
4199 * include/bits/stl_map.h: Likewise.
4200 * include/bits/stl_multimap.h: Likewise.
4201 * include/bits/stl_multiset.h: Likewise.
4202 * include/bits/stl_queue.h: Likewise.
4203 * include/bits/stl_set.h: Likewise.
4204 * include/bits/stl_stack.h: Likewise.
4205 * include/bits/stl_tree.h: Likewise.
4206 * include/bits/stl_vector.h: Likewise.
4207 * include/bits/unordered_map.h: Likewise.
4208 * include/bits/unordered_set.h: Likewise.
4209 * include/debug/array: Likewise.
4210 * include/experimental/any: Likewise.
4211 * include/experimental/bits/fs_path.h: Likewise.
4212 * include/experimental/internet: Likewise.
4213 * include/experimental/string_view: Likewise.
4214 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4216 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4218 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4220 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4222 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4224 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4226 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4228 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4230 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4231 info_fn_imps.hpp: Likewise.
4232 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4233 left_child_next_sibling_heap_.hpp: Likewise.
4234 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4236 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4238 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4240 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4242 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4244 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4246 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4248 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4249 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4250 * include/ext/rope: Likewise.
4251 * include/ext/slist: Likewise.
4252 * include/ext/vstring.h: Likewise.
4253 * include/profile/array: Likewise.
4254 * include/std/array: Likewise.
4255 * include/tr1/array: Likewise.
4256 * include/tr1/hashtable.h: Likewise.
4257 * include/tr1/regex: Likewise.
4258 * include/tr2/dynamic_bitset: Likewise.
4259 * include/bits/alloc_traits.h: Add nodiscard attribute to
4261 * include/experimental/memory_resource: Likewise.
4262 * include/ext/alloc_traits.h: Likewise.
4263 * include/ext/array_allocator.h: Likewise.
4264 * include/ext/bitmap_allocator.h: Likewise.
4265 * include/ext/debug_allocator.h: Likewise.
4266 * include/ext/extptr_allocator.h: Likewise.
4267 * include/ext/mt_allocator.h: Likewise.
4268 * include/ext/new_allocator.h: Likewise.
4269 * include/ext/pool_allocator.h: Likewise.
4270 * include/ext/throw_allocator.h: Likewise.
4271 * include/std/scoped_allocator: Likewise.
4272 * libsupc++/eh_alloc.cc: Likewise.
4273 * include/std/future: Add nodiscard attribute to async.
4274 * libsupc++/new: Add nodiscard attribute to new.
4276 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4281 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4282 * include/bits/shared_ptr.h
4283 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4284 (allocate_shared): Change to use new tag type.
4285 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4286 Declare new member function.
4287 (_Sp_alloc_shared_tag): Define new type.
4288 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4289 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4290 _Sp_make_shared_tag::_S_eq to check type_info.
4291 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4292 Constrain to prevent being called with _Sp_alloc_shared_tag.
4293 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4294 Replace constructor with ...
4295 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4296 reference parameter so address of the new object can be returned to
4297 the caller. Obtain the allocator from the tag type.
4298 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4299 constructor with ...
4300 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4301 to the __shared_count constructor.
4302 (__allocate_shared): Change to use new tag type.
4303 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4305 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4307 * src/c++17/fs_ops.cc
4308 (equivalent(const path&, const path&, error_code&))
4309 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4310 compare files instead of relying on incomplete info returned by stat.
4313 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4314 if the path is already absolute.
4315 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4316 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4319 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4320 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4321 of filesystem::exists.
4322 (create_directories(const path&, error_code&)): Add assertions.
4323 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4324 Add workaround for bug in _wstat for paths with trailing slash.
4325 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4326 for expected behaviour on mingw.
4327 * testsuite/experimental/filesystem/operations/create_directories.cc:
4329 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4330 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4331 not test permissions on mingw targets.
4333 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4335 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4336 constructors and open members taking wide strings. Fix patterns for
4337 filesystem::path members to match wstring_view parameters. Add
4338 exports for shared_ptr members used by directory iterators.
4339 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4340 error code parameter if the file doesn't exist.
4341 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4343 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4344 values for mingw targets, where "/" is not an absolute path. Do not
4345 test symlinks on mingw targets.
4346 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4347 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4349 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4350 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4351 that each component of the path is created.
4352 * testsuite/experimental/filesystem/operations/create_directories.cc:
4354 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4355 permissions on mingw targets.
4356 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4357 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4358 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4359 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4361 * testsuite/experimental/filesystem/operations/permissions.cc:
4363 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4364 symlinks or permissions on mingw targets.
4365 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4366 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4367 symlinks on mingw targets.
4368 * testsuite/experimental/filesystem/operations/remove_all.cc:
4370 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4371 permissions on mingw targets.
4372 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4373 test symlinks on mingw targets.
4374 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4377 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4380 Warn about unused comparisons of shared_ptr/unique_ptr
4381 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4382 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4383 <, <=, >, >= for shared_ptr.
4384 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4386 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4388 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4389 as 201611L, because P0497R0 changes are supported.
4390 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4392 * include/bits/erase_if.h [__cplusplus > 201703L]
4393 (__cpp_lib_erase_if): Only define for C++2a.
4394 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4395 (__cpp_lib_null_iterators): Define.
4396 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4397 (__cpp_lib_null_iterators): Define.
4398 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4400 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4402 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4404 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4405 changes are supported.
4406 * include/std/optional (__cpp_lib_optional): Likewise.
4407 * include/std/variant (__cpp_lib_variant): Likewise.
4408 * include/std/version [!__STRICT_ANSI__]
4409 (__cpp_lib_uncaught_exceptions): Define as long integer.
4410 [__cplusplus >= 201703L] (__cpp_lib_any)
4411 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4412 (__cpp_lib_variant): Define for C++17.
4413 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4415 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4418 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4420 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4424 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4426 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4429 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4431 * doc/xml/manual/intro.xml: Include new section.
4432 * doc/xml/manual/status_cxx2017.xml: Document more
4433 implementation-defined properties of the library.
4434 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4435 * doc/html/*: Regenerate.
4437 * include/bits/refwrap.h [__cplusplus > 201703L]
4438 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4439 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4440 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4442 (reference_wrapper::operator()): Add static assertion.
4443 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4445 * include/std/chrono (duration_values::zero(), duration_values::min())
4446 (duration_values::max()): Add noexcept.
4447 (duration::zero(), duration::min(), duration::max()): Likewise.
4448 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4449 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4450 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4452 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4454 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4456 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4457 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4459 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4462 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4463 specialization for C++17 (P0513R0, LWG 2817).
4464 * testsuite/20_util/hash/nullptr.cc: New test.
4467 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4468 pattern for std::basic_stringbuf::str().
4470 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4471 basic_ostream::operator<< patterns.
4473 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4475 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4476 test failures on targets with 32-bit time_t.
4478 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4479 * include/std/deque: Likewise.
4480 * include/std/forward_list: Likewise.
4481 * include/std/list: Likewise.
4482 * include/std/string: Likewise.
4483 * include/std/vector: Likewise.
4484 * include/std/version: Likewise.
4485 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4486 * testsuite/23_containers/deque/erasure.cc: Likewise.
4487 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4488 * testsuite/23_containers/list/erasure.cc: Likewise.
4489 * testsuite/23_containers/map/erasure.cc: Likewise.
4490 * testsuite/23_containers/set/erasure.cc: Likewise.
4491 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4492 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4493 * testsuite/23_containers/vector/erasure.cc: Likewise.
4495 * include/experimental/internet [AI_NUMERICSERV]
4496 (resolver_base::numeric_service): Define conditionally.
4497 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4499 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4502 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4503 Jonathan Wakely <jwakely@redhat.com>
4506 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4507 (GLIBCXX_3.4.26): Add new exports.
4508 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4509 correct list of sources.
4510 * include/Makefile.in: Regenerate.
4511 * include/std/ostream (operator<<(nullptr_t)): New member function.
4512 * src/c++17/ostream-inst.cc: New file.
4513 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4516 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4518 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4519 of the source file containing the caller.
4520 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4521 directories created by test.
4522 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4524 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4526 * testsuite/experimental/filesystem/iterators/
4527 recursive_directory_iterator.cc: Likewise.
4529 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4531 PR tree-optimization/88775
4532 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4533 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4534 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4535 instead of __builtin_constant_p if available. Don't bother with
4536 the pointer comparison in C++11 and earlier.
4538 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4542 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4545 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4547 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4548 for filesystem::path. Give variables more distinctive names.
4550 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4551 member function to perform non-trivial assignment.
4552 (_Optional_payload_base::_M_move_assign): Likewise.
4553 (_Optional_payload<T, true, false, true>::operator=)
4554 (_Optional_payload<T, true, true, false>::operator=)
4555 (_Optional_payload<T, true, false, false>::operator=): Call
4556 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4559 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4560 test std::complex<long double> if long double format is IBM128.
4561 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4564 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4566 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4567 for old std::unique_ptr layout.
4568 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4569 to become valueless. Add filesystem::path tests.
4572 * include/std/optional (_Optional_payload_base): New class template
4573 for common code hoisted from _Optional_payload specializations. Use
4574 a template for the union, to allow a partial specialization for
4575 types with non-trivial destructors. Add constructors for in-place
4576 initialization to the union.
4577 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4578 to perform non-trivial copy construction, instead of relying on
4579 non-standard copy elision in a delegating constructor.
4580 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4581 non-trivial move construction.
4582 (_Optional_payload): Derive from _Optional_payload_base and use it
4583 for everything except the non-trivial assignment operators, which are
4585 (_Optional_payload<false, C, M>): Derive from the specialization
4586 _Optional_payload<true, false, false> and add a destructor.
4587 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4588 Forward to corresponding members of _Optional_payload.
4589 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4590 Hoist common members from _Optional_base.
4591 (_Optional_base): Make all members and base class public.
4592 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4593 _Optional_base_impl.
4594 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4595 support for new std::optional layout.
4596 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4599 * include/bits/locale_conv.h: Use <> for includes not "".
4600 * include/ext/random: Likewise.
4601 * include/ext/vstring.h: Likewise.
4603 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4605 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4606 (GLIBCXX_3.4.21): Likewise.
4608 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4611 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4612 to match the one that controls whether utimbuf and utime are declared.
4614 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4617 * include/bits/char_traits.h (char_traits::move): Do not pass null
4618 pointers to memmove.
4619 * include/bits/locale_facets.h
4620 (ctype<char>::widen(const char*, const char*, char*)): Do not
4621 pass null pointers to memcpy.
4622 (ctype<char>::narrow(const char*, const char*, char, char*)):
4624 (ctype<char>::do_widen(const char*, const char*, char*)):
4626 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4629 * doc/xml/manual/spine.xml: Update copyright years.
4630 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4631 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4632 for C++17 filesystem library.
4633 * doc/html/*: Regenerate.
4635 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4636 * config.h.in: Regenerate.
4637 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4638 alphabetically and add missing entries for copy_symlink,
4639 hard_link_count, rename, and resize_file.
4640 * configure: Regenerate.
4641 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4642 used unconditionally.
4643 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4644 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4645 supports truncating to zero length.
4646 * testsuite/27_io/filesystem/operations/all.cc: New test.
4647 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4649 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4652 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4653 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4654 * config.h.in: Regenerate.
4655 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4656 remaining std::filesystem types and functions.
4657 * configure: Regenerate.
4658 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4659 * src/c++17/Makefile.in: Regenerate.
4660 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4661 here, and change name of included file.
4662 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4663 here, and change name of included file.
4664 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4665 path to dir-common.h.
4666 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4667 path to ops-common.h. Disable -Wunused-parameter warnings.
4668 (internal_file_clock): Define unconditionally.
4669 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4671 (do_copy_file, do_space): Move definitions to ops.common.h.
4672 (copy, file_size, hard_link_count, last_write_time, space): Only
4673 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4675 (last_write_time, read_symlink): Remove unused attributes from
4677 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4678 * src/filesystem/Makefile.in: Regenerate.
4679 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4680 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4681 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4682 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4683 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4684 dummy types and functions instead of using #error.
4685 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4686 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4688 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4689 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4690 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4691 to account for new namespace.
4692 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4693 -lstdc++fs from dg-options.
4694 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4695 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4696 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4697 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4698 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4700 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4701 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4703 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4704 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4705 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4706 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4707 * testsuite/27_io/filesystem/operations/create_directories.cc:
4709 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4710 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4711 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4712 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4713 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4714 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4715 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4716 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4717 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4718 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4719 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4720 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4721 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4722 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4723 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4724 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4725 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4726 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4728 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4732 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4733 typeinfo and vtables less greedy.
4734 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4735 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4736 * src/c++17/Makefile.in: Regenerate.
4737 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4738 here, and change name of included file.
4739 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4740 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4742 * src/filesystem/Makefile.in: Regenerate.
4743 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4744 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4745 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4746 from dg-options and remove dg-require-filesystem-ts.
4747 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4748 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4749 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4750 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4751 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4752 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4753 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4754 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4755 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4756 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4757 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4758 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4759 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4760 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4761 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4762 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4763 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4764 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4765 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4766 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4767 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4769 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4770 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4771 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4772 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4773 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4774 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4775 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4776 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4777 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4778 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4779 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4780 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4782 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4784 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4786 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4788 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4789 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4790 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4791 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4792 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4793 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4794 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4795 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4796 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4797 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4799 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4800 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4801 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4802 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4803 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4806 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4807 Check is_trivially_copyable instead of is_scalar.
4808 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4809 contained value can throw and its type is trivially copyable then
4810 construct into a temporary variant and move from it, to provide the
4811 strong exception safety guarantee.
4812 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4814 * testsuite/20_util/variant/87431.cc: New test.
4815 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4816 conversion causes valueless state.
4819 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4820 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4821 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4822 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4823 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4825 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4827 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4828 (file_time_type): Redefine in terms of __file_clock.
4829 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4831 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4833 (internal_file_lock): New helper type for accessing __file_clock.
4834 (do_copy_file): Use internal_file_lock to convert system time to
4836 (last_write_time(const path&, error_code&)): Likewise.
4837 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4839 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4841 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4842 for const member functions of std::basic_string.
4843 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4845 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4846 Make non-standard constructor private.
4847 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4849 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4850 explicit instantiations for C++17 as well as earlier dialects.
4851 * src/c++17/Makefile.am: Add new source files.
4852 * src/c++17/Makefile.in: Regenerate.
4853 * src/c++17/cow-string-inst.cc: New file defining explicit
4854 instantiations for basic_string member functions added in C++17.
4855 * src/c++17/string-inst.cc: Likewise.
4857 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4858 copy/move constructors for old std::basic_string.
4859 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4860 (basic_string::reference, basic_string::const_reference): Define
4861 as plain references for C++11 and later.
4862 (basic_string::basic_string()): Put constructor body outside
4863 preprocessor conditional groups.
4864 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4865 instead of copying it.
4866 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4868 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4870 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4871 cases for old basic_string.
4872 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4873 allocator-extended constructors unconditionally. Add extra members to
4874 allocator type when using old string ABI.
4875 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4877 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4879 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4880 -fno-inline added to test flags.
4882 * testsuite/21_strings/basic_string/requirements/
4883 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4885 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4886 assertion failures with old std::string ABI.
4888 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4890 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4891 functions that will only erase elements at the end.
4892 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4893 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4894 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4896 (path::_List::pop_back()): Define.
4897 (path::_List::_M_erase_from(const_iterator)): Define.
4898 (path::operator/=(const path&)): Use pop_back to remove last component
4899 and _M_erase_from to remove multiple components.
4900 (path::_M_append(basic_string_view<value_type>)): Likewise.
4901 (path::operator+=(const path&)): Likewise.
4902 (path::_M_concat(basic_string_view<value_type>)): Likewise.
4903 (path::remove_filename()): Likewise.
4904 (path::lexically_normal()): Use _List::_Impl iterators instead of
4905 path::iterator. Use pop_back to remove components from the end. Clear
4906 trailing filename, instead of using erase(const_iterator) to remove
4907 a non-final component.
4908 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
4910 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
4912 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
4913 incorrect treatment of empty filename after trailing slash.
4914 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
4916 * testsuite/21_strings/basic_string/modifiers/assign/char/
4917 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
4919 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
4920 move_assign_optim.cc: Likewise.
4922 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4923 Jakub Jelinek <jakub@redhat.com>
4926 * include/experimental/memory: Replace UTF-8 quote characters.
4927 * include/std/future: Replace UTF-8 "em dash" characters.
4929 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
4932 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
4933 * include/debug/forward_list: Likewise.
4934 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
4936 * include/experimental/chrono: Likewise.
4937 * include/experimental/functional: Likewise.
4938 * include/experimental/ratio: Likewise.
4939 * include/experimental/system_error: Likewise.
4940 * include/experimental/tuple: Likewise.
4941 * include/experimental/type_traits: Likewise.
4942 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
4943 * include/parallel/multiseq_selection.h: Likewise.
4946 * config/abi/pre/gnu.ver: Add missing exports.
4947 * testsuite/22_locale/collate_byname/88681.cc: New test.
4948 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
4949 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
4951 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
4953 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
4954 initializer_list<value_type> and from input iterator ranges.
4955 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4957 * testsuite/experimental/string_view/element_access/char/empty.cc:
4958 Fix year range in copyright header.
4960 2019-01-02 Joel Brobecker <brobecker@adacore.com>
4962 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4963 Fix year range in copyright header.
4965 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4967 Update copyright years.
4969 Copyright (C) 2019 Free Software Foundation, Inc.
4971 Copying and distribution of this file, with or without modification,
4972 are permitted in any medium without royalty provided the copyright
4973 notice and this notice are preserved.