1 2019-09-04 Mike Crowe <mac@mcrowe.com>
3 * testsuite/30_threads/condition_variable/members/2.cc (test01):
4 Parameterise so that test can be run against an arbitrary clock.
5 (main): Test using std::chrono::steady_clock and a user-defined
6 clock in addition to the previous std::chrono::system_clock.
7 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
9 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
11 * crossconfig.m4: Remove references to spu.
12 * configure: Regenerate.
13 * doc/xml/manual/appendix_contributing.xml: Remove references
14 to __ea as "badword" for spu.
15 * doc/html/manual/source_code_style.html: Regenerate.
16 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
17 to avoid __ea (as "badword" for spu).
18 (__ellint_rj): Likewise.
20 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
23 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
24 scanning to conform to the GNU Coding Standards.
25 * configure: Regenerate.
27 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
29 * src/c++17/memory_resource.cc: Use __constinit keyword.
31 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
33 * doc/xml/manual/abi.xml: Document 9.x library versions.
34 * doc/html/*: Regenerate.
36 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
38 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
39 (__detail::__to_chars_8_len): Remove.
40 (__detail::__to_chars_8): Inline length calculation here.
41 (__detail::__from_chars_binary): Use numeric_limits instead of
44 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
46 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
47 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
48 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
49 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
52 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
54 * testsuite_files/util/testsuite_performance.h
55 (resource_counter::start): Ignore unused malloc(0) result.
57 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
59 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
60 Model Object Technologies): Adjust name and link.
62 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
64 * include/std/charconv (__detail::__to_chars_8)
65 __detail::__to_chars_16): Replace array of precomputed digits with
66 arithmetic operations to avoid CPU cache misses. Remove zero
67 termination from array of digits to allow symbol merge with generic
68 implementation of __detail::__to_chars. Replace final offsets with
69 constants. Use __detail::__to_chars_len_2 instead of a generic
70 __detail::__to_chars_len.
71 (__detail::__to_chars): Remove zero termination from array of digits.
72 (__detail::__to_chars_2): Leading digit is always '1'.
74 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
76 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
78 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
80 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
82 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
85 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
86 to template parameters.
87 * include/bits/stl_uninitialized.h (uninitialized_copy)
88 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
89 diagnose invalid uses.
90 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
91 Adjust expected error.
92 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
94 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
96 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
98 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
100 * testsuite/23_containers/vector/cons/89164.cc: New test.
101 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
103 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
106 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
107 * configure: Regenerate.
108 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
110 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
112 * testsuite/util/testsuite_abi.cc: Add new symbol version.
114 2019-08-29 Jakub Jelinek <jakub@redhat.com>
116 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
117 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
119 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
121 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
122 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
123 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
124 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
125 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
126 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
127 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
129 2019-08-23 Joseph Myers <joseph@codesourcery.com>
131 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
132 (std::filesystem::__gnu_posix::lstat): Add return type.
134 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
136 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
138 * include/std/numeric (reduce): Fix Doxygen markup.
141 * include/std/type_traits (is_function): Simplify definition. Remove
142 partial specializations for function types.
143 (__is_referenceable): Simplify definition.
144 * testsuite/20_util/bind/91371.cc: New test.
145 * testsuite/20_util/is_function/91371.cc: New test.
146 * testsuite/20_util/is_function/value.cc: Check more pointer types.
147 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
148 * testsuite/20_util/is_object/91371.cc: New test.
150 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
152 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
154 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
157 * include/bits/std_function.h (__check_func_return_type): Remove.
158 (function::_Callable): Use std::__is_invocable_impl instead of
159 __check_func_return_type.
160 * include/std/type_traits (__is_invocable_impl): Add another defaulted
161 template parameter. Define a separate partial specialization for
162 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
163 with a check that models delayed temporary materialization.
164 * testsuite/20_util/function/91456.cc: New test.
165 * testsuite/20_util/is_invocable/91456.cc: New test.
167 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
169 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
171 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
173 Implement C++20 p0879 - Constexpr for swap and swap related functions.
174 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
175 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
177 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
178 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
179 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
180 * include/bits/move.h (swap): Add constexpr.
181 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
182 (__gcd, __rotate, rotate, __partition, __heap_select)
183 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
184 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
185 (__introselect, __chunk_insertion_sort, next_permutation)
186 (prev_permutation, partition, partial_sort, nth_element, sort)
187 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
188 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
189 (swap_ranges): Add constexpr.
190 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
191 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
193 * include/std/type_traits (swap): Add constexpr.
194 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
195 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
196 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
197 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
198 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
199 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
200 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
201 * testsuite/25_algorithms/partition/constexpr.cc: New test.
202 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
203 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
204 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
205 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
206 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
207 * testsuite/25_algorithms/sort/constexpr.cc: New test.
208 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
209 * testsuite/25_algorithms/swap/constexpr.cc: New test.
210 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
212 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
215 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
217 * include/std/tuple (__unpack_std_tuple): New variable template and
218 partial specializations.
219 (apply, make_from_tuple): Add noexcept-specifier.
220 * testsuite/20_util/tuple/apply/2.cc: New test.
221 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
223 2019-08-09 Corentin Gay <gay@adacore.com>
225 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
226 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
227 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
228 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
229 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
230 Add call to `VERIFY`.
232 2019-08-09 Alexandre Oliva <oliva@adacore.com>
235 (normal_mv_distribution::param_type::param_type): New private
236 ctor taking a decomposed varcov matrix, for use by...
237 (operator>>): ... this, befriended.
238 * include/ext/random.tcc (operator>>): Use it.
239 (normal_mv_distribution::param_type::_M_init_lower): Adjust
240 member function name in exception message.
242 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
244 P0325R4 to_array from LFTS with updates
245 * include/experimental/array (to_array): Qualify call to __to_array.
246 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
247 * include/std/version (__cpp_lib_to_array): Likewise.
248 * testsuite/23_containers/array/creation/1.cc: New test.
249 * testsuite/23_containers/array/creation/2.cc: New test.
250 * testsuite/23_containers/array/creation/3_neg.cc: New test.
251 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
252 Use zero for dg-error line number.
254 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
256 P1651R0 bind_front should not unwrap reference_wrapper
257 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
258 * include/std/version (__cpp_lib_bind_front): Update value.
259 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
261 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
263 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
264 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
265 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
266 specializations for __float128.
267 * testsuite/26_numerics/numbers/float128.cc: New test.
269 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
271 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
274 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
276 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
277 in <algorithm> and <utility> Headers.
278 Implement C++20 p1023 - constexpr comparison operators for std::array.
279 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
280 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
281 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
282 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
283 none_of, partition_copy, partition_point, remove, remove_if,
284 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
285 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
286 count_if, equal, find, find_first_of, find_if, for_each, generate,
287 generate_n, lexicographical_compare, merge, mismatch, replace,
288 replace_if, search, search_n, set_difference, set_intersection,
289 set_symmetric_difference, set_union, transform, unique_copy):
291 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
292 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
293 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
294 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
295 Use const ref instead of ref arg;
296 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
297 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
298 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
299 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
300 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
301 __iter_comp_iter): Mark constexpr.
302 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
303 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
304 none_of, any_of, find_if_not, is_partitioned, partition_point,
305 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
306 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
307 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
308 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
309 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
310 __equal_range, equal_range, binary_search, __includes, includes,
311 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
312 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
313 is_sorted_until, __is_permutation, is_permutation, for_each, find,
314 find_if, find_first_of, adjacent_find, count, count_if, search,
315 search_n, transform, replace, replace_if, generate, generate_n,
316 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
317 set_intersection, __set_difference, set_difference,
318 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
319 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
320 wrappers around __builtin_memmove and __builtin_memcmp
322 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
323 copy, move, __copy_move_b, __copy_move_backward_a,
324 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
325 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
326 __lexicographical_compare_impl, __lexicographical_compare,
327 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
328 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
329 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
330 is_heap): Mark constexpr.
331 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
332 is_heap): Mark constexpr.
333 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
334 * include/std/array: Make comparison ops constexpr.
335 * include/std/utility: Make exchange constexpr.
336 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
337 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
338 * testsuite/23_containers/array/tuple_interface/
339 tuple_element_neg.cc: Adjust.
340 * testsuite/20_util/exchange/constexpr.cc: New.
341 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
342 * testsuite/25_algorithms/constexpr_macro.cc: New.
343 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
344 * testsuite/25_algorithms/all_of/constexpr.cc: New.
345 * testsuite/25_algorithms/any_of/constexpr.cc: New.
346 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
347 * testsuite/25_algorithms/copy/constexpr.cc: New.
348 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
349 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
350 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
351 * testsuite/25_algorithms/count/constexpr.cc: New.
352 * testsuite/25_algorithms/count_if/constexpr.cc: New.
353 * testsuite/25_algorithms/equal/constexpr.cc: New.
354 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
355 * testsuite/25_algorithms/fill/constexpr.cc: New.
356 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
357 * testsuite/25_algorithms/find/constexpr.cc: New.
358 * testsuite/25_algorithms/find_end/constexpr.cc: New.
359 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
360 * testsuite/25_algorithms/find_if/constexpr.cc: New.
361 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
362 * testsuite/25_algorithms/for_each/constexpr.cc: New.
363 * testsuite/25_algorithms/generate/constexpr.cc: New.
364 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
365 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
366 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
367 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
368 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
369 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
370 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
371 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
372 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
373 * testsuite/25_algorithms/merge/constexpr.cc: New.
374 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
375 * testsuite/25_algorithms/none_of/constexpr.cc: New.
376 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
377 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
378 * testsuite/25_algorithms/remove/constexpr.cc: New.
379 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
380 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
381 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
382 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
383 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
384 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
385 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
386 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
387 * testsuite/25_algorithms/search/constexpr.cc: New.
388 * testsuite/25_algorithms/search_n/constexpr.cc: New.
389 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
390 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
391 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
392 * testsuite/25_algorithms/set_union/constexpr.cc: New.
393 * testsuite/25_algorithms/transform/constexpr.cc: New.
394 * testsuite/25_algorithms/unique/constexpr.cc: New.
395 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
396 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
398 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
400 * include/std/memory (make_obj_using_allocator): Qualify call to
401 uses_allocator_construction_args.
403 P0631R4 Math Constants
404 * include/Makefile.am: Add new header.
405 * include/Makefile.in: Regenerate.
406 * include/precompiled/stdc++.h: Include new header.
407 * include/std/numbers: New header.
408 * include/std/version (__cpp_lib_math_constants): Define.
409 * testsuite/26_numerics/numbers/1.cc: New test.
410 * testsuite/26_numerics/numbers/2.cc: New test.
411 * testsuite/26_numerics/numbers/3.cc: New test.
412 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
414 * include/std/bit: Add Doxygen comments.
417 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
418 constraints on deleter that should only apply to the constructor.
419 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
420 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
421 constraints on deleter here.
422 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
424 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
427 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
429 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
431 * testsuite/18_support/51333.cc: New test.
433 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
435 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
436 to the Doxygen manual. Avoid a "here" link on the way.
437 Fix another broken link to Doxygen docblocks.
439 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
441 * include/std/bit (__cpp_lib_endian): Define.
442 * include/std/version (__cpp_lib_endian): Define.
443 * testsuite/26_numerics/endian/2.cc: New.
444 * testsuite/26_numerics/endian/3.cc: New.
445 * testsuite/26_numerics/endian/4.cc: New.
447 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
449 * testsuite/util/testsuite_iterators.h
450 (bidirectional_iterator_wrapper): Fix type comment.
451 (random_access_iterator_wrapper): Likewise.
453 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
455 * include/std/bit (endian): Move definition here as per P1612R1.
456 * include/std/type_traits (endian): Remove definition from here.
457 * testsuite/20_util/endian/1.cc: Rename to ...
458 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
460 2019-07-25 Martin Liska <mliska@suse.cz>
461 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
464 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
466 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
467 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
468 * testsuite/ext/new_allocator/check_new.cc: Likewise.
470 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
472 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
473 * testsuite/26_numerics/bit/bit.count/*: Here.
475 * include/std/bit (__rotl, __rotr): Change second parameter from
476 unsigned int to int and handle negative values.
477 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
478 parameter from unsigned int to int. Add nodiscard attribute.
479 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
480 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
482 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
483 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
486 * include/std/bit (__ceil2): Make unrepresentable results undefined,
487 as per P1355R2. Add debug assertion. Perform one left shift, not two,
488 so that out of range values cause undefined behaviour. Ensure that
489 shift will still be undefined if left operand is promoted.
490 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
491 unrepresentable values with checks that they are not core constant
493 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
495 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
497 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
498 sized deallocation size computation.
500 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
502 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
504 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
506 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
507 (~_Temporary_buffer()): Use latter.
508 (_Temporary_buffer(_FIterator, size_type)): Likewise.
510 2019-07-17 Andreas Schwab <schwab@suse.de>
512 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
514 2019-07-16 Jason Merrill <jason@redhat.com>
516 * include/std/memory (uses_allocator_construction_args): Add parens
519 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
521 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
523 * include/experimental/string_view (__detail::__idt): Remove.
524 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
525 Use __type_identity_t instead of __detail::__idt;
526 * include/std/string_view (__detail::__idt): Remove.
527 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
528 Use __type_identity_t instead of __detail::__idt;
529 * include/std/type_traits (__type_identity_t): New alias template.
531 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
532 and floating point atomics.
534 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
536 * doc/xml/manual/configure.xml: Improve documentation of
537 --enable-libstdcxx-time option.
539 * include/bits/atomic_base.h (__atomic_impl): New namespace for
540 wrappers around atomic built-ins.
541 (__atomic_float, __atomic_ref): New class templates for use as base
543 * include/std/atomic (atomic<float>, atomic<double>)
544 (atomic<long double>): New explicit specializations.
545 (atomic_ref): New class template.
546 (__cpp_lib_atomic_ref): Define.
547 * include/std/version (__cpp_lib_atomic_ref): Define.
548 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
549 * testsuite/29_atomics/atomic_float/1.cc: New test.
550 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
551 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
552 * testsuite/29_atomics/atomic_ref/float.cc: New test.
553 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
554 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
555 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
556 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
558 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
560 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
561 throw() with _GLIBCXX_NOTHROW.
562 (__atomic_add_dispatch): Return after performing atomic increment.
564 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
566 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
567 (__exchange_and_add): Replace static specifier with always_inline
569 (__exchange_and_add_single, __atomic_add_single): Likewise.
570 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
571 combine !__gthread_active_p() and !__GTHREADS branches.
573 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
576 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
577 * configure: Regenerate.
578 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
580 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
581 * testsuite/util/testsuite_abi.cc: Add new symbol version.
583 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
585 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
586 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
587 instead of __is_identifier to detect Clang support.
589 2019-07-02 Jim Wilson <jimw@sifive.com>
591 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
593 * configure: Regenerate.
595 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
598 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
599 for the what_arg parameters.
600 (filesystem_error::filesystem_error): Pass system_error::what() to
601 the _Impl constructor.
602 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
603 filesystem_error::what() contains system_error::what().
605 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
607 * include/std/charconv (chars_format): Define bitmask type.
608 * testsuite/20_util/to_chars/chars_format.cc: New test.
610 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
611 * include/std/bit (_If_is_unsigned_integer_type): Remove.
612 (_If_is_unsigned_integer): Use __is_unsigned_integer.
613 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
614 (countl_one(byte), countr_zero(byte), countr_one(byte))
615 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
616 (log2p1(byte)): Remove.
617 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
618 (__detail::__is_int_to_chars_type): Remove.
619 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
620 and __is_unsigned_integer.
621 * include/std/type_traits (__is_one_of): Move here from <charconv>.
622 (__is_signed_integer, __is_unsigned_integer): New helpers.
623 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
625 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
626 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
627 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
628 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
629 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
630 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
631 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
632 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
633 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
634 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
636 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
638 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
641 2019-06-25 Jakub Jelinek <jakub@redhat.com>
643 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
644 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
645 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
646 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
648 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
650 * include/std/numeric (midpoint(T, T)): Change implementation for
651 floating-point types to avoid incorrect rounding of denormals.
652 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
653 rounding with denormals.
654 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
655 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
657 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
659 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
661 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
663 * configure: Regenerate.
665 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
666 Qualify calls to __never_valueless.
668 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
671 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
672 vector<bool> for test.
673 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
675 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
677 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
679 (istream_iterator::_M_read()): Do not check stream state before
680 attempting extraction. Set stream pointer to null when extraction
682 (operator==(const istream_iterator&, const istream_iterator&)): Change
683 to be a hidden friend of istream_iterator.
684 (operator!=(const istream_iterator&, const istream_iterator&)):
686 (ostream_iterator::ostream_iterator()): Add default constructor.
687 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
689 * testsuite/24_iterators/istream_iterator/1.cc: New test.
690 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
691 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
692 constructor taking a string.
693 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
696 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
697 Jonathan Wakely <jwakely@redhat.com>
700 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
701 values of type bool for vector<bool> elements.
702 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
703 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
705 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
707 PR libstdc++/90920 partially revert r263433
708 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
709 (rotate): Remove checks.
710 * testsuite/25_algorithms/rotate/90920.cc: New test.
712 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
713 category used in invocable check.
714 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
715 * testsuite/26_numerics/reduce/2.cc: New test.
717 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
719 * include/bits/algorithmfwd.h: Change title of doc group.
720 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
722 * include/bits/stl_numeric.h: Define doc group and add algos to it.
723 * include/std/numeric (__is_random_access_iter): New internal trait.
724 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
725 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
726 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
727 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
728 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
729 * testsuite/26_numerics/reduce/1.cc: New test.
730 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
731 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
732 * testsuite/26_numerics/transform_reduce/1.cc: New test.
733 * testsuite/util/testsuite_iterators.h (test_container::size()): New
736 * include/c_global/cstddef (std::byte): Perform arithmetic operations
737 in unsigned int to avoid promotion (LWG 2950).
739 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
741 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
744 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
746 PR libstdc++/90281 Fix string conversions for filesystem::path
747 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
748 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
749 __str_codecvt_in_all to fail for partial conversions and throw on
751 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
752 (path::_Cvt<char8_t>): Add explicit specialization.
753 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
755 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
756 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
757 instead of codecvt_utf8. Use __str_codecvt_in_all and
758 __str_codecvt_out_all.
759 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
760 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
761 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
762 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
763 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
764 after converting to UTF-8.
765 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
766 __str_codecvt_in_all.
767 (path::string): Fix initialization of string types with different
769 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
770 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
771 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
773 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
774 return false for partial conversions.
775 * include/experimental/bits/fs_path.h (u8path):
776 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
777 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
778 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
779 instead of codecvt_utf8. Use __str_codecvt_in_all and
780 __str_codecvt_out_all.
781 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
782 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
783 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
784 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
785 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
786 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
787 __str_codecvt_in_all.
788 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
789 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
790 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
791 __str_codecvt_in_all.
792 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
793 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
794 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
795 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
796 strings and with Unicode characters outside the basic multilingual
798 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
799 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
800 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
801 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
802 * testsuite/experimental/filesystem/path/native/string.cc: Test with
803 empty strings and with Unicode characters outside the basic
806 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
807 Jonathan Wakely <jwakely@redhat.com>
809 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
810 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
811 deallocate node if insertion fails.
812 (_Hashtable::_M_insert_multi_node): Likewise.
813 (_Hashtable::_M_reinsert_node): Pass additional key argument.
814 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
815 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
816 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
817 (_Hashtable::extract(const _Key&)): Likewise.
818 (_Hashtable::_M_merge_unique): Pass additional key argument.
819 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
821 (_Hashtable::_M_insert): Likewise.
822 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
823 (_Hashtable_alloc): Add comments to functions with misleading names.
825 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
827 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
829 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
830 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
831 header for std::allocator.
832 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
833 using-declaration for std::size_t.
834 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
836 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
838 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
839 * testsuite/experimental/map/erasure.cc: Include <string> for
841 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
843 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
845 * include/experimental/type_traits (experimental::nonesuch): Use
846 pragma to disable -Wctor-dtor-privacy warnings.
847 * include/std/type_traits (__is_convertible_helper<From, To, false>)
848 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
850 * include/std/version (__cpp_lib_bind_front): Add missing macro.
852 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
854 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
855 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
856 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
857 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
859 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
860 (variant::emplace): Change static_assert messages from "should be"
862 (hash<monostate>::operator()): Remove name of unused parameter.
864 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
867 * include/Makefile.am: Add new <bits/charconv.h> header.
868 * include/Makefile.in: Regenerate.
869 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
870 (to_string(long), to_string(unsigned long), to_string(long long))
871 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
872 * include/bits/charconv.h: New header.
873 (__detail::__to_chars_len): Move here from <charconv>.
874 (__detail::__to_chars_10_impl): New function extracted from
875 __detail::__to_chars_10.
876 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
877 (__to_chars_unsigned_type): New class template that reuses
878 __make_unsigned_selector_base::__select to pick a type.
879 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
880 (__detail::__to_chars_len): Move to new header.
881 (__detail::__to_chars_10): Add inline specifier. Move code doing the
882 output to __detail::__to_chars_10_impl and call that.
883 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
884 * testsuite/21_strings/basic_string/numeric_conversions/char/
885 to_string.cc: Fix reference in comment. Remove unused variable.
886 * testsuite/21_strings/basic_string/numeric_conversions/char/
887 to_string_int.cc: New test.
889 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
891 Fix ConstexprIterator requirements tests - No constexpr algorithms!
892 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
893 Replace copy with hand-rolled loop.
894 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
897 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
899 Test for C++20 p0858 - ConstexprIterator requirements.
900 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
902 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
905 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
907 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
909 * include/bits/c++config: Rename all macros of the form __PSTL* to
911 * include/std/algorithm: Likewise.
912 * include/std/execution: Likewise.
913 * include/std/numeric: Likewise.
914 * include/std/memory: Likewise.
915 * include/pstl/glue_memory_impl.h: Likewise.
916 * include/pstl/numeric_impl.h: Likewise.
917 * include/pstl/glue_memory_defs.h: Likewise.
918 * include/pstl/execution_defs.h: Likewise.
919 * include/pstl/utils.h: Likewise.
920 * include/pstl/algorithm_fwd.h: Likewise.
921 * include/pstl/unseq_backend_simd.h: Likewise.
922 * include/pstl/glue_execution_defs.h: Likewise.
923 * include/pstl/algorithm_impl.h: Likewise.
924 * include/pstl/parallel_impl.h: Likewise.
925 * include/pstl/memory_impl.h: Likewise.
926 * include/pstl/glue_numeric_defs.h: Likewise.
927 * include/pstl/parallel_backend_utils.h: Likewise.
928 * include/pstl/glue_algorithm_defs.h: Likewise.
929 * include/pstl/parallel_backend.h: Likewise.
930 * include/pstl/glue_numeric_impl.h: Likewise.
931 * include/pstl/parallel_backend_tbb.h: Likewise.
932 * include/pstl/numeric_fwd.h: Likewise.
933 * include/pstl/glue_algorithm_impl.h: Likewise.
934 * include/pstl/execution_impl.h: Likewise.
935 * include/pstl/pstl_config.h: Likewise.
936 * testsuite/util/pstl/pstl_test_config.h: Likewise.
937 * testsuite/util/pstl/test_utils.h: Likewise.
938 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
940 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
942 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
944 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
945 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
946 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
947 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
948 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
950 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
951 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
952 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
953 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
954 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
956 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
957 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
958 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
959 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
960 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
962 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
963 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
964 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
966 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
968 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
969 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
970 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
972 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
974 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
976 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
978 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
980 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
982 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
984 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
986 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
988 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
990 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
992 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
994 Rename header guards to be consistent with upstream project's
996 * include/pstl/glue_memory_impl.h: Rename all macros of the form
997 _PSTL_(.*)_H to _PSTL_\U\1_H.
998 * include/pstl/numeric_impl.h: Likewise.
999 * include/pstl/glue_memory_defs.h: Likewise.
1000 * include/pstl/execution_defs.h: Likewise.
1001 * include/pstl/utils.h: Likewise.
1002 * include/pstl/algorithm_fwd.h: Likewise.
1003 * include/pstl/unseq_backend_simd.h: Likewise.
1004 * include/pstl/glue_execution_defs.h: Likewise.
1005 * include/pstl/algorithm_impl.h: Likewise.
1006 * include/pstl/parallel_impl.h: Likewise.
1007 * include/pstl/memory_impl.h: Likewise.
1008 * include/pstl/glue_numeric_defs.h: Likewise.
1009 * include/pstl/parallel_backend_utils.h: Likewise.
1010 * include/pstl/glue_algorithm_defs.h: Likewise.
1011 * include/pstl/parallel_backend.h: Likewise.
1012 * include/pstl/glue_numeric_impl.h: Likewise.
1013 * include/pstl/parallel_backend_tbb.h: Likewise.
1014 * include/pstl/numeric_fwd.h: Likewise.
1015 * include/pstl/glue_algorithm_impl.h: Likewise.
1016 * include/pstl/execution_impl.h: Likewise.
1017 * include/pstl/pstl_config.h: Likewise.
1018 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1020 Synchronize libstdc++ parallel algorithms with upstream
1022 * include/pstl/algorithm_fwd.h: Synchronize with
1023 upstream PSTL project.
1024 * include/pstl/algorithm_impl.h: Likewise.
1025 * include/pstl/execution_defs.h: Likewise.
1026 * include/pstl/execution_impl.h: Likewise.
1027 * include/pstl/glue_algorithm_impl.h: Likewise.
1028 * include/pstl/glue_execution_defs.h: Likewise.
1029 * include/pstl/numeric_fwd.h: Likewise.
1030 * include/pstl/numeric_impl.h: Likewise.
1031 * include/pstl/parallel_backend.h: Likewise.
1032 * include/pstl/pstl_config.h: Likewise.
1033 * include/pstl/unseq_backend_simd.h: Likewise.
1034 * include/pstl/parallel_backend_serial.h: New file.
1035 * include/Makefile.am (pstl_headers): Add
1036 parallel_backend_serial.h.
1037 * include/Makefile.in: Regenerate.
1039 Clean up non-conforming names
1040 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1041 Uglfiy copy_range1 and copy_range2
1042 (__pattern_walk2_n): Rename local n to __n
1043 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1044 Rename parameter _T to _Tp.
1046 Integrate non-TBB serial backend support
1047 * include/bits/c++config: Adjust TBB detection logic to select serial
1048 PSTL backend if no TBB present.
1049 * testsuite/utils/pstl/test_utils.h: Remove check for
1050 _PSTL_USE_PAR_POLICIES
1052 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1054 * testsuite/24_iterators/container_access.cc: Move dg-options before
1055 dg-do directive so the target check uses the -std option.
1058 * configure: Regenerate.
1059 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1060 * src/Makefile.in: Regenerate.
1062 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1064 * include/std/array: Do not include <stdexcept>.
1065 * include/std/optional: Include <exception> and
1066 <bits/exception_defines.h> instead of <stdexcept>.
1067 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1069 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1071 * testsuite/23_containers/map/erasure.cc: Include <string>.
1072 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1074 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1075 dg-prune-output for different C++98 diagnostic.
1076 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1078 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1080 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1082 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1084 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1086 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1088 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1090 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1092 * testsuite/23_containers/vector/requirements/dr438/
1093 constructor_1_neg.cc: Likewise.
1094 * testsuite/23_containers/vector/requirements/dr438/
1095 constructor_2_neg.cc: Likewise.
1096 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1098 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1100 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1101 Do not test allocator rebinding extension for C++2a.
1102 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1103 dg-do directive for C++17 and C++2a.
1105 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1106 1_c++0x.cc: Remove redundant test.
1107 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1108 2.cc: Use target selector instead of preprocessor condition.
1109 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1110 3.cc: Do not run test for C++2a.
1111 * testsuite/23_containers/forward_list/requirements/
1112 explicit_instantiation/3.cc: Likewise.
1113 * testsuite/23_containers/forward_list/requirements/
1114 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1116 * testsuite/23_containers/list/requirements/explicit_instantiation/
1117 1_c++0x.cc: Remove redundant test.
1118 * testsuite/23_containers/list/requirements/explicit_instantiation/
1119 2.cc: Use target selector instead of preprocessor condition.
1120 * testsuite/23_containers/list/requirements/explicit_instantiation/
1121 3.cc: Do not run test for C++2a.
1122 * testsuite/23_containers/list/requirements/explicit_instantiation/
1123 5.cc: Do not test allocator rebinding extension for C++2a.
1124 * testsuite/23_containers/map/requirements/explicit_instantiation/
1125 1_c++0x.cc: Remove redundant test.
1126 * testsuite/23_containers/map/requirements/explicit_instantiation/
1127 2.cc: Adjust comment.
1128 * testsuite/23_containers/map/requirements/explicit_instantiation/
1129 3.cc: Do not run test for C++2a.
1130 * testsuite/23_containers/map/requirements/explicit_instantiation/
1131 5.cc: Do not test allocator rebinding extension for C++2a.
1132 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1133 1_c++0x.cc: Remove redundant test.
1134 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1135 3.cc: Do not run test for C++2a.
1136 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1137 5.cc: Do not test allocator rebinding extension for C++2a.
1138 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1139 3.cc: Do not run test for C++2a.
1140 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1141 5.cc: Do not test allocator rebinding extension for C++2a.
1142 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1143 Do not run test for C++2a.
1144 * testsuite/23_containers/set/requirements/explicit_instantiation/
1145 1_c++0x.cc: Remove redundant test.
1146 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1147 Do not test allocator rebinding extension for C++2a.
1148 * testsuite/23_containers/unordered_map/requirements/
1149 explicit_instantiation/3.cc: Likewise.
1150 * testsuite/23_containers/unordered_map/requirements/
1151 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1153 * testsuite/23_containers/unordered_multimap/requirements/
1154 explicit_instantiation/3.cc: Do not run test for C++2a.
1155 * testsuite/23_containers/unordered_multimap/requirements/
1156 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1158 * testsuite/23_containers/unordered_multiset/requirements/
1159 explicit_instantiation/3.cc: Do not run test for C++2a.
1160 * testsuite/23_containers/unordered_multiset/requirements/
1161 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1163 * testsuite/23_containers/unordered_set/requirements/
1164 explicit_instantiation/3.cc: Do not run test for C++2a.
1165 * testsuite/23_containers/unordered_set/requirements/
1166 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1168 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1169 2.cc: Remove redundant test.
1170 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1171 3.cc: Do not run test for C++2a.
1172 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1175 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1176 (is_abstract, is_aggregate): Remove static_assert.
1177 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1179 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1180 missing -std=gnu++17 option.
1181 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1182 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1183 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1186 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1187 * testsuite/18_support/set_unexpected.cc: Likewise.
1188 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1190 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1191 function to be valid in C++11.
1192 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1193 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1194 include Library Fundamentals or Networking headers in C++11 mode.
1195 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1197 * include/std/tuple (_TC): Replace with _TupleConstraints.
1198 (_TupleConstraints): New helper for SFINAE constraints, with more
1199 expressive member functions to reduce duplication when used.
1200 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1201 (tuple::_TCC): Replace dummy type parameter with bool non-type
1202 parameter that can be used to check the pack size.
1203 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1204 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1205 checking constraints in constructors.
1206 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1208 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1209 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1210 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1211 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1212 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1213 constraints in constructors.
1214 (tuple::__is_alloc_arg()): New SFINAE helpers.
1215 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1217 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1218 * testsuite/20_util/tuple/cons/90700.cc: New test.
1219 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1220 to meet new constraint on allocator-extended default constructor.
1222 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1224 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1225 * include/bits/stl_multimap.h (multimap): Likewise.
1227 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1229 Rename variables and cleanup comments.
1230 * include/bits/hashtable_policy.h
1231 * include/bits/hashtable.h
1233 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1235 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1236 Fix bgcolor for P0340R3.
1237 * doc/html/*: Regenerate.
1240 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1241 <experimental/memory_resource>.
1242 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1243 P0339R6, P0340R3, P1164R1 and P1357R1.
1244 * doc/html/*: Regenerate.
1246 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1247 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1248 allocator::value_type assertion for C++2a.
1249 * include/bits/hashtable.h: Likewise.
1250 * include/bits/stl_deque.h: Likewise.
1251 * include/bits/stl_list.h: Likewise.
1252 * include/bits/stl_map.h: Likewise.
1253 * include/bits/stl_multimap.h: Likewise.
1254 * include/bits/stl_multiset.h: Likewise.
1255 * include/bits/stl_set.h: Likewise.
1256 * include/bits/stl_vector.h: Likewise.
1257 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1258 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1259 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1260 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1261 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1262 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1263 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1264 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1265 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1266 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1267 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1268 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1270 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1272 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1274 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1276 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1278 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1280 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1282 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1284 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1287 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1288 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1289 * libsupc++/eh_term_handler.h: New header defining
1290 _GLIBCXX_DEFAULT_TERM_HANDLER.
1291 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1292 (set_terminate): Restore default handler when argument is null.
1293 (set_unexpected): Likewise.
1294 * testsuite/18_support/set_terminate.cc: New test.
1295 * testsuite/18_support/set_unexpected.cc: New test.
1297 * include/backward/hashtable.h (size_t, ptrdiff_t)
1298 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1299 (distance, vector, pair, __iterator_category): Remove
1300 using-declarations that add these names to namespace __gnu_cxx.
1301 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1302 * include/ext/debug_allocator.h (size_t): Likewise.
1303 * include/ext/functional (size_t, unary_function, binary_function)
1304 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1306 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1307 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1308 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1309 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1310 * include/ext/numeric (iota): Fix outdated comment.
1311 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1312 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1313 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1314 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1315 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1317 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1318 (allocator, __true_type, __false_type): Likewise.
1320 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1323 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1324 New helpers for checking preconditions in traits.
1325 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1326 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1327 (is_destructible, is_nothrow_destructible, is_constructible)
1328 (is_default_constructible, is_copy_constructible)
1329 (is_move_constructible, is_nothrow_default_constructible)
1330 (is_nothrow_constructible, is_nothrow_copy_constructible)
1331 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1332 (is_nothrow_assignable, is_nothrow_copy_assignable)
1333 (is_nothrow_move_assignable, is_trivially_constructible)
1334 (is_trivially_copy_constructible, is_trivially_move_constructible)
1335 is_trivially_assignable, is_trivially_copy_assignable)
1336 (is_trivially_move_assignable, is_trivially_destructible)
1337 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1338 (is_invocable_r, is_nothrow_invocable)
1339 (has_unique_object_representations, is_aggregate): Add static_asserts
1340 to make sure that type traits are not misused with incomplete types.
1341 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1342 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1343 base characteristics without assertions that can be reused in other
1345 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1346 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1348 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1349 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1350 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1351 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1352 * testsuite/20_util/is_function/value.cc: Likewise.
1353 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1354 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1356 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1357 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1358 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1359 * testsuite/20_util/is_union/value.cc: Likewise.
1360 * testsuite/20_util/is_void/value.cc: Likewise.
1361 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1363 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1365 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1366 Add new private member function.
1367 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1368 (random_device::_M_init_pretr1(const string&)): Call new private
1369 member with string data.
1370 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1372 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1373 test using COW strings.
1374 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1375 a value from the device.
1376 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1377 Fix typo in token string.
1379 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1381 LWG2788 basic_string spurious use of a default constructible allocator
1382 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1383 (basic_string::_M_replace_dispatch): Construct temporary string with
1384 the current allocator.
1385 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1386 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1388 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1390 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1392 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1393 section about new/delete overloads. Improve section on verbose
1395 * doc/html/*: Regenerate.
1397 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1398 P0811R3. Change status of P1353R0.
1399 * doc/html/*: Regenerate.
1401 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1402 documentation of implementation-defined types for [thread.req.native].
1403 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1404 implementation-defined strings for [variant.bad.access]. Fix typo in
1405 documentation of implementation-defined support for [fs.conform.9945].
1406 * doc/html/*: Regenerate.
1408 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1411 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1412 that fails on mingw-w64.
1415 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1416 (status(const path&, error_code&)): Use parent_path() to remove
1418 (symlink_status(const path&, error_code&)): Duplicate workaround for
1419 bug in _wstat for paths with trailing slash.
1420 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1421 with trailing slash.
1422 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1423 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1425 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1426 once instead of building it iteratively.
1428 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1430 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1431 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1432 the assembler supports rdseed.
1433 * config.h.in: Regenerate.
1434 * configure: Regenerate.
1435 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1436 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1437 * doc/html/*: Regenerate.
1438 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1439 * include/bits/random.h (random_device::random_device()): Always call
1440 _M_init rather than _M_init_pretr1.
1441 (random_device::random_device(const string&)): Likewise.
1442 (random_device::operator()()): Always call _M_getval().
1443 (random_device::_M_file): Replace first member of union with an
1444 anonymous struct, with _M_file as its first member.
1445 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1446 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1447 (USE_MT19937): Define if none of the above are defined.
1448 (USE_POSIX_FILE_IO): Define.
1449 (_M_strtoul): Remove.
1450 [USE_RDSEED] (__x86_rdseed): Define new function.
1451 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1452 (random_device::_M_init(const string&)): Initialize new union members.
1453 Add support for "rdseed" and "rand_s" tokens. Decide what the
1454 "default" token does according to which USE_* macros are defined.
1455 [USE_POSIX_FILE_IO]: Store a file descriptor.
1456 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1457 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1458 code from _M_strtoul.
1459 [!USE_MT19937]: Call _M_init, transforming the old default token or
1460 numeric tokens to "default".
1461 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1462 (random_device::_M_getval()): Use new union members to obtain a
1463 random number from the stored function pointer or file descriptor.
1464 [USE_MT19937]: Obtain a value from the mt19937 engine.
1465 (random_device::_M_getval_pretr1()): Call _M_getval().
1466 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1468 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1469 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1471 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1474 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1475 _M_split_cmpts() for a path with multiple components.
1476 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1477 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1478 components and reserve space in vector. Return early when there is
1480 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1481 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1483 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1484 form of std::equals for C++11 compatibility.
1486 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1488 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1489 C++ standard at ansi.org.
1491 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1493 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1494 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1497 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1498 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1500 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1502 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1504 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1505 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1506 "compile" test to "run".
1508 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1509 * doc/html/*: Regenerate.
1510 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1511 rvalue aliasing constructor.
1512 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1513 (reinterpret_pointer_cast): Add overloads taking rvalues.
1514 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1515 Add rvalue aliasing constructor.
1516 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1517 "run" and check return values as well as types.
1518 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1519 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1520 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1521 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1524 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1525 * doc/xml/manual/intro.xml: Likewise.
1526 * include/std/future (__create_task_state): Add default arguments
1527 to make providing an allocator optional.
1528 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1529 instead of delegating to another constructor.
1530 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1531 define allocator-extended constructors for C++17 and later.
1532 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1534 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1535 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1536 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1538 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1540 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1541 Don't run the libstdc++/83237 part on simulator targets.
1543 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1545 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1547 * doc/html/*: Regenerate.
1549 * include/experimental/any (__any_caster): Use RTTI if comparing
1550 addresses fails, to support non-unique addresses in shared libraries.
1551 * include/std/any (__any_caster): Likewise.
1554 * include/experimental/any (__any_caster): Constrain to only be
1555 callable for object types. Use remove_cv_t instead of decay_t.
1556 If the type decays or isn't copy constructible, compare the manager
1557 function to a dummy specialization.
1558 (__any_caster): Add overload constrained for non-object types.
1559 (any::_Manager_internal<_Op>): Add dummy specialization.
1560 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1563 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1566 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1567 reversed arguments to uninitialized_copy_n.
1568 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1569 is unchanged by copy assignment.
1570 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1571 compare path components.
1574 * include/experimental/memory_resource: Add system header pragma and
1575 do not define anything unless compiled as C++14 or later.
1576 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1577 (__resource_adaptor_imp::do_allocate): If the requested alignment
1578 is a fundamental alignment then either allocate directly from _M_alloc
1579 or call the new _M_allocate function.
1580 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1581 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1582 of the allocator rebound to a POD type with the specified alignment.
1583 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1584 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1585 Adjust expected allocation sizes.
1586 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1587 xfail for Solaris x86.
1589 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1591 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1592 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1593 Use std::__remove_cvref_t when building with GCC.
1595 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1598 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1599 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1600 Use check_v3_target_prop_cached to cache the result of the test.
1602 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1604 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1607 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1608 Changed v3_target_compile check from preprocess to executable.
1609 Added "-ltbb" to v3_target_compile flags.
1611 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1613 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1614 Add check for Thread Building Blocks 2018 or later.
1616 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1618 * testsuite/experimental/names.cc: Only include Networking TS headers
1619 on targets with the necessary Gthreads support.
1621 2019-05-20 Marek Polacek <polacek@redhat.com>
1623 CWG 2094 - volatile scalars are trivially copyable.
1625 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1626 result for volatile int.
1628 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1630 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1631 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1634 PR c++/90532 Ensure __is_constructible(T[]) is false
1635 * include/std/type_traits (__do_is_default_constructible_impl)
1636 (__is_default_constructible_atom, __is_default_constructible_safe):
1638 (is_default_constructible): Use is_constructible.
1639 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1640 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1641 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1642 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1645 2019-05-20 Pádraig Brady <pbrady@fb.com>
1647 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1648 to the deallocator with -fsized-deallocation.
1650 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1652 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1653 test by passing correct alignment to deallocate function.
1655 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1658 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1659 Raise exception if unique_ptr tuple member has unknown structure.
1660 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1661 Adjust worker to support new __uniq_ptr_data base class. Do not
1662 assume field called _M_head_impl is the first tuple element.
1664 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1666 * include/bits/stl_deque.h
1667 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1668 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1669 (_Deque_base::_Deque_impl_data): New.
1670 (_Deque_base::_Deque_impl): Inherit latter.
1671 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1672 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1673 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1674 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1675 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1676 (deque<>::deque()): Default.
1677 (deque<>::deque(deque&&)): Default.
1678 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1679 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1680 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1681 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1682 _M_range_initialize.
1683 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1684 (deque<>::resize(size_type, const value_type&)): Share a single
1686 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1687 _M_range_insert_aux.
1688 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1689 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1690 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1691 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1693 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1696 * include/std/variant (holds_alternative, get, get_if): Improve
1697 static assertion messages.
1698 (bad_variant_access::bad_variant_access()): Change default message.
1699 (__throw_bad_variant_access(bool)): New overload.
1700 (get): Use new overload.
1701 (visit, visit<R>): Improve exception message.
1703 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1704 targets. Add more cases from P0608R3.
1705 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1707 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1708 * include/experimental/type_traits (is_detected_exact)
1709 (is_detected_exact_v): Likewise.
1710 * include/pstl/execution_defs.h (is_execution_policy)
1711 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1712 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1713 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1714 * testsuite/experimental/names.cc: New test.
1717 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1718 assertions from the destructor.
1719 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1720 Move static_assert for hash function to here.
1721 (_Hash_table_base::_M_equals): Move static_assert for equality
1723 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1725 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1726 the value directly instead of calling _S_value.
1727 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1728 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1729 _S_key(_Const_Link_type).
1730 * testsuite/23_containers/set/85965.cc: Check construction,
1731 destruction, assignment and size() do not trigger the assertions.
1732 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1733 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1735 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1736 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1737 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1738 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1739 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1740 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1741 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1743 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1744 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1747 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1749 * doc/html/*: Regenerate.
1750 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1751 of decay_t (P0777R1).
1753 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1755 Move from state of allocators (LWG2593)
1756 * include/bits/stl_deque.h
1757 (_Deque_base(_Deque_base&&, false_type)): Remove.
1758 (_Deque_base(_Deque_base&&, true_type)): Remove.
1759 (_Deque_base(_Deque_base&&)): Adapt.
1760 (_Deque_base::_M_move_impl()): Remove.
1761 * testsuite/util/testsuite_allocator.h
1762 (propagating_allocator(propagating_allocator&&)): Preserve move from
1764 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1766 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1768 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1769 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1770 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1772 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1774 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1775 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1777 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1779 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1781 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1783 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1785 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1787 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1789 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1792 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1794 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1795 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1797 * include/std/variant (__overload_set): Remove.
1799 (_Build_FUN): New class template to define a single FUN overload,
1800 with specializations to prevent unwanted conversions, as per P0608R3.
1801 (_Build_FUNs): New class template to build an overload set of FUN.
1802 (_FUN_type): New alias template to perform overload resolution.
1803 (__accepted_type): Use integer_constant base for failure case. Use
1804 _FUN_type for successful case.
1805 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1806 (variant::variant(_Tp&&)): Likewise.
1807 (variant::operator=(_Tp&&)): Likewise.
1809 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1810 Replace raw visitation with a runtime check for the valueless state
1811 and a non-raw visitor.
1812 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1813 (variant::index()): Remove branch.
1814 (variant::swap(variant&)): Use valueless_by_exception() instead of
1815 comparing the index to variant_npos, and add likelihood attribute.
1817 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1818 (_Hashtable_base::_Equal_hash_code): Define new class template.
1819 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1822 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1823 Replace with _M_get non-static member function.
1824 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1826 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1827 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1829 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1830 _S_get accessors for members in EBO helpers.
1831 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1832 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1834 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1836 (_Hashtable_base::_M_eq()): Remove non-const overload.
1838 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1840 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1842 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1844 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1847 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1849 * config/os/solaris/solaris2.10: Move to ...
1850 * config/os/solaris: ... this.
1851 * configure.host (os_include_dir): Adapt.
1852 (abi_baseline_pair): Remove Solaris 10 handling.
1853 * config/abi/post/i386-solaris2.10: Remove.
1854 * config/abi/post/sparc-solaris2.10: Remove.
1855 * config/abi/post/i386-solaris2.11: Rename to ...
1856 * config/abi/post/i386-solaris: ... this.
1857 * config/abi/post/sparc-solaris2.11: Rename to ...
1858 * config/abi/post/sparc-solaris: ... this.
1860 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1863 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1866 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1868 * include/std/variant (__visit_with_index): Remove typedef.
1869 (__deduce_visit_result): New tag type.
1870 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1871 visitation of possibly-valueless variants, forwarding to __do_visit
1872 with the relevant tag type.
1873 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1874 and make lambda return void.
1875 (__variant_construct): Likewise.
1876 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1877 __raw_idx_visit and make lambda return void.
1878 (_Multi_array::__untag_result): Add metafunction to check the function
1879 pointer type for a tag type that dictates the kind of visitation.
1880 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1881 Use decltype(auto) instead of tagged function pointer type.
1882 (__gen_vtable_impl): Remove bool non-type parameter and unused
1883 _Variant_tuple parameter.
1884 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1885 (__gen_vtable_impl::__do_visit_invoke): Remove.
1886 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1887 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1888 for the visit<R> case, rather than dispatching to separate functions.
1889 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1891 (variant::swap): Likewise.
1892 (__do_visit): Replace two non-type template parameters with a single
1893 type parameter, so that the caller must specify the visitor's return
1894 type (or one of the tag types).
1895 (visit): Deduce a return type from the visitor and use the
1896 __deduce_visit_result tag to enforce that all overloads return the
1898 (visit<R>): Call __do_visit<R> with explicit result type.
1899 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1902 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1904 nonesuch is insufficiently useless (lwg2996)
1905 * include/std/type_traits (struct __nonesuch): Added private base
1906 class to make __nonesuch not an aggregate and removed deleted default
1908 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1909 (operator=(const pair&)): Use __nonesuch instead of
1910 __nonesuch_no_braces.
1911 (operator=(pair&&)): Likewise
1912 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1913 of __nonesuch_no_braces.
1914 (operator=(tuple&&)): Likewise
1915 * include/experimental/type_traits (struct nonesuch): Added private
1916 base class to make nonesuch not an aggregate and removed deleted
1917 default constructor.
1918 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1919 * testsuite/experimental/type_traits/nonesuch.cc: New.
1921 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1923 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1924 (_Function_handler): Remove partial specializations for void return
1925 types and pointers to member.
1926 (_Function_handler::_M_manager): Adapt to removal of
1927 _Simple_type_wrapper.
1928 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1929 * include/std/functional (_Bind_result::__enable_if_void)
1930 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1931 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1933 * include/std/future (__future_base::_Task_state::_M_run)
1934 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1935 change return type of lambda expressions.
1937 * include/bits/invoke.h (__invoke_r): Define new function implementing
1938 the INVOKE<R> pseudo-function.
1939 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1940 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1942 * include/std/type_traits (__is_nt_convertible_helper): Define it
1943 unconditionally, not only for C++20.
1944 (__is_nothrow_convertible): Define internal trait for use in C++11.
1945 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1946 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1947 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1948 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1949 that has nothrow explicit conversion but potentially-throwing implicit
1951 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1952 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1953 function to only consider implicit conversions.
1954 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1956 * include/std/iterator: Include <iosfwd> instead of <istream> and
1959 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1960 Remove unused, non-standard function.
1962 * include/bits/regex.h (match_results::max_size()): Adjust return
1963 value to account for prefix/suffix/unmatched subs.
1964 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1965 reset the contained sub matches.
1966 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1967 function to set result state following a failed match.
1968 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1969 sub_match states after _M_resize. Use _M_establish_failed_match.
1972 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1973 Replace single _Callable parameter with variadic _Args pack, to
1974 forward them directly to the tuple of decayed copies.
1975 * testsuite/30_threads/thread/cons/69724.cc: New test.
1977 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1979 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
1980 * include/bits/basic_string.h: (operator=(const basic_string&):
1981 Move allocator decision to assign.
1982 (assign(const basic_string&)): Move allocator decision here.
1983 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1985 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1988 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1990 * testsuite/util/testsuite_allocator.h (memory_resource)
1991 (default_resource_mgr): Fix indentation.
1993 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
1994 Use operator-> to access raw pointer member.
1995 * testsuite/23_containers/vector/59829.cc: Likewise.
1996 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
1997 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
1998 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
2000 (PointerBase, PointerBase_void): Derive from NullablePointer and use
2001 its constructors and equality operators. Change converting
2002 constructors to use operator-> to access private member of the other
2004 (PointerBase_void::operator->()): Add, for access to private member.
2005 (operator-(PointerBase, PointerBase)): Change to hidden friend.
2006 (operator==(PointerBase, PointerBase)): Remove.
2007 (operator!=(PointerBase, PointerBase)): Remove.
2009 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
2010 not assume field called _M_head_impl is the first tuple element.
2011 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
2012 implementation more accurate.
2013 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
2014 empty pointer type and non-empty deleter.
2016 LWG 2899 - Make is_move_constructible correct for unique_ptr
2017 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
2018 move assignment operator.
2019 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
2020 (__uniq_ptr_data): New class template with conditionally deleted
2022 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
2023 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
2024 constructor and move assignment operator as defaulted.
2025 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
2026 __uniq_ptr_impl::release().
2027 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
2028 to __uniq_ptr_impl::reset(pointer).
2029 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2030 Check for new __uniq_ptr_data type.
2031 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
2033 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2035 PR libstdc++/90454.cc path construction from void*
2036 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2037 pointers to void are rejected as well as void.
2038 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2039 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2041 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2043 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2044 <remark> elements. Fix formatting of bibliography references.
2046 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2048 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2050 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2052 Remove Profile Mode, deprecated since 7.1.0
2053 * doc/Makefile.am: Remove XML file for profile mode docs.
2054 * doc/Makefile.in: Regenerate.
2055 * doc/xml/authors.xml: Remove authors of profile mode docs.
2056 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2058 * doc/xml/manual/debug.xml: Likewise.
2059 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2060 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2061 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2062 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2064 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2066 * doc/html/*: Regenerate.
2067 * include/Makefile.am: Remove profile mode headers.
2068 * include/Makefile.in: Regenerate.
2069 * include/bits/c++config (std::__profile): Remove namespace.
2070 [_GLIBCXX_PROFILE]: Remove checks for macro.
2071 * include/profile/array: Remove.
2072 * include/profile/base.h: Remove.
2073 * include/profile/bitset: Remove.
2074 * include/profile/deque: Remove.
2075 * include/profile/forward_list: Remove.
2076 * include/profile/impl/profiler.h: Remove.
2077 * include/profile/impl/profiler_algos.h: Remove.
2078 * include/profile/impl/profiler_container_size.h: Remove.
2079 * include/profile/impl/profiler_hash_func.h: Remove.
2080 * include/profile/impl/profiler_hashtable_size.h: Remove.
2081 * include/profile/impl/profiler_list_to_slist.h: Remove.
2082 * include/profile/impl/profiler_list_to_vector.h: Remove.
2083 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2084 * include/profile/impl/profiler_node.h: Remove.
2085 * include/profile/impl/profiler_state.h: Remove.
2086 * include/profile/impl/profiler_trace.h: Remove.
2087 * include/profile/impl/profiler_vector_size.h: Remove.
2088 * include/profile/impl/profiler_vector_to_list.h: Remove.
2089 * include/profile/iterator_tracker.h: Remove.
2090 * include/profile/list: Remove.
2091 * include/profile/map: Remove.
2092 * include/profile/map.h: Remove.
2093 * include/profile/multimap.h: Remove.
2094 * include/profile/multiset.h: Remove.
2095 * include/profile/ordered_base.h: Remove.
2096 * include/profile/set: Remove.
2097 * include/profile/set.h: Remove.
2098 * include/profile/unordered_base.h: Remove.
2099 * include/profile/unordered_map: Remove.
2100 * include/profile/unordered_set: Remove.
2101 * include/profile/vector: Remove.
2102 * scripts/run_doxygen: Do not process profile mode headers.
2103 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2105 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2106 Remove dg-skip-if for profile mode.
2107 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2108 preprocessor check for profile mode.
2109 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2110 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2112 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2114 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2115 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2116 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2117 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2118 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2120 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2122 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2124 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2126 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2127 preprocessor check for profile mode.
2128 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2130 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2131 Remove dg-skip-if for profile mode.
2132 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2133 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2134 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2135 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2136 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2137 * testsuite/Makefile.am: Remove profile_flags variable and
2138 * testsuite/Makefile.am: Remove profile_flags variable and
2139 check-profile target.
2140 * testsuite/Makefile.in: Regenerate.
2141 * testsuite/ext/profile/all.cc: Remove.
2142 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2143 * testsuite/ext/profile/profiler_algos.cc: Remove.
2144 * testsuite/ext/profile/replace_new.cc: Remove.
2145 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2146 preprocessor check for profile mode.
2147 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2148 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2149 (check_v3_target_normal_mode): Do not check for profile mode macro.
2150 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2152 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2153 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2154 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2155 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2156 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2157 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2158 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2159 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2160 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2161 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2163 Remove array_allocator extension, deprecated since 4.9.0
2164 * doc/xml/manual/allocator.xml: Remove documentation for
2166 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2167 * doc/xml/manual/using.xml: Remove header from documentation.
2168 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2169 * include/Makefile.in: Regenerate.
2170 * include/ext/array_allocator.h: Remove.
2171 * include/precompiled/extc++.h: Do not include removed header.
2172 * testsuite/ext/array_allocator/1.cc: Remove.
2173 * testsuite/ext/array_allocator/2.cc: Remove.
2174 * testsuite/ext/array_allocator/26875.cc: Remove.
2175 * testsuite/ext/array_allocator/3.cc: Remove.
2176 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2177 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2178 * testsuite/ext/array_allocator/check_new.cc: Remove.
2179 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2180 * testsuite/ext/headers.cc: Do not include removed header.
2182 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2184 * include/bits/stl_bvector.h
2185 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2187 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2189 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2191 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2193 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2195 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2197 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2199 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2201 (_Bit_iterator::operator-(difference_type)): Likewise.
2202 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2203 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2205 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2206 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2208 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2211 * testsuite/util/thread/all.h: Do not use remove_pointer for
2212 std::thread::native_handle_type.
2215 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2216 (_Variant_storage<true, Types...>::_M_reset()))
2217 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2218 (__get_storage): Likewise.
2219 (variant): Add noexcept to friend declarations for __get and
2223 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2224 Use _Require for constraints.
2225 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2227 (__uniq_ptr_hash): New base class with conditionally-disabled call
2229 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2230 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2231 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2233 * include/bits/shared_ptr.h: Improve docs.
2234 * include/bits/shared_ptr_base.h: Likewise.
2235 * include/bits/stl_uninitialized.h: Likewise.
2236 * include/bits/unique_ptr.h: Likewise.
2237 * libsupc++/new: Likewise.
2239 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2241 * include/bits/stl_deque.h
2242 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2244 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2246 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2248 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2250 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2252 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2254 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2256 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2258 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2261 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2262 (test01): Reserve for number of insertions to avoid rehash during test.
2263 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2265 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2270 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2272 * include/experimental/bits/fs_path.h: Improve docs.
2273 * include/experimental/bits/net.h: Fix wrong header name in comment.
2274 Do not document implementation details.
2275 * include/experimental/netfwd: Fix doxygen grouping.
2277 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2279 * include/bits/stl_pair.h: Improve docs.
2280 * include/std/tuple: Likewise.
2282 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2284 * include/std/chrono: Improve docs.
2285 * include/std/ratio: Do not document implementation details.
2286 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2288 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2291 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2292 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2293 (__duration_common_type): New helper.
2294 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2295 __duration_common_type.
2296 (__timepoint_common_type_wrapper): Replace with ...
2297 (__timepoint_common_type): New helper.
2298 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2299 Use __time_point_common_type.
2300 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2301 (__common_type_impl): If either argument is transformed by decay,
2302 use the common_type of the decayed types.
2303 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2304 decayed, use __do_common_type_impl to get the common_type.
2305 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2306 (__do_member_type_wrapper, __member_type_wrapper)
2307 (__expanded_common_type_wrapper): Remove.
2308 (__common_type_pack, __common_type_fold): New helpers.
2309 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2310 __member_type_wrapper and __expanded_common_type_wrapper.
2311 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2312 Test zero-length template argument list.
2313 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2314 Test single argument cases and argument types that should decay.
2315 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2316 Adjust expected error.
2317 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2319 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2320 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2321 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2323 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2325 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2327 Make allocator propagation more consistent for
2328 operator+(basic_string) (P1165R1)
2329 * include/bits/basic_string.h
2330 (operator+(basic_string&&, basic_string&&): Changed resulting
2331 allocator to always be the one from the first parameter.
2332 * include/bits/basic_string.tcc
2333 (operator+(const _CharT*, const basic_string&)): Changed
2334 resulting allocator to be SOCCC on the second parameter's allocator.
2335 (operator+(_CharT, const basic_string&)): Likewise.
2336 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2338 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2341 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2343 * include/bits/regex.h: Improve docs.
2344 * include/bits/regex.tcc: Do not document implementation details.
2346 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2348 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2350 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2351 Add type printer for container types in std::__debug namespace.
2352 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2353 (gdb-tests): Use distinct parameters for the type of test and use of
2355 (gdb-test): Check for regex test even if 'whatis' test.
2356 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2358 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2359 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2360 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2361 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2362 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2363 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2364 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2366 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2368 * include/std/system_error (error_category): Fix comment.
2371 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2372 argument is an empty path.
2373 (absolute(const path&, error_code&)): Use invalid_argument as error
2374 code instead of no_such_file_or_directory.
2375 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2376 of non-existent paths and empty paths with both overloads of absolute.
2378 * include/std/system_error (error_category, error_code)
2379 (error_condition): Improve docs.
2380 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2381 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2382 to class documentation. Suppress documentation for implementation
2384 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2385 Suppress documentation for implementation details.
2387 * include/std/system_error (error_code): Remove friend declaration
2388 for hash<error_code>.
2389 (hash<error_code>::operator()): Use public member functions to access
2391 (hash<error_condition>::operator()): Use address of category, not
2392 its object representation.
2393 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2394 Use public member functions to access value and category.
2395 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2397 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2399 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2400 * include/bits/hashtable_policy.h
2401 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2402 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2403 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2404 smaller than input value rather than always greater. Preserve
2405 _M_next_resize if called with 0 input. Use __builtin_floorl.
2406 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2407 elements + number of insertions is greater than _M_next_resize. Start
2408 with 11 buckets if not told otherwise. Use __builtin_floorl.
2409 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2410 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2411 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2412 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2413 told otherwise. Use __builtin_floorl.
2414 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2415 to also validate _Power2_rehash_policy.
2416 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2419 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2422 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2426 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2427 overflow warning with -Wpedantic -Wsystem-headers.
2429 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2432 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2433 * include/bits/move.h (swap): Remove extra parentheses.
2435 * include/experimental/bits/lfts_config.h: Improve doc markup.
2436 * include/experimental/optional: Improve docs.
2437 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2438 (__constexpr_addressof): Remove.
2439 (optional::operator->()): Use std::__addressof().
2440 * include/std/optional (optional::operator->()): Adjust whitespace.
2441 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2442 that operator-> is still constexpr with overloaded operator&. Change
2443 to compile-only test.
2444 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2447 * include/bits/shared_ptr.h: Improve docs.
2448 * include/bits/shared_ptr_atomic.h: Likewise.
2449 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2451 * include/bits/basic_string.h: Fix iterator/index confusion in
2453 * include/bits/range_access.h: Fix Doxygen warnings.
2454 * include/bits/refwrap.h: Do not document implementation details.
2455 (ref, cref): Group docs with reference_wrapper.
2456 * include/std/fstream: Fix Doxygen markup.
2457 * libsupc++/initializer_list (begin, end): Group docs with
2460 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2462 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2463 * include/std/mutex: Likewise.
2464 * include/std/shared_mutex: Likewise.
2466 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2467 * include/bits/fs_fwd.h: Likewise.
2468 * include/bits/fs_ops.h: Likewise.
2469 * include/bits/fs_path.h: Likewise.
2470 * include/std/filesystem: Likewise.
2472 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2473 * include/experimental/buffer: Likewise.
2474 * include/experimental/executor: Likewise.
2475 * include/experimental/internet: Likewise.
2476 * include/experimental/io_context: Likewise.
2477 * include/experimental/net: Likewise.
2478 * include/experimental/netfwd: Likewise.
2479 * include/experimental/socket: Likewise.
2480 * include/experimental/timer: Likewise.
2482 * doc/doxygen/doxygroups.cc: Move description of experimental group
2484 * include/experimental/algorithm: Add to libfund-ts doc group.
2485 * include/experimental/any: Likewise. Do not document implementation
2487 * include/experimental/array: Add to libfund-ts doc group.
2488 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2489 for Library Fundamentals.
2490 * include/experimental/chrono: Add to libfund-ts doc group.
2491 * include/experimental/deque: Likewise.
2492 * include/experimental/forward_list: Likewise.
2493 * include/experimental/functional: Likewise.
2494 * include/experimental/iterator: Likewise.
2495 * include/experimental/list: Likewise.
2496 * include/experimental/map: Likewise.
2497 * include/experimental/memory: Likewise.
2498 * include/experimental/memory_resource: Likewise. Improve docs.
2500 * include/experimental/numeric: Add to libfund-ts doc group.
2501 * include/experimental/optional: Likewise.
2502 * include/experimental/propagate_const: Likewise.
2503 * include/experimental/random: Likewise.
2504 * include/experimental/ratio: Likewise.
2505 * include/experimental/regex: Likewise.
2506 * include/experimental/set: Likewise.
2507 * include/experimental/source_location: Likewise.
2508 * include/experimental/string: Likewise.
2509 * include/experimental/string_view: Likewise.
2510 * include/experimental/system_error: Likewise.
2511 * include/experimental/tuple: Likewise.
2512 * include/experimental/type_traits: Likewise.
2513 * include/experimental/unordered_map: Likewise.
2514 * include/experimental/unordered_set: Likewise.
2515 * include/experimental/utility: Likewise.
2516 * include/experimental/vector: Likewise.
2517 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2518 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2519 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2521 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2522 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2523 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2524 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2525 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2527 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2528 * include/experimental/bits/fs_fwd.h: Improve docs.
2529 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2530 * include/experimental/bits/fs_path.h: Likewise.
2531 (path, filesystem_error, u8path): Improve docs.
2532 * include/experimental/filesystem: Link to docs for TS.
2534 * config/allocator/new_allocator_base.h (__allocator_base): Add
2535 workaround for Doxygen bug #6945.
2536 * include/std/memory: Improve docs. Define group for pointer safety.
2537 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2538 conditional to suppress documentation for implementation details.
2540 * include/bits/specfun.h: Improve docs.
2541 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2544 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2545 (std::experimental): Add docs.
2546 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2547 namespace to nothing when generating docs.
2548 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2549 * include/std/chrono (std::chrono): Likewise.
2550 * include/std/functional (std::placeholders): Likewise.
2551 * include/std/thread (std::this_thread): Likewise.
2553 * include/parallel/settings.h: Fix Doxygen markup.
2555 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2556 anything unless PB_DS_CLASS_C_DEC is defined.
2557 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2558 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2559 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2560 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2561 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2562 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2563 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2565 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2566 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2567 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2568 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2569 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2570 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2571 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2572 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2573 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2574 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2575 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2577 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2578 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2580 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2583 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2584 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2585 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2588 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2590 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2591 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2592 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2593 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2594 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2595 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2597 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2598 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2601 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2604 * include/std/complex (__complex_proj): Return parameter unchanged.
2605 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2606 floating-point types to take std::complex arguments.
2607 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2608 floating-point types.
2609 * testsuite/26_numerics/complex/proj.cc: New test.
2611 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2613 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2614 to _Lock_policyE[012].
2615 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2617 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2619 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2620 macros accidentally left in.
2621 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2622 unnecessary -lstdc++fs option. Fix test for mingw.
2623 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2626 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2628 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2630 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2632 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2634 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2635 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2638 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2640 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2643 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2644 class template and partial specialization.
2647 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2649 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2650 functions to convert a value to an integral type.
2651 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2652 (fill_n): Convert _Size parameter to an integral type.
2653 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2654 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2655 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2656 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2657 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2658 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2660 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2662 Adding noexcept-specification on tuple constructors (LWG 2899)
2663 * libstdc++-v3/include/std/tuple:
2664 (tuple()): Add noexcept-specification.
2665 (tuple(const _Elements&...)): Likewise
2666 (tuple(_UElements&&...)): Likewise
2667 (tuple(const tuple<_UElements...>&)): Likewise
2668 (tuple(tuple<_UElements...>&&)): Likewise
2669 (tuple(const _T1&, const _T2&)): Likewise
2670 (tuple(_U1&&, _U2&&)): Likewise
2671 (tuple(const tuple<_U1, _U2>&): Likewise
2672 (tuple(tuple<_U1, _U2>&&): Likewise
2673 (tuple(const pair<_U1, _U2>&): Likewise
2674 (tuple(pair<_U1, _U2>&&): Likewise
2675 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2677 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2680 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2681 arguments with __restrict.
2683 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2685 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2687 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2689 * include/experimental/bits/fs_path.h
2690 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2691 avoid redundant call to _S_convert_loc with non-const pointers.
2693 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2694 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2695 * testsuite/21_strings/basic_string/hash/hash.cc
2696 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2697 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2698 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2700 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2701 wstring::_M_replace_dispatch with more specific patterns.
2702 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2703 Create const std::string to avoid redundant call to _S_convert_loc
2704 with non-const pointers.
2705 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2706 avoid unnecessary basic_string::assign instantiations.
2708 * include/std/memory (__uses_alloc_args): Add string-literal to
2709 static_assert, to match the one in __uses_alloc.
2710 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2711 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2712 for recursive uses-allocator construction of nested pairs.
2713 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2716 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2718 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2719 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2720 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2721 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2723 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2724 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2725 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2726 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2727 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2728 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2729 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2731 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2734 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2735 * include/std/scoped_allocator [__cplusplus > 201703L]
2736 (scoped_allocator_adaptor::construct): Define in terms of
2737 uses_allocator_construction_args, as per P0591R4.
2738 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2739 * testsuite/util/testsuite_allocator.h: Remove name of unused
2742 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2744 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2745 * doc/html/*: Regenerate.
2747 * include/bits/fs_path.h (operator<, operator<=, operator>)
2748 (operator>=, operator==, operator!=): Make hidden friends, as per
2750 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2751 string type in test.
2752 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2754 * include/std/any (any::any(ValueType&&)): Use __and_v.
2755 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2758 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2760 * include/std/type_traits (__result_of_memfun): Use remove_reference
2761 instead of __remove_cvref_t and remove redundant is_same check.
2762 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2764 * include/experimental/string_view (basic_string_view::pointer)
2765 (basic_string_view::reference): Fix to refer to non-const value_type.
2766 * include/bits/basic_string.h (basic_string): Use __sv_check and
2767 __sv_limit instead of basic_string_view::_M_check and
2768 basic_string_view::_M_limit.
2769 * include/std/string_view (__sv_check, __sv_limit): New
2770 helper functions to replace basic_string_view::_M_check and
2771 basic_string_view::_M_limit.
2772 (basic_string_view): Add static assertions to enforce ill-formed
2773 requirement for traits_type::char_type from P1148R0, and to enforce
2774 required properties of char-like types.
2775 (basic_string_view::pointer, basic_string_view::reference): Fix to
2776 refer to non-const value_type.
2777 (basic_string_view::operator[], basic_string_view::at)
2778 (basic_string_view::front, basic_string_view::back)
2779 (basic_string_view::data): Use const_reference and const_pointer
2780 typedefs for return types.
2781 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2782 (hash<wstring_view>): Fix argument_type typedef.
2783 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2784 char/1.cc: Fix expected return type of basic_string_view::data().
2785 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2786 wchar_t/1.cc: Likewise.
2787 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2788 char/1.cc: Likewise.
2789 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2790 wchar_t/1.cc: Likewise.
2791 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2793 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2794 Check reference and pointer typedefs.
2795 * testsuite/experimental/string_view/requirements/typedefs.cc:
2797 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2798 Fix expected return type of basic_string_view::data().
2799 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2801 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2803 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2807 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2808 Avoid a runtime check for types that can never be stored in std::any.
2809 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2812 PR libstdc++/90220 (partial)
2813 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2814 not attempt ill-formed static_cast to pointers to non-object types.
2815 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2818 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2819 prevent -Wcatch-value warning.
2821 * include/std/variant (__variant_construct): Use template parameter
2822 type instead of equivalent decltype-specifier.
2823 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2824 Replace forward with move.
2825 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2826 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2827 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2828 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2829 index after construction succeeds.
2830 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2831 if-constexpr checks that are always true. Use __remove_cvref_t instead
2832 of remove_reference so that is_nothrow_move_constructible check
2833 doesn't use a const rvalue parameter. In the potentially-throwing case
2834 construct a temporary and move assign it, as per LWG 2904.
2835 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2836 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2837 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2838 construct a temporary and move assign from it, as per LWG 2904.
2839 * testsuite/20_util/variant/exception_safety.cc: Check that
2840 assignment operators have strong exception safety guarantee.
2842 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2844 Document PSTL linker flags
2846 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2848 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2850 * include/std/variant (__detail::__variant::_Traits): Make
2851 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2852 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2854 (__detail::__variant::_Copy_assign_alias): Only depend on
2855 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2856 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2857 move assignment operators.
2860 * include/std/variant (variant::__not_self): New helper for the
2861 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2862 (variant::__to_type_impl): Remove.
2863 (variant::__to_type): Add default argument to check pack size, instead
2864 of using __to_type_impl.
2865 (variant::__accepted_type): Add default argument using __not_self.
2866 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2867 for variant(T&&) constructor constraint.
2868 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2869 Extract __accepted_type into a named template parameter for reuse in
2870 other constraints and in the exception specification.
2871 (variant::variant(in_place_type_t<T>, Args&&...))
2872 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2873 (variant::variant(in_place_index_t<T>, Args&&...))
2874 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2875 (variant::operator=T&&)): Remove redundant && from trait arguments.
2876 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2877 isn't used for in_place_type or in_place_index arguments.
2879 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2880 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2881 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2883 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2884 Bernd Edlinger <bernd.edlinger@hotmail.de>
2885 Jakub Jelinek <jakub@redhat.com>
2888 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2889 general-regs-only target attribute for ARM.
2891 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2894 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2895 specialization also depend on is_nothrow_move_constructible.
2896 * include/std/variant (__detail::__variant::__never_valueless()):
2897 Only true if the variant would have a move assignment operator.
2898 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2899 Check __never_valueless<T...>().
2900 (variant::emplace): Only perform non-throwing move assignments
2901 for never-valueless alternatives if the variant has a move assignment
2903 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2904 types can be emplaced into non-assignable variants.
2905 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2906 don't get copied when emplaced into non-assignable variants.
2908 * include/std/variant (__detail::__variant::__ref_cast): Remove
2910 (__detail::__variant::_Uninitialized::_M_get)
2911 (__detail::__variant::__get)
2912 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2914 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2916 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2918 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2919 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2920 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2921 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2923 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2925 Delegate PSTL configuration to pstl/pstl_config.h
2927 * include/bits/c++config: Remove explicit PSTL configuration
2928 macros and use definitions from <pstl/pstl_config.h>.
2930 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2932 Cleanup algorithm implementations
2933 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2935 (mismatch): Forward execution policy.
2936 (equal): Qualify call to std::equal().
2937 (partial_sort): Forward execution policy.
2938 (inplace_merge): Forward execution policy.
2940 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2942 Improve implementation of parallel equal()
2943 * include/pstl/algorithm_impl.h
2944 (__internal::__brick_equal): use "4 iterator" version of
2946 (__internal::__brick_equal): use simd for random access
2947 iterators on unsequenced execution policies.
2948 (__internal::__pattern_equal): add "4 iterator" version
2949 (__internal::__pattern_equal): dispatch to simd __brick_equal
2950 for vector-only execution policies.
2951 (__internal::__pattern_equal): dispatch to __parallel_or for
2952 parallel execution policies.
2953 * include/pstl/glue_algorithm_impl.h
2954 (std::equal): dispatch to "4 iterator" version of
2955 __internal::__pattern_equal().
2957 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2960 * include/bits/forward_list.h (operator==): Do not use operator!= to
2962 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2963 earlier in the list, so that sort is stable.
2964 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2965 * testsuite/23_containers/forward_list/comparable.cc: Test with
2966 types that meet the minimum EqualityComparable and LessThanComparable
2967 requirements. Remove irrelevant comment.
2969 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2970 Do not depend on whether all alternative types are move constructible.
2971 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2972 from the operand when deciding whether to perform the assignment.
2973 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2974 with deleted move constructor and deleted move assignment operator.
2975 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
2976 behaviour of variants with DeletedMoves as an alternative.
2977 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
2978 (move_ctor, move_assign): Check that moving a variant with a
2979 DeletedMoves alternative falls back to copying instead of moving.
2981 * testsuite/20_util/variant/compile.cc: Remove empty string literals
2982 from static_assert declarations.
2984 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
2985 actually match its name.
2986 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
2987 (test_swap()): Fix result for MoveCtorOnly and check
2988 MoveCtorAndSwapOnly.
2990 * include/std/optional (optional::value_or(U&&) &&): Add missing
2991 constexpr specifier.
2992 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
2993 for disengaged optionals and rvalue optionals.
2994 * testsuite/20_util/optional/observers/4.cc: Likewise.
2996 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
2998 * include/pstl/algorithm_impl.h: Uglify identfiers.
2999 * include/pstl/numeric_impl.h: Uglify identfiers.
3000 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
3002 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
3004 * include/bits/c++config:
3005 Add definition for __PSTL_ASSERT.
3006 Add definition for __PSTL_ASSERT_MSG.
3007 * include/pstl/algorithm_impl.h: Replace use of assert().
3008 * include/pstl/numeric_impl.h: Replace use of assert().
3009 * include/pstl/parallel_backend_tbb.h:
3010 Replace use of assert().
3011 Replace use of __TBB_ASSERT().
3012 * include/pstl/parallel_backend_utils.h: Replace use of assert().
3014 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
3017 * src/c++17/memory_resource.cc
3018 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
3019 needed to allow placing a _Chunk at the end of the buffer.
3020 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
3022 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
3024 * doc/xml/faq.xml: Add information about emergency EH pool.
3025 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
3026 Move outdated information on mt_allocator to a separate section.
3027 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
3028 doesn't affect the default allocator.
3030 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
3034 * testsuite/20_util/variant/89851.cc: New test.
3036 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3038 * include/std/variant: Adjust whitespace. Add comments.
3039 (_Multi_array): Leave primary template undefined.
3040 (_Multi_array<_Tp>): Define partial specialization for base case of
3042 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3043 which is always a reference.
3044 (__gen_vtable::_S_apply()): Remove function, inline body into
3045 default member initializer.
3046 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3048 * include/std/variant (__variant_idx_cookie): Add member type.
3049 (__visitor_result_type): Remove.
3050 (__do_visit): Use invoke_result instead of __visitor_result_type.
3051 * testsuite/20_util/variant/visit.cc: New test.
3054 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3056 * testsuite/20_util/variant/90008.cc: New test.
3058 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3060 * include/pstl/algorithm_impl.h: Add namespace qualification.
3061 * include/pstl/execution_defs.h: Add namespace qualification.
3062 * include/pstl/execution_impl.h: Add namespace qualification.
3063 * include/pstl/numeric_impl.h: Add namespace qualification.
3064 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3065 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3066 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3068 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3070 Fix visit<R> for variant.
3071 * include/std/variant (__do_visit): Add a template parameter
3072 for enforcing same return types for visit.
3073 (__gen_vtable_impl): Likewise.
3074 (_S_apply_single_alt): Adjust.
3075 (__visit_invoke_impl): New. Handle casting to void.
3076 (__do_visit_invoke): New. Enforces same return types.
3077 (__do_visit_invoke_r): New. Converts return types.
3078 (__visit_invoke): Adjust.
3079 (__gen_vtable): Add a template parameter for enforcing
3080 same return types for visit.
3081 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3082 different return types.
3083 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3084 visitors with different return types don't accidentally
3085 compile with regular visitation.
3087 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3089 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3090 dg-require-filesystem-ts.
3092 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3094 * doc/xml/manual/status_cxx2020.xml: Update status.
3095 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3096 * testsuite/20_util/variant/visit_r.cc: New test.
3098 * include/bits/fs_dir.h (directory_iterator::operator*)
3099 (directory_iterator::operator->): Add noexcept.
3100 (operator==, operator!=): Replace namespace-scope equality operators
3101 for directory iterators with hidden friends.
3104 * config/abi/pre/gnu.ver: Add missing exports.
3105 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3108 * config/abi/pre/gnu.ver: Export new symbols.
3109 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3110 (recursive_directory_iterator::recursion_pending())
3111 (recursive_directory_iterator::disable_recursion_pending()): Remove
3112 inline definitions. Make noexcept.
3113 (recursive_directory_iterator::depth())
3114 (recursive_directory_iterator::operator*())
3115 (recursive_directory_iterator::operator->()): Make noexcept.
3116 (recursive_directory_iterator::_M_options)
3117 (recursive_directory_iterator::_M_pending): Remove data members.
3118 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3119 (recursive_directory_iterator::recursive_directory_iterator): Remove
3120 ctor-initializer. Use new constructor for _Dir_stack.
3121 (recursive_directory_iterator::options())
3122 (recursive_directory_iterator::recursion_pending())
3123 (recursive_directory_iterator::disable_recursion_pending()): Add
3124 non-inline definitions.
3125 (recursive_directory_iterator::depth()): Make noexcept.
3126 (recursive_directory_iterator::increment(error_code&))
3127 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3128 location of options and recursion_pending members.
3129 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3130 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3131 user-declared move constructor and assignment operator, to make the
3134 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3135 d_type == DT_UNKNOWN immediately.
3136 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3138 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3140 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3142 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3143 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3146 PR libstdc++/87431 (again)
3147 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3148 Define partial specialization for basic_string.
3149 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3150 shared_ptr and weak_ptr.
3151 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3153 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3155 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3157 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3159 * include/std/any (_Never_valueless_alt): Define explicit
3160 specialization for any.
3161 * include/std/variant (_Never_valueless_alt): Define primary template.
3162 (__never_valueless): Use _Never_valueless_alt instead of
3163 is_trivially_copyable.
3164 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3165 initializations to avoid try-catch overhead. Add special case for
3166 scalars produced by potentially-throwing conversions. Use
3167 _Never_valueless_alt instead of is_trivially_copyable for the
3168 remaining strong exception-safety cases.
3169 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3170 * testsuite/20_util/variant/87431.cc: Run both test functions.
3171 * testsuite/20_util/variant/exception_safety.cc: New test.
3172 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3173 so the variant becomes valueless.
3175 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3178 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3180 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3182 * include/std/string (__hash_string_base): New class template defining
3183 operator() for hashing strings.
3184 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3185 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3186 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3187 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3189 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3191 Use single-visitation in variant assignment and swap and relops.
3192 Also use indices instead of types when checking whether
3193 variants hold the same thing.
3194 * include/std/variant (__do_visit): Add a template parameter
3195 for index visitation, invoke with indices if index visitation
3197 (__variant_idx_cookie): New.
3198 (__visit_with_index): Likewise.
3199 (_Copy_assign_base::operator=): Do single-visitation with
3201 (_Move_assign_base::operator=): Likewise.
3202 (_Extra_visit_slot_needed): Adjust.
3203 (__visit_invoke): Call with indices if it's an index visitor.
3204 (relops): Do single-visitation with an index visitor.
3206 (__visitor_result_type): New.
3208 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3210 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3212 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3214 Don't revisit a variant we are already visiting.
3215 * include/std/variant (__variant_construct_single): New.
3216 (__variant_construct): Use it.
3217 (_M_destructive_move): Likewise.
3218 (_M_destructive_copy): Likewise.
3219 (_Copy_assign_base::operator=): Adjust.
3220 (_Move_assign_base::operator=): Likewise.
3223 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3226 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3227 destructor so they are not evaluated until the _Key type is complete.
3228 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3229 * testsuite/23_containers/set/85965.cc: New test.
3230 * testsuite/23_containers/unordered_set/85965.cc: New test.
3231 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3232 with regexp matching the corresponding _Rb_tree specialization.
3233 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3234 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3235 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3236 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3237 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3238 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3239 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3241 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3244 Fix based on a suggestion by Antony Polukhin.
3245 * include/std/variant (__never_valueless): New.
3247 (_Extra_visit_slot_needed): New.
3248 (_Multi_array): Use it.
3249 (_S_apply_all_alts): Likewise.
3251 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3254 Fix based on a suggestion by Antony Polukhin.
3255 * include/std/variant (__gen_vtable): Don't reserve an
3256 additional table slot, _Multi_array already does that.
3258 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3261 Fix based on a suggestion by Antony Polukhin.
3262 * include/std/variant (__variant_construct): Capture a pointer
3263 to the storage and visit just one variant.
3265 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3267 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3268 Doxygen-generated pages with unstable URL.
3269 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3270 * doc/xml/manual/extensions.xml: Likewise.
3271 * doc/xml/manual/parallel_mode.xml: Likewise.
3272 * doc/xml/manual/support.xml: Likewise.
3274 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3275 avoid -Wconversion warnings.
3277 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3279 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3280 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3281 (allstamped): Add stamp-pstl.
3282 (install-headers): Add ptsl_builddir.
3283 * include/Makefile.in: Regenerate.
3284 * include/bits/c++config: Add pstl configuration.
3285 * include/pstl/LICENSE.txt: New file.
3286 * include/pstl/algorithm_fwd.h: New file.
3287 * include/pstl/algorithm_impl.h: New file.
3288 * include/pstl/execution_defs.h: New file.
3289 * include/pstl/execution_impl.h: New file.
3290 * include/pstl/glue_algorithm_defs.h: New file.
3291 * include/pstl/glue_algorithm_impl.h: New file.
3292 * include/pstl/glue_execution_defs.h: New file.
3293 * include/pstl/glue_memory_defs.h: New file.
3294 * include/pstl/glue_memory_impl.h: New file.
3295 * include/pstl/glue_numeric_defs.h: New file.
3296 * include/pstl/glue_numeric_impl.h: New file.
3297 * include/pstl/memory_impl.h: New file.
3298 * include/pstl/numeric_fwd.h: New file.
3299 * include/pstl/numeric_impl.h: New file.
3300 * include/pstl/parallel_backend.h: New file.
3301 * include/pstl/parallel_backend_tbb.h: New file.
3302 * include/pstl/parallel_backend_utils.h: New file.
3303 * include/pstl/parallel_impl.h: New file.
3304 * include/pstl/pstl_config.h: New file.
3305 * include/pstl/unseq_backend_simd.h: New file.
3306 * include/pstl/utils.h: New file.
3307 * include/std/algorithm: Include parallel algorithm implementations.
3308 * include/std/execution: New file.
3309 * include/std/memory: Include parallel algorithm implementations.
3310 * include/std/numeric: Include parallel algorithm implementations.
3311 * include/std/version: Add parallel algorithms feature test macro.
3312 * testsuite/util/pstl/pstl_test_config.h: New file.
3313 * testsuite/util/pstl/test_utils.h: New file.
3314 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3315 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3316 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3317 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3318 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3319 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3320 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3321 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3322 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3323 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3324 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3325 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3326 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3327 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3328 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3329 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3330 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3331 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3332 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3333 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3334 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3335 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3336 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3337 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3338 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3339 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3340 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3341 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3342 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3343 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3344 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3345 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3346 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3347 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3348 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3349 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3350 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3351 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3352 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3353 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3354 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3355 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3356 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3357 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3358 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3359 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3360 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3361 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3362 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3363 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3364 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3365 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3366 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3367 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3368 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3369 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3370 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3371 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3372 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3373 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3374 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3375 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3376 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3377 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3378 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3379 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3380 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3381 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3382 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3383 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3384 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3385 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3386 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3387 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3388 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3389 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3390 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3391 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3392 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3393 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3394 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3395 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3396 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3397 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3398 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3399 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3400 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3401 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3402 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3403 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3404 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3405 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3406 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3407 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3408 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3409 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3410 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3411 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3412 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3413 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3414 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3415 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3416 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3417 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3418 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3419 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3421 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3423 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3424 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3425 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3426 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3427 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3428 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3429 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3430 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3431 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3432 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3433 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3434 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3435 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3436 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3437 when the special functions IS is enabled, not for C++17.
3438 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3440 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3441 without checks for special functions in C++17.
3442 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3446 * include/backward/hash_map: Use <> for includes not "".
3447 * include/backward/hash_set: Likewise.
3448 * include/backward/strstream: Likewise.
3449 * include/tr1/bessel_function.tcc: Likewise.
3450 * include/tr1/exp_integral.tcc: Likewise.
3451 * include/tr1/legendre_function.tcc: Likewise.
3452 * include/tr1/modified_bessel_func.tcc: Likewise.
3453 * include/tr1/riemann_zeta.tcc: Likewise.
3455 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3457 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3458 of extension allocators.
3459 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3460 Document new headers in 7.2, 8.1 and 9.1 releases.
3461 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3462 * doc/html/*: Regenerate.
3464 2019-03-12 John David Anglin <dave.anglin@bell.net>
3467 * testsuite/lib/libstdc++.exp: Locate libatomic.
3468 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3469 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3471 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3472 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3473 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3474 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3476 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3479 * configure.ac: Check for sockatmark.
3480 * crossconfig.m4: Check for sockatmark.
3481 * config.h.in: Regenerate.
3482 * configure: Regenerate.
3483 * include/experimental/internet (address_v4::_S_hton): Rename
3484 overloaded functions to _S_hton_16 and _S_ntoh_16.
3485 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3486 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3487 * include/experimental/socket (basic_socket::at_mark): Check
3488 _GLIBCXX_HAVE_SOCKATMARK.
3490 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3491 const variables instead of macros.
3494 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3495 Use correct type for len_aligned.
3496 * testsuite/20_util/hash/89629.cc: New test.
3498 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3501 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3502 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3503 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3504 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3505 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3506 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3507 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3508 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3509 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3510 memory_order_seq_cst to int.
3512 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3514 * doc/xml/manual/using.xml: Use link element instead of xref.
3515 * doc/html/*: Regenerate.
3517 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3519 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3522 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3523 parameters in deduction guides.
3524 * include/debug/multimap.h (multimap): Likewise.
3525 * include/debug/set.h (multimap): Likewise.
3526 * include/debug/multiset.h (multimap): Likewise.
3527 * include/debug/unordered_map (unordered_map): Likewise.
3528 (unordered_multimap): Likewise.
3529 * include/debug/unordered_set (unordered_set): Likewise.
3530 (unordered_multiset): Likewise.
3533 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3534 Invalidate all iterators in case of rehash.
3535 (unordered_multimap<>::_M_check_rehashed): Likewise.
3536 * include/debug/unordered_set
3537 (unordered_set<>::_M_check_rehashed): Likewise.
3538 (unordered_multiset<>::_M_check_rehashed): Likewise.
3539 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3541 2019-03-07 Andreas Schwab <schwab@suse.de>
3543 * config/abi/post/riscv64-linux-gnu: New directory.
3544 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3546 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3548 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3549 compile test to run. Fix typo.
3551 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3552 * doc/html/*: Regenerate.
3554 P0356R5 Simplified partial function application
3555 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3556 helpers for bind_front.
3557 (bind_front, __cpp_lib_bind_front): Define.
3558 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3560 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3562 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3563 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3564 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3565 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3567 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3569 PR libstdc++/86655 - std::assoc_legendre should not constrain
3570 the value of m (or x).
3571 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3572 __sph_legendre): If degree > order Don't throw, return 0.
3573 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3574 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3575 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3576 * testsuite/tr1/5_numerical_facilities/special_functions/
3577 02_assoc_legendre/pr86655.cc: New test.
3578 * testsuite/tr1/5_numerical_facilities/special_functions/
3579 22_sph_legendre/pr86655.cc: New test.
3581 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3584 Also PR libstdc++/85517
3585 * include/std/variant (__do_visit): New.
3586 (__variant_cast): Likewise.
3587 (__variant_cookie): Likewise.
3588 (__erased_*): Remove.
3589 (_Variant_storage::_S_vtable): Likewise.
3590 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3591 (_Variant_storage::__M_reset): Adjust.
3592 (__variant_construct): New.
3593 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3594 __variant_construct.
3595 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3596 (_Move_ctor_base::__M_destructive_copy): New.
3597 (_Move_ctor_base::__M_destructive_move): Adjust to use
3598 __variant_construct.
3599 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3600 (_Copy_assign_alias): Adjust to check both copy assignment
3601 and copy construction for triviality.
3602 (_Move_assign_base::operator=): Adjust to use __do_visit.
3603 (_Multi_array): Add support for visitors that accept and return
3605 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3606 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3607 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3608 a __variant_cookie temporary for a variant that is valueless and..
3609 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3610 (__gen_vtable::_Array_type): Conditionally make space for
3611 the __variant_cookie visitor case.
3612 (__variant_construct_by_index): New.
3613 (get_if): Adjust to use std::addressof.
3614 (relops): Adjust to use __do_visit.
3615 (variant): Add __variant_cast and __variant_construct_by_index
3617 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3618 instead of self-destruction.
3619 (variant::swap): Adjust to use __do_visit.
3620 (visit): Reimplement in terms of __do_visit.
3621 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3622 * testsuite/20_util/variant/compile.cc: Adjust.
3623 * testsuite/20_util/variant/run.cc: Likewise.
3625 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3627 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3629 * testsuite/experimental/feat-char8_t.cc: Likewise.
3631 * include/std/type_traits [C++20] (is_bounded_array)
3632 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3634 * testsuite/20_util/is_bounded_array/requirements/
3635 explicit_instantiation.cc: New test.
3636 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3638 * testsuite/20_util/is_bounded_array/value.cc: New test.
3639 * testsuite/20_util/is_unbounded_array/requirements/
3640 explicit_instantiation.cc: New test.
3641 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3643 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3645 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3647 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3649 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3651 * include/c_compatibility/math.h [C++20] (lerp): Add using
3653 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3654 (__lerp): Define function template to implement lerp.
3655 (lerp(float, float, float), lerp(double, double, double))
3656 (lerp(long double, long double, long double)): Define for C++20.
3657 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3658 (midpoint(T, T), midpoint(T*, T*)): Define.
3659 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3660 * testsuite/26_numerics/lerp.cc: New test.
3661 * testsuite/26_numerics/midpoint/floating.cc: New test.
3662 * testsuite/26_numerics/midpoint/integral.cc: New test.
3663 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3665 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3667 PR libstdc++/88996 Implement P0439R0
3668 Make std::memory_order a scoped enumeration.
3669 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3670 add variables for the old enumerators. Adjust calls.
3671 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3672 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3674 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3676 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3679 * include/std/memory_resource (polymorphic_allocator): Add default
3680 template argument for C++20.
3681 (polymorphic_allocator::allocate_bytes)
3682 (polymorphic_allocator::deallocate_bytes)
3683 (polymorphic_allocator::allocate_object)
3684 (polymorphic_allocator::deallocate_object)
3685 (polymorphic_allocator::new_object)
3686 (polymorphic_allocator::delete_object): New member functions for
3688 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3691 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3694 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3697 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3699 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3700 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3702 * include/std/memory (uses_allocator_construction_args): New set of
3703 overloaded functions.
3704 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3706 * include/std/memory_resource (polymorphic_allocator::construct)
3707 [__cplusplus > 201703l]: Replace all overloads with a single function
3708 using uses_allocator_construction_args.
3709 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3711 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3713 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3716 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3717 stylesheet directories before check for xsltproc. Try to use
3718 xmlcatalog to find local stylesheet directory before trying hardcoded
3719 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3720 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3721 use xsltproc if xmlcatalog fails to find a local stylesheet.
3722 * configure.ac: Check for xmlcatalog.
3723 * Makefile.in: Regenerate.
3724 * configure: Likewise.
3725 * doc/Makefile.in: Likewise.
3726 * include/Makefile.in: Likewise.
3727 * libsupc++/Makefile.in: Likewise.
3728 * po/Makefile.in: Likewise.
3729 * python/Makefile.in: Likewise.
3730 * src/Makefile.in: Likewise.
3731 * src/c++11/Makefile.in: Likewise.
3732 * src/c++17/Makefile.in: Likewise.
3733 * src/c++98/Makefile.in: Likewise.
3734 * src/filesystem/Makefile.in: Likewise.
3735 * testsuite/Makefile.in: Likewise.
3737 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3740 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3741 container deduction guides.
3742 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3743 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3744 parameters in deduction guides.
3745 * include/bits/stl_multimap.h (multimap): Likewise.
3746 * include/bits/stl_multiset.h (multiset): Likewise.
3747 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3748 * include/bits/stl_set.h (set): Likewise.
3749 * include/bits/stl_stack.h (stack): Likewise.
3750 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3751 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3752 constrain parameters in deduction guides.
3753 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3755 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3757 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3758 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3759 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3760 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3762 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3764 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3767 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3768 to class template and partial specialization using void_t.
3769 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3771 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3774 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3775 copy and move members public.
3777 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3779 * include/std/type_traits (__underlying_type_impl): New helper to
3780 make underlying_type SFINAE-friendly.
3781 (underlying_type): Derive from __underlying_type_impl.
3782 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3786 * include/bits/char_traits.h (__constant_char_array): Check index is
3787 in range before dereferencing.
3788 (char_traits<char>::compare, char_traits<char>::find)
3789 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3790 immediately if n is zero.
3791 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3792 Remove workarounds for PR 67026.
3793 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3795 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3798 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3800 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3801 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3803 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3806 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3807 type to std::size_t and argument to type to long double.
3809 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3811 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3812 * config/abi/post/sparc64-linux-gnu: New directory.
3813 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3814 * config/abi/post/sparc64-linux-gnu/32: New directory.
3815 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3817 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3819 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3820 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3823 2019-02-22 Tom Honermann <tom@honermann.net>
3825 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3826 printers for u8string and u8string_view.
3828 2019-02-22 Tom Honermann <tom@honermann.net>
3830 * testsuite/18_support/byte/ops.cc: Validate
3831 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3832 std::to_integer<char32_t>.
3833 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3834 std::numeric_limits<char8_t>.
3835 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3836 std::numeric_limits<char8_t>::lowest().
3837 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3838 std::numeric_limits<char8_t>::max_digits10.
3839 * testsuite/18_support/type_info/fundamental.cc: Validate
3840 typeinfo for char8_t.
3841 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3842 std::from_chars with char8_t.
3843 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3844 Validate explicit instantiation of std::hash<char8_t>.
3845 * testsuite/20_util/is_integral/value.cc: Validate
3846 std::is_integral<char8_t>.
3847 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3848 Validate std::make_signed<char8_t>.
3849 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3850 Validate u8string construction from char8_t sources.
3851 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3853 * testsuite/21_strings/basic_string_view/operations/compare/
3854 char/70483.cc: Validate substr operations on u8string_view.
3855 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3856 the u8string_view typedef is defined.
3857 * testsuite/21_strings/char_traits/requirements/
3858 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3860 * testsuite/21_strings/char_traits/requirements/
3861 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3862 constexpr member functions.
3863 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3864 that the u8string typedef is defined.
3865 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3866 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3867 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3868 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3870 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3871 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3873 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3874 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3875 Validate std::atomic<char8_t>::is_always_lock_free
3876 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3877 Update line numbers.
3878 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3880 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3882 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3883 Validate std::experimental::pmr::u8string.
3884 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3885 u8string_view typedef is defined.
3886 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3887 char32_t to the typelists.
3889 2019-02-22 Tom Honermann <tom@honermann.net>
3891 * include/ext/typelist.h: Constrain a partial specialization of
3892 typelist::detail::append_ to only match chain<T1,T2>.
3894 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3897 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3898 class template with class. Replace move and copy member types with
3899 member alias templates, so they are only instantiated when needed.
3900 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3901 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3902 test for C++11/14/17 as well.
3903 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3906 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3909 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3910 _GLIBCXX_PURE to the alias declaration.
3912 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3914 * testsuite/21_strings/basic_string/literals/types.cc
3915 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3916 * testsuite/21_strings/basic_string/literals/values.cc
3917 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3918 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3919 potentially having different type.
3920 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3921 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3923 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3924 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3925 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3926 string literals only using basic character set.
3927 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3928 u8 literals to char.
3929 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3930 Test ATOMIC_CHAR8_T_LOCK_FREE.
3931 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3932 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3933 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3934 * testsuite/experimental/string_view/literals/types.cc
3935 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3937 * testsuite/experimental/string_view/literals/values.cc
3938 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3940 2019-02-19 Tom Honermann <tom@honermann.net>
3942 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3943 from char16_32_t.cc; validates numeric_limits<char8_t>.
3944 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3945 test cloned from types.cc; validates operator""s for char8_t
3947 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3948 test cloned from values.cc; validates construction and comparison
3950 * testsuite/21_strings/basic_string/requirements/
3951 /explicit_instantiation/char8_t/1.cc: New test cloned from
3952 char16_t/1.cc; validates explicit instantiation of
3953 basic_string<char8_t>.
3954 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3955 New test cloned from types.cc; validates operator""sv for char8_t
3956 returns u8string_view.
3957 * testsuite/21_strings/basic_string_view/literals/
3958 values-char8_t.cc: New test cloned from values.cc; validates
3959 construction and comparison of u8string_view values.
3960 * testsuite/21_strings/basic_string_view/requirements/
3961 explicit_instantiation/char8_t/1.cc: New test cloned from
3962 char16_t/1.cc; validates explicit instantiation of
3963 basic_string_view<char8_t>.
3964 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3965 New test cloned from char16_t/65049.cc; validates that
3966 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3967 * testsuite/21_strings/char_traits/requirements/char8_t/
3968 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3969 that char_traits<char8_t> member typedefs are present and correct.
3970 * testsuite/21_strings/char_traits/requirements/
3971 explicit_instantiation/char8_t/1.cc: New test cloned from
3972 char16_t/1.cc; validates explicit instantiation of
3973 char_traits<char8_t>.
3974 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
3975 from char16_t.cc: validates
3976 codecvt<char16_t, char8_t, mbstate_t>.
3977 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
3978 from char32_t.cc: validates
3979 codecvt<char32_t, char8_t, mbstate_t>.
3980 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
3981 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
3982 codecvt<char32_t, char8_t, std::mbstate_t>.
3983 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
3984 test cloned from string.cc; validates filesystem::path construction
3986 * testsuite/experimental/feat-char8_t.cc: New test; validates that
3987 the __cpp_lib_char8_t feature test macro is defined with the
3989 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3990 New test cloned from string.cc; validates filesystem::path
3991 construction from char8_t input.
3992 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
3993 test cloned from types.cc; validates operator""sv for char8_t
3994 returns u8string_view.
3995 * testsuite/experimental/string_view/literals/values-char8_t.cc:
3996 New test cloned from values.cc; validates construction and
3997 comparison of u8string_view values.
3998 * testsuite/experimental/string_view/requirements/
3999 explicit_instantiation/char8_t/1.cc: New test cloned from
4000 char16_t/1.cc; validates explicit instantiation of
4001 basic_string_view<char8_t>.
4002 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
4003 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
4006 2019-02-19 Tom Honermann <tom@honermann.net>
4008 P0482R5 char8_t: Standard library support
4009 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
4010 typeinfo symbols for char8_t.
4011 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
4012 (GLIBCXX_3.4.26): Add symbols for specializations of
4013 numeric_limits and codecvt that involve char8_t.
4014 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
4015 * include/bits/atomic_base.h: Add atomic_char8_t.
4016 * include/bits/basic_string.h: Add std::hash<u8string> and
4017 operator""s(const char8_t*, size_t).
4018 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
4020 * include/bits/char_traits.h: Add char_traits<char8_t>.
4021 * include/bits/codecvt.h: Add
4022 codecvt<char16_t, char8_t, mbstate_t>,
4023 codecvt<char32_t, char8_t, mbstate_t>,
4024 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4025 codecvt_byname<char32_t, char8_t, mbstate_t>.
4026 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
4027 recognize char8_t as an integral type.
4028 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
4030 (path::u8string): Return std::u8string when char8_t support is
4032 (path::generic_u8string): Likewise.
4033 (path::_S_convert): Handle conversion from char8_t input.
4034 (path::_S_str_convert): Likewise.
4035 * include/bits/functional_hash.h: Add hash<char8_t>.
4036 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4038 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4039 for new char8_t specializations.
4040 * include/bits/localefwd.h: Add missing declarations of
4041 codecvt<char16_t, char, mbstate_t> and
4042 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4043 codecvt<char16_t, char8_t, mbstate_t> and
4044 codecvt<char32_t, char8_t, mbstate_t>.
4045 * include/bits/postypes.h: Add u8streampos
4046 * include/bits/stringfwd.h: Add declarations of
4047 char_traits<char8_t> and u8string.
4048 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4049 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4051 (path::u8string): Return std::u8string when char8_t support is
4053 (path::generic_u8string): Likewise.
4054 (path::_S_convert): Handle conversion from char8_t input.
4055 (path::_S_str_convert): Likewise.
4056 * include/experimental/string: Add u8string.
4057 * include/experimental/string_view: Add u8string_view,
4058 hash<experimental::u8string_view>, and
4059 operator""sv(const char8_t*, size_t).
4060 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4061 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4062 as a character type.
4063 * include/std/limits: Add numeric_limits<char8_t>.
4064 * include/std/string_view: Add u8string_view,
4065 hash<experimental::u8string_view>, and
4066 operator""sv(const char8_t*, size_t).
4067 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4068 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4069 * libsupc++/atomic_lockfree_defines.h: Define
4070 ATOMIC_CHAR8_T_LOCK_FREE.
4071 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4072 codecvt.cc and limits.cc so that char8_t specializations of
4073 numeric_limits and codecvt and emitted.
4074 * src/c++11/Makefile.in: Likewise.
4075 * src/c++11/codecvt.cc: Define members of
4076 codecvt<char16_t, char8_t, mbstate_t>,
4077 codecvt<char32_t, char8_t, mbstate_t>,
4078 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4079 codecvt_byname<char32_t, char8_t, mbstate_t>.
4080 * src/c++11/limits.cc: Define members of
4081 numeric_limits<char8_t>.
4082 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4083 locale_init.cc and localename.cc.
4084 * src/c++98/Makefile.in: Likewise.
4085 * src/c++98/locale_init.cc: Add initialization for the
4086 codecvt<char16_t, char8_t, mbstate_t> and
4087 codecvt<char32_t, char8_t, mbstate_t> facets.
4088 * src/c++98/localename.cc: Likewise.
4089 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4091 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4093 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4094 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4095 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4097 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4099 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4100 * doc/html/*: Regenerate.
4102 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4103 * doc/html/*: Regenerate.
4105 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4106 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4107 allocator type in is_constructible checks.
4108 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4109 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4110 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4111 problematic type from LWG 2586 discussion.
4112 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4113 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4115 * configure.ac: Check for C11 timespec_get function.
4116 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4118 * config.h.in: Regenerate.
4119 * configure: Regenerate.
4120 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4121 std for C++17 and up.
4123 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4124 * include/bits/stl_queue.h
4125 (priority_queue(const Compare&, const Container&, const Alloc&))
4126 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4128 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4130 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4131 * include/bits/stl_queue.h (queue, priority_queue): Add static
4132 assertions to enforce LWG 2566 requirement on value_type.
4133 * include/bits/stl_stack.h (stack): Likewise.
4136 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4138 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4139 * include/bits/std_abs.h: Add comment about LWG 2735.
4140 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4142 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4145 * include/std/version [__cpp_impl_destroying_delete]
4146 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4147 * libsupc++/new [__cpp_impl_destroying_delete]
4148 (__cpp_lib_destroying_delete): Likewise.
4149 (destroying_delete_t, destroying_delete): Likewise, but define even
4150 when __cpp_impl_destroying_delete is not defined.
4151 * testsuite/18_support/destroying_delete.cc: New test.
4153 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4156 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4157 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4158 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4159 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4161 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4164 * include/bits/fs_path.h (path::has_root_name)
4165 (path::has_root_directory, path::has_root_path)
4166 (path::has_relative_path, path::has_parent_path)
4167 (path::has_filename, path::has_stem, path::has_extension)
4168 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4170 * src/c++17/fs_path.cc (path::has_root_name)
4171 (path::has_root_directory, path::has_root_path)
4172 (path::has_relative_path, path::has_parent_path)
4173 (path::has_filename, path::_M_find_extension): Add noexcept.
4175 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4177 PR libstdc++/89102 (partial)
4178 * include/std/type_traits (common_type<>): Define.
4179 (common_type<T>): Derive from common_type<T, T>.
4180 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4181 Test zero-length template argument list.
4182 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4183 Test additional single argument cases.
4184 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4185 Adjust expected error.
4187 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4190 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4192 * include/bits/stl_stack.h (stack): Likewise.
4193 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4194 * testsuite/23_containers/queue/deduction.cc: New test.
4195 * testsuite/23_containers/stack/deduction.cc: New test.
4198 * include/std/type_traits (__is_convertible_helper)
4199 (__is_convertible_helper<_From, _To, false>): Revert changes to
4200 support is_nothrow_convertible.
4201 (__is_nt_convertible_helper): New helper.
4202 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4204 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4205 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4208 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4209 __is_alloc_insertable_impl. Replace single type member with two
4210 members, one for each of copy and move insertable.
4211 (__is_move_insertable): New trait for internal use.
4212 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4213 (vector::_S_nothrow_relocate(true_type)): New functions to
4214 conditionally check if __relocate_a can throw.
4215 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4216 on __is_move_insertable.
4217 (vector::_S_do_relocate): New overloaded functions to conditionally
4219 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4220 based on _S_use_relocate.
4221 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4222 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4223 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4226 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4227 parameter unnamed. Add message to static assertion.
4228 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4229 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4232 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4235 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4237 (__is_bitwise_relocatable): ... to this.
4238 (__relocate_a_1): Adapt.
4239 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4240 (__is_bitwise_relocatable): ... to this.
4242 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4245 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4246 final component as well as from _M_pathname. Append the dot using
4247 operator+= instead of only to _M_pathname.
4248 (path::_M_find_extension): Reformat slightly.
4249 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4250 Add more test cases.
4252 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4254 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4256 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4258 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4259 constexpr specifiers from arg and proj.
4261 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4262 __shared_ptr instantiations used by gcc4-compatible ABI.
4264 * include/experimental/forward_list (experimental::erase): Qualify
4266 * include/experimental/list (experimental::erase): Likewise.
4267 * include/std/forward_list (std::erase): Likewise.
4268 * include/std/list (std::erase): Likewise.
4270 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4272 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4273 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4274 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4275 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4276 * testsuite/ext/array_allocator/26875.cc: Likewise.
4277 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4278 * testsuite/util/replacement_memory_operators.h: Likewise.
4279 * testsuite/util/testsuite_allocator.h: Likewise.
4281 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4282 normal mode vector, even for debug mode.
4283 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4284 Define alias template for normal mode vector.
4286 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4289 * config/locale/generic/c_locale.h (__convert_from_v)
4290 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4291 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4292 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4293 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4295 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4298 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4299 data member with static member function _S_use_relocate().
4300 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4301 (vector::_M_default_append): Use _S_use_relocate() instead of
4304 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4307 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4310 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4311 write to stderr instead of using printf.
4313 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4316 * include/bits/char_traits.h (__constant_string_p,
4317 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4320 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4322 Implement C++20 P0600r1.
4323 * include/backward/hash_map: Add nodiscard attribute to empty.
4324 * include/backward/hash_set: Likewise.
4325 * backward/hashtable.h: Likewise.
4326 * include/bits/basic_string.h: Likewise.
4327 * include/bits/forward_list.h: Likewise.
4328 * include/bits/hashtable.h: Likewise.
4329 * include/bits/regex.h: Likewise.
4330 * include/bits/stl_deque.h: Likewise.
4331 * include/bits/stl_list.h: Likewise.
4332 * include/bits/stl_map.h: Likewise.
4333 * include/bits/stl_multimap.h: Likewise.
4334 * include/bits/stl_multiset.h: Likewise.
4335 * include/bits/stl_queue.h: Likewise.
4336 * include/bits/stl_set.h: Likewise.
4337 * include/bits/stl_stack.h: Likewise.
4338 * include/bits/stl_tree.h: Likewise.
4339 * include/bits/stl_vector.h: Likewise.
4340 * include/bits/unordered_map.h: Likewise.
4341 * include/bits/unordered_set.h: Likewise.
4342 * include/debug/array: Likewise.
4343 * include/experimental/any: Likewise.
4344 * include/experimental/bits/fs_path.h: Likewise.
4345 * include/experimental/internet: Likewise.
4346 * include/experimental/string_view: Likewise.
4347 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4349 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4351 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4353 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4355 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4357 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4359 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4361 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4363 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4364 info_fn_imps.hpp: Likewise.
4365 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4366 left_child_next_sibling_heap_.hpp: Likewise.
4367 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4369 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4371 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4373 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4375 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4377 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4379 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4381 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4382 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4383 * include/ext/rope: Likewise.
4384 * include/ext/slist: Likewise.
4385 * include/ext/vstring.h: Likewise.
4386 * include/profile/array: Likewise.
4387 * include/std/array: Likewise.
4388 * include/tr1/array: Likewise.
4389 * include/tr1/hashtable.h: Likewise.
4390 * include/tr1/regex: Likewise.
4391 * include/tr2/dynamic_bitset: Likewise.
4392 * include/bits/alloc_traits.h: Add nodiscard attribute to
4394 * include/experimental/memory_resource: Likewise.
4395 * include/ext/alloc_traits.h: Likewise.
4396 * include/ext/array_allocator.h: Likewise.
4397 * include/ext/bitmap_allocator.h: Likewise.
4398 * include/ext/debug_allocator.h: Likewise.
4399 * include/ext/extptr_allocator.h: Likewise.
4400 * include/ext/mt_allocator.h: Likewise.
4401 * include/ext/new_allocator.h: Likewise.
4402 * include/ext/pool_allocator.h: Likewise.
4403 * include/ext/throw_allocator.h: Likewise.
4404 * include/std/scoped_allocator: Likewise.
4405 * libsupc++/eh_alloc.cc: Likewise.
4406 * include/std/future: Add nodiscard attribute to async.
4407 * libsupc++/new: Add nodiscard attribute to new.
4409 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4414 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4415 * include/bits/shared_ptr.h
4416 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4417 (allocate_shared): Change to use new tag type.
4418 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4419 Declare new member function.
4420 (_Sp_alloc_shared_tag): Define new type.
4421 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4422 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4423 _Sp_make_shared_tag::_S_eq to check type_info.
4424 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4425 Constrain to prevent being called with _Sp_alloc_shared_tag.
4426 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4427 Replace constructor with ...
4428 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4429 reference parameter so address of the new object can be returned to
4430 the caller. Obtain the allocator from the tag type.
4431 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4432 constructor with ...
4433 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4434 to the __shared_count constructor.
4435 (__allocate_shared): Change to use new tag type.
4436 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4438 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4440 * src/c++17/fs_ops.cc
4441 (equivalent(const path&, const path&, error_code&))
4442 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4443 compare files instead of relying on incomplete info returned by stat.
4446 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4447 if the path is already absolute.
4448 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4449 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4452 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4453 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4454 of filesystem::exists.
4455 (create_directories(const path&, error_code&)): Add assertions.
4456 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4457 Add workaround for bug in _wstat for paths with trailing slash.
4458 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4459 for expected behaviour on mingw.
4460 * testsuite/experimental/filesystem/operations/create_directories.cc:
4462 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4463 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4464 not test permissions on mingw targets.
4466 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4468 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4469 constructors and open members taking wide strings. Fix patterns for
4470 filesystem::path members to match wstring_view parameters. Add
4471 exports for shared_ptr members used by directory iterators.
4472 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4473 error code parameter if the file doesn't exist.
4474 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4476 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4477 values for mingw targets, where "/" is not an absolute path. Do not
4478 test symlinks on mingw targets.
4479 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4480 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4482 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4483 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4484 that each component of the path is created.
4485 * testsuite/experimental/filesystem/operations/create_directories.cc:
4487 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4488 permissions on mingw targets.
4489 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4490 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4491 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4492 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4494 * testsuite/experimental/filesystem/operations/permissions.cc:
4496 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4497 symlinks or permissions on mingw targets.
4498 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4499 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4500 symlinks on mingw targets.
4501 * testsuite/experimental/filesystem/operations/remove_all.cc:
4503 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4504 permissions on mingw targets.
4505 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4506 test symlinks on mingw targets.
4507 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4510 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4513 Warn about unused comparisons of shared_ptr/unique_ptr
4514 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4515 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4516 <, <=, >, >= for shared_ptr.
4517 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4519 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4521 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4522 as 201611L, because P0497R0 changes are supported.
4523 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4525 * include/bits/erase_if.h [__cplusplus > 201703L]
4526 (__cpp_lib_erase_if): Only define for C++2a.
4527 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4528 (__cpp_lib_null_iterators): Define.
4529 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4530 (__cpp_lib_null_iterators): Define.
4531 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4533 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4535 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4537 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4538 changes are supported.
4539 * include/std/optional (__cpp_lib_optional): Likewise.
4540 * include/std/variant (__cpp_lib_variant): Likewise.
4541 * include/std/version [!__STRICT_ANSI__]
4542 (__cpp_lib_uncaught_exceptions): Define as long integer.
4543 [__cplusplus >= 201703L] (__cpp_lib_any)
4544 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4545 (__cpp_lib_variant): Define for C++17.
4546 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4548 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4551 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4553 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4557 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4559 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4562 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4564 * doc/xml/manual/intro.xml: Include new section.
4565 * doc/xml/manual/status_cxx2017.xml: Document more
4566 implementation-defined properties of the library.
4567 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4568 * doc/html/*: Regenerate.
4570 * include/bits/refwrap.h [__cplusplus > 201703L]
4571 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4572 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4573 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4575 (reference_wrapper::operator()): Add static assertion.
4576 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4578 * include/std/chrono (duration_values::zero(), duration_values::min())
4579 (duration_values::max()): Add noexcept.
4580 (duration::zero(), duration::min(), duration::max()): Likewise.
4581 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4582 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4583 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4585 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4587 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4589 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4590 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4592 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4595 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4596 specialization for C++17 (P0513R0, LWG 2817).
4597 * testsuite/20_util/hash/nullptr.cc: New test.
4600 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4601 pattern for std::basic_stringbuf::str().
4603 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4604 basic_ostream::operator<< patterns.
4606 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4608 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4609 test failures on targets with 32-bit time_t.
4611 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4612 * include/std/deque: Likewise.
4613 * include/std/forward_list: Likewise.
4614 * include/std/list: Likewise.
4615 * include/std/string: Likewise.
4616 * include/std/vector: Likewise.
4617 * include/std/version: Likewise.
4618 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4619 * testsuite/23_containers/deque/erasure.cc: Likewise.
4620 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4621 * testsuite/23_containers/list/erasure.cc: Likewise.
4622 * testsuite/23_containers/map/erasure.cc: Likewise.
4623 * testsuite/23_containers/set/erasure.cc: Likewise.
4624 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4625 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4626 * testsuite/23_containers/vector/erasure.cc: Likewise.
4628 * include/experimental/internet [AI_NUMERICSERV]
4629 (resolver_base::numeric_service): Define conditionally.
4630 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4632 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4635 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4636 Jonathan Wakely <jwakely@redhat.com>
4639 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4640 (GLIBCXX_3.4.26): Add new exports.
4641 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4642 correct list of sources.
4643 * include/Makefile.in: Regenerate.
4644 * include/std/ostream (operator<<(nullptr_t)): New member function.
4645 * src/c++17/ostream-inst.cc: New file.
4646 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4649 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4651 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4652 of the source file containing the caller.
4653 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4654 directories created by test.
4655 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4657 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4659 * testsuite/experimental/filesystem/iterators/
4660 recursive_directory_iterator.cc: Likewise.
4662 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4664 PR tree-optimization/88775
4665 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4666 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4667 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4668 instead of __builtin_constant_p if available. Don't bother with
4669 the pointer comparison in C++11 and earlier.
4671 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4675 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4678 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4680 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4681 for filesystem::path. Give variables more distinctive names.
4683 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4684 member function to perform non-trivial assignment.
4685 (_Optional_payload_base::_M_move_assign): Likewise.
4686 (_Optional_payload<T, true, false, true>::operator=)
4687 (_Optional_payload<T, true, true, false>::operator=)
4688 (_Optional_payload<T, true, false, false>::operator=): Call
4689 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4692 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4693 test std::complex<long double> if long double format is IBM128.
4694 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4697 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4699 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4700 for old std::unique_ptr layout.
4701 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4702 to become valueless. Add filesystem::path tests.
4705 * include/std/optional (_Optional_payload_base): New class template
4706 for common code hoisted from _Optional_payload specializations. Use
4707 a template for the union, to allow a partial specialization for
4708 types with non-trivial destructors. Add constructors for in-place
4709 initialization to the union.
4710 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4711 to perform non-trivial copy construction, instead of relying on
4712 non-standard copy elision in a delegating constructor.
4713 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4714 non-trivial move construction.
4715 (_Optional_payload): Derive from _Optional_payload_base and use it
4716 for everything except the non-trivial assignment operators, which are
4718 (_Optional_payload<false, C, M>): Derive from the specialization
4719 _Optional_payload<true, false, false> and add a destructor.
4720 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4721 Forward to corresponding members of _Optional_payload.
4722 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4723 Hoist common members from _Optional_base.
4724 (_Optional_base): Make all members and base class public.
4725 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4726 _Optional_base_impl.
4727 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4728 support for new std::optional layout.
4729 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4732 * include/bits/locale_conv.h: Use <> for includes not "".
4733 * include/ext/random: Likewise.
4734 * include/ext/vstring.h: Likewise.
4736 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4738 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4739 (GLIBCXX_3.4.21): Likewise.
4741 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4744 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4745 to match the one that controls whether utimbuf and utime are declared.
4747 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4750 * include/bits/char_traits.h (char_traits::move): Do not pass null
4751 pointers to memmove.
4752 * include/bits/locale_facets.h
4753 (ctype<char>::widen(const char*, const char*, char*)): Do not
4754 pass null pointers to memcpy.
4755 (ctype<char>::narrow(const char*, const char*, char, char*)):
4757 (ctype<char>::do_widen(const char*, const char*, char*)):
4759 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4762 * doc/xml/manual/spine.xml: Update copyright years.
4763 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4764 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4765 for C++17 filesystem library.
4766 * doc/html/*: Regenerate.
4768 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4769 * config.h.in: Regenerate.
4770 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4771 alphabetically and add missing entries for copy_symlink,
4772 hard_link_count, rename, and resize_file.
4773 * configure: Regenerate.
4774 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4775 used unconditionally.
4776 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4777 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4778 supports truncating to zero length.
4779 * testsuite/27_io/filesystem/operations/all.cc: New test.
4780 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4782 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4785 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4786 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4787 * config.h.in: Regenerate.
4788 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4789 remaining std::filesystem types and functions.
4790 * configure: Regenerate.
4791 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4792 * src/c++17/Makefile.in: Regenerate.
4793 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4794 here, and change name of included file.
4795 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4796 here, and change name of included file.
4797 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4798 path to dir-common.h.
4799 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4800 path to ops-common.h. Disable -Wunused-parameter warnings.
4801 (internal_file_clock): Define unconditionally.
4802 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4804 (do_copy_file, do_space): Move definitions to ops.common.h.
4805 (copy, file_size, hard_link_count, last_write_time, space): Only
4806 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4808 (last_write_time, read_symlink): Remove unused attributes from
4810 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4811 * src/filesystem/Makefile.in: Regenerate.
4812 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4813 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4814 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4815 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4816 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4817 dummy types and functions instead of using #error.
4818 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4819 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4821 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4822 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4823 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4824 to account for new namespace.
4825 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4826 -lstdc++fs from dg-options.
4827 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4828 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4829 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4830 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4831 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4833 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4834 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4836 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4837 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4838 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4839 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4840 * testsuite/27_io/filesystem/operations/create_directories.cc:
4842 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4843 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4844 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4845 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4846 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4847 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4848 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4849 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4850 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4851 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4852 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4853 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4854 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4855 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4856 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4857 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4858 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4859 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4861 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4865 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4866 typeinfo and vtables less greedy.
4867 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4868 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4869 * src/c++17/Makefile.in: Regenerate.
4870 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4871 here, and change name of included file.
4872 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4873 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4875 * src/filesystem/Makefile.in: Regenerate.
4876 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4877 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4878 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4879 from dg-options and remove dg-require-filesystem-ts.
4880 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4881 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4882 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4883 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4884 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4885 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4886 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4887 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4888 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4889 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4890 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4891 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4892 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4893 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4894 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4895 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4896 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4897 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4898 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4899 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4900 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4902 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4903 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4904 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4905 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4906 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4907 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4908 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4909 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4910 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4911 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4912 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4913 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4915 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4917 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4919 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4921 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4922 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4923 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4924 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4925 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4926 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4927 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4928 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4929 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4930 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4932 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4933 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4934 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4935 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4936 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4939 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4940 Check is_trivially_copyable instead of is_scalar.
4941 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4942 contained value can throw and its type is trivially copyable then
4943 construct into a temporary variant and move from it, to provide the
4944 strong exception safety guarantee.
4945 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4947 * testsuite/20_util/variant/87431.cc: New test.
4948 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4949 conversion causes valueless state.
4952 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4953 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4954 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4955 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4956 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4958 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4960 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4961 (file_time_type): Redefine in terms of __file_clock.
4962 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4964 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4966 (internal_file_lock): New helper type for accessing __file_clock.
4967 (do_copy_file): Use internal_file_lock to convert system time to
4969 (last_write_time(const path&, error_code&)): Likewise.
4970 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4972 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4974 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
4975 for const member functions of std::basic_string.
4976 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
4978 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
4979 Make non-standard constructor private.
4980 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
4982 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
4983 explicit instantiations for C++17 as well as earlier dialects.
4984 * src/c++17/Makefile.am: Add new source files.
4985 * src/c++17/Makefile.in: Regenerate.
4986 * src/c++17/cow-string-inst.cc: New file defining explicit
4987 instantiations for basic_string member functions added in C++17.
4988 * src/c++17/string-inst.cc: Likewise.
4990 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
4991 copy/move constructors for old std::basic_string.
4992 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
4993 (basic_string::reference, basic_string::const_reference): Define
4994 as plain references for C++11 and later.
4995 (basic_string::basic_string()): Put constructor body outside
4996 preprocessor conditional groups.
4997 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
4998 instead of copying it.
4999 (basic_string::basic_string(const basic_string&, const _Alloc&)):
5001 (basic_string::basic_string(basic_string&&, const _Alloc&)):
5003 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
5004 cases for old basic_string.
5005 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
5006 allocator-extended constructors unconditionally. Add extra members to
5007 allocator type when using old string ABI.
5008 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
5010 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
5012 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
5013 -fno-inline added to test flags.
5015 * testsuite/21_strings/basic_string/requirements/
5016 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
5018 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
5019 assertion failures with old std::string ABI.
5021 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
5023 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
5024 functions that will only erase elements at the end.
5025 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
5026 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
5027 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
5029 (path::_List::pop_back()): Define.
5030 (path::_List::_M_erase_from(const_iterator)): Define.
5031 (path::operator/=(const path&)): Use pop_back to remove last component
5032 and _M_erase_from to remove multiple components.
5033 (path::_M_append(basic_string_view<value_type>)): Likewise.
5034 (path::operator+=(const path&)): Likewise.
5035 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5036 (path::remove_filename()): Likewise.
5037 (path::lexically_normal()): Use _List::_Impl iterators instead of
5038 path::iterator. Use pop_back to remove components from the end. Clear
5039 trailing filename, instead of using erase(const_iterator) to remove
5040 a non-final component.
5041 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5043 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5045 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5046 incorrect treatment of empty filename after trailing slash.
5047 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5049 * testsuite/21_strings/basic_string/modifiers/assign/char/
5050 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5052 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5053 move_assign_optim.cc: Likewise.
5055 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5056 Jakub Jelinek <jakub@redhat.com>
5059 * include/experimental/memory: Replace UTF-8 quote characters.
5060 * include/std/future: Replace UTF-8 "em dash" characters.
5062 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5065 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5066 * include/debug/forward_list: Likewise.
5067 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5069 * include/experimental/chrono: Likewise.
5070 * include/experimental/functional: Likewise.
5071 * include/experimental/ratio: Likewise.
5072 * include/experimental/system_error: Likewise.
5073 * include/experimental/tuple: Likewise.
5074 * include/experimental/type_traits: Likewise.
5075 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5076 * include/parallel/multiseq_selection.h: Likewise.
5079 * config/abi/pre/gnu.ver: Add missing exports.
5080 * testsuite/22_locale/collate_byname/88681.cc: New test.
5081 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5082 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5084 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5086 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5087 initializer_list<value_type> and from input iterator ranges.
5088 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5090 * testsuite/experimental/string_view/element_access/char/empty.cc:
5091 Fix year range in copyright header.
5093 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5095 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5096 Fix year range in copyright header.
5098 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5100 Update copyright years.
5102 Copyright (C) 2019 Free Software Foundation, Inc.
5104 Copying and distribution of this file, with or without modification,
5105 are permitted in any medium without royalty provided the copyright
5106 notice and this notice are preserved.