1 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
3 * doc/xml/manual/abi.xml: Document 9.x library versions.
4 * doc/html/*: Regenerate.
6 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
8 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
9 (__detail::__to_chars_8_len): Remove.
10 (__detail::__to_chars_8): Inline length calculation here.
11 (__detail::__from_chars_binary): Use numeric_limits instead of
14 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
17 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
18 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
19 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
22 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
24 * testsuite_files/util/testsuite_performance.h
25 (resource_counter::start): Ignore unused malloc(0) result.
27 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
29 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
30 Model Object Technologies): Adjust name and link.
32 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
34 * include/std/charconv (__detail::__to_chars_8)
35 __detail::__to_chars_16): Replace array of precomputed digits with
36 arithmetic operations to avoid CPU cache misses. Remove zero
37 termination from array of digits to allow symbol merge with generic
38 implementation of __detail::__to_chars. Replace final offsets with
39 constants. Use __detail::__to_chars_len_2 instead of a generic
40 __detail::__to_chars_len.
41 (__detail::__to_chars): Remove zero termination from array of digits.
42 (__detail::__to_chars_2): Leading digit is always '1'.
44 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
46 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
48 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
50 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
52 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
55 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
56 to template parameters.
57 * include/bits/stl_uninitialized.h (uninitialized_copy)
58 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
59 diagnose invalid uses.
60 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
61 Adjust expected error.
62 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
64 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
66 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
68 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
70 * testsuite/23_containers/vector/cons/89164.cc: New test.
71 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
73 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
76 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
77 * configure: Regenerate.
78 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
80 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
82 * testsuite/util/testsuite_abi.cc: Add new symbol version.
84 2019-08-29 Jakub Jelinek <jakub@redhat.com>
86 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
87 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
89 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
91 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
92 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
93 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
94 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
95 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
96 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
97 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
99 2019-08-23 Joseph Myers <joseph@codesourcery.com>
101 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
102 (std::filesystem::__gnu_posix::lstat): Add return type.
104 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
106 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
108 * include/std/numeric (reduce): Fix Doxygen markup.
111 * include/std/type_traits (is_function): Simplify definition. Remove
112 partial specializations for function types.
113 (__is_referenceable): Simplify definition.
114 * testsuite/20_util/bind/91371.cc: New test.
115 * testsuite/20_util/is_function/91371.cc: New test.
116 * testsuite/20_util/is_function/value.cc: Check more pointer types.
117 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
118 * testsuite/20_util/is_object/91371.cc: New test.
120 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
122 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
124 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
127 * include/bits/std_function.h (__check_func_return_type): Remove.
128 (function::_Callable): Use std::__is_invocable_impl instead of
129 __check_func_return_type.
130 * include/std/type_traits (__is_invocable_impl): Add another defaulted
131 template parameter. Define a separate partial specialization for
132 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
133 with a check that models delayed temporary materialization.
134 * testsuite/20_util/function/91456.cc: New test.
135 * testsuite/20_util/is_invocable/91456.cc: New test.
137 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
139 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
141 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
143 Implement C++20 p0879 - Constexpr for swap and swap related functions.
144 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
145 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
147 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
148 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
149 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
150 * include/bits/move.h (swap): Add constexpr.
151 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
152 (__gcd, __rotate, rotate, __partition, __heap_select)
153 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
154 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
155 (__introselect, __chunk_insertion_sort, next_permutation)
156 (prev_permutation, partition, partial_sort, nth_element, sort)
157 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
158 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
159 (swap_ranges): Add constexpr.
160 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
161 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
163 * include/std/type_traits (swap): Add constexpr.
164 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
165 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
166 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
167 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
168 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
169 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
170 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
171 * testsuite/25_algorithms/partition/constexpr.cc: New test.
172 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
173 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
174 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
175 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
176 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
177 * testsuite/25_algorithms/sort/constexpr.cc: New test.
178 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
179 * testsuite/25_algorithms/swap/constexpr.cc: New test.
180 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
182 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
185 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
187 * include/std/tuple (__unpack_std_tuple): New variable template and
188 partial specializations.
189 (apply, make_from_tuple): Add noexcept-specifier.
190 * testsuite/20_util/tuple/apply/2.cc: New test.
191 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
193 2019-08-09 Corentin Gay <gay@adacore.com>
195 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
196 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
197 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
198 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
199 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
200 Add call to `VERIFY`.
202 2019-08-09 Alexandre Oliva <oliva@adacore.com>
205 (normal_mv_distribution::param_type::param_type): New private
206 ctor taking a decomposed varcov matrix, for use by...
207 (operator>>): ... this, befriended.
208 * include/ext/random.tcc (operator>>): Use it.
209 (normal_mv_distribution::param_type::_M_init_lower): Adjust
210 member function name in exception message.
212 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
214 P0325R4 to_array from LFTS with updates
215 * include/experimental/array (to_array): Qualify call to __to_array.
216 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
217 * include/std/version (__cpp_lib_to_array): Likewise.
218 * testsuite/23_containers/array/creation/1.cc: New test.
219 * testsuite/23_containers/array/creation/2.cc: New test.
220 * testsuite/23_containers/array/creation/3_neg.cc: New test.
221 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
222 Use zero for dg-error line number.
224 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
226 P1651R0 bind_front should not unwrap reference_wrapper
227 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
228 * include/std/version (__cpp_lib_bind_front): Update value.
229 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
231 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
233 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
234 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
235 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
236 specializations for __float128.
237 * testsuite/26_numerics/numbers/float128.cc: New test.
239 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
241 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
244 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
246 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
247 in <algorithm> and <utility> Headers.
248 Implement C++20 p1023 - constexpr comparison operators for std::array.
249 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
250 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
251 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
252 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
253 none_of, partition_copy, partition_point, remove, remove_if,
254 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
255 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
256 count_if, equal, find, find_first_of, find_if, for_each, generate,
257 generate_n, lexicographical_compare, merge, mismatch, replace,
258 replace_if, search, search_n, set_difference, set_intersection,
259 set_symmetric_difference, set_union, transform, unique_copy):
261 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
262 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
263 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
264 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
265 Use const ref instead of ref arg;
266 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
267 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
268 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
269 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
270 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
271 __iter_comp_iter): Mark constexpr.
272 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
273 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
274 none_of, any_of, find_if_not, is_partitioned, partition_point,
275 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
276 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
277 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
278 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
279 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
280 __equal_range, equal_range, binary_search, __includes, includes,
281 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
282 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
283 is_sorted_until, __is_permutation, is_permutation, for_each, find,
284 find_if, find_first_of, adjacent_find, count, count_if, search,
285 search_n, transform, replace, replace_if, generate, generate_n,
286 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
287 set_intersection, __set_difference, set_difference,
288 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
289 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
290 wrappers around __builtin_memmove and __builtin_memcmp
292 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
293 copy, move, __copy_move_b, __copy_move_backward_a,
294 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
295 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
296 __lexicographical_compare_impl, __lexicographical_compare,
297 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
298 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
299 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
300 is_heap): Mark constexpr.
301 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
302 is_heap): Mark constexpr.
303 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
304 * include/std/array: Make comparison ops constexpr.
305 * include/std/utility: Make exchange constexpr.
306 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
307 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
308 * testsuite/23_containers/array/tuple_interface/
309 tuple_element_neg.cc: Adjust.
310 * testsuite/20_util/exchange/constexpr.cc: New.
311 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
312 * testsuite/25_algorithms/constexpr_macro.cc: New.
313 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
314 * testsuite/25_algorithms/all_of/constexpr.cc: New.
315 * testsuite/25_algorithms/any_of/constexpr.cc: New.
316 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
317 * testsuite/25_algorithms/copy/constexpr.cc: New.
318 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
319 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
320 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
321 * testsuite/25_algorithms/count/constexpr.cc: New.
322 * testsuite/25_algorithms/count_if/constexpr.cc: New.
323 * testsuite/25_algorithms/equal/constexpr.cc: New.
324 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
325 * testsuite/25_algorithms/fill/constexpr.cc: New.
326 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
327 * testsuite/25_algorithms/find/constexpr.cc: New.
328 * testsuite/25_algorithms/find_end/constexpr.cc: New.
329 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
330 * testsuite/25_algorithms/find_if/constexpr.cc: New.
331 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
332 * testsuite/25_algorithms/for_each/constexpr.cc: New.
333 * testsuite/25_algorithms/generate/constexpr.cc: New.
334 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
335 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
336 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
337 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
338 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
339 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
340 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
341 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
342 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
343 * testsuite/25_algorithms/merge/constexpr.cc: New.
344 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
345 * testsuite/25_algorithms/none_of/constexpr.cc: New.
346 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
347 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
348 * testsuite/25_algorithms/remove/constexpr.cc: New.
349 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
350 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
351 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
352 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
353 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
354 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
355 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
356 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
357 * testsuite/25_algorithms/search/constexpr.cc: New.
358 * testsuite/25_algorithms/search_n/constexpr.cc: New.
359 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
360 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
361 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
362 * testsuite/25_algorithms/set_union/constexpr.cc: New.
363 * testsuite/25_algorithms/transform/constexpr.cc: New.
364 * testsuite/25_algorithms/unique/constexpr.cc: New.
365 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
366 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
368 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
370 * include/std/memory (make_obj_using_allocator): Qualify call to
371 uses_allocator_construction_args.
373 P0631R4 Math Constants
374 * include/Makefile.am: Add new header.
375 * include/Makefile.in: Regenerate.
376 * include/precompiled/stdc++.h: Include new header.
377 * include/std/numbers: New header.
378 * include/std/version (__cpp_lib_math_constants): Define.
379 * testsuite/26_numerics/numbers/1.cc: New test.
380 * testsuite/26_numerics/numbers/2.cc: New test.
381 * testsuite/26_numerics/numbers/3.cc: New test.
382 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
384 * include/std/bit: Add Doxygen comments.
387 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
388 constraints on deleter that should only apply to the constructor.
389 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
390 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
391 constraints on deleter here.
392 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
394 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
397 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
399 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
401 * testsuite/18_support/51333.cc: New test.
403 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
405 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
406 to the Doxygen manual. Avoid a "here" link on the way.
407 Fix another broken link to Doxygen docblocks.
409 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
411 * include/std/bit (__cpp_lib_endian): Define.
412 * include/std/version (__cpp_lib_endian): Define.
413 * testsuite/26_numerics/endian/2.cc: New.
414 * testsuite/26_numerics/endian/3.cc: New.
415 * testsuite/26_numerics/endian/4.cc: New.
417 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
419 * testsuite/util/testsuite_iterators.h
420 (bidirectional_iterator_wrapper): Fix type comment.
421 (random_access_iterator_wrapper): Likewise.
423 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
425 * include/std/bit (endian): Move definition here as per P1612R1.
426 * include/std/type_traits (endian): Remove definition from here.
427 * testsuite/20_util/endian/1.cc: Rename to ...
428 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
430 2019-07-25 Martin Liska <mliska@suse.cz>
431 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
434 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
436 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
437 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
438 * testsuite/ext/new_allocator/check_new.cc: Likewise.
440 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
442 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
443 * testsuite/26_numerics/bit/bit.count/*: Here.
445 * include/std/bit (__rotl, __rotr): Change second parameter from
446 unsigned int to int and handle negative values.
447 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
448 parameter from unsigned int to int. Add nodiscard attribute.
449 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
450 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
452 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
453 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
456 * include/std/bit (__ceil2): Make unrepresentable results undefined,
457 as per P1355R2. Add debug assertion. Perform one left shift, not two,
458 so that out of range values cause undefined behaviour. Ensure that
459 shift will still be undefined if left operand is promoted.
460 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
461 unrepresentable values with checks that they are not core constant
463 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
465 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
467 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
468 sized deallocation size computation.
470 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
472 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
474 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
476 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
477 (~_Temporary_buffer()): Use latter.
478 (_Temporary_buffer(_FIterator, size_type)): Likewise.
480 2019-07-17 Andreas Schwab <schwab@suse.de>
482 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
484 2019-07-16 Jason Merrill <jason@redhat.com>
486 * include/std/memory (uses_allocator_construction_args): Add parens
489 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
491 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
493 * include/experimental/string_view (__detail::__idt): Remove.
494 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
495 Use __type_identity_t instead of __detail::__idt;
496 * include/std/string_view (__detail::__idt): Remove.
497 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
498 Use __type_identity_t instead of __detail::__idt;
499 * include/std/type_traits (__type_identity_t): New alias template.
501 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
502 and floating point atomics.
504 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
506 * doc/xml/manual/configure.xml: Improve documentation of
507 --enable-libstdcxx-time option.
509 * include/bits/atomic_base.h (__atomic_impl): New namespace for
510 wrappers around atomic built-ins.
511 (__atomic_float, __atomic_ref): New class templates for use as base
513 * include/std/atomic (atomic<float>, atomic<double>)
514 (atomic<long double>): New explicit specializations.
515 (atomic_ref): New class template.
516 (__cpp_lib_atomic_ref): Define.
517 * include/std/version (__cpp_lib_atomic_ref): Define.
518 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
519 * testsuite/29_atomics/atomic_float/1.cc: New test.
520 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
521 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
522 * testsuite/29_atomics/atomic_ref/float.cc: New test.
523 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
524 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
525 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
526 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
528 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
530 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
531 throw() with _GLIBCXX_NOTHROW.
532 (__atomic_add_dispatch): Return after performing atomic increment.
534 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
536 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
537 (__exchange_and_add): Replace static specifier with always_inline
539 (__exchange_and_add_single, __atomic_add_single): Likewise.
540 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
541 combine !__gthread_active_p() and !__GTHREADS branches.
543 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
546 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
547 * configure: Regenerate.
548 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
550 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
551 * testsuite/util/testsuite_abi.cc: Add new symbol version.
553 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
555 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
556 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
557 instead of __is_identifier to detect Clang support.
559 2019-07-02 Jim Wilson <jimw@sifive.com>
561 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
563 * configure: Regenerate.
565 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
568 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
569 for the what_arg parameters.
570 (filesystem_error::filesystem_error): Pass system_error::what() to
571 the _Impl constructor.
572 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
573 filesystem_error::what() contains system_error::what().
575 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
577 * include/std/charconv (chars_format): Define bitmask type.
578 * testsuite/20_util/to_chars/chars_format.cc: New test.
580 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
581 * include/std/bit (_If_is_unsigned_integer_type): Remove.
582 (_If_is_unsigned_integer): Use __is_unsigned_integer.
583 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
584 (countl_one(byte), countr_zero(byte), countr_one(byte))
585 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
586 (log2p1(byte)): Remove.
587 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
588 (__detail::__is_int_to_chars_type): Remove.
589 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
590 and __is_unsigned_integer.
591 * include/std/type_traits (__is_one_of): Move here from <charconv>.
592 (__is_signed_integer, __is_unsigned_integer): New helpers.
593 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
595 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
596 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
597 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
598 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
599 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
600 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
601 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
602 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
603 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
604 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
606 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
608 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
611 2019-06-25 Jakub Jelinek <jakub@redhat.com>
613 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
614 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
615 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
616 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
618 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
620 * include/std/numeric (midpoint(T, T)): Change implementation for
621 floating-point types to avoid incorrect rounding of denormals.
622 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
623 rounding with denormals.
624 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
625 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
627 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
629 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
631 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
633 * configure: Regenerate.
635 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
636 Qualify calls to __never_valueless.
638 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
641 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
642 vector<bool> for test.
643 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
645 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
647 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
649 (istream_iterator::_M_read()): Do not check stream state before
650 attempting extraction. Set stream pointer to null when extraction
652 (operator==(const istream_iterator&, const istream_iterator&)): Change
653 to be a hidden friend of istream_iterator.
654 (operator!=(const istream_iterator&, const istream_iterator&)):
656 (ostream_iterator::ostream_iterator()): Add default constructor.
657 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
659 * testsuite/24_iterators/istream_iterator/1.cc: New test.
660 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
661 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
662 constructor taking a string.
663 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
666 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
667 Jonathan Wakely <jwakely@redhat.com>
670 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
671 values of type bool for vector<bool> elements.
672 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
673 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
675 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
677 PR libstdc++/90920 partially revert r263433
678 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
679 (rotate): Remove checks.
680 * testsuite/25_algorithms/rotate/90920.cc: New test.
682 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
683 category used in invocable check.
684 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
685 * testsuite/26_numerics/reduce/2.cc: New test.
687 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
689 * include/bits/algorithmfwd.h: Change title of doc group.
690 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
692 * include/bits/stl_numeric.h: Define doc group and add algos to it.
693 * include/std/numeric (__is_random_access_iter): New internal trait.
694 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
695 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
696 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
697 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
698 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
699 * testsuite/26_numerics/reduce/1.cc: New test.
700 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
701 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
702 * testsuite/26_numerics/transform_reduce/1.cc: New test.
703 * testsuite/util/testsuite_iterators.h (test_container::size()): New
706 * include/c_global/cstddef (std::byte): Perform arithmetic operations
707 in unsigned int to avoid promotion (LWG 2950).
709 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
711 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
714 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
716 PR libstdc++/90281 Fix string conversions for filesystem::path
717 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
718 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
719 __str_codecvt_in_all to fail for partial conversions and throw on
721 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
722 (path::_Cvt<char8_t>): Add explicit specialization.
723 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
725 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
726 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
727 instead of codecvt_utf8. Use __str_codecvt_in_all and
728 __str_codecvt_out_all.
729 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
730 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
731 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
732 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
733 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
734 after converting to UTF-8.
735 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
736 __str_codecvt_in_all.
737 (path::string): Fix initialization of string types with different
739 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
740 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
741 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
743 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
744 return false for partial conversions.
745 * include/experimental/bits/fs_path.h (u8path):
746 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
747 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
748 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
749 instead of codecvt_utf8. Use __str_codecvt_in_all and
750 __str_codecvt_out_all.
751 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
752 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
753 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
754 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
755 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
756 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
757 __str_codecvt_in_all.
758 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
759 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
760 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
761 __str_codecvt_in_all.
762 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
763 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
764 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
765 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
766 strings and with Unicode characters outside the basic multilingual
768 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
769 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
770 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
771 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
772 * testsuite/experimental/filesystem/path/native/string.cc: Test with
773 empty strings and with Unicode characters outside the basic
776 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
777 Jonathan Wakely <jwakely@redhat.com>
779 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
780 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
781 deallocate node if insertion fails.
782 (_Hashtable::_M_insert_multi_node): Likewise.
783 (_Hashtable::_M_reinsert_node): Pass additional key argument.
784 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
785 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
786 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
787 (_Hashtable::extract(const _Key&)): Likewise.
788 (_Hashtable::_M_merge_unique): Pass additional key argument.
789 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
791 (_Hashtable::_M_insert): Likewise.
792 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
793 (_Hashtable_alloc): Add comments to functions with misleading names.
795 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
797 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
799 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
800 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
801 header for std::allocator.
802 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
803 using-declaration for std::size_t.
804 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
806 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
808 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
809 * testsuite/experimental/map/erasure.cc: Include <string> for
811 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
813 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
815 * include/experimental/type_traits (experimental::nonesuch): Use
816 pragma to disable -Wctor-dtor-privacy warnings.
817 * include/std/type_traits (__is_convertible_helper<From, To, false>)
818 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
820 * include/std/version (__cpp_lib_bind_front): Add missing macro.
822 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
824 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
825 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
826 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
827 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
829 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
830 (variant::emplace): Change static_assert messages from "should be"
832 (hash<monostate>::operator()): Remove name of unused parameter.
834 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
837 * include/Makefile.am: Add new <bits/charconv.h> header.
838 * include/Makefile.in: Regenerate.
839 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
840 (to_string(long), to_string(unsigned long), to_string(long long))
841 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
842 * include/bits/charconv.h: New header.
843 (__detail::__to_chars_len): Move here from <charconv>.
844 (__detail::__to_chars_10_impl): New function extracted from
845 __detail::__to_chars_10.
846 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
847 (__to_chars_unsigned_type): New class template that reuses
848 __make_unsigned_selector_base::__select to pick a type.
849 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
850 (__detail::__to_chars_len): Move to new header.
851 (__detail::__to_chars_10): Add inline specifier. Move code doing the
852 output to __detail::__to_chars_10_impl and call that.
853 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
854 * testsuite/21_strings/basic_string/numeric_conversions/char/
855 to_string.cc: Fix reference in comment. Remove unused variable.
856 * testsuite/21_strings/basic_string/numeric_conversions/char/
857 to_string_int.cc: New test.
859 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
861 Fix ConstexprIterator requirements tests - No constexpr algorithms!
862 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
863 Replace copy with hand-rolled loop.
864 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
867 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
869 Test for C++20 p0858 - ConstexprIterator requirements.
870 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
872 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
875 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
877 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
879 * include/bits/c++config: Rename all macros of the form __PSTL* to
881 * include/std/algorithm: Likewise.
882 * include/std/execution: Likewise.
883 * include/std/numeric: Likewise.
884 * include/std/memory: Likewise.
885 * include/pstl/glue_memory_impl.h: Likewise.
886 * include/pstl/numeric_impl.h: Likewise.
887 * include/pstl/glue_memory_defs.h: Likewise.
888 * include/pstl/execution_defs.h: Likewise.
889 * include/pstl/utils.h: Likewise.
890 * include/pstl/algorithm_fwd.h: Likewise.
891 * include/pstl/unseq_backend_simd.h: Likewise.
892 * include/pstl/glue_execution_defs.h: Likewise.
893 * include/pstl/algorithm_impl.h: Likewise.
894 * include/pstl/parallel_impl.h: Likewise.
895 * include/pstl/memory_impl.h: Likewise.
896 * include/pstl/glue_numeric_defs.h: Likewise.
897 * include/pstl/parallel_backend_utils.h: Likewise.
898 * include/pstl/glue_algorithm_defs.h: Likewise.
899 * include/pstl/parallel_backend.h: Likewise.
900 * include/pstl/glue_numeric_impl.h: Likewise.
901 * include/pstl/parallel_backend_tbb.h: Likewise.
902 * include/pstl/numeric_fwd.h: Likewise.
903 * include/pstl/glue_algorithm_impl.h: Likewise.
904 * include/pstl/execution_impl.h: Likewise.
905 * include/pstl/pstl_config.h: Likewise.
906 * testsuite/util/pstl/pstl_test_config.h: Likewise.
907 * testsuite/util/pstl/test_utils.h: Likewise.
908 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
910 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
912 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
914 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
915 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
916 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
917 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
918 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
920 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
921 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
922 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
923 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
924 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
926 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
927 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
928 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
929 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
930 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
932 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
933 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
934 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
936 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
938 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
939 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
940 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
942 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
944 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
946 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
948 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
950 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
952 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
954 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
956 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
958 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
960 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
962 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
964 Rename header guards to be consistent with upstream project's
966 * include/pstl/glue_memory_impl.h: Rename all macros of the form
967 _PSTL_(.*)_H to _PSTL_\U\1_H.
968 * include/pstl/numeric_impl.h: Likewise.
969 * include/pstl/glue_memory_defs.h: Likewise.
970 * include/pstl/execution_defs.h: Likewise.
971 * include/pstl/utils.h: Likewise.
972 * include/pstl/algorithm_fwd.h: Likewise.
973 * include/pstl/unseq_backend_simd.h: Likewise.
974 * include/pstl/glue_execution_defs.h: Likewise.
975 * include/pstl/algorithm_impl.h: Likewise.
976 * include/pstl/parallel_impl.h: Likewise.
977 * include/pstl/memory_impl.h: Likewise.
978 * include/pstl/glue_numeric_defs.h: Likewise.
979 * include/pstl/parallel_backend_utils.h: Likewise.
980 * include/pstl/glue_algorithm_defs.h: Likewise.
981 * include/pstl/parallel_backend.h: Likewise.
982 * include/pstl/glue_numeric_impl.h: Likewise.
983 * include/pstl/parallel_backend_tbb.h: Likewise.
984 * include/pstl/numeric_fwd.h: Likewise.
985 * include/pstl/glue_algorithm_impl.h: Likewise.
986 * include/pstl/execution_impl.h: Likewise.
987 * include/pstl/pstl_config.h: Likewise.
988 * testsuite/util/pstl/pstl_test_config.h: Likewise.
990 Synchronize libstdc++ parallel algorithms with upstream
992 * include/pstl/algorithm_fwd.h: Synchronize with
993 upstream PSTL project.
994 * include/pstl/algorithm_impl.h: Likewise.
995 * include/pstl/execution_defs.h: Likewise.
996 * include/pstl/execution_impl.h: Likewise.
997 * include/pstl/glue_algorithm_impl.h: Likewise.
998 * include/pstl/glue_execution_defs.h: Likewise.
999 * include/pstl/numeric_fwd.h: Likewise.
1000 * include/pstl/numeric_impl.h: Likewise.
1001 * include/pstl/parallel_backend.h: Likewise.
1002 * include/pstl/pstl_config.h: Likewise.
1003 * include/pstl/unseq_backend_simd.h: Likewise.
1004 * include/pstl/parallel_backend_serial.h: New file.
1005 * include/Makefile.am (pstl_headers): Add
1006 parallel_backend_serial.h.
1007 * include/Makefile.in: Regenerate.
1009 Clean up non-conforming names
1010 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1011 Uglfiy copy_range1 and copy_range2
1012 (__pattern_walk2_n): Rename local n to __n
1013 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1014 Rename parameter _T to _Tp.
1016 Integrate non-TBB serial backend support
1017 * include/bits/c++config: Adjust TBB detection logic to select serial
1018 PSTL backend if no TBB present.
1019 * testsuite/utils/pstl/test_utils.h: Remove check for
1020 _PSTL_USE_PAR_POLICIES
1022 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1024 * testsuite/24_iterators/container_access.cc: Move dg-options before
1025 dg-do directive so the target check uses the -std option.
1028 * configure: Regenerate.
1029 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1030 * src/Makefile.in: Regenerate.
1032 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1034 * include/std/array: Do not include <stdexcept>.
1035 * include/std/optional: Include <exception> and
1036 <bits/exception_defines.h> instead of <stdexcept>.
1037 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1039 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1041 * testsuite/23_containers/map/erasure.cc: Include <string>.
1042 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1044 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1045 dg-prune-output for different C++98 diagnostic.
1046 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1048 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1050 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1052 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1054 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1056 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1058 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1060 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1062 * testsuite/23_containers/vector/requirements/dr438/
1063 constructor_1_neg.cc: Likewise.
1064 * testsuite/23_containers/vector/requirements/dr438/
1065 constructor_2_neg.cc: Likewise.
1066 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1068 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1070 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1071 Do not test allocator rebinding extension for C++2a.
1072 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1073 dg-do directive for C++17 and C++2a.
1075 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1076 1_c++0x.cc: Remove redundant test.
1077 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1078 2.cc: Use target selector instead of preprocessor condition.
1079 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1080 3.cc: Do not run test for C++2a.
1081 * testsuite/23_containers/forward_list/requirements/
1082 explicit_instantiation/3.cc: Likewise.
1083 * testsuite/23_containers/forward_list/requirements/
1084 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1086 * testsuite/23_containers/list/requirements/explicit_instantiation/
1087 1_c++0x.cc: Remove redundant test.
1088 * testsuite/23_containers/list/requirements/explicit_instantiation/
1089 2.cc: Use target selector instead of preprocessor condition.
1090 * testsuite/23_containers/list/requirements/explicit_instantiation/
1091 3.cc: Do not run test for C++2a.
1092 * testsuite/23_containers/list/requirements/explicit_instantiation/
1093 5.cc: Do not test allocator rebinding extension for C++2a.
1094 * testsuite/23_containers/map/requirements/explicit_instantiation/
1095 1_c++0x.cc: Remove redundant test.
1096 * testsuite/23_containers/map/requirements/explicit_instantiation/
1097 2.cc: Adjust comment.
1098 * testsuite/23_containers/map/requirements/explicit_instantiation/
1099 3.cc: Do not run test for C++2a.
1100 * testsuite/23_containers/map/requirements/explicit_instantiation/
1101 5.cc: Do not test allocator rebinding extension for C++2a.
1102 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1103 1_c++0x.cc: Remove redundant test.
1104 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1105 3.cc: Do not run test for C++2a.
1106 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1107 5.cc: Do not test allocator rebinding extension for C++2a.
1108 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1109 3.cc: Do not run test for C++2a.
1110 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1111 5.cc: Do not test allocator rebinding extension for C++2a.
1112 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1113 Do not run test for C++2a.
1114 * testsuite/23_containers/set/requirements/explicit_instantiation/
1115 1_c++0x.cc: Remove redundant test.
1116 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1117 Do not test allocator rebinding extension for C++2a.
1118 * testsuite/23_containers/unordered_map/requirements/
1119 explicit_instantiation/3.cc: Likewise.
1120 * testsuite/23_containers/unordered_map/requirements/
1121 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1123 * testsuite/23_containers/unordered_multimap/requirements/
1124 explicit_instantiation/3.cc: Do not run test for C++2a.
1125 * testsuite/23_containers/unordered_multimap/requirements/
1126 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1128 * testsuite/23_containers/unordered_multiset/requirements/
1129 explicit_instantiation/3.cc: Do not run test for C++2a.
1130 * testsuite/23_containers/unordered_multiset/requirements/
1131 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1133 * testsuite/23_containers/unordered_set/requirements/
1134 explicit_instantiation/3.cc: Do not run test for C++2a.
1135 * testsuite/23_containers/unordered_set/requirements/
1136 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1138 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1139 2.cc: Remove redundant test.
1140 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1141 3.cc: Do not run test for C++2a.
1142 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1145 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1146 (is_abstract, is_aggregate): Remove static_assert.
1147 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1149 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1150 missing -std=gnu++17 option.
1151 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1152 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1153 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1156 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1157 * testsuite/18_support/set_unexpected.cc: Likewise.
1158 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1160 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1161 function to be valid in C++11.
1162 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1163 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1164 include Library Fundamentals or Networking headers in C++11 mode.
1165 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1167 * include/std/tuple (_TC): Replace with _TupleConstraints.
1168 (_TupleConstraints): New helper for SFINAE constraints, with more
1169 expressive member functions to reduce duplication when used.
1170 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1171 (tuple::_TCC): Replace dummy type parameter with bool non-type
1172 parameter that can be used to check the pack size.
1173 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1174 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1175 checking constraints in constructors.
1176 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1178 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1179 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1180 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1181 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1182 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1183 constraints in constructors.
1184 (tuple::__is_alloc_arg()): New SFINAE helpers.
1185 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1187 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1188 * testsuite/20_util/tuple/cons/90700.cc: New test.
1189 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1190 to meet new constraint on allocator-extended default constructor.
1192 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1194 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1195 * include/bits/stl_multimap.h (multimap): Likewise.
1197 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1199 Rename variables and cleanup comments.
1200 * include/bits/hashtable_policy.h
1201 * include/bits/hashtable.h
1203 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1205 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1206 Fix bgcolor for P0340R3.
1207 * doc/html/*: Regenerate.
1210 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1211 <experimental/memory_resource>.
1212 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1213 P0339R6, P0340R3, P1164R1 and P1357R1.
1214 * doc/html/*: Regenerate.
1216 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1217 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1218 allocator::value_type assertion for C++2a.
1219 * include/bits/hashtable.h: Likewise.
1220 * include/bits/stl_deque.h: Likewise.
1221 * include/bits/stl_list.h: Likewise.
1222 * include/bits/stl_map.h: Likewise.
1223 * include/bits/stl_multimap.h: Likewise.
1224 * include/bits/stl_multiset.h: Likewise.
1225 * include/bits/stl_set.h: Likewise.
1226 * include/bits/stl_vector.h: Likewise.
1227 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1228 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1229 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1230 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1231 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1232 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1233 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1234 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1235 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1236 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1237 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1238 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1240 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1242 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1244 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1246 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1248 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1250 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1252 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1254 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1257 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1258 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1259 * libsupc++/eh_term_handler.h: New header defining
1260 _GLIBCXX_DEFAULT_TERM_HANDLER.
1261 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1262 (set_terminate): Restore default handler when argument is null.
1263 (set_unexpected): Likewise.
1264 * testsuite/18_support/set_terminate.cc: New test.
1265 * testsuite/18_support/set_unexpected.cc: New test.
1267 * include/backward/hashtable.h (size_t, ptrdiff_t)
1268 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1269 (distance, vector, pair, __iterator_category): Remove
1270 using-declarations that add these names to namespace __gnu_cxx.
1271 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1272 * include/ext/debug_allocator.h (size_t): Likewise.
1273 * include/ext/functional (size_t, unary_function, binary_function)
1274 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1276 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1277 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1278 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1279 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1280 * include/ext/numeric (iota): Fix outdated comment.
1281 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1282 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1283 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1284 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1285 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1287 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1288 (allocator, __true_type, __false_type): Likewise.
1290 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1293 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1294 New helpers for checking preconditions in traits.
1295 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1296 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1297 (is_destructible, is_nothrow_destructible, is_constructible)
1298 (is_default_constructible, is_copy_constructible)
1299 (is_move_constructible, is_nothrow_default_constructible)
1300 (is_nothrow_constructible, is_nothrow_copy_constructible)
1301 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1302 (is_nothrow_assignable, is_nothrow_copy_assignable)
1303 (is_nothrow_move_assignable, is_trivially_constructible)
1304 (is_trivially_copy_constructible, is_trivially_move_constructible)
1305 is_trivially_assignable, is_trivially_copy_assignable)
1306 (is_trivially_move_assignable, is_trivially_destructible)
1307 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1308 (is_invocable_r, is_nothrow_invocable)
1309 (has_unique_object_representations, is_aggregate): Add static_asserts
1310 to make sure that type traits are not misused with incomplete types.
1311 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1312 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1313 base characteristics without assertions that can be reused in other
1315 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1316 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1318 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1319 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1320 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1321 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1322 * testsuite/20_util/is_function/value.cc: Likewise.
1323 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1324 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1326 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1327 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1328 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1329 * testsuite/20_util/is_union/value.cc: Likewise.
1330 * testsuite/20_util/is_void/value.cc: Likewise.
1331 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1333 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1335 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1336 Add new private member function.
1337 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1338 (random_device::_M_init_pretr1(const string&)): Call new private
1339 member with string data.
1340 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1342 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1343 test using COW strings.
1344 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1345 a value from the device.
1346 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1347 Fix typo in token string.
1349 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1351 LWG2788 basic_string spurious use of a default constructible allocator
1352 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1353 (basic_string::_M_replace_dispatch): Construct temporary string with
1354 the current allocator.
1355 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1356 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1358 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1360 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1362 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1363 section about new/delete overloads. Improve section on verbose
1365 * doc/html/*: Regenerate.
1367 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1368 P0811R3. Change status of P1353R0.
1369 * doc/html/*: Regenerate.
1371 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1372 documentation of implementation-defined types for [thread.req.native].
1373 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1374 implementation-defined strings for [variant.bad.access]. Fix typo in
1375 documentation of implementation-defined support for [fs.conform.9945].
1376 * doc/html/*: Regenerate.
1378 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1381 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1382 that fails on mingw-w64.
1385 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1386 (status(const path&, error_code&)): Use parent_path() to remove
1388 (symlink_status(const path&, error_code&)): Duplicate workaround for
1389 bug in _wstat for paths with trailing slash.
1390 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1391 with trailing slash.
1392 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1393 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1395 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1396 once instead of building it iteratively.
1398 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1400 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1401 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1402 the assembler supports rdseed.
1403 * config.h.in: Regenerate.
1404 * configure: Regenerate.
1405 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1406 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1407 * doc/html/*: Regenerate.
1408 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1409 * include/bits/random.h (random_device::random_device()): Always call
1410 _M_init rather than _M_init_pretr1.
1411 (random_device::random_device(const string&)): Likewise.
1412 (random_device::operator()()): Always call _M_getval().
1413 (random_device::_M_file): Replace first member of union with an
1414 anonymous struct, with _M_file as its first member.
1415 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1416 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1417 (USE_MT19937): Define if none of the above are defined.
1418 (USE_POSIX_FILE_IO): Define.
1419 (_M_strtoul): Remove.
1420 [USE_RDSEED] (__x86_rdseed): Define new function.
1421 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1422 (random_device::_M_init(const string&)): Initialize new union members.
1423 Add support for "rdseed" and "rand_s" tokens. Decide what the
1424 "default" token does according to which USE_* macros are defined.
1425 [USE_POSIX_FILE_IO]: Store a file descriptor.
1426 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1427 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1428 code from _M_strtoul.
1429 [!USE_MT19937]: Call _M_init, transforming the old default token or
1430 numeric tokens to "default".
1431 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1432 (random_device::_M_getval()): Use new union members to obtain a
1433 random number from the stored function pointer or file descriptor.
1434 [USE_MT19937]: Obtain a value from the mt19937 engine.
1435 (random_device::_M_getval_pretr1()): Call _M_getval().
1436 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1438 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1439 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1441 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1444 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1445 _M_split_cmpts() for a path with multiple components.
1446 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1447 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1448 components and reserve space in vector. Return early when there is
1450 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1451 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1453 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1454 form of std::equals for C++11 compatibility.
1456 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1458 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1459 C++ standard at ansi.org.
1461 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1463 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1464 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1467 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1468 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1470 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1472 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1474 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1475 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1476 "compile" test to "run".
1478 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1479 * doc/html/*: Regenerate.
1480 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1481 rvalue aliasing constructor.
1482 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1483 (reinterpret_pointer_cast): Add overloads taking rvalues.
1484 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1485 Add rvalue aliasing constructor.
1486 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1487 "run" and check return values as well as types.
1488 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1489 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1490 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1491 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1494 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1495 * doc/xml/manual/intro.xml: Likewise.
1496 * include/std/future (__create_task_state): Add default arguments
1497 to make providing an allocator optional.
1498 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1499 instead of delegating to another constructor.
1500 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1501 define allocator-extended constructors for C++17 and later.
1502 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1504 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1505 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1506 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1508 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1510 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1511 Don't run the libstdc++/83237 part on simulator targets.
1513 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1515 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1517 * doc/html/*: Regenerate.
1519 * include/experimental/any (__any_caster): Use RTTI if comparing
1520 addresses fails, to support non-unique addresses in shared libraries.
1521 * include/std/any (__any_caster): Likewise.
1524 * include/experimental/any (__any_caster): Constrain to only be
1525 callable for object types. Use remove_cv_t instead of decay_t.
1526 If the type decays or isn't copy constructible, compare the manager
1527 function to a dummy specialization.
1528 (__any_caster): Add overload constrained for non-object types.
1529 (any::_Manager_internal<_Op>): Add dummy specialization.
1530 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1533 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1536 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1537 reversed arguments to uninitialized_copy_n.
1538 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1539 is unchanged by copy assignment.
1540 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1541 compare path components.
1544 * include/experimental/memory_resource: Add system header pragma and
1545 do not define anything unless compiled as C++14 or later.
1546 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1547 (__resource_adaptor_imp::do_allocate): If the requested alignment
1548 is a fundamental alignment then either allocate directly from _M_alloc
1549 or call the new _M_allocate function.
1550 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1551 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1552 of the allocator rebound to a POD type with the specified alignment.
1553 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1554 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1555 Adjust expected allocation sizes.
1556 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1557 xfail for Solaris x86.
1559 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1561 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1562 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1563 Use std::__remove_cvref_t when building with GCC.
1565 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1568 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1569 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1570 Use check_v3_target_prop_cached to cache the result of the test.
1572 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1574 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1577 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1578 Changed v3_target_compile check from preprocess to executable.
1579 Added "-ltbb" to v3_target_compile flags.
1581 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1583 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1584 Add check for Thread Building Blocks 2018 or later.
1586 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1588 * testsuite/experimental/names.cc: Only include Networking TS headers
1589 on targets with the necessary Gthreads support.
1591 2019-05-20 Marek Polacek <polacek@redhat.com>
1593 CWG 2094 - volatile scalars are trivially copyable.
1595 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1596 result for volatile int.
1598 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1600 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1601 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1604 PR c++/90532 Ensure __is_constructible(T[]) is false
1605 * include/std/type_traits (__do_is_default_constructible_impl)
1606 (__is_default_constructible_atom, __is_default_constructible_safe):
1608 (is_default_constructible): Use is_constructible.
1609 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1610 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1611 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1612 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1615 2019-05-20 Pádraig Brady <pbrady@fb.com>
1617 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1618 to the deallocator with -fsized-deallocation.
1620 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1622 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1623 test by passing correct alignment to deallocate function.
1625 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1628 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1629 Raise exception if unique_ptr tuple member has unknown structure.
1630 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1631 Adjust worker to support new __uniq_ptr_data base class. Do not
1632 assume field called _M_head_impl is the first tuple element.
1634 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1636 * include/bits/stl_deque.h
1637 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1638 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1639 (_Deque_base::_Deque_impl_data): New.
1640 (_Deque_base::_Deque_impl): Inherit latter.
1641 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1642 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1643 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1644 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1645 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1646 (deque<>::deque()): Default.
1647 (deque<>::deque(deque&&)): Default.
1648 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1649 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1650 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1651 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1652 _M_range_initialize.
1653 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1654 (deque<>::resize(size_type, const value_type&)): Share a single
1656 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1657 _M_range_insert_aux.
1658 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1659 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1660 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1661 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1663 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1666 * include/std/variant (holds_alternative, get, get_if): Improve
1667 static assertion messages.
1668 (bad_variant_access::bad_variant_access()): Change default message.
1669 (__throw_bad_variant_access(bool)): New overload.
1670 (get): Use new overload.
1671 (visit, visit<R>): Improve exception message.
1673 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1674 targets. Add more cases from P0608R3.
1675 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1677 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1678 * include/experimental/type_traits (is_detected_exact)
1679 (is_detected_exact_v): Likewise.
1680 * include/pstl/execution_defs.h (is_execution_policy)
1681 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1682 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1683 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1684 * testsuite/experimental/names.cc: New test.
1687 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1688 assertions from the destructor.
1689 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1690 Move static_assert for hash function to here.
1691 (_Hash_table_base::_M_equals): Move static_assert for equality
1693 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1695 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1696 the value directly instead of calling _S_value.
1697 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1698 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1699 _S_key(_Const_Link_type).
1700 * testsuite/23_containers/set/85965.cc: Check construction,
1701 destruction, assignment and size() do not trigger the assertions.
1702 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1703 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1705 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1706 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1707 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1708 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1709 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1710 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1711 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1713 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1714 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1717 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1719 * doc/html/*: Regenerate.
1720 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1721 of decay_t (P0777R1).
1723 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1725 Move from state of allocators (LWG2593)
1726 * include/bits/stl_deque.h
1727 (_Deque_base(_Deque_base&&, false_type)): Remove.
1728 (_Deque_base(_Deque_base&&, true_type)): Remove.
1729 (_Deque_base(_Deque_base&&)): Adapt.
1730 (_Deque_base::_M_move_impl()): Remove.
1731 * testsuite/util/testsuite_allocator.h
1732 (propagating_allocator(propagating_allocator&&)): Preserve move from
1734 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1736 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1738 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1739 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1740 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1742 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1744 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1745 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1747 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1749 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1751 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1753 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1755 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1757 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1759 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1762 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1764 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1765 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1767 * include/std/variant (__overload_set): Remove.
1769 (_Build_FUN): New class template to define a single FUN overload,
1770 with specializations to prevent unwanted conversions, as per P0608R3.
1771 (_Build_FUNs): New class template to build an overload set of FUN.
1772 (_FUN_type): New alias template to perform overload resolution.
1773 (__accepted_type): Use integer_constant base for failure case. Use
1774 _FUN_type for successful case.
1775 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1776 (variant::variant(_Tp&&)): Likewise.
1777 (variant::operator=(_Tp&&)): Likewise.
1779 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1780 Replace raw visitation with a runtime check for the valueless state
1781 and a non-raw visitor.
1782 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1783 (variant::index()): Remove branch.
1784 (variant::swap(variant&)): Use valueless_by_exception() instead of
1785 comparing the index to variant_npos, and add likelihood attribute.
1787 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1788 (_Hashtable_base::_Equal_hash_code): Define new class template.
1789 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1792 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1793 Replace with _M_get non-static member function.
1794 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1796 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1797 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1799 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1800 _S_get accessors for members in EBO helpers.
1801 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1802 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1804 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1806 (_Hashtable_base::_M_eq()): Remove non-const overload.
1808 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1810 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1812 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1814 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1817 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1819 * config/os/solaris/solaris2.10: Move to ...
1820 * config/os/solaris: ... this.
1821 * configure.host (os_include_dir): Adapt.
1822 (abi_baseline_pair): Remove Solaris 10 handling.
1823 * config/abi/post/i386-solaris2.10: Remove.
1824 * config/abi/post/sparc-solaris2.10: Remove.
1825 * config/abi/post/i386-solaris2.11: Rename to ...
1826 * config/abi/post/i386-solaris: ... this.
1827 * config/abi/post/sparc-solaris2.11: Rename to ...
1828 * config/abi/post/sparc-solaris: ... this.
1830 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1833 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1836 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1838 * include/std/variant (__visit_with_index): Remove typedef.
1839 (__deduce_visit_result): New tag type.
1840 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1841 visitation of possibly-valueless variants, forwarding to __do_visit
1842 with the relevant tag type.
1843 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1844 and make lambda return void.
1845 (__variant_construct): Likewise.
1846 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1847 __raw_idx_visit and make lambda return void.
1848 (_Multi_array::__untag_result): Add metafunction to check the function
1849 pointer type for a tag type that dictates the kind of visitation.
1850 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1851 Use decltype(auto) instead of tagged function pointer type.
1852 (__gen_vtable_impl): Remove bool non-type parameter and unused
1853 _Variant_tuple parameter.
1854 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1855 (__gen_vtable_impl::__do_visit_invoke): Remove.
1856 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1857 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1858 for the visit<R> case, rather than dispatching to separate functions.
1859 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1861 (variant::swap): Likewise.
1862 (__do_visit): Replace two non-type template parameters with a single
1863 type parameter, so that the caller must specify the visitor's return
1864 type (or one of the tag types).
1865 (visit): Deduce a return type from the visitor and use the
1866 __deduce_visit_result tag to enforce that all overloads return the
1868 (visit<R>): Call __do_visit<R> with explicit result type.
1869 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1872 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1874 nonesuch is insufficiently useless (lwg2996)
1875 * include/std/type_traits (struct __nonesuch): Added private base
1876 class to make __nonesuch not an aggregate and removed deleted default
1878 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1879 (operator=(const pair&)): Use __nonesuch instead of
1880 __nonesuch_no_braces.
1881 (operator=(pair&&)): Likewise
1882 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1883 of __nonesuch_no_braces.
1884 (operator=(tuple&&)): Likewise
1885 * include/experimental/type_traits (struct nonesuch): Added private
1886 base class to make nonesuch not an aggregate and removed deleted
1887 default constructor.
1888 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1889 * testsuite/experimental/type_traits/nonesuch.cc: New.
1891 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1893 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1894 (_Function_handler): Remove partial specializations for void return
1895 types and pointers to member.
1896 (_Function_handler::_M_manager): Adapt to removal of
1897 _Simple_type_wrapper.
1898 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1899 * include/std/functional (_Bind_result::__enable_if_void)
1900 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1901 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1903 * include/std/future (__future_base::_Task_state::_M_run)
1904 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1905 change return type of lambda expressions.
1907 * include/bits/invoke.h (__invoke_r): Define new function implementing
1908 the INVOKE<R> pseudo-function.
1909 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1910 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1912 * include/std/type_traits (__is_nt_convertible_helper): Define it
1913 unconditionally, not only for C++20.
1914 (__is_nothrow_convertible): Define internal trait for use in C++11.
1915 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1916 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1917 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1918 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1919 that has nothrow explicit conversion but potentially-throwing implicit
1921 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1922 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1923 function to only consider implicit conversions.
1924 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1926 * include/std/iterator: Include <iosfwd> instead of <istream> and
1929 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1930 Remove unused, non-standard function.
1932 * include/bits/regex.h (match_results::max_size()): Adjust return
1933 value to account for prefix/suffix/unmatched subs.
1934 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1935 reset the contained sub matches.
1936 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1937 function to set result state following a failed match.
1938 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1939 sub_match states after _M_resize. Use _M_establish_failed_match.
1942 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1943 Replace single _Callable parameter with variadic _Args pack, to
1944 forward them directly to the tuple of decayed copies.
1945 * testsuite/30_threads/thread/cons/69724.cc: New test.
1947 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1949 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1950 * include/bits/basic_string.h: (operator=(const basic_string&):
1951 Move allocator decision to assign.
1952 (assign(const basic_string&)): Move allocator decision here.
1953 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1955 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1958 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1960 * testsuite/util/testsuite_allocator.h (memory_resource)
1961 (default_resource_mgr): Fix indentation.
1963 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1964 Use operator-> to access raw pointer member.
1965 * testsuite/23_containers/vector/59829.cc: Likewise.
1966 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1967 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1968 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
1970 (PointerBase, PointerBase_void): Derive from NullablePointer and use
1971 its constructors and equality operators. Change converting
1972 constructors to use operator-> to access private member of the other
1974 (PointerBase_void::operator->()): Add, for access to private member.
1975 (operator-(PointerBase, PointerBase)): Change to hidden friend.
1976 (operator==(PointerBase, PointerBase)): Remove.
1977 (operator!=(PointerBase, PointerBase)): Remove.
1979 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
1980 not assume field called _M_head_impl is the first tuple element.
1981 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
1982 implementation more accurate.
1983 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
1984 empty pointer type and non-empty deleter.
1986 LWG 2899 - Make is_move_constructible correct for unique_ptr
1987 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
1988 move assignment operator.
1989 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
1990 (__uniq_ptr_data): New class template with conditionally deleted
1992 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
1993 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
1994 constructor and move assignment operator as defaulted.
1995 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
1996 __uniq_ptr_impl::release().
1997 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
1998 to __uniq_ptr_impl::reset(pointer).
1999 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2000 Check for new __uniq_ptr_data type.
2001 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
2003 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2005 PR libstdc++/90454.cc path construction from void*
2006 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2007 pointers to void are rejected as well as void.
2008 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2009 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2011 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2013 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2014 <remark> elements. Fix formatting of bibliography references.
2016 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2018 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2020 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2022 Remove Profile Mode, deprecated since 7.1.0
2023 * doc/Makefile.am: Remove XML file for profile mode docs.
2024 * doc/Makefile.in: Regenerate.
2025 * doc/xml/authors.xml: Remove authors of profile mode docs.
2026 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2028 * doc/xml/manual/debug.xml: Likewise.
2029 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2030 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2031 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2032 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2034 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2036 * doc/html/*: Regenerate.
2037 * include/Makefile.am: Remove profile mode headers.
2038 * include/Makefile.in: Regenerate.
2039 * include/bits/c++config (std::__profile): Remove namespace.
2040 [_GLIBCXX_PROFILE]: Remove checks for macro.
2041 * include/profile/array: Remove.
2042 * include/profile/base.h: Remove.
2043 * include/profile/bitset: Remove.
2044 * include/profile/deque: Remove.
2045 * include/profile/forward_list: Remove.
2046 * include/profile/impl/profiler.h: Remove.
2047 * include/profile/impl/profiler_algos.h: Remove.
2048 * include/profile/impl/profiler_container_size.h: Remove.
2049 * include/profile/impl/profiler_hash_func.h: Remove.
2050 * include/profile/impl/profiler_hashtable_size.h: Remove.
2051 * include/profile/impl/profiler_list_to_slist.h: Remove.
2052 * include/profile/impl/profiler_list_to_vector.h: Remove.
2053 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2054 * include/profile/impl/profiler_node.h: Remove.
2055 * include/profile/impl/profiler_state.h: Remove.
2056 * include/profile/impl/profiler_trace.h: Remove.
2057 * include/profile/impl/profiler_vector_size.h: Remove.
2058 * include/profile/impl/profiler_vector_to_list.h: Remove.
2059 * include/profile/iterator_tracker.h: Remove.
2060 * include/profile/list: Remove.
2061 * include/profile/map: Remove.
2062 * include/profile/map.h: Remove.
2063 * include/profile/multimap.h: Remove.
2064 * include/profile/multiset.h: Remove.
2065 * include/profile/ordered_base.h: Remove.
2066 * include/profile/set: Remove.
2067 * include/profile/set.h: Remove.
2068 * include/profile/unordered_base.h: Remove.
2069 * include/profile/unordered_map: Remove.
2070 * include/profile/unordered_set: Remove.
2071 * include/profile/vector: Remove.
2072 * scripts/run_doxygen: Do not process profile mode headers.
2073 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2075 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2076 Remove dg-skip-if for profile mode.
2077 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2078 preprocessor check for profile mode.
2079 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2080 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2082 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2084 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2085 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2086 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2087 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2088 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2090 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2092 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2094 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2096 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2097 preprocessor check for profile mode.
2098 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2100 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2101 Remove dg-skip-if for profile mode.
2102 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2103 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2104 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2105 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2106 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2107 * testsuite/Makefile.am: Remove profile_flags variable and
2108 * testsuite/Makefile.am: Remove profile_flags variable and
2109 check-profile target.
2110 * testsuite/Makefile.in: Regenerate.
2111 * testsuite/ext/profile/all.cc: Remove.
2112 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2113 * testsuite/ext/profile/profiler_algos.cc: Remove.
2114 * testsuite/ext/profile/replace_new.cc: Remove.
2115 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2116 preprocessor check for profile mode.
2117 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2118 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2119 (check_v3_target_normal_mode): Do not check for profile mode macro.
2120 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2122 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2123 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2124 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2125 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2126 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2127 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2128 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2129 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2130 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2131 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2133 Remove array_allocator extension, deprecated since 4.9.0
2134 * doc/xml/manual/allocator.xml: Remove documentation for
2136 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2137 * doc/xml/manual/using.xml: Remove header from documentation.
2138 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2139 * include/Makefile.in: Regenerate.
2140 * include/ext/array_allocator.h: Remove.
2141 * include/precompiled/extc++.h: Do not include removed header.
2142 * testsuite/ext/array_allocator/1.cc: Remove.
2143 * testsuite/ext/array_allocator/2.cc: Remove.
2144 * testsuite/ext/array_allocator/26875.cc: Remove.
2145 * testsuite/ext/array_allocator/3.cc: Remove.
2146 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2147 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2148 * testsuite/ext/array_allocator/check_new.cc: Remove.
2149 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2150 * testsuite/ext/headers.cc: Do not include removed header.
2152 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2154 * include/bits/stl_bvector.h
2155 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2157 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2159 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2161 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2163 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2165 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2167 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2169 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2171 (_Bit_iterator::operator-(difference_type)): Likewise.
2172 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2173 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2175 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2176 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2178 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2181 * testsuite/util/thread/all.h: Do not use remove_pointer for
2182 std::thread::native_handle_type.
2185 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2186 (_Variant_storage<true, Types...>::_M_reset()))
2187 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2188 (__get_storage): Likewise.
2189 (variant): Add noexcept to friend declarations for __get and
2193 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2194 Use _Require for constraints.
2195 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2197 (__uniq_ptr_hash): New base class with conditionally-disabled call
2199 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2200 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2201 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2203 * include/bits/shared_ptr.h: Improve docs.
2204 * include/bits/shared_ptr_base.h: Likewise.
2205 * include/bits/stl_uninitialized.h: Likewise.
2206 * include/bits/unique_ptr.h: Likewise.
2207 * libsupc++/new: Likewise.
2209 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2211 * include/bits/stl_deque.h
2212 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2214 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2216 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2218 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2220 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2222 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2224 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2226 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2228 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2231 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2232 (test01): Reserve for number of insertions to avoid rehash during test.
2233 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2235 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2240 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2242 * include/experimental/bits/fs_path.h: Improve docs.
2243 * include/experimental/bits/net.h: Fix wrong header name in comment.
2244 Do not document implementation details.
2245 * include/experimental/netfwd: Fix doxygen grouping.
2247 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2249 * include/bits/stl_pair.h: Improve docs.
2250 * include/std/tuple: Likewise.
2252 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2254 * include/std/chrono: Improve docs.
2255 * include/std/ratio: Do not document implementation details.
2256 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2258 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2261 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2262 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2263 (__duration_common_type): New helper.
2264 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2265 __duration_common_type.
2266 (__timepoint_common_type_wrapper): Replace with ...
2267 (__timepoint_common_type): New helper.
2268 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2269 Use __time_point_common_type.
2270 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2271 (__common_type_impl): If either argument is transformed by decay,
2272 use the common_type of the decayed types.
2273 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2274 decayed, use __do_common_type_impl to get the common_type.
2275 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2276 (__do_member_type_wrapper, __member_type_wrapper)
2277 (__expanded_common_type_wrapper): Remove.
2278 (__common_type_pack, __common_type_fold): New helpers.
2279 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2280 __member_type_wrapper and __expanded_common_type_wrapper.
2281 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2282 Test zero-length template argument list.
2283 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2284 Test single argument cases and argument types that should decay.
2285 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2286 Adjust expected error.
2287 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2289 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2290 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2291 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2293 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2295 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2297 Make allocator propagation more consistent for
2298 operator+(basic_string) (P1165R1)
2299 * include/bits/basic_string.h
2300 (operator+(basic_string&&, basic_string&&): Changed resulting
2301 allocator to always be the one from the first parameter.
2302 * include/bits/basic_string.tcc
2303 (operator+(const _CharT*, const basic_string&)): Changed
2304 resulting allocator to be SOCCC on the second parameter's allocator.
2305 (operator+(_CharT, const basic_string&)): Likewise.
2306 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2308 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2311 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2313 * include/bits/regex.h: Improve docs.
2314 * include/bits/regex.tcc: Do not document implementation details.
2316 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2318 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2320 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2321 Add type printer for container types in std::__debug namespace.
2322 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2323 (gdb-tests): Use distinct parameters for the type of test and use of
2325 (gdb-test): Check for regex test even if 'whatis' test.
2326 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2328 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2329 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2330 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2331 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2332 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2333 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2334 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2336 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2338 * include/std/system_error (error_category): Fix comment.
2341 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2342 argument is an empty path.
2343 (absolute(const path&, error_code&)): Use invalid_argument as error
2344 code instead of no_such_file_or_directory.
2345 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2346 of non-existent paths and empty paths with both overloads of absolute.
2348 * include/std/system_error (error_category, error_code)
2349 (error_condition): Improve docs.
2350 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2351 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2352 to class documentation. Suppress documentation for implementation
2354 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2355 Suppress documentation for implementation details.
2357 * include/std/system_error (error_code): Remove friend declaration
2358 for hash<error_code>.
2359 (hash<error_code>::operator()): Use public member functions to access
2361 (hash<error_condition>::operator()): Use address of category, not
2362 its object representation.
2363 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2364 Use public member functions to access value and category.
2365 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2367 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2369 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2370 * include/bits/hashtable_policy.h
2371 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2372 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2373 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2374 smaller than input value rather than always greater. Preserve
2375 _M_next_resize if called with 0 input. Use __builtin_floorl.
2376 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2377 elements + number of insertions is greater than _M_next_resize. Start
2378 with 11 buckets if not told otherwise. Use __builtin_floorl.
2379 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2380 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2381 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2382 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2383 told otherwise. Use __builtin_floorl.
2384 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2385 to also validate _Power2_rehash_policy.
2386 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2389 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2392 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2396 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2397 overflow warning with -Wpedantic -Wsystem-headers.
2399 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2402 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2403 * include/bits/move.h (swap): Remove extra parentheses.
2405 * include/experimental/bits/lfts_config.h: Improve doc markup.
2406 * include/experimental/optional: Improve docs.
2407 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2408 (__constexpr_addressof): Remove.
2409 (optional::operator->()): Use std::__addressof().
2410 * include/std/optional (optional::operator->()): Adjust whitespace.
2411 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2412 that operator-> is still constexpr with overloaded operator&. Change
2413 to compile-only test.
2414 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2417 * include/bits/shared_ptr.h: Improve docs.
2418 * include/bits/shared_ptr_atomic.h: Likewise.
2419 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2421 * include/bits/basic_string.h: Fix iterator/index confusion in
2423 * include/bits/range_access.h: Fix Doxygen warnings.
2424 * include/bits/refwrap.h: Do not document implementation details.
2425 (ref, cref): Group docs with reference_wrapper.
2426 * include/std/fstream: Fix Doxygen markup.
2427 * libsupc++/initializer_list (begin, end): Group docs with
2430 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2432 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2433 * include/std/mutex: Likewise.
2434 * include/std/shared_mutex: Likewise.
2436 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2437 * include/bits/fs_fwd.h: Likewise.
2438 * include/bits/fs_ops.h: Likewise.
2439 * include/bits/fs_path.h: Likewise.
2440 * include/std/filesystem: Likewise.
2442 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2443 * include/experimental/buffer: Likewise.
2444 * include/experimental/executor: Likewise.
2445 * include/experimental/internet: Likewise.
2446 * include/experimental/io_context: Likewise.
2447 * include/experimental/net: Likewise.
2448 * include/experimental/netfwd: Likewise.
2449 * include/experimental/socket: Likewise.
2450 * include/experimental/timer: Likewise.
2452 * doc/doxygen/doxygroups.cc: Move description of experimental group
2454 * include/experimental/algorithm: Add to libfund-ts doc group.
2455 * include/experimental/any: Likewise. Do not document implementation
2457 * include/experimental/array: Add to libfund-ts doc group.
2458 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2459 for Library Fundamentals.
2460 * include/experimental/chrono: Add to libfund-ts doc group.
2461 * include/experimental/deque: Likewise.
2462 * include/experimental/forward_list: Likewise.
2463 * include/experimental/functional: Likewise.
2464 * include/experimental/iterator: Likewise.
2465 * include/experimental/list: Likewise.
2466 * include/experimental/map: Likewise.
2467 * include/experimental/memory: Likewise.
2468 * include/experimental/memory_resource: Likewise. Improve docs.
2470 * include/experimental/numeric: Add to libfund-ts doc group.
2471 * include/experimental/optional: Likewise.
2472 * include/experimental/propagate_const: Likewise.
2473 * include/experimental/random: Likewise.
2474 * include/experimental/ratio: Likewise.
2475 * include/experimental/regex: Likewise.
2476 * include/experimental/set: Likewise.
2477 * include/experimental/source_location: Likewise.
2478 * include/experimental/string: Likewise.
2479 * include/experimental/string_view: Likewise.
2480 * include/experimental/system_error: Likewise.
2481 * include/experimental/tuple: Likewise.
2482 * include/experimental/type_traits: Likewise.
2483 * include/experimental/unordered_map: Likewise.
2484 * include/experimental/unordered_set: Likewise.
2485 * include/experimental/utility: Likewise.
2486 * include/experimental/vector: Likewise.
2487 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2488 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2489 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2491 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2492 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2493 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2494 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2495 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2497 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2498 * include/experimental/bits/fs_fwd.h: Improve docs.
2499 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2500 * include/experimental/bits/fs_path.h: Likewise.
2501 (path, filesystem_error, u8path): Improve docs.
2502 * include/experimental/filesystem: Link to docs for TS.
2504 * config/allocator/new_allocator_base.h (__allocator_base): Add
2505 workaround for Doxygen bug #6945.
2506 * include/std/memory: Improve docs. Define group for pointer safety.
2507 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2508 conditional to suppress documentation for implementation details.
2510 * include/bits/specfun.h: Improve docs.
2511 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2514 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2515 (std::experimental): Add docs.
2516 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2517 namespace to nothing when generating docs.
2518 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2519 * include/std/chrono (std::chrono): Likewise.
2520 * include/std/functional (std::placeholders): Likewise.
2521 * include/std/thread (std::this_thread): Likewise.
2523 * include/parallel/settings.h: Fix Doxygen markup.
2525 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2526 anything unless PB_DS_CLASS_C_DEC is defined.
2527 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2528 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2529 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2530 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2531 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2532 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2533 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2535 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2536 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2537 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2538 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2539 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2540 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2541 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2542 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2543 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2544 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2545 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2547 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2548 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2550 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2553 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2554 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2555 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2558 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2560 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2561 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2562 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2563 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2564 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2565 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2567 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2568 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2571 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2574 * include/std/complex (__complex_proj): Return parameter unchanged.
2575 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2576 floating-point types to take std::complex arguments.
2577 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2578 floating-point types.
2579 * testsuite/26_numerics/complex/proj.cc: New test.
2581 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2583 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2584 to _Lock_policyE[012].
2585 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2587 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2589 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2590 macros accidentally left in.
2591 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2592 unnecessary -lstdc++fs option. Fix test for mingw.
2593 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2596 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2598 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2600 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2602 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2604 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2605 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2608 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2610 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2613 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2614 class template and partial specialization.
2617 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2619 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2620 functions to convert a value to an integral type.
2621 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2622 (fill_n): Convert _Size parameter to an integral type.
2623 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2624 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2625 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2626 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2627 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2628 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2630 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2632 Adding noexcept-specification on tuple constructors (LWG 2899)
2633 * libstdc++-v3/include/std/tuple:
2634 (tuple()): Add noexcept-specification.
2635 (tuple(const _Elements&...)): Likewise
2636 (tuple(_UElements&&...)): Likewise
2637 (tuple(const tuple<_UElements...>&)): Likewise
2638 (tuple(tuple<_UElements...>&&)): Likewise
2639 (tuple(const _T1&, const _T2&)): Likewise
2640 (tuple(_U1&&, _U2&&)): Likewise
2641 (tuple(const tuple<_U1, _U2>&): Likewise
2642 (tuple(tuple<_U1, _U2>&&): Likewise
2643 (tuple(const pair<_U1, _U2>&): Likewise
2644 (tuple(pair<_U1, _U2>&&): Likewise
2645 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2647 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2650 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2651 arguments with __restrict.
2653 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2655 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2657 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2659 * include/experimental/bits/fs_path.h
2660 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2661 avoid redundant call to _S_convert_loc with non-const pointers.
2663 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2664 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2665 * testsuite/21_strings/basic_string/hash/hash.cc
2666 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2667 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2668 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2670 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2671 wstring::_M_replace_dispatch with more specific patterns.
2672 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2673 Create const std::string to avoid redundant call to _S_convert_loc
2674 with non-const pointers.
2675 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2676 avoid unnecessary basic_string::assign instantiations.
2678 * include/std/memory (__uses_alloc_args): Add string-literal to
2679 static_assert, to match the one in __uses_alloc.
2680 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2681 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2682 for recursive uses-allocator construction of nested pairs.
2683 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2686 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2688 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2689 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2690 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2691 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2693 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2694 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2695 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2696 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2697 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2698 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2699 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2701 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2704 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2705 * include/std/scoped_allocator [__cplusplus > 201703L]
2706 (scoped_allocator_adaptor::construct): Define in terms of
2707 uses_allocator_construction_args, as per P0591R4.
2708 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2709 * testsuite/util/testsuite_allocator.h: Remove name of unused
2712 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2714 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2715 * doc/html/*: Regenerate.
2717 * include/bits/fs_path.h (operator<, operator<=, operator>)
2718 (operator>=, operator==, operator!=): Make hidden friends, as per
2720 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2721 string type in test.
2722 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2724 * include/std/any (any::any(ValueType&&)): Use __and_v.
2725 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2728 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2730 * include/std/type_traits (__result_of_memfun): Use remove_reference
2731 instead of __remove_cvref_t and remove redundant is_same check.
2732 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2734 * include/experimental/string_view (basic_string_view::pointer)
2735 (basic_string_view::reference): Fix to refer to non-const value_type.
2736 * include/bits/basic_string.h (basic_string): Use __sv_check and
2737 __sv_limit instead of basic_string_view::_M_check and
2738 basic_string_view::_M_limit.
2739 * include/std/string_view (__sv_check, __sv_limit): New
2740 helper functions to replace basic_string_view::_M_check and
2741 basic_string_view::_M_limit.
2742 (basic_string_view): Add static assertions to enforce ill-formed
2743 requirement for traits_type::char_type from P1148R0, and to enforce
2744 required properties of char-like types.
2745 (basic_string_view::pointer, basic_string_view::reference): Fix to
2746 refer to non-const value_type.
2747 (basic_string_view::operator[], basic_string_view::at)
2748 (basic_string_view::front, basic_string_view::back)
2749 (basic_string_view::data): Use const_reference and const_pointer
2750 typedefs for return types.
2751 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2752 (hash<wstring_view>): Fix argument_type typedef.
2753 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2754 char/1.cc: Fix expected return type of basic_string_view::data().
2755 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2756 wchar_t/1.cc: Likewise.
2757 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2758 char/1.cc: Likewise.
2759 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2760 wchar_t/1.cc: Likewise.
2761 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2763 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2764 Check reference and pointer typedefs.
2765 * testsuite/experimental/string_view/requirements/typedefs.cc:
2767 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2768 Fix expected return type of basic_string_view::data().
2769 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2771 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2773 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2777 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2778 Avoid a runtime check for types that can never be stored in std::any.
2779 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2782 PR libstdc++/90220 (partial)
2783 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2784 not attempt ill-formed static_cast to pointers to non-object types.
2785 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2788 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2789 prevent -Wcatch-value warning.
2791 * include/std/variant (__variant_construct): Use template parameter
2792 type instead of equivalent decltype-specifier.
2793 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2794 Replace forward with move.
2795 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2796 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2797 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2798 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2799 index after construction succeeds.
2800 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2801 if-constexpr checks that are always true. Use __remove_cvref_t instead
2802 of remove_reference so that is_nothrow_move_constructible check
2803 doesn't use a const rvalue parameter. In the potentially-throwing case
2804 construct a temporary and move assign it, as per LWG 2904.
2805 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2806 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2807 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2808 construct a temporary and move assign from it, as per LWG 2904.
2809 * testsuite/20_util/variant/exception_safety.cc: Check that
2810 assignment operators have strong exception safety guarantee.
2812 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2814 Document PSTL linker flags
2816 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2818 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2820 * include/std/variant (__detail::__variant::_Traits): Make
2821 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2822 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2824 (__detail::__variant::_Copy_assign_alias): Only depend on
2825 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2826 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2827 move assignment operators.
2830 * include/std/variant (variant::__not_self): New helper for the
2831 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2832 (variant::__to_type_impl): Remove.
2833 (variant::__to_type): Add default argument to check pack size, instead
2834 of using __to_type_impl.
2835 (variant::__accepted_type): Add default argument using __not_self.
2836 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2837 for variant(T&&) constructor constraint.
2838 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2839 Extract __accepted_type into a named template parameter for reuse in
2840 other constraints and in the exception specification.
2841 (variant::variant(in_place_type_t<T>, Args&&...))
2842 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2843 (variant::variant(in_place_index_t<T>, Args&&...))
2844 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2845 (variant::operator=T&&)): Remove redundant && from trait arguments.
2846 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2847 isn't used for in_place_type or in_place_index arguments.
2849 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2850 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2851 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2853 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2854 Bernd Edlinger <bernd.edlinger@hotmail.de>
2855 Jakub Jelinek <jakub@redhat.com>
2858 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2859 general-regs-only target attribute for ARM.
2861 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2864 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2865 specialization also depend on is_nothrow_move_constructible.
2866 * include/std/variant (__detail::__variant::__never_valueless()):
2867 Only true if the variant would have a move assignment operator.
2868 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2869 Check __never_valueless<T...>().
2870 (variant::emplace): Only perform non-throwing move assignments
2871 for never-valueless alternatives if the variant has a move assignment
2873 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2874 types can be emplaced into non-assignable variants.
2875 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2876 don't get copied when emplaced into non-assignable variants.
2878 * include/std/variant (__detail::__variant::__ref_cast): Remove
2880 (__detail::__variant::_Uninitialized::_M_get)
2881 (__detail::__variant::__get)
2882 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2884 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2886 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2888 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2889 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2890 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2891 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2893 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2895 Delegate PSTL configuration to pstl/pstl_config.h
2897 * include/bits/c++config: Remove explicit PSTL configuration
2898 macros and use definitions from <pstl/pstl_config.h>.
2900 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2902 Cleanup algorithm implementations
2903 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2905 (mismatch): Forward execution policy.
2906 (equal): Qualify call to std::equal().
2907 (partial_sort): Forward execution policy.
2908 (inplace_merge): Forward execution policy.
2910 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2912 Improve implementation of parallel equal()
2913 * include/pstl/algorithm_impl.h
2914 (__internal::__brick_equal): use "4 iterator" version of
2916 (__internal::__brick_equal): use simd for random access
2917 iterators on unsequenced execution policies.
2918 (__internal::__pattern_equal): add "4 iterator" version
2919 (__internal::__pattern_equal): dispatch to simd __brick_equal
2920 for vector-only execution policies.
2921 (__internal::__pattern_equal): dispatch to __parallel_or for
2922 parallel execution policies.
2923 * include/pstl/glue_algorithm_impl.h
2924 (std::equal): dispatch to "4 iterator" version of
2925 __internal::__pattern_equal().
2927 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2930 * include/bits/forward_list.h (operator==): Do not use operator!= to
2932 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2933 earlier in the list, so that sort is stable.
2934 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2935 * testsuite/23_containers/forward_list/comparable.cc: Test with
2936 types that meet the minimum EqualityComparable and LessThanComparable
2937 requirements. Remove irrelevant comment.
2939 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2940 Do not depend on whether all alternative types are move constructible.
2941 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2942 from the operand when deciding whether to perform the assignment.
2943 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2944 with deleted move constructor and deleted move assignment operator.
2945 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2946 behaviour of variants with DeletedMoves as an alternative.
2947 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2948 (move_ctor, move_assign): Check that moving a variant with a
2949 DeletedMoves alternative falls back to copying instead of moving.
2951 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2952 from static_assert declarations.
2954 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2955 actually match its name.
2956 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2957 (test_swap()): Fix result for MoveCtorOnly and check
2958 MoveCtorAndSwapOnly.
2960 * include/std/optional (optional::value_or(U&&) &&): Add missing
2961 constexpr specifier.
2962 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2963 for disengaged optionals and rvalue optionals.
2964 * testsuite/20_util/optional/observers/4.cc: Likewise.
2966 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2968 * include/pstl/algorithm_impl.h: Uglify identfiers.
2969 * include/pstl/numeric_impl.h: Uglify identfiers.
2970 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
2972 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
2974 * include/bits/c++config:
2975 Add definition for __PSTL_ASSERT.
2976 Add definition for __PSTL_ASSERT_MSG.
2977 * include/pstl/algorithm_impl.h: Replace use of assert().
2978 * include/pstl/numeric_impl.h: Replace use of assert().
2979 * include/pstl/parallel_backend_tbb.h:
2980 Replace use of assert().
2981 Replace use of __TBB_ASSERT().
2982 * include/pstl/parallel_backend_utils.h: Replace use of assert().
2984 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
2987 * src/c++17/memory_resource.cc
2988 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
2989 needed to allow placing a _Chunk at the end of the buffer.
2990 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
2992 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
2994 * doc/xml/faq.xml: Add information about emergency EH pool.
2995 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
2996 Move outdated information on mt_allocator to a separate section.
2997 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
2998 doesn't affect the default allocator.
3000 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
3004 * testsuite/20_util/variant/89851.cc: New test.
3006 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3008 * include/std/variant: Adjust whitespace. Add comments.
3009 (_Multi_array): Leave primary template undefined.
3010 (_Multi_array<_Tp>): Define partial specialization for base case of
3012 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3013 which is always a reference.
3014 (__gen_vtable::_S_apply()): Remove function, inline body into
3015 default member initializer.
3016 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3018 * include/std/variant (__variant_idx_cookie): Add member type.
3019 (__visitor_result_type): Remove.
3020 (__do_visit): Use invoke_result instead of __visitor_result_type.
3021 * testsuite/20_util/variant/visit.cc: New test.
3024 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3026 * testsuite/20_util/variant/90008.cc: New test.
3028 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3030 * include/pstl/algorithm_impl.h: Add namespace qualification.
3031 * include/pstl/execution_defs.h: Add namespace qualification.
3032 * include/pstl/execution_impl.h: Add namespace qualification.
3033 * include/pstl/numeric_impl.h: Add namespace qualification.
3034 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3035 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3036 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3038 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3040 Fix visit<R> for variant.
3041 * include/std/variant (__do_visit): Add a template parameter
3042 for enforcing same return types for visit.
3043 (__gen_vtable_impl): Likewise.
3044 (_S_apply_single_alt): Adjust.
3045 (__visit_invoke_impl): New. Handle casting to void.
3046 (__do_visit_invoke): New. Enforces same return types.
3047 (__do_visit_invoke_r): New. Converts return types.
3048 (__visit_invoke): Adjust.
3049 (__gen_vtable): Add a template parameter for enforcing
3050 same return types for visit.
3051 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3052 different return types.
3053 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3054 visitors with different return types don't accidentally
3055 compile with regular visitation.
3057 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3059 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3060 dg-require-filesystem-ts.
3062 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3064 * doc/xml/manual/status_cxx2020.xml: Update status.
3065 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3066 * testsuite/20_util/variant/visit_r.cc: New test.
3068 * include/bits/fs_dir.h (directory_iterator::operator*)
3069 (directory_iterator::operator->): Add noexcept.
3070 (operator==, operator!=): Replace namespace-scope equality operators
3071 for directory iterators with hidden friends.
3074 * config/abi/pre/gnu.ver: Add missing exports.
3075 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3078 * config/abi/pre/gnu.ver: Export new symbols.
3079 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3080 (recursive_directory_iterator::recursion_pending())
3081 (recursive_directory_iterator::disable_recursion_pending()): Remove
3082 inline definitions. Make noexcept.
3083 (recursive_directory_iterator::depth())
3084 (recursive_directory_iterator::operator*())
3085 (recursive_directory_iterator::operator->()): Make noexcept.
3086 (recursive_directory_iterator::_M_options)
3087 (recursive_directory_iterator::_M_pending): Remove data members.
3088 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3089 (recursive_directory_iterator::recursive_directory_iterator): Remove
3090 ctor-initializer. Use new constructor for _Dir_stack.
3091 (recursive_directory_iterator::options())
3092 (recursive_directory_iterator::recursion_pending())
3093 (recursive_directory_iterator::disable_recursion_pending()): Add
3094 non-inline definitions.
3095 (recursive_directory_iterator::depth()): Make noexcept.
3096 (recursive_directory_iterator::increment(error_code&))
3097 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3098 location of options and recursion_pending members.
3099 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3100 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3101 user-declared move constructor and assignment operator, to make the
3104 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3105 d_type == DT_UNKNOWN immediately.
3106 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3108 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3110 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3112 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3113 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3116 PR libstdc++/87431 (again)
3117 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3118 Define partial specialization for basic_string.
3119 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3120 shared_ptr and weak_ptr.
3121 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3123 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3125 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3127 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3129 * include/std/any (_Never_valueless_alt): Define explicit
3130 specialization for any.
3131 * include/std/variant (_Never_valueless_alt): Define primary template.
3132 (__never_valueless): Use _Never_valueless_alt instead of
3133 is_trivially_copyable.
3134 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3135 initializations to avoid try-catch overhead. Add special case for
3136 scalars produced by potentially-throwing conversions. Use
3137 _Never_valueless_alt instead of is_trivially_copyable for the
3138 remaining strong exception-safety cases.
3139 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3140 * testsuite/20_util/variant/87431.cc: Run both test functions.
3141 * testsuite/20_util/variant/exception_safety.cc: New test.
3142 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3143 so the variant becomes valueless.
3145 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3148 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3150 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3152 * include/std/string (__hash_string_base): New class template defining
3153 operator() for hashing strings.
3154 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3155 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3156 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3157 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3159 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3161 Use single-visitation in variant assignment and swap and relops.
3162 Also use indices instead of types when checking whether
3163 variants hold the same thing.
3164 * include/std/variant (__do_visit): Add a template parameter
3165 for index visitation, invoke with indices if index visitation
3167 (__variant_idx_cookie): New.
3168 (__visit_with_index): Likewise.
3169 (_Copy_assign_base::operator=): Do single-visitation with
3171 (_Move_assign_base::operator=): Likewise.
3172 (_Extra_visit_slot_needed): Adjust.
3173 (__visit_invoke): Call with indices if it's an index visitor.
3174 (relops): Do single-visitation with an index visitor.
3176 (__visitor_result_type): New.
3178 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3180 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3182 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3184 Don't revisit a variant we are already visiting.
3185 * include/std/variant (__variant_construct_single): New.
3186 (__variant_construct): Use it.
3187 (_M_destructive_move): Likewise.
3188 (_M_destructive_copy): Likewise.
3189 (_Copy_assign_base::operator=): Adjust.
3190 (_Move_assign_base::operator=): Likewise.
3193 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3196 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3197 destructor so they are not evaluated until the _Key type is complete.
3198 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3199 * testsuite/23_containers/set/85965.cc: New test.
3200 * testsuite/23_containers/unordered_set/85965.cc: New test.
3201 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3202 with regexp matching the corresponding _Rb_tree specialization.
3203 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3204 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3205 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3206 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3207 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3208 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3209 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3211 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3214 Fix based on a suggestion by Antony Polukhin.
3215 * include/std/variant (__never_valueless): New.
3217 (_Extra_visit_slot_needed): New.
3218 (_Multi_array): Use it.
3219 (_S_apply_all_alts): Likewise.
3221 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3224 Fix based on a suggestion by Antony Polukhin.
3225 * include/std/variant (__gen_vtable): Don't reserve an
3226 additional table slot, _Multi_array already does that.
3228 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3231 Fix based on a suggestion by Antony Polukhin.
3232 * include/std/variant (__variant_construct): Capture a pointer
3233 to the storage and visit just one variant.
3235 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3237 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3238 Doxygen-generated pages with unstable URL.
3239 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3240 * doc/xml/manual/extensions.xml: Likewise.
3241 * doc/xml/manual/parallel_mode.xml: Likewise.
3242 * doc/xml/manual/support.xml: Likewise.
3244 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3245 avoid -Wconversion warnings.
3247 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3249 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3250 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3251 (allstamped): Add stamp-pstl.
3252 (install-headers): Add ptsl_builddir.
3253 * include/Makefile.in: Regenerate.
3254 * include/bits/c++config: Add pstl configuration.
3255 * include/pstl/LICENSE.txt: New file.
3256 * include/pstl/algorithm_fwd.h: New file.
3257 * include/pstl/algorithm_impl.h: New file.
3258 * include/pstl/execution_defs.h: New file.
3259 * include/pstl/execution_impl.h: New file.
3260 * include/pstl/glue_algorithm_defs.h: New file.
3261 * include/pstl/glue_algorithm_impl.h: New file.
3262 * include/pstl/glue_execution_defs.h: New file.
3263 * include/pstl/glue_memory_defs.h: New file.
3264 * include/pstl/glue_memory_impl.h: New file.
3265 * include/pstl/glue_numeric_defs.h: New file.
3266 * include/pstl/glue_numeric_impl.h: New file.
3267 * include/pstl/memory_impl.h: New file.
3268 * include/pstl/numeric_fwd.h: New file.
3269 * include/pstl/numeric_impl.h: New file.
3270 * include/pstl/parallel_backend.h: New file.
3271 * include/pstl/parallel_backend_tbb.h: New file.
3272 * include/pstl/parallel_backend_utils.h: New file.
3273 * include/pstl/parallel_impl.h: New file.
3274 * include/pstl/pstl_config.h: New file.
3275 * include/pstl/unseq_backend_simd.h: New file.
3276 * include/pstl/utils.h: New file.
3277 * include/std/algorithm: Include parallel algorithm implementations.
3278 * include/std/execution: New file.
3279 * include/std/memory: Include parallel algorithm implementations.
3280 * include/std/numeric: Include parallel algorithm implementations.
3281 * include/std/version: Add parallel algorithms feature test macro.
3282 * testsuite/util/pstl/pstl_test_config.h: New file.
3283 * testsuite/util/pstl/test_utils.h: New file.
3284 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3285 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3286 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3287 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3288 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3289 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3290 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3291 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3292 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3293 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3294 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3295 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3296 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3297 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3298 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3299 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3300 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3301 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3302 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3303 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3304 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3305 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3306 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3307 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3308 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3309 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3310 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3311 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3312 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3313 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3314 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3315 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3316 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3317 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3318 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3319 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3320 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3321 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3322 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3323 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3324 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3325 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3326 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3327 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3328 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3329 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3330 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3331 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3332 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3333 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3334 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3335 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3336 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3337 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3338 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3339 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3340 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3341 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3342 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3343 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3344 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3345 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3346 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3347 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3348 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3349 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3350 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3351 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3352 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3353 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3354 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3355 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3356 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3357 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3358 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3359 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3360 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3361 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3362 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3363 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3364 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3365 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3366 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3367 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3368 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3369 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3370 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3371 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3372 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3373 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3374 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3375 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3376 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3377 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3378 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3379 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3380 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3381 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3382 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3383 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3384 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3385 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3386 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3387 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3388 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3389 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3391 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3393 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3394 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3395 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3396 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3397 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3398 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3399 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3400 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3401 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3402 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3403 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3404 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3405 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3406 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3407 when the special functions IS is enabled, not for C++17.
3408 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3410 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3411 without checks for special functions in C++17.
3412 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3416 * include/backward/hash_map: Use <> for includes not "".
3417 * include/backward/hash_set: Likewise.
3418 * include/backward/strstream: Likewise.
3419 * include/tr1/bessel_function.tcc: Likewise.
3420 * include/tr1/exp_integral.tcc: Likewise.
3421 * include/tr1/legendre_function.tcc: Likewise.
3422 * include/tr1/modified_bessel_func.tcc: Likewise.
3423 * include/tr1/riemann_zeta.tcc: Likewise.
3425 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3427 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3428 of extension allocators.
3429 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3430 Document new headers in 7.2, 8.1 and 9.1 releases.
3431 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3432 * doc/html/*: Regenerate.
3434 2019-03-12 John David Anglin <dave.anglin@bell.net>
3437 * testsuite/lib/libstdc++.exp: Locate libatomic.
3438 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3439 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3441 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3442 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3443 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3444 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3446 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3449 * configure.ac: Check for sockatmark.
3450 * crossconfig.m4: Check for sockatmark.
3451 * config.h.in: Regenerate.
3452 * configure: Regenerate.
3453 * include/experimental/internet (address_v4::_S_hton): Rename
3454 overloaded functions to _S_hton_16 and _S_ntoh_16.
3455 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3456 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3457 * include/experimental/socket (basic_socket::at_mark): Check
3458 _GLIBCXX_HAVE_SOCKATMARK.
3460 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3461 const variables instead of macros.
3464 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3465 Use correct type for len_aligned.
3466 * testsuite/20_util/hash/89629.cc: New test.
3468 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3471 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3472 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3473 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3474 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3475 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3476 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3477 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3478 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3479 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3480 memory_order_seq_cst to int.
3482 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3484 * doc/xml/manual/using.xml: Use link element instead of xref.
3485 * doc/html/*: Regenerate.
3487 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3489 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3492 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3493 parameters in deduction guides.
3494 * include/debug/multimap.h (multimap): Likewise.
3495 * include/debug/set.h (multimap): Likewise.
3496 * include/debug/multiset.h (multimap): Likewise.
3497 * include/debug/unordered_map (unordered_map): Likewise.
3498 (unordered_multimap): Likewise.
3499 * include/debug/unordered_set (unordered_set): Likewise.
3500 (unordered_multiset): Likewise.
3503 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3504 Invalidate all iterators in case of rehash.
3505 (unordered_multimap<>::_M_check_rehashed): Likewise.
3506 * include/debug/unordered_set
3507 (unordered_set<>::_M_check_rehashed): Likewise.
3508 (unordered_multiset<>::_M_check_rehashed): Likewise.
3509 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3511 2019-03-07 Andreas Schwab <schwab@suse.de>
3513 * config/abi/post/riscv64-linux-gnu: New directory.
3514 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3516 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3518 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3519 compile test to run. Fix typo.
3521 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3522 * doc/html/*: Regenerate.
3524 P0356R5 Simplified partial function application
3525 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3526 helpers for bind_front.
3527 (bind_front, __cpp_lib_bind_front): Define.
3528 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3530 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3532 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3533 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3534 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3535 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3537 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3539 PR libstdc++/86655 - std::assoc_legendre should not constrain
3540 the value of m (or x).
3541 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3542 __sph_legendre): If degree > order Don't throw, return 0.
3543 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3544 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3545 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3546 * testsuite/tr1/5_numerical_facilities/special_functions/
3547 02_assoc_legendre/pr86655.cc: New test.
3548 * testsuite/tr1/5_numerical_facilities/special_functions/
3549 22_sph_legendre/pr86655.cc: New test.
3551 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3554 Also PR libstdc++/85517
3555 * include/std/variant (__do_visit): New.
3556 (__variant_cast): Likewise.
3557 (__variant_cookie): Likewise.
3558 (__erased_*): Remove.
3559 (_Variant_storage::_S_vtable): Likewise.
3560 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3561 (_Variant_storage::__M_reset): Adjust.
3562 (__variant_construct): New.
3563 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3564 __variant_construct.
3565 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3566 (_Move_ctor_base::__M_destructive_copy): New.
3567 (_Move_ctor_base::__M_destructive_move): Adjust to use
3568 __variant_construct.
3569 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3570 (_Copy_assign_alias): Adjust to check both copy assignment
3571 and copy construction for triviality.
3572 (_Move_assign_base::operator=): Adjust to use __do_visit.
3573 (_Multi_array): Add support for visitors that accept and return
3575 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3576 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3577 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3578 a __variant_cookie temporary for a variant that is valueless and..
3579 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3580 (__gen_vtable::_Array_type): Conditionally make space for
3581 the __variant_cookie visitor case.
3582 (__variant_construct_by_index): New.
3583 (get_if): Adjust to use std::addressof.
3584 (relops): Adjust to use __do_visit.
3585 (variant): Add __variant_cast and __variant_construct_by_index
3587 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3588 instead of self-destruction.
3589 (variant::swap): Adjust to use __do_visit.
3590 (visit): Reimplement in terms of __do_visit.
3591 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3592 * testsuite/20_util/variant/compile.cc: Adjust.
3593 * testsuite/20_util/variant/run.cc: Likewise.
3595 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3597 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3599 * testsuite/experimental/feat-char8_t.cc: Likewise.
3601 * include/std/type_traits [C++20] (is_bounded_array)
3602 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3604 * testsuite/20_util/is_bounded_array/requirements/
3605 explicit_instantiation.cc: New test.
3606 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3608 * testsuite/20_util/is_bounded_array/value.cc: New test.
3609 * testsuite/20_util/is_unbounded_array/requirements/
3610 explicit_instantiation.cc: New test.
3611 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3613 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3615 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3617 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3619 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3621 * include/c_compatibility/math.h [C++20] (lerp): Add using
3623 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3624 (__lerp): Define function template to implement lerp.
3625 (lerp(float, float, float), lerp(double, double, double))
3626 (lerp(long double, long double, long double)): Define for C++20.
3627 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3628 (midpoint(T, T), midpoint(T*, T*)): Define.
3629 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3630 * testsuite/26_numerics/lerp.cc: New test.
3631 * testsuite/26_numerics/midpoint/floating.cc: New test.
3632 * testsuite/26_numerics/midpoint/integral.cc: New test.
3633 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3635 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3637 PR libstdc++/88996 Implement P0439R0
3638 Make std::memory_order a scoped enumeration.
3639 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3640 add variables for the old enumerators. Adjust calls.
3641 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3642 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3644 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3646 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3649 * include/std/memory_resource (polymorphic_allocator): Add default
3650 template argument for C++20.
3651 (polymorphic_allocator::allocate_bytes)
3652 (polymorphic_allocator::deallocate_bytes)
3653 (polymorphic_allocator::allocate_object)
3654 (polymorphic_allocator::deallocate_object)
3655 (polymorphic_allocator::new_object)
3656 (polymorphic_allocator::delete_object): New member functions for
3658 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3661 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3664 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3667 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3669 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3670 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3672 * include/std/memory (uses_allocator_construction_args): New set of
3673 overloaded functions.
3674 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3676 * include/std/memory_resource (polymorphic_allocator::construct)
3677 [__cplusplus > 201703l]: Replace all overloads with a single function
3678 using uses_allocator_construction_args.
3679 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3681 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3683 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3686 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3687 stylesheet directories before check for xsltproc. Try to use
3688 xmlcatalog to find local stylesheet directory before trying hardcoded
3689 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3690 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3691 use xsltproc if xmlcatalog fails to find a local stylesheet.
3692 * configure.ac: Check for xmlcatalog.
3693 * Makefile.in: Regenerate.
3694 * configure: Likewise.
3695 * doc/Makefile.in: Likewise.
3696 * include/Makefile.in: Likewise.
3697 * libsupc++/Makefile.in: Likewise.
3698 * po/Makefile.in: Likewise.
3699 * python/Makefile.in: Likewise.
3700 * src/Makefile.in: Likewise.
3701 * src/c++11/Makefile.in: Likewise.
3702 * src/c++17/Makefile.in: Likewise.
3703 * src/c++98/Makefile.in: Likewise.
3704 * src/filesystem/Makefile.in: Likewise.
3705 * testsuite/Makefile.in: Likewise.
3707 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3710 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3711 container deduction guides.
3712 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3713 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3714 parameters in deduction guides.
3715 * include/bits/stl_multimap.h (multimap): Likewise.
3716 * include/bits/stl_multiset.h (multiset): Likewise.
3717 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3718 * include/bits/stl_set.h (set): Likewise.
3719 * include/bits/stl_stack.h (stack): Likewise.
3720 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3721 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3722 constrain parameters in deduction guides.
3723 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3725 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3727 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3728 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3729 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3730 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3732 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3734 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3737 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3738 to class template and partial specialization using void_t.
3739 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3741 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3744 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3745 copy and move members public.
3747 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3749 * include/std/type_traits (__underlying_type_impl): New helper to
3750 make underlying_type SFINAE-friendly.
3751 (underlying_type): Derive from __underlying_type_impl.
3752 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3756 * include/bits/char_traits.h (__constant_char_array): Check index is
3757 in range before dereferencing.
3758 (char_traits<char>::compare, char_traits<char>::find)
3759 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3760 immediately if n is zero.
3761 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3762 Remove workarounds for PR 67026.
3763 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3765 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3768 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3770 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3771 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3773 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3776 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3777 type to std::size_t and argument to type to long double.
3779 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3781 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3782 * config/abi/post/sparc64-linux-gnu: New directory.
3783 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3784 * config/abi/post/sparc64-linux-gnu/32: New directory.
3785 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3787 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3789 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3790 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3793 2019-02-22 Tom Honermann <tom@honermann.net>
3795 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3796 printers for u8string and u8string_view.
3798 2019-02-22 Tom Honermann <tom@honermann.net>
3800 * testsuite/18_support/byte/ops.cc: Validate
3801 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3802 std::to_integer<char32_t>.
3803 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3804 std::numeric_limits<char8_t>.
3805 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3806 std::numeric_limits<char8_t>::lowest().
3807 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3808 std::numeric_limits<char8_t>::max_digits10.
3809 * testsuite/18_support/type_info/fundamental.cc: Validate
3810 typeinfo for char8_t.
3811 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3812 std::from_chars with char8_t.
3813 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3814 Validate explicit instantiation of std::hash<char8_t>.
3815 * testsuite/20_util/is_integral/value.cc: Validate
3816 std::is_integral<char8_t>.
3817 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3818 Validate std::make_signed<char8_t>.
3819 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3820 Validate u8string construction from char8_t sources.
3821 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3823 * testsuite/21_strings/basic_string_view/operations/compare/
3824 char/70483.cc: Validate substr operations on u8string_view.
3825 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3826 the u8string_view typedef is defined.
3827 * testsuite/21_strings/char_traits/requirements/
3828 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3830 * testsuite/21_strings/char_traits/requirements/
3831 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3832 constexpr member functions.
3833 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3834 that the u8string typedef is defined.
3835 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3836 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3837 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3838 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3840 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3841 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3843 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3844 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3845 Validate std::atomic<char8_t>::is_always_lock_free
3846 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3847 Update line numbers.
3848 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3850 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3852 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3853 Validate std::experimental::pmr::u8string.
3854 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3855 u8string_view typedef is defined.
3856 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3857 char32_t to the typelists.
3859 2019-02-22 Tom Honermann <tom@honermann.net>
3861 * include/ext/typelist.h: Constrain a partial specialization of
3862 typelist::detail::append_ to only match chain<T1,T2>.
3864 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3867 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3868 class template with class. Replace move and copy member types with
3869 member alias templates, so they are only instantiated when needed.
3870 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3871 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3872 test for C++11/14/17 as well.
3873 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3876 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3879 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3880 _GLIBCXX_PURE to the alias declaration.
3882 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3884 * testsuite/21_strings/basic_string/literals/types.cc
3885 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3886 * testsuite/21_strings/basic_string/literals/values.cc
3887 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3888 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3889 potentially having different type.
3890 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3891 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3893 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3894 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3895 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3896 string literals only using basic character set.
3897 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3898 u8 literals to char.
3899 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3900 Test ATOMIC_CHAR8_T_LOCK_FREE.
3901 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3902 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3903 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3904 * testsuite/experimental/string_view/literals/types.cc
3905 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3907 * testsuite/experimental/string_view/literals/values.cc
3908 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3910 2019-02-19 Tom Honermann <tom@honermann.net>
3912 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3913 from char16_32_t.cc; validates numeric_limits<char8_t>.
3914 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3915 test cloned from types.cc; validates operator""s for char8_t
3917 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3918 test cloned from values.cc; validates construction and comparison
3920 * testsuite/21_strings/basic_string/requirements/
3921 /explicit_instantiation/char8_t/1.cc: New test cloned from
3922 char16_t/1.cc; validates explicit instantiation of
3923 basic_string<char8_t>.
3924 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3925 New test cloned from types.cc; validates operator""sv for char8_t
3926 returns u8string_view.
3927 * testsuite/21_strings/basic_string_view/literals/
3928 values-char8_t.cc: New test cloned from values.cc; validates
3929 construction and comparison of u8string_view values.
3930 * testsuite/21_strings/basic_string_view/requirements/
3931 explicit_instantiation/char8_t/1.cc: New test cloned from
3932 char16_t/1.cc; validates explicit instantiation of
3933 basic_string_view<char8_t>.
3934 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3935 New test cloned from char16_t/65049.cc; validates that
3936 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3937 * testsuite/21_strings/char_traits/requirements/char8_t/
3938 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3939 that char_traits<char8_t> member typedefs are present and correct.
3940 * testsuite/21_strings/char_traits/requirements/
3941 explicit_instantiation/char8_t/1.cc: New test cloned from
3942 char16_t/1.cc; validates explicit instantiation of
3943 char_traits<char8_t>.
3944 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3945 from char16_t.cc: validates
3946 codecvt<char16_t, char8_t, mbstate_t>.
3947 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3948 from char32_t.cc: validates
3949 codecvt<char32_t, char8_t, mbstate_t>.
3950 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3951 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3952 codecvt<char32_t, char8_t, std::mbstate_t>.
3953 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3954 test cloned from string.cc; validates filesystem::path construction
3956 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3957 the __cpp_lib_char8_t feature test macro is defined with the
3959 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3960 New test cloned from string.cc; validates filesystem::path
3961 construction from char8_t input.
3962 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3963 test cloned from types.cc; validates operator""sv for char8_t
3964 returns u8string_view.
3965 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3966 New test cloned from values.cc; validates construction and
3967 comparison of u8string_view values.
3968 * testsuite/experimental/string_view/requirements/
3969 explicit_instantiation/char8_t/1.cc: New test cloned from
3970 char16_t/1.cc; validates explicit instantiation of
3971 basic_string_view<char8_t>.
3972 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
3973 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
3976 2019-02-19 Tom Honermann <tom@honermann.net>
3978 P0482R5 char8_t: Standard library support
3979 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
3980 typeinfo symbols for char8_t.
3981 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
3982 (GLIBCXX_3.4.26): Add symbols for specializations of
3983 numeric_limits and codecvt that involve char8_t.
3984 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
3985 * include/bits/atomic_base.h: Add atomic_char8_t.
3986 * include/bits/basic_string.h: Add std::hash<u8string> and
3987 operator""s(const char8_t*, size_t).
3988 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
3990 * include/bits/char_traits.h: Add char_traits<char8_t>.
3991 * include/bits/codecvt.h: Add
3992 codecvt<char16_t, char8_t, mbstate_t>,
3993 codecvt<char32_t, char8_t, mbstate_t>,
3994 codecvt_byname<char16_t, char8_t, mbstate_t>, and
3995 codecvt_byname<char32_t, char8_t, mbstate_t>.
3996 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
3997 recognize char8_t as an integral type.
3998 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
4000 (path::u8string): Return std::u8string when char8_t support is
4002 (path::generic_u8string): Likewise.
4003 (path::_S_convert): Handle conversion from char8_t input.
4004 (path::_S_str_convert): Likewise.
4005 * include/bits/functional_hash.h: Add hash<char8_t>.
4006 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4008 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4009 for new char8_t specializations.
4010 * include/bits/localefwd.h: Add missing declarations of
4011 codecvt<char16_t, char, mbstate_t> and
4012 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4013 codecvt<char16_t, char8_t, mbstate_t> and
4014 codecvt<char32_t, char8_t, mbstate_t>.
4015 * include/bits/postypes.h: Add u8streampos
4016 * include/bits/stringfwd.h: Add declarations of
4017 char_traits<char8_t> and u8string.
4018 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4019 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4021 (path::u8string): Return std::u8string when char8_t support is
4023 (path::generic_u8string): Likewise.
4024 (path::_S_convert): Handle conversion from char8_t input.
4025 (path::_S_str_convert): Likewise.
4026 * include/experimental/string: Add u8string.
4027 * include/experimental/string_view: Add u8string_view,
4028 hash<experimental::u8string_view>, and
4029 operator""sv(const char8_t*, size_t).
4030 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4031 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4032 as a character type.
4033 * include/std/limits: Add numeric_limits<char8_t>.
4034 * include/std/string_view: Add u8string_view,
4035 hash<experimental::u8string_view>, and
4036 operator""sv(const char8_t*, size_t).
4037 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4038 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4039 * libsupc++/atomic_lockfree_defines.h: Define
4040 ATOMIC_CHAR8_T_LOCK_FREE.
4041 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4042 codecvt.cc and limits.cc so that char8_t specializations of
4043 numeric_limits and codecvt and emitted.
4044 * src/c++11/Makefile.in: Likewise.
4045 * src/c++11/codecvt.cc: Define members of
4046 codecvt<char16_t, char8_t, mbstate_t>,
4047 codecvt<char32_t, char8_t, mbstate_t>,
4048 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4049 codecvt_byname<char32_t, char8_t, mbstate_t>.
4050 * src/c++11/limits.cc: Define members of
4051 numeric_limits<char8_t>.
4052 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4053 locale_init.cc and localename.cc.
4054 * src/c++98/Makefile.in: Likewise.
4055 * src/c++98/locale_init.cc: Add initialization for the
4056 codecvt<char16_t, char8_t, mbstate_t> and
4057 codecvt<char32_t, char8_t, mbstate_t> facets.
4058 * src/c++98/localename.cc: Likewise.
4059 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4061 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4063 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4064 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4065 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4067 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4069 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4070 * doc/html/*: Regenerate.
4072 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4073 * doc/html/*: Regenerate.
4075 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4076 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4077 allocator type in is_constructible checks.
4078 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4079 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4080 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4081 problematic type from LWG 2586 discussion.
4082 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4083 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4085 * configure.ac: Check for C11 timespec_get function.
4086 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4088 * config.h.in: Regenerate.
4089 * configure: Regenerate.
4090 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4091 std for C++17 and up.
4093 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4094 * include/bits/stl_queue.h
4095 (priority_queue(const Compare&, const Container&, const Alloc&))
4096 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4098 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4100 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4101 * include/bits/stl_queue.h (queue, priority_queue): Add static
4102 assertions to enforce LWG 2566 requirement on value_type.
4103 * include/bits/stl_stack.h (stack): Likewise.
4106 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4108 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4109 * include/bits/std_abs.h: Add comment about LWG 2735.
4110 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4112 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4115 * include/std/version [__cpp_impl_destroying_delete]
4116 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4117 * libsupc++/new [__cpp_impl_destroying_delete]
4118 (__cpp_lib_destroying_delete): Likewise.
4119 (destroying_delete_t, destroying_delete): Likewise, but define even
4120 when __cpp_impl_destroying_delete is not defined.
4121 * testsuite/18_support/destroying_delete.cc: New test.
4123 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4126 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4127 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4128 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4129 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4131 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4134 * include/bits/fs_path.h (path::has_root_name)
4135 (path::has_root_directory, path::has_root_path)
4136 (path::has_relative_path, path::has_parent_path)
4137 (path::has_filename, path::has_stem, path::has_extension)
4138 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4140 * src/c++17/fs_path.cc (path::has_root_name)
4141 (path::has_root_directory, path::has_root_path)
4142 (path::has_relative_path, path::has_parent_path)
4143 (path::has_filename, path::_M_find_extension): Add noexcept.
4145 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4147 PR libstdc++/89102 (partial)
4148 * include/std/type_traits (common_type<>): Define.
4149 (common_type<T>): Derive from common_type<T, T>.
4150 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4151 Test zero-length template argument list.
4152 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4153 Test additional single argument cases.
4154 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4155 Adjust expected error.
4157 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4160 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4162 * include/bits/stl_stack.h (stack): Likewise.
4163 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4164 * testsuite/23_containers/queue/deduction.cc: New test.
4165 * testsuite/23_containers/stack/deduction.cc: New test.
4168 * include/std/type_traits (__is_convertible_helper)
4169 (__is_convertible_helper<_From, _To, false>): Revert changes to
4170 support is_nothrow_convertible.
4171 (__is_nt_convertible_helper): New helper.
4172 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4174 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4175 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4178 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4179 __is_alloc_insertable_impl. Replace single type member with two
4180 members, one for each of copy and move insertable.
4181 (__is_move_insertable): New trait for internal use.
4182 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4183 (vector::_S_nothrow_relocate(true_type)): New functions to
4184 conditionally check if __relocate_a can throw.
4185 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4186 on __is_move_insertable.
4187 (vector::_S_do_relocate): New overloaded functions to conditionally
4189 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4190 based on _S_use_relocate.
4191 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4192 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4193 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4196 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4197 parameter unnamed. Add message to static assertion.
4198 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4199 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4202 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4205 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4207 (__is_bitwise_relocatable): ... to this.
4208 (__relocate_a_1): Adapt.
4209 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4210 (__is_bitwise_relocatable): ... to this.
4212 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4215 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4216 final component as well as from _M_pathname. Append the dot using
4217 operator+= instead of only to _M_pathname.
4218 (path::_M_find_extension): Reformat slightly.
4219 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4220 Add more test cases.
4222 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4224 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4226 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4228 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4229 constexpr specifiers from arg and proj.
4231 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4232 __shared_ptr instantiations used by gcc4-compatible ABI.
4234 * include/experimental/forward_list (experimental::erase): Qualify
4236 * include/experimental/list (experimental::erase): Likewise.
4237 * include/std/forward_list (std::erase): Likewise.
4238 * include/std/list (std::erase): Likewise.
4240 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4242 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4243 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4244 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4245 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4246 * testsuite/ext/array_allocator/26875.cc: Likewise.
4247 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4248 * testsuite/util/replacement_memory_operators.h: Likewise.
4249 * testsuite/util/testsuite_allocator.h: Likewise.
4251 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4252 normal mode vector, even for debug mode.
4253 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4254 Define alias template for normal mode vector.
4256 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4259 * config/locale/generic/c_locale.h (__convert_from_v)
4260 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4261 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4262 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4263 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4265 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4268 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4269 data member with static member function _S_use_relocate().
4270 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4271 (vector::_M_default_append): Use _S_use_relocate() instead of
4274 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4277 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4280 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4281 write to stderr instead of using printf.
4283 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4286 * include/bits/char_traits.h (__constant_string_p,
4287 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4290 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4292 Implement C++20 P0600r1.
4293 * include/backward/hash_map: Add nodiscard attribute to empty.
4294 * include/backward/hash_set: Likewise.
4295 * backward/hashtable.h: Likewise.
4296 * include/bits/basic_string.h: Likewise.
4297 * include/bits/forward_list.h: Likewise.
4298 * include/bits/hashtable.h: Likewise.
4299 * include/bits/regex.h: Likewise.
4300 * include/bits/stl_deque.h: Likewise.
4301 * include/bits/stl_list.h: Likewise.
4302 * include/bits/stl_map.h: Likewise.
4303 * include/bits/stl_multimap.h: Likewise.
4304 * include/bits/stl_multiset.h: Likewise.
4305 * include/bits/stl_queue.h: Likewise.
4306 * include/bits/stl_set.h: Likewise.
4307 * include/bits/stl_stack.h: Likewise.
4308 * include/bits/stl_tree.h: Likewise.
4309 * include/bits/stl_vector.h: Likewise.
4310 * include/bits/unordered_map.h: Likewise.
4311 * include/bits/unordered_set.h: Likewise.
4312 * include/debug/array: Likewise.
4313 * include/experimental/any: Likewise.
4314 * include/experimental/bits/fs_path.h: Likewise.
4315 * include/experimental/internet: Likewise.
4316 * include/experimental/string_view: Likewise.
4317 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4319 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4321 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4323 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4325 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4327 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4329 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4331 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4333 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4334 info_fn_imps.hpp: Likewise.
4335 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4336 left_child_next_sibling_heap_.hpp: Likewise.
4337 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4339 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4341 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4343 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4345 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4347 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4349 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4351 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4352 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4353 * include/ext/rope: Likewise.
4354 * include/ext/slist: Likewise.
4355 * include/ext/vstring.h: Likewise.
4356 * include/profile/array: Likewise.
4357 * include/std/array: Likewise.
4358 * include/tr1/array: Likewise.
4359 * include/tr1/hashtable.h: Likewise.
4360 * include/tr1/regex: Likewise.
4361 * include/tr2/dynamic_bitset: Likewise.
4362 * include/bits/alloc_traits.h: Add nodiscard attribute to
4364 * include/experimental/memory_resource: Likewise.
4365 * include/ext/alloc_traits.h: Likewise.
4366 * include/ext/array_allocator.h: Likewise.
4367 * include/ext/bitmap_allocator.h: Likewise.
4368 * include/ext/debug_allocator.h: Likewise.
4369 * include/ext/extptr_allocator.h: Likewise.
4370 * include/ext/mt_allocator.h: Likewise.
4371 * include/ext/new_allocator.h: Likewise.
4372 * include/ext/pool_allocator.h: Likewise.
4373 * include/ext/throw_allocator.h: Likewise.
4374 * include/std/scoped_allocator: Likewise.
4375 * libsupc++/eh_alloc.cc: Likewise.
4376 * include/std/future: Add nodiscard attribute to async.
4377 * libsupc++/new: Add nodiscard attribute to new.
4379 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4384 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4385 * include/bits/shared_ptr.h
4386 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4387 (allocate_shared): Change to use new tag type.
4388 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4389 Declare new member function.
4390 (_Sp_alloc_shared_tag): Define new type.
4391 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4392 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4393 _Sp_make_shared_tag::_S_eq to check type_info.
4394 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4395 Constrain to prevent being called with _Sp_alloc_shared_tag.
4396 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4397 Replace constructor with ...
4398 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4399 reference parameter so address of the new object can be returned to
4400 the caller. Obtain the allocator from the tag type.
4401 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4402 constructor with ...
4403 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4404 to the __shared_count constructor.
4405 (__allocate_shared): Change to use new tag type.
4406 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4408 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4410 * src/c++17/fs_ops.cc
4411 (equivalent(const path&, const path&, error_code&))
4412 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4413 compare files instead of relying on incomplete info returned by stat.
4416 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4417 if the path is already absolute.
4418 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4419 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4422 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4423 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4424 of filesystem::exists.
4425 (create_directories(const path&, error_code&)): Add assertions.
4426 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4427 Add workaround for bug in _wstat for paths with trailing slash.
4428 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4429 for expected behaviour on mingw.
4430 * testsuite/experimental/filesystem/operations/create_directories.cc:
4432 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4433 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4434 not test permissions on mingw targets.
4436 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4438 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4439 constructors and open members taking wide strings. Fix patterns for
4440 filesystem::path members to match wstring_view parameters. Add
4441 exports for shared_ptr members used by directory iterators.
4442 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4443 error code parameter if the file doesn't exist.
4444 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4446 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4447 values for mingw targets, where "/" is not an absolute path. Do not
4448 test symlinks on mingw targets.
4449 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4450 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4452 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4453 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4454 that each component of the path is created.
4455 * testsuite/experimental/filesystem/operations/create_directories.cc:
4457 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4458 permissions on mingw targets.
4459 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4460 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4461 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4462 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4464 * testsuite/experimental/filesystem/operations/permissions.cc:
4466 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4467 symlinks or permissions on mingw targets.
4468 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4469 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4470 symlinks on mingw targets.
4471 * testsuite/experimental/filesystem/operations/remove_all.cc:
4473 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4474 permissions on mingw targets.
4475 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4476 test symlinks on mingw targets.
4477 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4480 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4483 Warn about unused comparisons of shared_ptr/unique_ptr
4484 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4485 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4486 <, <=, >, >= for shared_ptr.
4487 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4489 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4491 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4492 as 201611L, because P0497R0 changes are supported.
4493 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4495 * include/bits/erase_if.h [__cplusplus > 201703L]
4496 (__cpp_lib_erase_if): Only define for C++2a.
4497 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4498 (__cpp_lib_null_iterators): Define.
4499 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4500 (__cpp_lib_null_iterators): Define.
4501 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4503 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4505 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4507 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4508 changes are supported.
4509 * include/std/optional (__cpp_lib_optional): Likewise.
4510 * include/std/variant (__cpp_lib_variant): Likewise.
4511 * include/std/version [!__STRICT_ANSI__]
4512 (__cpp_lib_uncaught_exceptions): Define as long integer.
4513 [__cplusplus >= 201703L] (__cpp_lib_any)
4514 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4515 (__cpp_lib_variant): Define for C++17.
4516 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4518 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4521 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4523 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4527 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4529 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4532 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4534 * doc/xml/manual/intro.xml: Include new section.
4535 * doc/xml/manual/status_cxx2017.xml: Document more
4536 implementation-defined properties of the library.
4537 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4538 * doc/html/*: Regenerate.
4540 * include/bits/refwrap.h [__cplusplus > 201703L]
4541 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4542 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4543 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4545 (reference_wrapper::operator()): Add static assertion.
4546 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4548 * include/std/chrono (duration_values::zero(), duration_values::min())
4549 (duration_values::max()): Add noexcept.
4550 (duration::zero(), duration::min(), duration::max()): Likewise.
4551 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4552 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4553 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4555 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4557 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4559 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4560 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4562 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4565 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4566 specialization for C++17 (P0513R0, LWG 2817).
4567 * testsuite/20_util/hash/nullptr.cc: New test.
4570 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4571 pattern for std::basic_stringbuf::str().
4573 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4574 basic_ostream::operator<< patterns.
4576 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4578 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4579 test failures on targets with 32-bit time_t.
4581 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4582 * include/std/deque: Likewise.
4583 * include/std/forward_list: Likewise.
4584 * include/std/list: Likewise.
4585 * include/std/string: Likewise.
4586 * include/std/vector: Likewise.
4587 * include/std/version: Likewise.
4588 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4589 * testsuite/23_containers/deque/erasure.cc: Likewise.
4590 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4591 * testsuite/23_containers/list/erasure.cc: Likewise.
4592 * testsuite/23_containers/map/erasure.cc: Likewise.
4593 * testsuite/23_containers/set/erasure.cc: Likewise.
4594 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4595 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4596 * testsuite/23_containers/vector/erasure.cc: Likewise.
4598 * include/experimental/internet [AI_NUMERICSERV]
4599 (resolver_base::numeric_service): Define conditionally.
4600 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4602 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4605 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4606 Jonathan Wakely <jwakely@redhat.com>
4609 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4610 (GLIBCXX_3.4.26): Add new exports.
4611 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4612 correct list of sources.
4613 * include/Makefile.in: Regenerate.
4614 * include/std/ostream (operator<<(nullptr_t)): New member function.
4615 * src/c++17/ostream-inst.cc: New file.
4616 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4619 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4621 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4622 of the source file containing the caller.
4623 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4624 directories created by test.
4625 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4627 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4629 * testsuite/experimental/filesystem/iterators/
4630 recursive_directory_iterator.cc: Likewise.
4632 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4634 PR tree-optimization/88775
4635 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4636 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4637 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4638 instead of __builtin_constant_p if available. Don't bother with
4639 the pointer comparison in C++11 and earlier.
4641 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4645 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4648 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4650 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4651 for filesystem::path. Give variables more distinctive names.
4653 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4654 member function to perform non-trivial assignment.
4655 (_Optional_payload_base::_M_move_assign): Likewise.
4656 (_Optional_payload<T, true, false, true>::operator=)
4657 (_Optional_payload<T, true, true, false>::operator=)
4658 (_Optional_payload<T, true, false, false>::operator=): Call
4659 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4662 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4663 test std::complex<long double> if long double format is IBM128.
4664 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4667 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4669 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4670 for old std::unique_ptr layout.
4671 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4672 to become valueless. Add filesystem::path tests.
4675 * include/std/optional (_Optional_payload_base): New class template
4676 for common code hoisted from _Optional_payload specializations. Use
4677 a template for the union, to allow a partial specialization for
4678 types with non-trivial destructors. Add constructors for in-place
4679 initialization to the union.
4680 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4681 to perform non-trivial copy construction, instead of relying on
4682 non-standard copy elision in a delegating constructor.
4683 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4684 non-trivial move construction.
4685 (_Optional_payload): Derive from _Optional_payload_base and use it
4686 for everything except the non-trivial assignment operators, which are
4688 (_Optional_payload<false, C, M>): Derive from the specialization
4689 _Optional_payload<true, false, false> and add a destructor.
4690 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4691 Forward to corresponding members of _Optional_payload.
4692 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4693 Hoist common members from _Optional_base.
4694 (_Optional_base): Make all members and base class public.
4695 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4696 _Optional_base_impl.
4697 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4698 support for new std::optional layout.
4699 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4702 * include/bits/locale_conv.h: Use <> for includes not "".
4703 * include/ext/random: Likewise.
4704 * include/ext/vstring.h: Likewise.
4706 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4708 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4709 (GLIBCXX_3.4.21): Likewise.
4711 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4714 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4715 to match the one that controls whether utimbuf and utime are declared.
4717 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4720 * include/bits/char_traits.h (char_traits::move): Do not pass null
4721 pointers to memmove.
4722 * include/bits/locale_facets.h
4723 (ctype<char>::widen(const char*, const char*, char*)): Do not
4724 pass null pointers to memcpy.
4725 (ctype<char>::narrow(const char*, const char*, char, char*)):
4727 (ctype<char>::do_widen(const char*, const char*, char*)):
4729 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4732 * doc/xml/manual/spine.xml: Update copyright years.
4733 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4734 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4735 for C++17 filesystem library.
4736 * doc/html/*: Regenerate.
4738 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4739 * config.h.in: Regenerate.
4740 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4741 alphabetically and add missing entries for copy_symlink,
4742 hard_link_count, rename, and resize_file.
4743 * configure: Regenerate.
4744 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4745 used unconditionally.
4746 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4747 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4748 supports truncating to zero length.
4749 * testsuite/27_io/filesystem/operations/all.cc: New test.
4750 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4752 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4755 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4756 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4757 * config.h.in: Regenerate.
4758 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4759 remaining std::filesystem types and functions.
4760 * configure: Regenerate.
4761 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4762 * src/c++17/Makefile.in: Regenerate.
4763 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4764 here, and change name of included file.
4765 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4766 here, and change name of included file.
4767 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4768 path to dir-common.h.
4769 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4770 path to ops-common.h. Disable -Wunused-parameter warnings.
4771 (internal_file_clock): Define unconditionally.
4772 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4774 (do_copy_file, do_space): Move definitions to ops.common.h.
4775 (copy, file_size, hard_link_count, last_write_time, space): Only
4776 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4778 (last_write_time, read_symlink): Remove unused attributes from
4780 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4781 * src/filesystem/Makefile.in: Regenerate.
4782 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4783 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4784 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4785 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4786 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4787 dummy types and functions instead of using #error.
4788 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4789 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4791 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4792 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4793 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4794 to account for new namespace.
4795 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4796 -lstdc++fs from dg-options.
4797 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4798 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4799 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4800 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4801 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4803 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4804 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4806 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4807 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4808 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4809 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4810 * testsuite/27_io/filesystem/operations/create_directories.cc:
4812 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4813 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4814 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4815 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4816 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4817 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4818 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4819 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4820 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4821 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4822 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4823 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4824 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4825 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4826 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4827 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4828 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4829 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4831 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4835 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4836 typeinfo and vtables less greedy.
4837 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4838 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4839 * src/c++17/Makefile.in: Regenerate.
4840 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4841 here, and change name of included file.
4842 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4843 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4845 * src/filesystem/Makefile.in: Regenerate.
4846 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4847 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4848 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4849 from dg-options and remove dg-require-filesystem-ts.
4850 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4851 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4852 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4853 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4854 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4855 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4856 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4857 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4858 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4859 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4860 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4861 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4862 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4863 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4864 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4865 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4866 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4867 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4868 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4869 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4870 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4872 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4873 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4874 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4875 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4876 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4877 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4878 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4879 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4880 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4881 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4882 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4883 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4885 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4887 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4889 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4891 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4892 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4893 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4894 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4895 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4896 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4897 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4898 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4899 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4900 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4902 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4903 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4904 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4905 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4906 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4909 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4910 Check is_trivially_copyable instead of is_scalar.
4911 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4912 contained value can throw and its type is trivially copyable then
4913 construct into a temporary variant and move from it, to provide the
4914 strong exception safety guarantee.
4915 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4917 * testsuite/20_util/variant/87431.cc: New test.
4918 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4919 conversion causes valueless state.
4922 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4923 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4924 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4925 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4926 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4928 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4930 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4931 (file_time_type): Redefine in terms of __file_clock.
4932 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4934 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4936 (internal_file_lock): New helper type for accessing __file_clock.
4937 (do_copy_file): Use internal_file_lock to convert system time to
4939 (last_write_time(const path&, error_code&)): Likewise.
4940 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4942 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4944 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4945 for const member functions of std::basic_string.
4946 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4948 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4949 Make non-standard constructor private.
4950 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4952 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4953 explicit instantiations for C++17 as well as earlier dialects.
4954 * src/c++17/Makefile.am: Add new source files.
4955 * src/c++17/Makefile.in: Regenerate.
4956 * src/c++17/cow-string-inst.cc: New file defining explicit
4957 instantiations for basic_string member functions added in C++17.
4958 * src/c++17/string-inst.cc: Likewise.
4960 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4961 copy/move constructors for old std::basic_string.
4962 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4963 (basic_string::reference, basic_string::const_reference): Define
4964 as plain references for C++11 and later.
4965 (basic_string::basic_string()): Put constructor body outside
4966 preprocessor conditional groups.
4967 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4968 instead of copying it.
4969 (basic_string::basic_string(const basic_string&, const _Alloc&)):
4971 (basic_string::basic_string(basic_string&&, const _Alloc&)):
4973 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
4974 cases for old basic_string.
4975 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
4976 allocator-extended constructors unconditionally. Add extra members to
4977 allocator type when using old string ABI.
4978 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
4980 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
4982 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
4983 -fno-inline added to test flags.
4985 * testsuite/21_strings/basic_string/requirements/
4986 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
4988 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
4989 assertion failures with old std::string ABI.
4991 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
4993 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
4994 functions that will only erase elements at the end.
4995 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
4996 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
4997 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
4999 (path::_List::pop_back()): Define.
5000 (path::_List::_M_erase_from(const_iterator)): Define.
5001 (path::operator/=(const path&)): Use pop_back to remove last component
5002 and _M_erase_from to remove multiple components.
5003 (path::_M_append(basic_string_view<value_type>)): Likewise.
5004 (path::operator+=(const path&)): Likewise.
5005 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5006 (path::remove_filename()): Likewise.
5007 (path::lexically_normal()): Use _List::_Impl iterators instead of
5008 path::iterator. Use pop_back to remove components from the end. Clear
5009 trailing filename, instead of using erase(const_iterator) to remove
5010 a non-final component.
5011 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5013 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5015 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5016 incorrect treatment of empty filename after trailing slash.
5017 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5019 * testsuite/21_strings/basic_string/modifiers/assign/char/
5020 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5022 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5023 move_assign_optim.cc: Likewise.
5025 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5026 Jakub Jelinek <jakub@redhat.com>
5029 * include/experimental/memory: Replace UTF-8 quote characters.
5030 * include/std/future: Replace UTF-8 "em dash" characters.
5032 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5035 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5036 * include/debug/forward_list: Likewise.
5037 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5039 * include/experimental/chrono: Likewise.
5040 * include/experimental/functional: Likewise.
5041 * include/experimental/ratio: Likewise.
5042 * include/experimental/system_error: Likewise.
5043 * include/experimental/tuple: Likewise.
5044 * include/experimental/type_traits: Likewise.
5045 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5046 * include/parallel/multiseq_selection.h: Likewise.
5049 * config/abi/pre/gnu.ver: Add missing exports.
5050 * testsuite/22_locale/collate_byname/88681.cc: New test.
5051 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5052 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5054 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5056 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5057 initializer_list<value_type> and from input iterator ranges.
5058 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5060 * testsuite/experimental/string_view/element_access/char/empty.cc:
5061 Fix year range in copyright header.
5063 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5065 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5066 Fix year range in copyright header.
5068 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5070 Update copyright years.
5072 Copyright (C) 2019 Free Software Foundation, Inc.
5074 Copying and distribution of this file, with or without modification,
5075 are permitted in any medium without royalty provided the copyright
5076 notice and this notice are preserved.