1 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
3 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
4 * doc/html/*: Regenerate.
6 2019-09-04 Mike Crowe <mac@mcrowe.com>
9 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
10 pthread_cond_clockwait function.
11 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
12 * configure: Regenerate.
13 * config.h.in: Regenerate.
14 * include/std/condition_variable: (condition_variable): Rename
15 __steady_clock_t typedef and add system_clock. Change __clock_t to be
16 a typedef for the preferred clock to convert arbitrary other clocks to.
17 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
19 (wait_until): Change __clock_t overload to use system_clock.
20 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
21 steady_clock overload that calls pthread_cond_clockwait.
22 (__wait_until_impl): Change __clock_t overload to use system_clock.
23 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
24 steady_clock for __clock_t if pthread_cond_clockwait is available.
26 2019-09-04 Mike Crowe <mac@mcrowe.com>
28 * testsuite/30_threads/condition_variable/members/2.cc (test01):
29 Parameterise so that test can be run against an arbitrary clock.
30 (main): Test using std::chrono::steady_clock and a user-defined
31 clock in addition to the previous std::chrono::system_clock.
32 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
34 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
36 * crossconfig.m4: Remove references to spu.
37 * configure: Regenerate.
38 * doc/xml/manual/appendix_contributing.xml: Remove references
39 to __ea as "badword" for spu.
40 * doc/html/manual/source_code_style.html: Regenerate.
41 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
42 to avoid __ea (as "badword" for spu).
43 (__ellint_rj): Likewise.
45 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
48 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
49 scanning to conform to the GNU Coding Standards.
50 * configure: Regenerate.
52 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
54 * src/c++17/memory_resource.cc: Use __constinit keyword.
56 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
58 * doc/xml/manual/abi.xml: Document 9.x library versions.
59 * doc/html/*: Regenerate.
61 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
63 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
64 (__detail::__to_chars_8_len): Remove.
65 (__detail::__to_chars_8): Inline length calculation here.
66 (__detail::__from_chars_binary): Use numeric_limits instead of
69 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
71 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
72 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
73 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
74 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
77 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
79 * testsuite_files/util/testsuite_performance.h
80 (resource_counter::start): Ignore unused malloc(0) result.
82 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
84 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
85 Model Object Technologies): Adjust name and link.
87 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
89 * include/std/charconv (__detail::__to_chars_8)
90 __detail::__to_chars_16): Replace array of precomputed digits with
91 arithmetic operations to avoid CPU cache misses. Remove zero
92 termination from array of digits to allow symbol merge with generic
93 implementation of __detail::__to_chars. Replace final offsets with
94 constants. Use __detail::__to_chars_len_2 instead of a generic
95 __detail::__to_chars_len.
96 (__detail::__to_chars): Remove zero termination from array of digits.
97 (__detail::__to_chars_2): Leading digit is always '1'.
99 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
101 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
103 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
105 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
107 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
110 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
111 to template parameters.
112 * include/bits/stl_uninitialized.h (uninitialized_copy)
113 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
114 diagnose invalid uses.
115 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
116 Adjust expected error.
117 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
119 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
121 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
123 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
125 * testsuite/23_containers/vector/cons/89164.cc: New test.
126 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
128 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
131 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
132 * configure: Regenerate.
133 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
135 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
137 * testsuite/util/testsuite_abi.cc: Add new symbol version.
139 2019-08-29 Jakub Jelinek <jakub@redhat.com>
141 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
142 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
144 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
146 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
147 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
148 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
149 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
150 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
151 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
152 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
154 2019-08-23 Joseph Myers <joseph@codesourcery.com>
156 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
157 (std::filesystem::__gnu_posix::lstat): Add return type.
159 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
161 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
163 * include/std/numeric (reduce): Fix Doxygen markup.
166 * include/std/type_traits (is_function): Simplify definition. Remove
167 partial specializations for function types.
168 (__is_referenceable): Simplify definition.
169 * testsuite/20_util/bind/91371.cc: New test.
170 * testsuite/20_util/is_function/91371.cc: New test.
171 * testsuite/20_util/is_function/value.cc: Check more pointer types.
172 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
173 * testsuite/20_util/is_object/91371.cc: New test.
175 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
177 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
179 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
182 * include/bits/std_function.h (__check_func_return_type): Remove.
183 (function::_Callable): Use std::__is_invocable_impl instead of
184 __check_func_return_type.
185 * include/std/type_traits (__is_invocable_impl): Add another defaulted
186 template parameter. Define a separate partial specialization for
187 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
188 with a check that models delayed temporary materialization.
189 * testsuite/20_util/function/91456.cc: New test.
190 * testsuite/20_util/is_invocable/91456.cc: New test.
192 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
194 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
196 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
198 Implement C++20 p0879 - Constexpr for swap and swap related functions.
199 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
200 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
202 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
203 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
204 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
205 * include/bits/move.h (swap): Add constexpr.
206 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
207 (__gcd, __rotate, rotate, __partition, __heap_select)
208 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
209 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
210 (__introselect, __chunk_insertion_sort, next_permutation)
211 (prev_permutation, partition, partial_sort, nth_element, sort)
212 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
213 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
214 (swap_ranges): Add constexpr.
215 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
216 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
218 * include/std/type_traits (swap): Add constexpr.
219 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
220 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
221 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
222 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
223 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
224 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
225 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
226 * testsuite/25_algorithms/partition/constexpr.cc: New test.
227 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
228 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
229 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
230 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
231 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
232 * testsuite/25_algorithms/sort/constexpr.cc: New test.
233 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
234 * testsuite/25_algorithms/swap/constexpr.cc: New test.
235 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
237 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
240 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
242 * include/std/tuple (__unpack_std_tuple): New variable template and
243 partial specializations.
244 (apply, make_from_tuple): Add noexcept-specifier.
245 * testsuite/20_util/tuple/apply/2.cc: New test.
246 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
248 2019-08-09 Corentin Gay <gay@adacore.com>
250 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
251 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
252 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
253 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
254 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
255 Add call to `VERIFY`.
257 2019-08-09 Alexandre Oliva <oliva@adacore.com>
260 (normal_mv_distribution::param_type::param_type): New private
261 ctor taking a decomposed varcov matrix, for use by...
262 (operator>>): ... this, befriended.
263 * include/ext/random.tcc (operator>>): Use it.
264 (normal_mv_distribution::param_type::_M_init_lower): Adjust
265 member function name in exception message.
267 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
269 P0325R4 to_array from LFTS with updates
270 * include/experimental/array (to_array): Qualify call to __to_array.
271 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
272 * include/std/version (__cpp_lib_to_array): Likewise.
273 * testsuite/23_containers/array/creation/1.cc: New test.
274 * testsuite/23_containers/array/creation/2.cc: New test.
275 * testsuite/23_containers/array/creation/3_neg.cc: New test.
276 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
277 Use zero for dg-error line number.
279 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
281 P1651R0 bind_front should not unwrap reference_wrapper
282 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
283 * include/std/version (__cpp_lib_bind_front): Update value.
284 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
286 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
288 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
289 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
290 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
291 specializations for __float128.
292 * testsuite/26_numerics/numbers/float128.cc: New test.
294 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
296 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
299 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
301 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
302 in <algorithm> and <utility> Headers.
303 Implement C++20 p1023 - constexpr comparison operators for std::array.
304 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
305 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
306 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
307 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
308 none_of, partition_copy, partition_point, remove, remove_if,
309 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
310 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
311 count_if, equal, find, find_first_of, find_if, for_each, generate,
312 generate_n, lexicographical_compare, merge, mismatch, replace,
313 replace_if, search, search_n, set_difference, set_intersection,
314 set_symmetric_difference, set_union, transform, unique_copy):
316 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
317 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
318 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
319 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
320 Use const ref instead of ref arg;
321 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
322 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
323 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
324 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
325 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
326 __iter_comp_iter): Mark constexpr.
327 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
328 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
329 none_of, any_of, find_if_not, is_partitioned, partition_point,
330 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
331 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
332 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
333 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
334 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
335 __equal_range, equal_range, binary_search, __includes, includes,
336 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
337 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
338 is_sorted_until, __is_permutation, is_permutation, for_each, find,
339 find_if, find_first_of, adjacent_find, count, count_if, search,
340 search_n, transform, replace, replace_if, generate, generate_n,
341 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
342 set_intersection, __set_difference, set_difference,
343 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
344 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
345 wrappers around __builtin_memmove and __builtin_memcmp
347 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
348 copy, move, __copy_move_b, __copy_move_backward_a,
349 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
350 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
351 __lexicographical_compare_impl, __lexicographical_compare,
352 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
353 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
354 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
355 is_heap): Mark constexpr.
356 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
357 is_heap): Mark constexpr.
358 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
359 * include/std/array: Make comparison ops constexpr.
360 * include/std/utility: Make exchange constexpr.
361 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
362 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
363 * testsuite/23_containers/array/tuple_interface/
364 tuple_element_neg.cc: Adjust.
365 * testsuite/20_util/exchange/constexpr.cc: New.
366 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
367 * testsuite/25_algorithms/constexpr_macro.cc: New.
368 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
369 * testsuite/25_algorithms/all_of/constexpr.cc: New.
370 * testsuite/25_algorithms/any_of/constexpr.cc: New.
371 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
372 * testsuite/25_algorithms/copy/constexpr.cc: New.
373 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
374 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
375 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
376 * testsuite/25_algorithms/count/constexpr.cc: New.
377 * testsuite/25_algorithms/count_if/constexpr.cc: New.
378 * testsuite/25_algorithms/equal/constexpr.cc: New.
379 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
380 * testsuite/25_algorithms/fill/constexpr.cc: New.
381 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
382 * testsuite/25_algorithms/find/constexpr.cc: New.
383 * testsuite/25_algorithms/find_end/constexpr.cc: New.
384 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
385 * testsuite/25_algorithms/find_if/constexpr.cc: New.
386 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
387 * testsuite/25_algorithms/for_each/constexpr.cc: New.
388 * testsuite/25_algorithms/generate/constexpr.cc: New.
389 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
390 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
391 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
392 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
393 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
394 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
395 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
396 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
397 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
398 * testsuite/25_algorithms/merge/constexpr.cc: New.
399 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
400 * testsuite/25_algorithms/none_of/constexpr.cc: New.
401 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
402 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
403 * testsuite/25_algorithms/remove/constexpr.cc: New.
404 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
405 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
406 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
407 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
408 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
409 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
410 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
411 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
412 * testsuite/25_algorithms/search/constexpr.cc: New.
413 * testsuite/25_algorithms/search_n/constexpr.cc: New.
414 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
415 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
416 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
417 * testsuite/25_algorithms/set_union/constexpr.cc: New.
418 * testsuite/25_algorithms/transform/constexpr.cc: New.
419 * testsuite/25_algorithms/unique/constexpr.cc: New.
420 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
421 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
423 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
425 * include/std/memory (make_obj_using_allocator): Qualify call to
426 uses_allocator_construction_args.
428 P0631R4 Math Constants
429 * include/Makefile.am: Add new header.
430 * include/Makefile.in: Regenerate.
431 * include/precompiled/stdc++.h: Include new header.
432 * include/std/numbers: New header.
433 * include/std/version (__cpp_lib_math_constants): Define.
434 * testsuite/26_numerics/numbers/1.cc: New test.
435 * testsuite/26_numerics/numbers/2.cc: New test.
436 * testsuite/26_numerics/numbers/3.cc: New test.
437 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
439 * include/std/bit: Add Doxygen comments.
442 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
443 constraints on deleter that should only apply to the constructor.
444 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
445 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
446 constraints on deleter here.
447 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
449 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
452 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
454 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
456 * testsuite/18_support/51333.cc: New test.
458 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
460 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
461 to the Doxygen manual. Avoid a "here" link on the way.
462 Fix another broken link to Doxygen docblocks.
464 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
466 * include/std/bit (__cpp_lib_endian): Define.
467 * include/std/version (__cpp_lib_endian): Define.
468 * testsuite/26_numerics/endian/2.cc: New.
469 * testsuite/26_numerics/endian/3.cc: New.
470 * testsuite/26_numerics/endian/4.cc: New.
472 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
474 * testsuite/util/testsuite_iterators.h
475 (bidirectional_iterator_wrapper): Fix type comment.
476 (random_access_iterator_wrapper): Likewise.
478 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
480 * include/std/bit (endian): Move definition here as per P1612R1.
481 * include/std/type_traits (endian): Remove definition from here.
482 * testsuite/20_util/endian/1.cc: Rename to ...
483 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
485 2019-07-25 Martin Liska <mliska@suse.cz>
486 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
489 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
491 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
492 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
493 * testsuite/ext/new_allocator/check_new.cc: Likewise.
495 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
497 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
498 * testsuite/26_numerics/bit/bit.count/*: Here.
500 * include/std/bit (__rotl, __rotr): Change second parameter from
501 unsigned int to int and handle negative values.
502 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
503 parameter from unsigned int to int. Add nodiscard attribute.
504 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
505 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
507 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
508 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
511 * include/std/bit (__ceil2): Make unrepresentable results undefined,
512 as per P1355R2. Add debug assertion. Perform one left shift, not two,
513 so that out of range values cause undefined behaviour. Ensure that
514 shift will still be undefined if left operand is promoted.
515 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
516 unrepresentable values with checks that they are not core constant
518 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
520 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
522 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
523 sized deallocation size computation.
525 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
527 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
529 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
531 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
532 (~_Temporary_buffer()): Use latter.
533 (_Temporary_buffer(_FIterator, size_type)): Likewise.
535 2019-07-17 Andreas Schwab <schwab@suse.de>
537 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
539 2019-07-16 Jason Merrill <jason@redhat.com>
541 * include/std/memory (uses_allocator_construction_args): Add parens
544 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
546 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
548 * include/experimental/string_view (__detail::__idt): Remove.
549 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
550 Use __type_identity_t instead of __detail::__idt;
551 * include/std/string_view (__detail::__idt): Remove.
552 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
553 Use __type_identity_t instead of __detail::__idt;
554 * include/std/type_traits (__type_identity_t): New alias template.
556 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
557 and floating point atomics.
559 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
561 * doc/xml/manual/configure.xml: Improve documentation of
562 --enable-libstdcxx-time option.
564 * include/bits/atomic_base.h (__atomic_impl): New namespace for
565 wrappers around atomic built-ins.
566 (__atomic_float, __atomic_ref): New class templates for use as base
568 * include/std/atomic (atomic<float>, atomic<double>)
569 (atomic<long double>): New explicit specializations.
570 (atomic_ref): New class template.
571 (__cpp_lib_atomic_ref): Define.
572 * include/std/version (__cpp_lib_atomic_ref): Define.
573 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
574 * testsuite/29_atomics/atomic_float/1.cc: New test.
575 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
576 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
577 * testsuite/29_atomics/atomic_ref/float.cc: New test.
578 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
579 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
580 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
581 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
583 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
585 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
586 throw() with _GLIBCXX_NOTHROW.
587 (__atomic_add_dispatch): Return after performing atomic increment.
589 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
591 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
592 (__exchange_and_add): Replace static specifier with always_inline
594 (__exchange_and_add_single, __atomic_add_single): Likewise.
595 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
596 combine !__gthread_active_p() and !__GTHREADS branches.
598 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
601 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
602 * configure: Regenerate.
603 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
605 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
606 * testsuite/util/testsuite_abi.cc: Add new symbol version.
608 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
610 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
611 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
612 instead of __is_identifier to detect Clang support.
614 2019-07-02 Jim Wilson <jimw@sifive.com>
616 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
618 * configure: Regenerate.
620 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
623 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
624 for the what_arg parameters.
625 (filesystem_error::filesystem_error): Pass system_error::what() to
626 the _Impl constructor.
627 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
628 filesystem_error::what() contains system_error::what().
630 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
632 * include/std/charconv (chars_format): Define bitmask type.
633 * testsuite/20_util/to_chars/chars_format.cc: New test.
635 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
636 * include/std/bit (_If_is_unsigned_integer_type): Remove.
637 (_If_is_unsigned_integer): Use __is_unsigned_integer.
638 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
639 (countl_one(byte), countr_zero(byte), countr_one(byte))
640 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
641 (log2p1(byte)): Remove.
642 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
643 (__detail::__is_int_to_chars_type): Remove.
644 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
645 and __is_unsigned_integer.
646 * include/std/type_traits (__is_one_of): Move here from <charconv>.
647 (__is_signed_integer, __is_unsigned_integer): New helpers.
648 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
650 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
651 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
652 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
653 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
654 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
655 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
656 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
657 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
658 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
659 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
661 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
663 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
666 2019-06-25 Jakub Jelinek <jakub@redhat.com>
668 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
669 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
670 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
671 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
673 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
675 * include/std/numeric (midpoint(T, T)): Change implementation for
676 floating-point types to avoid incorrect rounding of denormals.
677 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
678 rounding with denormals.
679 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
680 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
682 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
684 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
686 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
688 * configure: Regenerate.
690 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
691 Qualify calls to __never_valueless.
693 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
696 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
697 vector<bool> for test.
698 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
700 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
702 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
704 (istream_iterator::_M_read()): Do not check stream state before
705 attempting extraction. Set stream pointer to null when extraction
707 (operator==(const istream_iterator&, const istream_iterator&)): Change
708 to be a hidden friend of istream_iterator.
709 (operator!=(const istream_iterator&, const istream_iterator&)):
711 (ostream_iterator::ostream_iterator()): Add default constructor.
712 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
714 * testsuite/24_iterators/istream_iterator/1.cc: New test.
715 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
716 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
717 constructor taking a string.
718 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
721 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
722 Jonathan Wakely <jwakely@redhat.com>
725 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
726 values of type bool for vector<bool> elements.
727 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
728 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
730 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
732 PR libstdc++/90920 partially revert r263433
733 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
734 (rotate): Remove checks.
735 * testsuite/25_algorithms/rotate/90920.cc: New test.
737 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
738 category used in invocable check.
739 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
740 * testsuite/26_numerics/reduce/2.cc: New test.
742 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
744 * include/bits/algorithmfwd.h: Change title of doc group.
745 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
747 * include/bits/stl_numeric.h: Define doc group and add algos to it.
748 * include/std/numeric (__is_random_access_iter): New internal trait.
749 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
750 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
751 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
752 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
753 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
754 * testsuite/26_numerics/reduce/1.cc: New test.
755 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
756 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
757 * testsuite/26_numerics/transform_reduce/1.cc: New test.
758 * testsuite/util/testsuite_iterators.h (test_container::size()): New
761 * include/c_global/cstddef (std::byte): Perform arithmetic operations
762 in unsigned int to avoid promotion (LWG 2950).
764 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
766 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
769 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
771 PR libstdc++/90281 Fix string conversions for filesystem::path
772 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
773 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
774 __str_codecvt_in_all to fail for partial conversions and throw on
776 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
777 (path::_Cvt<char8_t>): Add explicit specialization.
778 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
780 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
781 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
782 instead of codecvt_utf8. Use __str_codecvt_in_all and
783 __str_codecvt_out_all.
784 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
785 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
786 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
787 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
788 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
789 after converting to UTF-8.
790 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
791 __str_codecvt_in_all.
792 (path::string): Fix initialization of string types with different
794 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
795 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
796 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
798 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
799 return false for partial conversions.
800 * include/experimental/bits/fs_path.h (u8path):
801 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
802 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
803 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
804 instead of codecvt_utf8. Use __str_codecvt_in_all and
805 __str_codecvt_out_all.
806 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
807 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
808 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
809 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
810 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
811 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
812 __str_codecvt_in_all.
813 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
814 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
815 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
816 __str_codecvt_in_all.
817 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
818 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
819 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
820 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
821 strings and with Unicode characters outside the basic multilingual
823 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
824 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
825 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
826 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
827 * testsuite/experimental/filesystem/path/native/string.cc: Test with
828 empty strings and with Unicode characters outside the basic
831 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
832 Jonathan Wakely <jwakely@redhat.com>
834 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
835 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
836 deallocate node if insertion fails.
837 (_Hashtable::_M_insert_multi_node): Likewise.
838 (_Hashtable::_M_reinsert_node): Pass additional key argument.
839 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
840 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
841 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
842 (_Hashtable::extract(const _Key&)): Likewise.
843 (_Hashtable::_M_merge_unique): Pass additional key argument.
844 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
846 (_Hashtable::_M_insert): Likewise.
847 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
848 (_Hashtable_alloc): Add comments to functions with misleading names.
850 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
852 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
854 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
855 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
856 header for std::allocator.
857 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
858 using-declaration for std::size_t.
859 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
861 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
863 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
864 * testsuite/experimental/map/erasure.cc: Include <string> for
866 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
868 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
870 * include/experimental/type_traits (experimental::nonesuch): Use
871 pragma to disable -Wctor-dtor-privacy warnings.
872 * include/std/type_traits (__is_convertible_helper<From, To, false>)
873 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
875 * include/std/version (__cpp_lib_bind_front): Add missing macro.
877 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
879 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
880 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
881 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
882 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
884 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
885 (variant::emplace): Change static_assert messages from "should be"
887 (hash<monostate>::operator()): Remove name of unused parameter.
889 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
892 * include/Makefile.am: Add new <bits/charconv.h> header.
893 * include/Makefile.in: Regenerate.
894 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
895 (to_string(long), to_string(unsigned long), to_string(long long))
896 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
897 * include/bits/charconv.h: New header.
898 (__detail::__to_chars_len): Move here from <charconv>.
899 (__detail::__to_chars_10_impl): New function extracted from
900 __detail::__to_chars_10.
901 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
902 (__to_chars_unsigned_type): New class template that reuses
903 __make_unsigned_selector_base::__select to pick a type.
904 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
905 (__detail::__to_chars_len): Move to new header.
906 (__detail::__to_chars_10): Add inline specifier. Move code doing the
907 output to __detail::__to_chars_10_impl and call that.
908 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
909 * testsuite/21_strings/basic_string/numeric_conversions/char/
910 to_string.cc: Fix reference in comment. Remove unused variable.
911 * testsuite/21_strings/basic_string/numeric_conversions/char/
912 to_string_int.cc: New test.
914 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
916 Fix ConstexprIterator requirements tests - No constexpr algorithms!
917 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
918 Replace copy with hand-rolled loop.
919 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
922 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
924 Test for C++20 p0858 - ConstexprIterator requirements.
925 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
927 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
930 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
932 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
934 * include/bits/c++config: Rename all macros of the form __PSTL* to
936 * include/std/algorithm: Likewise.
937 * include/std/execution: Likewise.
938 * include/std/numeric: Likewise.
939 * include/std/memory: Likewise.
940 * include/pstl/glue_memory_impl.h: Likewise.
941 * include/pstl/numeric_impl.h: Likewise.
942 * include/pstl/glue_memory_defs.h: Likewise.
943 * include/pstl/execution_defs.h: Likewise.
944 * include/pstl/utils.h: Likewise.
945 * include/pstl/algorithm_fwd.h: Likewise.
946 * include/pstl/unseq_backend_simd.h: Likewise.
947 * include/pstl/glue_execution_defs.h: Likewise.
948 * include/pstl/algorithm_impl.h: Likewise.
949 * include/pstl/parallel_impl.h: Likewise.
950 * include/pstl/memory_impl.h: Likewise.
951 * include/pstl/glue_numeric_defs.h: Likewise.
952 * include/pstl/parallel_backend_utils.h: Likewise.
953 * include/pstl/glue_algorithm_defs.h: Likewise.
954 * include/pstl/parallel_backend.h: Likewise.
955 * include/pstl/glue_numeric_impl.h: Likewise.
956 * include/pstl/parallel_backend_tbb.h: Likewise.
957 * include/pstl/numeric_fwd.h: Likewise.
958 * include/pstl/glue_algorithm_impl.h: Likewise.
959 * include/pstl/execution_impl.h: Likewise.
960 * include/pstl/pstl_config.h: Likewise.
961 * testsuite/util/pstl/pstl_test_config.h: Likewise.
962 * testsuite/util/pstl/test_utils.h: Likewise.
963 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
965 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
967 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
969 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
970 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
971 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
972 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
973 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
975 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
976 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
977 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
978 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
979 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
981 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
982 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
983 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
984 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
985 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
987 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
988 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
989 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
991 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
993 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
994 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
995 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
997 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
999 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
1001 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
1003 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
1005 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
1007 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
1009 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
1011 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
1013 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
1015 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
1017 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
1019 Rename header guards to be consistent with upstream project's
1021 * include/pstl/glue_memory_impl.h: Rename all macros of the form
1022 _PSTL_(.*)_H to _PSTL_\U\1_H.
1023 * include/pstl/numeric_impl.h: Likewise.
1024 * include/pstl/glue_memory_defs.h: Likewise.
1025 * include/pstl/execution_defs.h: Likewise.
1026 * include/pstl/utils.h: Likewise.
1027 * include/pstl/algorithm_fwd.h: Likewise.
1028 * include/pstl/unseq_backend_simd.h: Likewise.
1029 * include/pstl/glue_execution_defs.h: Likewise.
1030 * include/pstl/algorithm_impl.h: Likewise.
1031 * include/pstl/parallel_impl.h: Likewise.
1032 * include/pstl/memory_impl.h: Likewise.
1033 * include/pstl/glue_numeric_defs.h: Likewise.
1034 * include/pstl/parallel_backend_utils.h: Likewise.
1035 * include/pstl/glue_algorithm_defs.h: Likewise.
1036 * include/pstl/parallel_backend.h: Likewise.
1037 * include/pstl/glue_numeric_impl.h: Likewise.
1038 * include/pstl/parallel_backend_tbb.h: Likewise.
1039 * include/pstl/numeric_fwd.h: Likewise.
1040 * include/pstl/glue_algorithm_impl.h: Likewise.
1041 * include/pstl/execution_impl.h: Likewise.
1042 * include/pstl/pstl_config.h: Likewise.
1043 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1045 Synchronize libstdc++ parallel algorithms with upstream
1047 * include/pstl/algorithm_fwd.h: Synchronize with
1048 upstream PSTL project.
1049 * include/pstl/algorithm_impl.h: Likewise.
1050 * include/pstl/execution_defs.h: Likewise.
1051 * include/pstl/execution_impl.h: Likewise.
1052 * include/pstl/glue_algorithm_impl.h: Likewise.
1053 * include/pstl/glue_execution_defs.h: Likewise.
1054 * include/pstl/numeric_fwd.h: Likewise.
1055 * include/pstl/numeric_impl.h: Likewise.
1056 * include/pstl/parallel_backend.h: Likewise.
1057 * include/pstl/pstl_config.h: Likewise.
1058 * include/pstl/unseq_backend_simd.h: Likewise.
1059 * include/pstl/parallel_backend_serial.h: New file.
1060 * include/Makefile.am (pstl_headers): Add
1061 parallel_backend_serial.h.
1062 * include/Makefile.in: Regenerate.
1064 Clean up non-conforming names
1065 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1066 Uglfiy copy_range1 and copy_range2
1067 (__pattern_walk2_n): Rename local n to __n
1068 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1069 Rename parameter _T to _Tp.
1071 Integrate non-TBB serial backend support
1072 * include/bits/c++config: Adjust TBB detection logic to select serial
1073 PSTL backend if no TBB present.
1074 * testsuite/utils/pstl/test_utils.h: Remove check for
1075 _PSTL_USE_PAR_POLICIES
1077 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1079 * testsuite/24_iterators/container_access.cc: Move dg-options before
1080 dg-do directive so the target check uses the -std option.
1083 * configure: Regenerate.
1084 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1085 * src/Makefile.in: Regenerate.
1087 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1089 * include/std/array: Do not include <stdexcept>.
1090 * include/std/optional: Include <exception> and
1091 <bits/exception_defines.h> instead of <stdexcept>.
1092 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1094 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1096 * testsuite/23_containers/map/erasure.cc: Include <string>.
1097 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1099 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1100 dg-prune-output for different C++98 diagnostic.
1101 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1103 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1105 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1107 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1109 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1111 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1113 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1115 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1117 * testsuite/23_containers/vector/requirements/dr438/
1118 constructor_1_neg.cc: Likewise.
1119 * testsuite/23_containers/vector/requirements/dr438/
1120 constructor_2_neg.cc: Likewise.
1121 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1123 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1125 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1126 Do not test allocator rebinding extension for C++2a.
1127 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1128 dg-do directive for C++17 and C++2a.
1130 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1131 1_c++0x.cc: Remove redundant test.
1132 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1133 2.cc: Use target selector instead of preprocessor condition.
1134 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1135 3.cc: Do not run test for C++2a.
1136 * testsuite/23_containers/forward_list/requirements/
1137 explicit_instantiation/3.cc: Likewise.
1138 * testsuite/23_containers/forward_list/requirements/
1139 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1141 * testsuite/23_containers/list/requirements/explicit_instantiation/
1142 1_c++0x.cc: Remove redundant test.
1143 * testsuite/23_containers/list/requirements/explicit_instantiation/
1144 2.cc: Use target selector instead of preprocessor condition.
1145 * testsuite/23_containers/list/requirements/explicit_instantiation/
1146 3.cc: Do not run test for C++2a.
1147 * testsuite/23_containers/list/requirements/explicit_instantiation/
1148 5.cc: Do not test allocator rebinding extension for C++2a.
1149 * testsuite/23_containers/map/requirements/explicit_instantiation/
1150 1_c++0x.cc: Remove redundant test.
1151 * testsuite/23_containers/map/requirements/explicit_instantiation/
1152 2.cc: Adjust comment.
1153 * testsuite/23_containers/map/requirements/explicit_instantiation/
1154 3.cc: Do not run test for C++2a.
1155 * testsuite/23_containers/map/requirements/explicit_instantiation/
1156 5.cc: Do not test allocator rebinding extension for C++2a.
1157 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1158 1_c++0x.cc: Remove redundant test.
1159 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1160 3.cc: Do not run test for C++2a.
1161 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1162 5.cc: Do not test allocator rebinding extension for C++2a.
1163 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1164 3.cc: Do not run test for C++2a.
1165 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1166 5.cc: Do not test allocator rebinding extension for C++2a.
1167 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1168 Do not run test for C++2a.
1169 * testsuite/23_containers/set/requirements/explicit_instantiation/
1170 1_c++0x.cc: Remove redundant test.
1171 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1172 Do not test allocator rebinding extension for C++2a.
1173 * testsuite/23_containers/unordered_map/requirements/
1174 explicit_instantiation/3.cc: Likewise.
1175 * testsuite/23_containers/unordered_map/requirements/
1176 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1178 * testsuite/23_containers/unordered_multimap/requirements/
1179 explicit_instantiation/3.cc: Do not run test for C++2a.
1180 * testsuite/23_containers/unordered_multimap/requirements/
1181 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1183 * testsuite/23_containers/unordered_multiset/requirements/
1184 explicit_instantiation/3.cc: Do not run test for C++2a.
1185 * testsuite/23_containers/unordered_multiset/requirements/
1186 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1188 * testsuite/23_containers/unordered_set/requirements/
1189 explicit_instantiation/3.cc: Do not run test for C++2a.
1190 * testsuite/23_containers/unordered_set/requirements/
1191 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1193 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1194 2.cc: Remove redundant test.
1195 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1196 3.cc: Do not run test for C++2a.
1197 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1200 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1201 (is_abstract, is_aggregate): Remove static_assert.
1202 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1204 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1205 missing -std=gnu++17 option.
1206 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1207 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1208 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1211 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1212 * testsuite/18_support/set_unexpected.cc: Likewise.
1213 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1215 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1216 function to be valid in C++11.
1217 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1218 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1219 include Library Fundamentals or Networking headers in C++11 mode.
1220 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1222 * include/std/tuple (_TC): Replace with _TupleConstraints.
1223 (_TupleConstraints): New helper for SFINAE constraints, with more
1224 expressive member functions to reduce duplication when used.
1225 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1226 (tuple::_TCC): Replace dummy type parameter with bool non-type
1227 parameter that can be used to check the pack size.
1228 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1229 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1230 checking constraints in constructors.
1231 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1233 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1234 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1235 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1236 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1237 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1238 constraints in constructors.
1239 (tuple::__is_alloc_arg()): New SFINAE helpers.
1240 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1242 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1243 * testsuite/20_util/tuple/cons/90700.cc: New test.
1244 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1245 to meet new constraint on allocator-extended default constructor.
1247 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1249 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1250 * include/bits/stl_multimap.h (multimap): Likewise.
1252 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1254 Rename variables and cleanup comments.
1255 * include/bits/hashtable_policy.h
1256 * include/bits/hashtable.h
1258 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1260 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1261 Fix bgcolor for P0340R3.
1262 * doc/html/*: Regenerate.
1265 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1266 <experimental/memory_resource>.
1267 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1268 P0339R6, P0340R3, P1164R1 and P1357R1.
1269 * doc/html/*: Regenerate.
1271 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1272 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1273 allocator::value_type assertion for C++2a.
1274 * include/bits/hashtable.h: Likewise.
1275 * include/bits/stl_deque.h: Likewise.
1276 * include/bits/stl_list.h: Likewise.
1277 * include/bits/stl_map.h: Likewise.
1278 * include/bits/stl_multimap.h: Likewise.
1279 * include/bits/stl_multiset.h: Likewise.
1280 * include/bits/stl_set.h: Likewise.
1281 * include/bits/stl_vector.h: Likewise.
1282 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1283 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1284 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1285 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1286 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1287 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1288 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1289 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1290 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1291 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1292 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1293 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1295 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1297 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1299 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1301 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1303 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1305 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1307 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1309 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1312 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1313 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1314 * libsupc++/eh_term_handler.h: New header defining
1315 _GLIBCXX_DEFAULT_TERM_HANDLER.
1316 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1317 (set_terminate): Restore default handler when argument is null.
1318 (set_unexpected): Likewise.
1319 * testsuite/18_support/set_terminate.cc: New test.
1320 * testsuite/18_support/set_unexpected.cc: New test.
1322 * include/backward/hashtable.h (size_t, ptrdiff_t)
1323 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1324 (distance, vector, pair, __iterator_category): Remove
1325 using-declarations that add these names to namespace __gnu_cxx.
1326 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1327 * include/ext/debug_allocator.h (size_t): Likewise.
1328 * include/ext/functional (size_t, unary_function, binary_function)
1329 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1331 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1332 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1333 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1334 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1335 * include/ext/numeric (iota): Fix outdated comment.
1336 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1337 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1338 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1339 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1340 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1342 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1343 (allocator, __true_type, __false_type): Likewise.
1345 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1348 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1349 New helpers for checking preconditions in traits.
1350 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1351 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1352 (is_destructible, is_nothrow_destructible, is_constructible)
1353 (is_default_constructible, is_copy_constructible)
1354 (is_move_constructible, is_nothrow_default_constructible)
1355 (is_nothrow_constructible, is_nothrow_copy_constructible)
1356 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1357 (is_nothrow_assignable, is_nothrow_copy_assignable)
1358 (is_nothrow_move_assignable, is_trivially_constructible)
1359 (is_trivially_copy_constructible, is_trivially_move_constructible)
1360 is_trivially_assignable, is_trivially_copy_assignable)
1361 (is_trivially_move_assignable, is_trivially_destructible)
1362 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1363 (is_invocable_r, is_nothrow_invocable)
1364 (has_unique_object_representations, is_aggregate): Add static_asserts
1365 to make sure that type traits are not misused with incomplete types.
1366 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1367 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1368 base characteristics without assertions that can be reused in other
1370 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1371 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1373 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1374 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1375 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1376 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1377 * testsuite/20_util/is_function/value.cc: Likewise.
1378 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1379 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1381 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1382 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1383 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1384 * testsuite/20_util/is_union/value.cc: Likewise.
1385 * testsuite/20_util/is_void/value.cc: Likewise.
1386 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1388 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1390 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1391 Add new private member function.
1392 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1393 (random_device::_M_init_pretr1(const string&)): Call new private
1394 member with string data.
1395 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1397 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1398 test using COW strings.
1399 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1400 a value from the device.
1401 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1402 Fix typo in token string.
1404 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1406 LWG2788 basic_string spurious use of a default constructible allocator
1407 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1408 (basic_string::_M_replace_dispatch): Construct temporary string with
1409 the current allocator.
1410 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1411 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1413 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1415 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1417 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1418 section about new/delete overloads. Improve section on verbose
1420 * doc/html/*: Regenerate.
1422 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1423 P0811R3. Change status of P1353R0.
1424 * doc/html/*: Regenerate.
1426 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1427 documentation of implementation-defined types for [thread.req.native].
1428 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1429 implementation-defined strings for [variant.bad.access]. Fix typo in
1430 documentation of implementation-defined support for [fs.conform.9945].
1431 * doc/html/*: Regenerate.
1433 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1436 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1437 that fails on mingw-w64.
1440 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1441 (status(const path&, error_code&)): Use parent_path() to remove
1443 (symlink_status(const path&, error_code&)): Duplicate workaround for
1444 bug in _wstat for paths with trailing slash.
1445 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1446 with trailing slash.
1447 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1448 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1450 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1451 once instead of building it iteratively.
1453 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1455 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1456 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1457 the assembler supports rdseed.
1458 * config.h.in: Regenerate.
1459 * configure: Regenerate.
1460 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1461 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1462 * doc/html/*: Regenerate.
1463 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1464 * include/bits/random.h (random_device::random_device()): Always call
1465 _M_init rather than _M_init_pretr1.
1466 (random_device::random_device(const string&)): Likewise.
1467 (random_device::operator()()): Always call _M_getval().
1468 (random_device::_M_file): Replace first member of union with an
1469 anonymous struct, with _M_file as its first member.
1470 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1471 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1472 (USE_MT19937): Define if none of the above are defined.
1473 (USE_POSIX_FILE_IO): Define.
1474 (_M_strtoul): Remove.
1475 [USE_RDSEED] (__x86_rdseed): Define new function.
1476 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1477 (random_device::_M_init(const string&)): Initialize new union members.
1478 Add support for "rdseed" and "rand_s" tokens. Decide what the
1479 "default" token does according to which USE_* macros are defined.
1480 [USE_POSIX_FILE_IO]: Store a file descriptor.
1481 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1482 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1483 code from _M_strtoul.
1484 [!USE_MT19937]: Call _M_init, transforming the old default token or
1485 numeric tokens to "default".
1486 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1487 (random_device::_M_getval()): Use new union members to obtain a
1488 random number from the stored function pointer or file descriptor.
1489 [USE_MT19937]: Obtain a value from the mt19937 engine.
1490 (random_device::_M_getval_pretr1()): Call _M_getval().
1491 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1493 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1494 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1496 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1499 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1500 _M_split_cmpts() for a path with multiple components.
1501 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1502 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1503 components and reserve space in vector. Return early when there is
1505 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1506 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1508 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1509 form of std::equals for C++11 compatibility.
1511 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1513 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1514 C++ standard at ansi.org.
1516 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1518 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1519 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1522 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1523 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1525 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1527 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1529 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1530 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1531 "compile" test to "run".
1533 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1534 * doc/html/*: Regenerate.
1535 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1536 rvalue aliasing constructor.
1537 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1538 (reinterpret_pointer_cast): Add overloads taking rvalues.
1539 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1540 Add rvalue aliasing constructor.
1541 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1542 "run" and check return values as well as types.
1543 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1544 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1545 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1546 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1549 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1550 * doc/xml/manual/intro.xml: Likewise.
1551 * include/std/future (__create_task_state): Add default arguments
1552 to make providing an allocator optional.
1553 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1554 instead of delegating to another constructor.
1555 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1556 define allocator-extended constructors for C++17 and later.
1557 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1559 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1560 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1561 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1563 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1565 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1566 Don't run the libstdc++/83237 part on simulator targets.
1568 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1570 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1572 * doc/html/*: Regenerate.
1574 * include/experimental/any (__any_caster): Use RTTI if comparing
1575 addresses fails, to support non-unique addresses in shared libraries.
1576 * include/std/any (__any_caster): Likewise.
1579 * include/experimental/any (__any_caster): Constrain to only be
1580 callable for object types. Use remove_cv_t instead of decay_t.
1581 If the type decays or isn't copy constructible, compare the manager
1582 function to a dummy specialization.
1583 (__any_caster): Add overload constrained for non-object types.
1584 (any::_Manager_internal<_Op>): Add dummy specialization.
1585 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1588 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1591 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1592 reversed arguments to uninitialized_copy_n.
1593 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1594 is unchanged by copy assignment.
1595 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1596 compare path components.
1599 * include/experimental/memory_resource: Add system header pragma and
1600 do not define anything unless compiled as C++14 or later.
1601 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1602 (__resource_adaptor_imp::do_allocate): If the requested alignment
1603 is a fundamental alignment then either allocate directly from _M_alloc
1604 or call the new _M_allocate function.
1605 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1606 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1607 of the allocator rebound to a POD type with the specified alignment.
1608 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1609 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1610 Adjust expected allocation sizes.
1611 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1612 xfail for Solaris x86.
1614 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1616 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1617 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1618 Use std::__remove_cvref_t when building with GCC.
1620 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1623 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1624 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1625 Use check_v3_target_prop_cached to cache the result of the test.
1627 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1629 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1632 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1633 Changed v3_target_compile check from preprocess to executable.
1634 Added "-ltbb" to v3_target_compile flags.
1636 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1638 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1639 Add check for Thread Building Blocks 2018 or later.
1641 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1643 * testsuite/experimental/names.cc: Only include Networking TS headers
1644 on targets with the necessary Gthreads support.
1646 2019-05-20 Marek Polacek <polacek@redhat.com>
1648 CWG 2094 - volatile scalars are trivially copyable.
1650 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1651 result for volatile int.
1653 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1655 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1656 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1659 PR c++/90532 Ensure __is_constructible(T[]) is false
1660 * include/std/type_traits (__do_is_default_constructible_impl)
1661 (__is_default_constructible_atom, __is_default_constructible_safe):
1663 (is_default_constructible): Use is_constructible.
1664 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1665 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1666 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1667 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1670 2019-05-20 Pádraig Brady <pbrady@fb.com>
1672 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1673 to the deallocator with -fsized-deallocation.
1675 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1677 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1678 test by passing correct alignment to deallocate function.
1680 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1683 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1684 Raise exception if unique_ptr tuple member has unknown structure.
1685 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1686 Adjust worker to support new __uniq_ptr_data base class. Do not
1687 assume field called _M_head_impl is the first tuple element.
1689 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1691 * include/bits/stl_deque.h
1692 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1693 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1694 (_Deque_base::_Deque_impl_data): New.
1695 (_Deque_base::_Deque_impl): Inherit latter.
1696 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1697 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1698 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1699 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1700 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1701 (deque<>::deque()): Default.
1702 (deque<>::deque(deque&&)): Default.
1703 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1704 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1705 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1706 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1707 _M_range_initialize.
1708 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1709 (deque<>::resize(size_type, const value_type&)): Share a single
1711 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1712 _M_range_insert_aux.
1713 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1714 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1715 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1716 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1718 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1721 * include/std/variant (holds_alternative, get, get_if): Improve
1722 static assertion messages.
1723 (bad_variant_access::bad_variant_access()): Change default message.
1724 (__throw_bad_variant_access(bool)): New overload.
1725 (get): Use new overload.
1726 (visit, visit<R>): Improve exception message.
1728 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1729 targets. Add more cases from P0608R3.
1730 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1732 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1733 * include/experimental/type_traits (is_detected_exact)
1734 (is_detected_exact_v): Likewise.
1735 * include/pstl/execution_defs.h (is_execution_policy)
1736 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1737 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1738 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1739 * testsuite/experimental/names.cc: New test.
1742 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1743 assertions from the destructor.
1744 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1745 Move static_assert for hash function to here.
1746 (_Hash_table_base::_M_equals): Move static_assert for equality
1748 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1750 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1751 the value directly instead of calling _S_value.
1752 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1753 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1754 _S_key(_Const_Link_type).
1755 * testsuite/23_containers/set/85965.cc: Check construction,
1756 destruction, assignment and size() do not trigger the assertions.
1757 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1758 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1760 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1761 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1762 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1763 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1764 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1765 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1766 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1768 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1769 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1772 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1774 * doc/html/*: Regenerate.
1775 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1776 of decay_t (P0777R1).
1778 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1780 Move from state of allocators (LWG2593)
1781 * include/bits/stl_deque.h
1782 (_Deque_base(_Deque_base&&, false_type)): Remove.
1783 (_Deque_base(_Deque_base&&, true_type)): Remove.
1784 (_Deque_base(_Deque_base&&)): Adapt.
1785 (_Deque_base::_M_move_impl()): Remove.
1786 * testsuite/util/testsuite_allocator.h
1787 (propagating_allocator(propagating_allocator&&)): Preserve move from
1789 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1791 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1793 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1794 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1795 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1797 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1799 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1800 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1802 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1804 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1806 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1808 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1810 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1812 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1814 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1817 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1819 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1820 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1822 * include/std/variant (__overload_set): Remove.
1824 (_Build_FUN): New class template to define a single FUN overload,
1825 with specializations to prevent unwanted conversions, as per P0608R3.
1826 (_Build_FUNs): New class template to build an overload set of FUN.
1827 (_FUN_type): New alias template to perform overload resolution.
1828 (__accepted_type): Use integer_constant base for failure case. Use
1829 _FUN_type for successful case.
1830 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1831 (variant::variant(_Tp&&)): Likewise.
1832 (variant::operator=(_Tp&&)): Likewise.
1834 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1835 Replace raw visitation with a runtime check for the valueless state
1836 and a non-raw visitor.
1837 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1838 (variant::index()): Remove branch.
1839 (variant::swap(variant&)): Use valueless_by_exception() instead of
1840 comparing the index to variant_npos, and add likelihood attribute.
1842 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1843 (_Hashtable_base::_Equal_hash_code): Define new class template.
1844 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1847 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1848 Replace with _M_get non-static member function.
1849 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1851 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1852 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1854 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1855 _S_get accessors for members in EBO helpers.
1856 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1857 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1859 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1861 (_Hashtable_base::_M_eq()): Remove non-const overload.
1863 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1865 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1867 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1869 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1872 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1874 * config/os/solaris/solaris2.10: Move to ...
1875 * config/os/solaris: ... this.
1876 * configure.host (os_include_dir): Adapt.
1877 (abi_baseline_pair): Remove Solaris 10 handling.
1878 * config/abi/post/i386-solaris2.10: Remove.
1879 * config/abi/post/sparc-solaris2.10: Remove.
1880 * config/abi/post/i386-solaris2.11: Rename to ...
1881 * config/abi/post/i386-solaris: ... this.
1882 * config/abi/post/sparc-solaris2.11: Rename to ...
1883 * config/abi/post/sparc-solaris: ... this.
1885 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1888 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1891 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1893 * include/std/variant (__visit_with_index): Remove typedef.
1894 (__deduce_visit_result): New tag type.
1895 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1896 visitation of possibly-valueless variants, forwarding to __do_visit
1897 with the relevant tag type.
1898 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1899 and make lambda return void.
1900 (__variant_construct): Likewise.
1901 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1902 __raw_idx_visit and make lambda return void.
1903 (_Multi_array::__untag_result): Add metafunction to check the function
1904 pointer type for a tag type that dictates the kind of visitation.
1905 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1906 Use decltype(auto) instead of tagged function pointer type.
1907 (__gen_vtable_impl): Remove bool non-type parameter and unused
1908 _Variant_tuple parameter.
1909 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1910 (__gen_vtable_impl::__do_visit_invoke): Remove.
1911 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1912 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1913 for the visit<R> case, rather than dispatching to separate functions.
1914 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1916 (variant::swap): Likewise.
1917 (__do_visit): Replace two non-type template parameters with a single
1918 type parameter, so that the caller must specify the visitor's return
1919 type (or one of the tag types).
1920 (visit): Deduce a return type from the visitor and use the
1921 __deduce_visit_result tag to enforce that all overloads return the
1923 (visit<R>): Call __do_visit<R> with explicit result type.
1924 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1927 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1929 nonesuch is insufficiently useless (lwg2996)
1930 * include/std/type_traits (struct __nonesuch): Added private base
1931 class to make __nonesuch not an aggregate and removed deleted default
1933 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1934 (operator=(const pair&)): Use __nonesuch instead of
1935 __nonesuch_no_braces.
1936 (operator=(pair&&)): Likewise
1937 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
1938 of __nonesuch_no_braces.
1939 (operator=(tuple&&)): Likewise
1940 * include/experimental/type_traits (struct nonesuch): Added private
1941 base class to make nonesuch not an aggregate and removed deleted
1942 default constructor.
1943 * testsuite/20_util/nonesuch/nonesuch.cc: New.
1944 * testsuite/experimental/type_traits/nonesuch.cc: New.
1946 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1948 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
1949 (_Function_handler): Remove partial specializations for void return
1950 types and pointers to member.
1951 (_Function_handler::_M_manager): Adapt to removal of
1952 _Simple_type_wrapper.
1953 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
1954 * include/std/functional (_Bind_result::__enable_if_void)
1955 (_Bind_result::__disable_if_void): Remove sfinae helpers.
1956 (_Bind_result::__call): Use __invoke_r and remove overloads for void
1958 * include/std/future (__future_base::_Task_state::_M_run)
1959 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
1960 change return type of lambda expressions.
1962 * include/bits/invoke.h (__invoke_r): Define new function implementing
1963 the INVOKE<R> pseudo-function.
1964 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
1965 * testsuite/20_util/function_objects/invoke/2.cc: New test.
1967 * include/std/type_traits (__is_nt_convertible_helper): Define it
1968 unconditionally, not only for C++20.
1969 (__is_nothrow_convertible): Define internal trait for use in C++11.
1970 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
1971 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
1972 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
1973 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
1974 that has nothrow explicit conversion but potentially-throwing implicit
1976 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
1977 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
1978 function to only consider implicit conversions.
1979 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
1981 * include/std/iterator: Include <iosfwd> instead of <istream> and
1984 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
1985 Remove unused, non-standard function.
1987 * include/bits/regex.h (match_results::max_size()): Adjust return
1988 value to account for prefix/suffix/unmatched subs.
1989 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
1990 reset the contained sub matches.
1991 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
1992 function to set result state following a failed match.
1993 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
1994 sub_match states after _M_resize. Use _M_establish_failed_match.
1997 * include/std/thread (thread::_State_impl, thread::_S_make_state):
1998 Replace single _Callable parameter with variadic _Args pack, to
1999 forward them directly to the tuple of decayed copies.
2000 * testsuite/30_threads/thread/cons/69724.cc: New test.
2002 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2004 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
2005 * include/bits/basic_string.h: (operator=(const basic_string&):
2006 Move allocator decision to assign.
2007 (assign(const basic_string&)): Move allocator decision here.
2008 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2010 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2013 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2015 * testsuite/util/testsuite_allocator.h (memory_resource)
2016 (default_resource_mgr): Fix indentation.
2018 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
2019 Use operator-> to access raw pointer member.
2020 * testsuite/23_containers/vector/59829.cc: Likewise.
2021 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
2022 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
2023 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
2025 (PointerBase, PointerBase_void): Derive from NullablePointer and use
2026 its constructors and equality operators. Change converting
2027 constructors to use operator-> to access private member of the other
2029 (PointerBase_void::operator->()): Add, for access to private member.
2030 (operator-(PointerBase, PointerBase)): Change to hidden friend.
2031 (operator==(PointerBase, PointerBase)): Remove.
2032 (operator!=(PointerBase, PointerBase)): Remove.
2034 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
2035 not assume field called _M_head_impl is the first tuple element.
2036 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
2037 implementation more accurate.
2038 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
2039 empty pointer type and non-empty deleter.
2041 LWG 2899 - Make is_move_constructible correct for unique_ptr
2042 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
2043 move assignment operator.
2044 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
2045 (__uniq_ptr_data): New class template with conditionally deleted
2047 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
2048 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
2049 constructor and move assignment operator as defaulted.
2050 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
2051 __uniq_ptr_impl::release().
2052 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
2053 to __uniq_ptr_impl::reset(pointer).
2054 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2055 Check for new __uniq_ptr_data type.
2056 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
2058 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2060 PR libstdc++/90454.cc path construction from void*
2061 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2062 pointers to void are rejected as well as void.
2063 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2064 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2066 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2068 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2069 <remark> elements. Fix formatting of bibliography references.
2071 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2073 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2075 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2077 Remove Profile Mode, deprecated since 7.1.0
2078 * doc/Makefile.am: Remove XML file for profile mode docs.
2079 * doc/Makefile.in: Regenerate.
2080 * doc/xml/authors.xml: Remove authors of profile mode docs.
2081 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2083 * doc/xml/manual/debug.xml: Likewise.
2084 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2085 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2086 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2087 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2089 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2091 * doc/html/*: Regenerate.
2092 * include/Makefile.am: Remove profile mode headers.
2093 * include/Makefile.in: Regenerate.
2094 * include/bits/c++config (std::__profile): Remove namespace.
2095 [_GLIBCXX_PROFILE]: Remove checks for macro.
2096 * include/profile/array: Remove.
2097 * include/profile/base.h: Remove.
2098 * include/profile/bitset: Remove.
2099 * include/profile/deque: Remove.
2100 * include/profile/forward_list: Remove.
2101 * include/profile/impl/profiler.h: Remove.
2102 * include/profile/impl/profiler_algos.h: Remove.
2103 * include/profile/impl/profiler_container_size.h: Remove.
2104 * include/profile/impl/profiler_hash_func.h: Remove.
2105 * include/profile/impl/profiler_hashtable_size.h: Remove.
2106 * include/profile/impl/profiler_list_to_slist.h: Remove.
2107 * include/profile/impl/profiler_list_to_vector.h: Remove.
2108 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2109 * include/profile/impl/profiler_node.h: Remove.
2110 * include/profile/impl/profiler_state.h: Remove.
2111 * include/profile/impl/profiler_trace.h: Remove.
2112 * include/profile/impl/profiler_vector_size.h: Remove.
2113 * include/profile/impl/profiler_vector_to_list.h: Remove.
2114 * include/profile/iterator_tracker.h: Remove.
2115 * include/profile/list: Remove.
2116 * include/profile/map: Remove.
2117 * include/profile/map.h: Remove.
2118 * include/profile/multimap.h: Remove.
2119 * include/profile/multiset.h: Remove.
2120 * include/profile/ordered_base.h: Remove.
2121 * include/profile/set: Remove.
2122 * include/profile/set.h: Remove.
2123 * include/profile/unordered_base.h: Remove.
2124 * include/profile/unordered_map: Remove.
2125 * include/profile/unordered_set: Remove.
2126 * include/profile/vector: Remove.
2127 * scripts/run_doxygen: Do not process profile mode headers.
2128 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2130 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2131 Remove dg-skip-if for profile mode.
2132 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2133 preprocessor check for profile mode.
2134 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2135 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2137 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2139 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2140 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2141 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2142 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2143 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2145 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2147 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2149 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2151 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2152 preprocessor check for profile mode.
2153 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2155 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2156 Remove dg-skip-if for profile mode.
2157 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2158 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2159 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2160 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2161 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2162 * testsuite/Makefile.am: Remove profile_flags variable and
2163 * testsuite/Makefile.am: Remove profile_flags variable and
2164 check-profile target.
2165 * testsuite/Makefile.in: Regenerate.
2166 * testsuite/ext/profile/all.cc: Remove.
2167 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2168 * testsuite/ext/profile/profiler_algos.cc: Remove.
2169 * testsuite/ext/profile/replace_new.cc: Remove.
2170 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2171 preprocessor check for profile mode.
2172 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2173 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2174 (check_v3_target_normal_mode): Do not check for profile mode macro.
2175 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2177 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2178 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2179 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2180 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2181 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2182 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2183 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2184 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2185 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2186 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2188 Remove array_allocator extension, deprecated since 4.9.0
2189 * doc/xml/manual/allocator.xml: Remove documentation for
2191 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2192 * doc/xml/manual/using.xml: Remove header from documentation.
2193 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2194 * include/Makefile.in: Regenerate.
2195 * include/ext/array_allocator.h: Remove.
2196 * include/precompiled/extc++.h: Do not include removed header.
2197 * testsuite/ext/array_allocator/1.cc: Remove.
2198 * testsuite/ext/array_allocator/2.cc: Remove.
2199 * testsuite/ext/array_allocator/26875.cc: Remove.
2200 * testsuite/ext/array_allocator/3.cc: Remove.
2201 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2202 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2203 * testsuite/ext/array_allocator/check_new.cc: Remove.
2204 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2205 * testsuite/ext/headers.cc: Do not include removed header.
2207 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2209 * include/bits/stl_bvector.h
2210 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2212 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2214 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2216 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2218 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2220 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2222 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2224 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2226 (_Bit_iterator::operator-(difference_type)): Likewise.
2227 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2228 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2230 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2231 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2233 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2236 * testsuite/util/thread/all.h: Do not use remove_pointer for
2237 std::thread::native_handle_type.
2240 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2241 (_Variant_storage<true, Types...>::_M_reset()))
2242 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2243 (__get_storage): Likewise.
2244 (variant): Add noexcept to friend declarations for __get and
2248 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2249 Use _Require for constraints.
2250 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2252 (__uniq_ptr_hash): New base class with conditionally-disabled call
2254 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2255 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2256 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2258 * include/bits/shared_ptr.h: Improve docs.
2259 * include/bits/shared_ptr_base.h: Likewise.
2260 * include/bits/stl_uninitialized.h: Likewise.
2261 * include/bits/unique_ptr.h: Likewise.
2262 * libsupc++/new: Likewise.
2264 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2266 * include/bits/stl_deque.h
2267 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2269 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2271 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2273 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2275 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2277 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2279 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2281 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2283 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2286 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2287 (test01): Reserve for number of insertions to avoid rehash during test.
2288 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2290 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2295 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2297 * include/experimental/bits/fs_path.h: Improve docs.
2298 * include/experimental/bits/net.h: Fix wrong header name in comment.
2299 Do not document implementation details.
2300 * include/experimental/netfwd: Fix doxygen grouping.
2302 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2304 * include/bits/stl_pair.h: Improve docs.
2305 * include/std/tuple: Likewise.
2307 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2309 * include/std/chrono: Improve docs.
2310 * include/std/ratio: Do not document implementation details.
2311 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2313 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2316 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2317 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2318 (__duration_common_type): New helper.
2319 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2320 __duration_common_type.
2321 (__timepoint_common_type_wrapper): Replace with ...
2322 (__timepoint_common_type): New helper.
2323 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2324 Use __time_point_common_type.
2325 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2326 (__common_type_impl): If either argument is transformed by decay,
2327 use the common_type of the decayed types.
2328 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2329 decayed, use __do_common_type_impl to get the common_type.
2330 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2331 (__do_member_type_wrapper, __member_type_wrapper)
2332 (__expanded_common_type_wrapper): Remove.
2333 (__common_type_pack, __common_type_fold): New helpers.
2334 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2335 __member_type_wrapper and __expanded_common_type_wrapper.
2336 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2337 Test zero-length template argument list.
2338 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2339 Test single argument cases and argument types that should decay.
2340 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2341 Adjust expected error.
2342 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2344 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2345 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2346 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2348 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2350 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2352 Make allocator propagation more consistent for
2353 operator+(basic_string) (P1165R1)
2354 * include/bits/basic_string.h
2355 (operator+(basic_string&&, basic_string&&): Changed resulting
2356 allocator to always be the one from the first parameter.
2357 * include/bits/basic_string.tcc
2358 (operator+(const _CharT*, const basic_string&)): Changed
2359 resulting allocator to be SOCCC on the second parameter's allocator.
2360 (operator+(_CharT, const basic_string&)): Likewise.
2361 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2363 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2366 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2368 * include/bits/regex.h: Improve docs.
2369 * include/bits/regex.tcc: Do not document implementation details.
2371 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2373 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2375 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2376 Add type printer for container types in std::__debug namespace.
2377 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2378 (gdb-tests): Use distinct parameters for the type of test and use of
2380 (gdb-test): Check for regex test even if 'whatis' test.
2381 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2383 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2384 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2385 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2386 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2387 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2388 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2389 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2391 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2393 * include/std/system_error (error_category): Fix comment.
2396 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2397 argument is an empty path.
2398 (absolute(const path&, error_code&)): Use invalid_argument as error
2399 code instead of no_such_file_or_directory.
2400 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2401 of non-existent paths and empty paths with both overloads of absolute.
2403 * include/std/system_error (error_category, error_code)
2404 (error_condition): Improve docs.
2405 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2406 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2407 to class documentation. Suppress documentation for implementation
2409 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2410 Suppress documentation for implementation details.
2412 * include/std/system_error (error_code): Remove friend declaration
2413 for hash<error_code>.
2414 (hash<error_code>::operator()): Use public member functions to access
2416 (hash<error_condition>::operator()): Use address of category, not
2417 its object representation.
2418 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2419 Use public member functions to access value and category.
2420 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2422 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2424 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2425 * include/bits/hashtable_policy.h
2426 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2427 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2428 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2429 smaller than input value rather than always greater. Preserve
2430 _M_next_resize if called with 0 input. Use __builtin_floorl.
2431 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2432 elements + number of insertions is greater than _M_next_resize. Start
2433 with 11 buckets if not told otherwise. Use __builtin_floorl.
2434 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2435 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2436 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2437 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2438 told otherwise. Use __builtin_floorl.
2439 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2440 to also validate _Power2_rehash_policy.
2441 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2444 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2447 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2451 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2452 overflow warning with -Wpedantic -Wsystem-headers.
2454 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2457 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2458 * include/bits/move.h (swap): Remove extra parentheses.
2460 * include/experimental/bits/lfts_config.h: Improve doc markup.
2461 * include/experimental/optional: Improve docs.
2462 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2463 (__constexpr_addressof): Remove.
2464 (optional::operator->()): Use std::__addressof().
2465 * include/std/optional (optional::operator->()): Adjust whitespace.
2466 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2467 that operator-> is still constexpr with overloaded operator&. Change
2468 to compile-only test.
2469 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2472 * include/bits/shared_ptr.h: Improve docs.
2473 * include/bits/shared_ptr_atomic.h: Likewise.
2474 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2476 * include/bits/basic_string.h: Fix iterator/index confusion in
2478 * include/bits/range_access.h: Fix Doxygen warnings.
2479 * include/bits/refwrap.h: Do not document implementation details.
2480 (ref, cref): Group docs with reference_wrapper.
2481 * include/std/fstream: Fix Doxygen markup.
2482 * libsupc++/initializer_list (begin, end): Group docs with
2485 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2487 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2488 * include/std/mutex: Likewise.
2489 * include/std/shared_mutex: Likewise.
2491 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2492 * include/bits/fs_fwd.h: Likewise.
2493 * include/bits/fs_ops.h: Likewise.
2494 * include/bits/fs_path.h: Likewise.
2495 * include/std/filesystem: Likewise.
2497 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2498 * include/experimental/buffer: Likewise.
2499 * include/experimental/executor: Likewise.
2500 * include/experimental/internet: Likewise.
2501 * include/experimental/io_context: Likewise.
2502 * include/experimental/net: Likewise.
2503 * include/experimental/netfwd: Likewise.
2504 * include/experimental/socket: Likewise.
2505 * include/experimental/timer: Likewise.
2507 * doc/doxygen/doxygroups.cc: Move description of experimental group
2509 * include/experimental/algorithm: Add to libfund-ts doc group.
2510 * include/experimental/any: Likewise. Do not document implementation
2512 * include/experimental/array: Add to libfund-ts doc group.
2513 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2514 for Library Fundamentals.
2515 * include/experimental/chrono: Add to libfund-ts doc group.
2516 * include/experimental/deque: Likewise.
2517 * include/experimental/forward_list: Likewise.
2518 * include/experimental/functional: Likewise.
2519 * include/experimental/iterator: Likewise.
2520 * include/experimental/list: Likewise.
2521 * include/experimental/map: Likewise.
2522 * include/experimental/memory: Likewise.
2523 * include/experimental/memory_resource: Likewise. Improve docs.
2525 * include/experimental/numeric: Add to libfund-ts doc group.
2526 * include/experimental/optional: Likewise.
2527 * include/experimental/propagate_const: Likewise.
2528 * include/experimental/random: Likewise.
2529 * include/experimental/ratio: Likewise.
2530 * include/experimental/regex: Likewise.
2531 * include/experimental/set: Likewise.
2532 * include/experimental/source_location: Likewise.
2533 * include/experimental/string: Likewise.
2534 * include/experimental/string_view: Likewise.
2535 * include/experimental/system_error: Likewise.
2536 * include/experimental/tuple: Likewise.
2537 * include/experimental/type_traits: Likewise.
2538 * include/experimental/unordered_map: Likewise.
2539 * include/experimental/unordered_set: Likewise.
2540 * include/experimental/utility: Likewise.
2541 * include/experimental/vector: Likewise.
2542 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2543 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2544 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2546 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2547 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2548 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2549 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2550 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2552 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2553 * include/experimental/bits/fs_fwd.h: Improve docs.
2554 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2555 * include/experimental/bits/fs_path.h: Likewise.
2556 (path, filesystem_error, u8path): Improve docs.
2557 * include/experimental/filesystem: Link to docs for TS.
2559 * config/allocator/new_allocator_base.h (__allocator_base): Add
2560 workaround for Doxygen bug #6945.
2561 * include/std/memory: Improve docs. Define group for pointer safety.
2562 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2563 conditional to suppress documentation for implementation details.
2565 * include/bits/specfun.h: Improve docs.
2566 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2569 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2570 (std::experimental): Add docs.
2571 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2572 namespace to nothing when generating docs.
2573 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2574 * include/std/chrono (std::chrono): Likewise.
2575 * include/std/functional (std::placeholders): Likewise.
2576 * include/std/thread (std::this_thread): Likewise.
2578 * include/parallel/settings.h: Fix Doxygen markup.
2580 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2581 anything unless PB_DS_CLASS_C_DEC is defined.
2582 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2583 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2584 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2585 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2586 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2587 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2588 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2590 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2591 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2592 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2593 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2594 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2595 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2596 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2597 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2598 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2599 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2600 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2602 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2603 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2605 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2608 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2609 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2610 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2613 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2615 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2616 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2617 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2618 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2619 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2620 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2622 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2623 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2626 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2629 * include/std/complex (__complex_proj): Return parameter unchanged.
2630 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2631 floating-point types to take std::complex arguments.
2632 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2633 floating-point types.
2634 * testsuite/26_numerics/complex/proj.cc: New test.
2636 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2638 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2639 to _Lock_policyE[012].
2640 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2642 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2644 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2645 macros accidentally left in.
2646 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2647 unnecessary -lstdc++fs option. Fix test for mingw.
2648 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2651 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2653 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2655 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2657 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2659 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2660 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2663 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2665 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2668 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2669 class template and partial specialization.
2672 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2674 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2675 functions to convert a value to an integral type.
2676 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2677 (fill_n): Convert _Size parameter to an integral type.
2678 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2679 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2680 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2681 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2682 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2683 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2685 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2687 Adding noexcept-specification on tuple constructors (LWG 2899)
2688 * libstdc++-v3/include/std/tuple:
2689 (tuple()): Add noexcept-specification.
2690 (tuple(const _Elements&...)): Likewise
2691 (tuple(_UElements&&...)): Likewise
2692 (tuple(const tuple<_UElements...>&)): Likewise
2693 (tuple(tuple<_UElements...>&&)): Likewise
2694 (tuple(const _T1&, const _T2&)): Likewise
2695 (tuple(_U1&&, _U2&&)): Likewise
2696 (tuple(const tuple<_U1, _U2>&): Likewise
2697 (tuple(tuple<_U1, _U2>&&): Likewise
2698 (tuple(const pair<_U1, _U2>&): Likewise
2699 (tuple(pair<_U1, _U2>&&): Likewise
2700 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2702 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2705 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2706 arguments with __restrict.
2708 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2710 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2712 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2714 * include/experimental/bits/fs_path.h
2715 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2716 avoid redundant call to _S_convert_loc with non-const pointers.
2718 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2719 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2720 * testsuite/21_strings/basic_string/hash/hash.cc
2721 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2722 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2723 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2725 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2726 wstring::_M_replace_dispatch with more specific patterns.
2727 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2728 Create const std::string to avoid redundant call to _S_convert_loc
2729 with non-const pointers.
2730 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2731 avoid unnecessary basic_string::assign instantiations.
2733 * include/std/memory (__uses_alloc_args): Add string-literal to
2734 static_assert, to match the one in __uses_alloc.
2735 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2736 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2737 for recursive uses-allocator construction of nested pairs.
2738 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2741 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2743 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2744 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2745 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2746 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2748 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2749 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2750 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2751 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2752 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2753 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2754 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2756 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2759 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2760 * include/std/scoped_allocator [__cplusplus > 201703L]
2761 (scoped_allocator_adaptor::construct): Define in terms of
2762 uses_allocator_construction_args, as per P0591R4.
2763 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2764 * testsuite/util/testsuite_allocator.h: Remove name of unused
2767 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2769 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2770 * doc/html/*: Regenerate.
2772 * include/bits/fs_path.h (operator<, operator<=, operator>)
2773 (operator>=, operator==, operator!=): Make hidden friends, as per
2775 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2776 string type in test.
2777 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2779 * include/std/any (any::any(ValueType&&)): Use __and_v.
2780 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2783 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2785 * include/std/type_traits (__result_of_memfun): Use remove_reference
2786 instead of __remove_cvref_t and remove redundant is_same check.
2787 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2789 * include/experimental/string_view (basic_string_view::pointer)
2790 (basic_string_view::reference): Fix to refer to non-const value_type.
2791 * include/bits/basic_string.h (basic_string): Use __sv_check and
2792 __sv_limit instead of basic_string_view::_M_check and
2793 basic_string_view::_M_limit.
2794 * include/std/string_view (__sv_check, __sv_limit): New
2795 helper functions to replace basic_string_view::_M_check and
2796 basic_string_view::_M_limit.
2797 (basic_string_view): Add static assertions to enforce ill-formed
2798 requirement for traits_type::char_type from P1148R0, and to enforce
2799 required properties of char-like types.
2800 (basic_string_view::pointer, basic_string_view::reference): Fix to
2801 refer to non-const value_type.
2802 (basic_string_view::operator[], basic_string_view::at)
2803 (basic_string_view::front, basic_string_view::back)
2804 (basic_string_view::data): Use const_reference and const_pointer
2805 typedefs for return types.
2806 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2807 (hash<wstring_view>): Fix argument_type typedef.
2808 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2809 char/1.cc: Fix expected return type of basic_string_view::data().
2810 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2811 wchar_t/1.cc: Likewise.
2812 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2813 char/1.cc: Likewise.
2814 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2815 wchar_t/1.cc: Likewise.
2816 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2818 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2819 Check reference and pointer typedefs.
2820 * testsuite/experimental/string_view/requirements/typedefs.cc:
2822 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2823 Fix expected return type of basic_string_view::data().
2824 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2826 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2828 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2832 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2833 Avoid a runtime check for types that can never be stored in std::any.
2834 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2837 PR libstdc++/90220 (partial)
2838 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2839 not attempt ill-formed static_cast to pointers to non-object types.
2840 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2843 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2844 prevent -Wcatch-value warning.
2846 * include/std/variant (__variant_construct): Use template parameter
2847 type instead of equivalent decltype-specifier.
2848 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2849 Replace forward with move.
2850 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2851 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2852 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2853 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2854 index after construction succeeds.
2855 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2856 if-constexpr checks that are always true. Use __remove_cvref_t instead
2857 of remove_reference so that is_nothrow_move_constructible check
2858 doesn't use a const rvalue parameter. In the potentially-throwing case
2859 construct a temporary and move assign it, as per LWG 2904.
2860 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2861 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2862 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2863 construct a temporary and move assign from it, as per LWG 2904.
2864 * testsuite/20_util/variant/exception_safety.cc: Check that
2865 assignment operators have strong exception safety guarantee.
2867 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2869 Document PSTL linker flags
2871 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2873 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2875 * include/std/variant (__detail::__variant::_Traits): Make
2876 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2877 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2879 (__detail::__variant::_Copy_assign_alias): Only depend on
2880 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2881 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2882 move assignment operators.
2885 * include/std/variant (variant::__not_self): New helper for the
2886 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2887 (variant::__to_type_impl): Remove.
2888 (variant::__to_type): Add default argument to check pack size, instead
2889 of using __to_type_impl.
2890 (variant::__accepted_type): Add default argument using __not_self.
2891 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2892 for variant(T&&) constructor constraint.
2893 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2894 Extract __accepted_type into a named template parameter for reuse in
2895 other constraints and in the exception specification.
2896 (variant::variant(in_place_type_t<T>, Args&&...))
2897 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2898 (variant::variant(in_place_index_t<T>, Args&&...))
2899 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2900 (variant::operator=T&&)): Remove redundant && from trait arguments.
2901 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2902 isn't used for in_place_type or in_place_index arguments.
2904 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2905 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2906 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2908 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2909 Bernd Edlinger <bernd.edlinger@hotmail.de>
2910 Jakub Jelinek <jakub@redhat.com>
2913 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2914 general-regs-only target attribute for ARM.
2916 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2919 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2920 specialization also depend on is_nothrow_move_constructible.
2921 * include/std/variant (__detail::__variant::__never_valueless()):
2922 Only true if the variant would have a move assignment operator.
2923 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2924 Check __never_valueless<T...>().
2925 (variant::emplace): Only perform non-throwing move assignments
2926 for never-valueless alternatives if the variant has a move assignment
2928 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2929 types can be emplaced into non-assignable variants.
2930 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2931 don't get copied when emplaced into non-assignable variants.
2933 * include/std/variant (__detail::__variant::__ref_cast): Remove
2935 (__detail::__variant::_Uninitialized::_M_get)
2936 (__detail::__variant::__get)
2937 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
2939 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
2941 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
2943 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
2944 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
2945 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
2946 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
2948 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2950 Delegate PSTL configuration to pstl/pstl_config.h
2952 * include/bits/c++config: Remove explicit PSTL configuration
2953 macros and use definitions from <pstl/pstl_config.h>.
2955 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
2957 Cleanup algorithm implementations
2958 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
2960 (mismatch): Forward execution policy.
2961 (equal): Qualify call to std::equal().
2962 (partial_sort): Forward execution policy.
2963 (inplace_merge): Forward execution policy.
2965 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
2967 Improve implementation of parallel equal()
2968 * include/pstl/algorithm_impl.h
2969 (__internal::__brick_equal): use "4 iterator" version of
2971 (__internal::__brick_equal): use simd for random access
2972 iterators on unsequenced execution policies.
2973 (__internal::__pattern_equal): add "4 iterator" version
2974 (__internal::__pattern_equal): dispatch to simd __brick_equal
2975 for vector-only execution policies.
2976 (__internal::__pattern_equal): dispatch to __parallel_or for
2977 parallel execution policies.
2978 * include/pstl/glue_algorithm_impl.h
2979 (std::equal): dispatch to "4 iterator" version of
2980 __internal::__pattern_equal().
2982 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
2985 * include/bits/forward_list.h (operator==): Do not use operator!= to
2987 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
2988 earlier in the list, so that sort is stable.
2989 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
2990 * testsuite/23_containers/forward_list/comparable.cc: Test with
2991 types that meet the minimum EqualityComparable and LessThanComparable
2992 requirements. Remove irrelevant comment.
2994 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
2995 Do not depend on whether all alternative types are move constructible.
2996 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
2997 from the operand when deciding whether to perform the assignment.
2998 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
2999 with deleted move constructor and deleted move assignment operator.
3000 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
3001 behaviour of variants with DeletedMoves as an alternative.
3002 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
3003 (move_ctor, move_assign): Check that moving a variant with a
3004 DeletedMoves alternative falls back to copying instead of moving.
3006 * testsuite/20_util/variant/compile.cc: Remove empty string literals
3007 from static_assert declarations.
3009 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
3010 actually match its name.
3011 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
3012 (test_swap()): Fix result for MoveCtorOnly and check
3013 MoveCtorAndSwapOnly.
3015 * include/std/optional (optional::value_or(U&&) &&): Add missing
3016 constexpr specifier.
3017 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
3018 for disengaged optionals and rvalue optionals.
3019 * testsuite/20_util/optional/observers/4.cc: Likewise.
3021 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
3023 * include/pstl/algorithm_impl.h: Uglify identfiers.
3024 * include/pstl/numeric_impl.h: Uglify identfiers.
3025 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
3027 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
3029 * include/bits/c++config:
3030 Add definition for __PSTL_ASSERT.
3031 Add definition for __PSTL_ASSERT_MSG.
3032 * include/pstl/algorithm_impl.h: Replace use of assert().
3033 * include/pstl/numeric_impl.h: Replace use of assert().
3034 * include/pstl/parallel_backend_tbb.h:
3035 Replace use of assert().
3036 Replace use of __TBB_ASSERT().
3037 * include/pstl/parallel_backend_utils.h: Replace use of assert().
3039 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
3042 * src/c++17/memory_resource.cc
3043 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
3044 needed to allow placing a _Chunk at the end of the buffer.
3045 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
3047 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
3049 * doc/xml/faq.xml: Add information about emergency EH pool.
3050 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
3051 Move outdated information on mt_allocator to a separate section.
3052 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
3053 doesn't affect the default allocator.
3055 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
3059 * testsuite/20_util/variant/89851.cc: New test.
3061 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3063 * include/std/variant: Adjust whitespace. Add comments.
3064 (_Multi_array): Leave primary template undefined.
3065 (_Multi_array<_Tp>): Define partial specialization for base case of
3067 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3068 which is always a reference.
3069 (__gen_vtable::_S_apply()): Remove function, inline body into
3070 default member initializer.
3071 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3073 * include/std/variant (__variant_idx_cookie): Add member type.
3074 (__visitor_result_type): Remove.
3075 (__do_visit): Use invoke_result instead of __visitor_result_type.
3076 * testsuite/20_util/variant/visit.cc: New test.
3079 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3081 * testsuite/20_util/variant/90008.cc: New test.
3083 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3085 * include/pstl/algorithm_impl.h: Add namespace qualification.
3086 * include/pstl/execution_defs.h: Add namespace qualification.
3087 * include/pstl/execution_impl.h: Add namespace qualification.
3088 * include/pstl/numeric_impl.h: Add namespace qualification.
3089 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3090 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3091 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3093 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3095 Fix visit<R> for variant.
3096 * include/std/variant (__do_visit): Add a template parameter
3097 for enforcing same return types for visit.
3098 (__gen_vtable_impl): Likewise.
3099 (_S_apply_single_alt): Adjust.
3100 (__visit_invoke_impl): New. Handle casting to void.
3101 (__do_visit_invoke): New. Enforces same return types.
3102 (__do_visit_invoke_r): New. Converts return types.
3103 (__visit_invoke): Adjust.
3104 (__gen_vtable): Add a template parameter for enforcing
3105 same return types for visit.
3106 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3107 different return types.
3108 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3109 visitors with different return types don't accidentally
3110 compile with regular visitation.
3112 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3114 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3115 dg-require-filesystem-ts.
3117 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3119 * doc/xml/manual/status_cxx2020.xml: Update status.
3120 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3121 * testsuite/20_util/variant/visit_r.cc: New test.
3123 * include/bits/fs_dir.h (directory_iterator::operator*)
3124 (directory_iterator::operator->): Add noexcept.
3125 (operator==, operator!=): Replace namespace-scope equality operators
3126 for directory iterators with hidden friends.
3129 * config/abi/pre/gnu.ver: Add missing exports.
3130 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3133 * config/abi/pre/gnu.ver: Export new symbols.
3134 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3135 (recursive_directory_iterator::recursion_pending())
3136 (recursive_directory_iterator::disable_recursion_pending()): Remove
3137 inline definitions. Make noexcept.
3138 (recursive_directory_iterator::depth())
3139 (recursive_directory_iterator::operator*())
3140 (recursive_directory_iterator::operator->()): Make noexcept.
3141 (recursive_directory_iterator::_M_options)
3142 (recursive_directory_iterator::_M_pending): Remove data members.
3143 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3144 (recursive_directory_iterator::recursive_directory_iterator): Remove
3145 ctor-initializer. Use new constructor for _Dir_stack.
3146 (recursive_directory_iterator::options())
3147 (recursive_directory_iterator::recursion_pending())
3148 (recursive_directory_iterator::disable_recursion_pending()): Add
3149 non-inline definitions.
3150 (recursive_directory_iterator::depth()): Make noexcept.
3151 (recursive_directory_iterator::increment(error_code&))
3152 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3153 location of options and recursion_pending members.
3154 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3155 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3156 user-declared move constructor and assignment operator, to make the
3159 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3160 d_type == DT_UNKNOWN immediately.
3161 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3163 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3165 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3167 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3168 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3171 PR libstdc++/87431 (again)
3172 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3173 Define partial specialization for basic_string.
3174 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3175 shared_ptr and weak_ptr.
3176 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3178 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3180 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3182 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3184 * include/std/any (_Never_valueless_alt): Define explicit
3185 specialization for any.
3186 * include/std/variant (_Never_valueless_alt): Define primary template.
3187 (__never_valueless): Use _Never_valueless_alt instead of
3188 is_trivially_copyable.
3189 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3190 initializations to avoid try-catch overhead. Add special case for
3191 scalars produced by potentially-throwing conversions. Use
3192 _Never_valueless_alt instead of is_trivially_copyable for the
3193 remaining strong exception-safety cases.
3194 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3195 * testsuite/20_util/variant/87431.cc: Run both test functions.
3196 * testsuite/20_util/variant/exception_safety.cc: New test.
3197 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3198 so the variant becomes valueless.
3200 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3203 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3205 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3207 * include/std/string (__hash_string_base): New class template defining
3208 operator() for hashing strings.
3209 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3210 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3211 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3212 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3214 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3216 Use single-visitation in variant assignment and swap and relops.
3217 Also use indices instead of types when checking whether
3218 variants hold the same thing.
3219 * include/std/variant (__do_visit): Add a template parameter
3220 for index visitation, invoke with indices if index visitation
3222 (__variant_idx_cookie): New.
3223 (__visit_with_index): Likewise.
3224 (_Copy_assign_base::operator=): Do single-visitation with
3226 (_Move_assign_base::operator=): Likewise.
3227 (_Extra_visit_slot_needed): Adjust.
3228 (__visit_invoke): Call with indices if it's an index visitor.
3229 (relops): Do single-visitation with an index visitor.
3231 (__visitor_result_type): New.
3233 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3235 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3237 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3239 Don't revisit a variant we are already visiting.
3240 * include/std/variant (__variant_construct_single): New.
3241 (__variant_construct): Use it.
3242 (_M_destructive_move): Likewise.
3243 (_M_destructive_copy): Likewise.
3244 (_Copy_assign_base::operator=): Adjust.
3245 (_Move_assign_base::operator=): Likewise.
3248 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3251 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3252 destructor so they are not evaluated until the _Key type is complete.
3253 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3254 * testsuite/23_containers/set/85965.cc: New test.
3255 * testsuite/23_containers/unordered_set/85965.cc: New test.
3256 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3257 with regexp matching the corresponding _Rb_tree specialization.
3258 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3259 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3260 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3261 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3262 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3263 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3264 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3266 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3269 Fix based on a suggestion by Antony Polukhin.
3270 * include/std/variant (__never_valueless): New.
3272 (_Extra_visit_slot_needed): New.
3273 (_Multi_array): Use it.
3274 (_S_apply_all_alts): Likewise.
3276 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3279 Fix based on a suggestion by Antony Polukhin.
3280 * include/std/variant (__gen_vtable): Don't reserve an
3281 additional table slot, _Multi_array already does that.
3283 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3286 Fix based on a suggestion by Antony Polukhin.
3287 * include/std/variant (__variant_construct): Capture a pointer
3288 to the storage and visit just one variant.
3290 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3292 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3293 Doxygen-generated pages with unstable URL.
3294 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3295 * doc/xml/manual/extensions.xml: Likewise.
3296 * doc/xml/manual/parallel_mode.xml: Likewise.
3297 * doc/xml/manual/support.xml: Likewise.
3299 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3300 avoid -Wconversion warnings.
3302 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3304 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3305 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3306 (allstamped): Add stamp-pstl.
3307 (install-headers): Add ptsl_builddir.
3308 * include/Makefile.in: Regenerate.
3309 * include/bits/c++config: Add pstl configuration.
3310 * include/pstl/LICENSE.txt: New file.
3311 * include/pstl/algorithm_fwd.h: New file.
3312 * include/pstl/algorithm_impl.h: New file.
3313 * include/pstl/execution_defs.h: New file.
3314 * include/pstl/execution_impl.h: New file.
3315 * include/pstl/glue_algorithm_defs.h: New file.
3316 * include/pstl/glue_algorithm_impl.h: New file.
3317 * include/pstl/glue_execution_defs.h: New file.
3318 * include/pstl/glue_memory_defs.h: New file.
3319 * include/pstl/glue_memory_impl.h: New file.
3320 * include/pstl/glue_numeric_defs.h: New file.
3321 * include/pstl/glue_numeric_impl.h: New file.
3322 * include/pstl/memory_impl.h: New file.
3323 * include/pstl/numeric_fwd.h: New file.
3324 * include/pstl/numeric_impl.h: New file.
3325 * include/pstl/parallel_backend.h: New file.
3326 * include/pstl/parallel_backend_tbb.h: New file.
3327 * include/pstl/parallel_backend_utils.h: New file.
3328 * include/pstl/parallel_impl.h: New file.
3329 * include/pstl/pstl_config.h: New file.
3330 * include/pstl/unseq_backend_simd.h: New file.
3331 * include/pstl/utils.h: New file.
3332 * include/std/algorithm: Include parallel algorithm implementations.
3333 * include/std/execution: New file.
3334 * include/std/memory: Include parallel algorithm implementations.
3335 * include/std/numeric: Include parallel algorithm implementations.
3336 * include/std/version: Add parallel algorithms feature test macro.
3337 * testsuite/util/pstl/pstl_test_config.h: New file.
3338 * testsuite/util/pstl/test_utils.h: New file.
3339 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3340 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3341 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3342 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3343 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3344 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3345 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3346 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3347 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3348 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3349 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3350 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3351 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3352 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3353 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3354 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3355 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3356 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3357 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3358 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3359 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3360 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3361 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3362 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3363 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3364 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3365 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3366 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3367 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3368 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3369 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3370 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3371 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3372 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3373 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3374 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3375 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3376 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3377 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3378 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3379 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3380 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3381 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3382 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3383 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3384 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3385 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3386 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3387 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3388 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3389 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3390 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3391 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3392 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3393 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3394 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3395 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3396 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3397 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3398 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3399 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3400 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3401 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3402 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3403 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3404 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3405 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3406 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3407 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3408 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3409 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3410 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3411 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3412 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3413 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3414 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3415 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3416 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3417 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3418 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3419 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3420 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3421 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3422 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3423 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3424 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3425 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3426 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3427 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3428 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3429 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3430 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3431 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3432 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3433 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3434 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3435 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3436 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3437 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3438 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3439 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3440 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3441 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3442 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3443 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3444 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3446 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3448 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3449 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3450 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3451 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3452 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3453 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3454 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3455 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3456 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3457 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3458 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3459 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3460 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3461 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3462 when the special functions IS is enabled, not for C++17.
3463 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3465 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3466 without checks for special functions in C++17.
3467 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3471 * include/backward/hash_map: Use <> for includes not "".
3472 * include/backward/hash_set: Likewise.
3473 * include/backward/strstream: Likewise.
3474 * include/tr1/bessel_function.tcc: Likewise.
3475 * include/tr1/exp_integral.tcc: Likewise.
3476 * include/tr1/legendre_function.tcc: Likewise.
3477 * include/tr1/modified_bessel_func.tcc: Likewise.
3478 * include/tr1/riemann_zeta.tcc: Likewise.
3480 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3482 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3483 of extension allocators.
3484 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3485 Document new headers in 7.2, 8.1 and 9.1 releases.
3486 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3487 * doc/html/*: Regenerate.
3489 2019-03-12 John David Anglin <dave.anglin@bell.net>
3492 * testsuite/lib/libstdc++.exp: Locate libatomic.
3493 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3494 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3496 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3497 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3498 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3499 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3501 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3504 * configure.ac: Check for sockatmark.
3505 * crossconfig.m4: Check for sockatmark.
3506 * config.h.in: Regenerate.
3507 * configure: Regenerate.
3508 * include/experimental/internet (address_v4::_S_hton): Rename
3509 overloaded functions to _S_hton_16 and _S_ntoh_16.
3510 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3511 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3512 * include/experimental/socket (basic_socket::at_mark): Check
3513 _GLIBCXX_HAVE_SOCKATMARK.
3515 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3516 const variables instead of macros.
3519 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3520 Use correct type for len_aligned.
3521 * testsuite/20_util/hash/89629.cc: New test.
3523 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3526 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3527 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3528 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3529 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3530 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3531 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3532 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3533 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3534 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3535 memory_order_seq_cst to int.
3537 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3539 * doc/xml/manual/using.xml: Use link element instead of xref.
3540 * doc/html/*: Regenerate.
3542 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3544 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3547 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3548 parameters in deduction guides.
3549 * include/debug/multimap.h (multimap): Likewise.
3550 * include/debug/set.h (multimap): Likewise.
3551 * include/debug/multiset.h (multimap): Likewise.
3552 * include/debug/unordered_map (unordered_map): Likewise.
3553 (unordered_multimap): Likewise.
3554 * include/debug/unordered_set (unordered_set): Likewise.
3555 (unordered_multiset): Likewise.
3558 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3559 Invalidate all iterators in case of rehash.
3560 (unordered_multimap<>::_M_check_rehashed): Likewise.
3561 * include/debug/unordered_set
3562 (unordered_set<>::_M_check_rehashed): Likewise.
3563 (unordered_multiset<>::_M_check_rehashed): Likewise.
3564 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3566 2019-03-07 Andreas Schwab <schwab@suse.de>
3568 * config/abi/post/riscv64-linux-gnu: New directory.
3569 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3571 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3573 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3574 compile test to run. Fix typo.
3576 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3577 * doc/html/*: Regenerate.
3579 P0356R5 Simplified partial function application
3580 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3581 helpers for bind_front.
3582 (bind_front, __cpp_lib_bind_front): Define.
3583 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3585 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3587 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3588 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3589 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3590 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3592 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3594 PR libstdc++/86655 - std::assoc_legendre should not constrain
3595 the value of m (or x).
3596 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3597 __sph_legendre): If degree > order Don't throw, return 0.
3598 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3599 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3600 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3601 * testsuite/tr1/5_numerical_facilities/special_functions/
3602 02_assoc_legendre/pr86655.cc: New test.
3603 * testsuite/tr1/5_numerical_facilities/special_functions/
3604 22_sph_legendre/pr86655.cc: New test.
3606 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3609 Also PR libstdc++/85517
3610 * include/std/variant (__do_visit): New.
3611 (__variant_cast): Likewise.
3612 (__variant_cookie): Likewise.
3613 (__erased_*): Remove.
3614 (_Variant_storage::_S_vtable): Likewise.
3615 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3616 (_Variant_storage::__M_reset): Adjust.
3617 (__variant_construct): New.
3618 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3619 __variant_construct.
3620 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3621 (_Move_ctor_base::__M_destructive_copy): New.
3622 (_Move_ctor_base::__M_destructive_move): Adjust to use
3623 __variant_construct.
3624 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3625 (_Copy_assign_alias): Adjust to check both copy assignment
3626 and copy construction for triviality.
3627 (_Move_assign_base::operator=): Adjust to use __do_visit.
3628 (_Multi_array): Add support for visitors that accept and return
3630 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3631 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3632 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3633 a __variant_cookie temporary for a variant that is valueless and..
3634 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3635 (__gen_vtable::_Array_type): Conditionally make space for
3636 the __variant_cookie visitor case.
3637 (__variant_construct_by_index): New.
3638 (get_if): Adjust to use std::addressof.
3639 (relops): Adjust to use __do_visit.
3640 (variant): Add __variant_cast and __variant_construct_by_index
3642 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3643 instead of self-destruction.
3644 (variant::swap): Adjust to use __do_visit.
3645 (visit): Reimplement in terms of __do_visit.
3646 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3647 * testsuite/20_util/variant/compile.cc: Adjust.
3648 * testsuite/20_util/variant/run.cc: Likewise.
3650 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3652 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3654 * testsuite/experimental/feat-char8_t.cc: Likewise.
3656 * include/std/type_traits [C++20] (is_bounded_array)
3657 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3659 * testsuite/20_util/is_bounded_array/requirements/
3660 explicit_instantiation.cc: New test.
3661 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3663 * testsuite/20_util/is_bounded_array/value.cc: New test.
3664 * testsuite/20_util/is_unbounded_array/requirements/
3665 explicit_instantiation.cc: New test.
3666 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3668 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3670 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3672 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3674 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3676 * include/c_compatibility/math.h [C++20] (lerp): Add using
3678 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3679 (__lerp): Define function template to implement lerp.
3680 (lerp(float, float, float), lerp(double, double, double))
3681 (lerp(long double, long double, long double)): Define for C++20.
3682 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3683 (midpoint(T, T), midpoint(T*, T*)): Define.
3684 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3685 * testsuite/26_numerics/lerp.cc: New test.
3686 * testsuite/26_numerics/midpoint/floating.cc: New test.
3687 * testsuite/26_numerics/midpoint/integral.cc: New test.
3688 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3690 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3692 PR libstdc++/88996 Implement P0439R0
3693 Make std::memory_order a scoped enumeration.
3694 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3695 add variables for the old enumerators. Adjust calls.
3696 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3697 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3699 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3701 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3704 * include/std/memory_resource (polymorphic_allocator): Add default
3705 template argument for C++20.
3706 (polymorphic_allocator::allocate_bytes)
3707 (polymorphic_allocator::deallocate_bytes)
3708 (polymorphic_allocator::allocate_object)
3709 (polymorphic_allocator::deallocate_object)
3710 (polymorphic_allocator::new_object)
3711 (polymorphic_allocator::delete_object): New member functions for
3713 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3716 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3719 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3722 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3724 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3725 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3727 * include/std/memory (uses_allocator_construction_args): New set of
3728 overloaded functions.
3729 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3731 * include/std/memory_resource (polymorphic_allocator::construct)
3732 [__cplusplus > 201703l]: Replace all overloads with a single function
3733 using uses_allocator_construction_args.
3734 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3736 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3738 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3741 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3742 stylesheet directories before check for xsltproc. Try to use
3743 xmlcatalog to find local stylesheet directory before trying hardcoded
3744 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3745 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3746 use xsltproc if xmlcatalog fails to find a local stylesheet.
3747 * configure.ac: Check for xmlcatalog.
3748 * Makefile.in: Regenerate.
3749 * configure: Likewise.
3750 * doc/Makefile.in: Likewise.
3751 * include/Makefile.in: Likewise.
3752 * libsupc++/Makefile.in: Likewise.
3753 * po/Makefile.in: Likewise.
3754 * python/Makefile.in: Likewise.
3755 * src/Makefile.in: Likewise.
3756 * src/c++11/Makefile.in: Likewise.
3757 * src/c++17/Makefile.in: Likewise.
3758 * src/c++98/Makefile.in: Likewise.
3759 * src/filesystem/Makefile.in: Likewise.
3760 * testsuite/Makefile.in: Likewise.
3762 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3765 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3766 container deduction guides.
3767 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3768 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3769 parameters in deduction guides.
3770 * include/bits/stl_multimap.h (multimap): Likewise.
3771 * include/bits/stl_multiset.h (multiset): Likewise.
3772 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3773 * include/bits/stl_set.h (set): Likewise.
3774 * include/bits/stl_stack.h (stack): Likewise.
3775 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3776 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3777 constrain parameters in deduction guides.
3778 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3780 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3782 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3783 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3784 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3785 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3787 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3789 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3792 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3793 to class template and partial specialization using void_t.
3794 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3796 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3799 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3800 copy and move members public.
3802 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3804 * include/std/type_traits (__underlying_type_impl): New helper to
3805 make underlying_type SFINAE-friendly.
3806 (underlying_type): Derive from __underlying_type_impl.
3807 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3811 * include/bits/char_traits.h (__constant_char_array): Check index is
3812 in range before dereferencing.
3813 (char_traits<char>::compare, char_traits<char>::find)
3814 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3815 immediately if n is zero.
3816 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3817 Remove workarounds for PR 67026.
3818 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3820 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3823 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3825 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3826 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3828 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3831 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3832 type to std::size_t and argument to type to long double.
3834 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3836 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3837 * config/abi/post/sparc64-linux-gnu: New directory.
3838 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3839 * config/abi/post/sparc64-linux-gnu/32: New directory.
3840 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3842 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3844 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3845 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3848 2019-02-22 Tom Honermann <tom@honermann.net>
3850 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3851 printers for u8string and u8string_view.
3853 2019-02-22 Tom Honermann <tom@honermann.net>
3855 * testsuite/18_support/byte/ops.cc: Validate
3856 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3857 std::to_integer<char32_t>.
3858 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3859 std::numeric_limits<char8_t>.
3860 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3861 std::numeric_limits<char8_t>::lowest().
3862 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3863 std::numeric_limits<char8_t>::max_digits10.
3864 * testsuite/18_support/type_info/fundamental.cc: Validate
3865 typeinfo for char8_t.
3866 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3867 std::from_chars with char8_t.
3868 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3869 Validate explicit instantiation of std::hash<char8_t>.
3870 * testsuite/20_util/is_integral/value.cc: Validate
3871 std::is_integral<char8_t>.
3872 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3873 Validate std::make_signed<char8_t>.
3874 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3875 Validate u8string construction from char8_t sources.
3876 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3878 * testsuite/21_strings/basic_string_view/operations/compare/
3879 char/70483.cc: Validate substr operations on u8string_view.
3880 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3881 the u8string_view typedef is defined.
3882 * testsuite/21_strings/char_traits/requirements/
3883 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3885 * testsuite/21_strings/char_traits/requirements/
3886 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3887 constexpr member functions.
3888 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3889 that the u8string typedef is defined.
3890 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3891 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3892 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3893 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3895 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3896 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3898 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3899 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3900 Validate std::atomic<char8_t>::is_always_lock_free
3901 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3902 Update line numbers.
3903 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3905 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3907 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3908 Validate std::experimental::pmr::u8string.
3909 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3910 u8string_view typedef is defined.
3911 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3912 char32_t to the typelists.
3914 2019-02-22 Tom Honermann <tom@honermann.net>
3916 * include/ext/typelist.h: Constrain a partial specialization of
3917 typelist::detail::append_ to only match chain<T1,T2>.
3919 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3922 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3923 class template with class. Replace move and copy member types with
3924 member alias templates, so they are only instantiated when needed.
3925 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3926 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3927 test for C++11/14/17 as well.
3928 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3931 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3934 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
3935 _GLIBCXX_PURE to the alias declaration.
3937 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
3939 * testsuite/21_strings/basic_string/literals/types.cc
3940 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
3941 * testsuite/21_strings/basic_string/literals/values.cc
3942 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3943 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
3944 potentially having different type.
3945 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
3946 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
3948 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
3949 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
3950 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
3951 string literals only using basic character set.
3952 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
3953 u8 literals to char.
3954 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
3955 Test ATOMIC_CHAR8_T_LOCK_FREE.
3956 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
3957 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
3958 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
3959 * testsuite/experimental/string_view/literals/types.cc
3960 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
3962 * testsuite/experimental/string_view/literals/values.cc
3963 [_GLIBCXX_USE_CHAR8_T]: Likewise.
3965 2019-02-19 Tom Honermann <tom@honermann.net>
3967 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
3968 from char16_32_t.cc; validates numeric_limits<char8_t>.
3969 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
3970 test cloned from types.cc; validates operator""s for char8_t
3972 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
3973 test cloned from values.cc; validates construction and comparison
3975 * testsuite/21_strings/basic_string/requirements/
3976 /explicit_instantiation/char8_t/1.cc: New test cloned from
3977 char16_t/1.cc; validates explicit instantiation of
3978 basic_string<char8_t>.
3979 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3980 New test cloned from types.cc; validates operator""sv for char8_t
3981 returns u8string_view.
3982 * testsuite/21_strings/basic_string_view/literals/
3983 values-char8_t.cc: New test cloned from values.cc; validates
3984 construction and comparison of u8string_view values.
3985 * testsuite/21_strings/basic_string_view/requirements/
3986 explicit_instantiation/char8_t/1.cc: New test cloned from
3987 char16_t/1.cc; validates explicit instantiation of
3988 basic_string_view<char8_t>.
3989 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
3990 New test cloned from char16_t/65049.cc; validates that
3991 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
3992 * testsuite/21_strings/char_traits/requirements/char8_t/
3993 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
3994 that char_traits<char8_t> member typedefs are present and correct.
3995 * testsuite/21_strings/char_traits/requirements/
3996 explicit_instantiation/char8_t/1.cc: New test cloned from
3997 char16_t/1.cc; validates explicit instantiation of
3998 char_traits<char8_t>.
3999 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
4000 from char16_t.cc: validates
4001 codecvt<char16_t, char8_t, mbstate_t>.
4002 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
4003 from char32_t.cc: validates
4004 codecvt<char32_t, char8_t, mbstate_t>.
4005 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
4006 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
4007 codecvt<char32_t, char8_t, std::mbstate_t>.
4008 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
4009 test cloned from string.cc; validates filesystem::path construction
4011 * testsuite/experimental/feat-char8_t.cc: New test; validates that
4012 the __cpp_lib_char8_t feature test macro is defined with the
4014 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
4015 New test cloned from string.cc; validates filesystem::path
4016 construction from char8_t input.
4017 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
4018 test cloned from types.cc; validates operator""sv for char8_t
4019 returns u8string_view.
4020 * testsuite/experimental/string_view/literals/values-char8_t.cc:
4021 New test cloned from values.cc; validates construction and
4022 comparison of u8string_view values.
4023 * testsuite/experimental/string_view/requirements/
4024 explicit_instantiation/char8_t/1.cc: New test cloned from
4025 char16_t/1.cc; validates explicit instantiation of
4026 basic_string_view<char8_t>.
4027 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
4028 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
4031 2019-02-19 Tom Honermann <tom@honermann.net>
4033 P0482R5 char8_t: Standard library support
4034 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
4035 typeinfo symbols for char8_t.
4036 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
4037 (GLIBCXX_3.4.26): Add symbols for specializations of
4038 numeric_limits and codecvt that involve char8_t.
4039 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
4040 * include/bits/atomic_base.h: Add atomic_char8_t.
4041 * include/bits/basic_string.h: Add std::hash<u8string> and
4042 operator""s(const char8_t*, size_t).
4043 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
4045 * include/bits/char_traits.h: Add char_traits<char8_t>.
4046 * include/bits/codecvt.h: Add
4047 codecvt<char16_t, char8_t, mbstate_t>,
4048 codecvt<char32_t, char8_t, mbstate_t>,
4049 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4050 codecvt_byname<char32_t, char8_t, mbstate_t>.
4051 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
4052 recognize char8_t as an integral type.
4053 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
4055 (path::u8string): Return std::u8string when char8_t support is
4057 (path::generic_u8string): Likewise.
4058 (path::_S_convert): Handle conversion from char8_t input.
4059 (path::_S_str_convert): Likewise.
4060 * include/bits/functional_hash.h: Add hash<char8_t>.
4061 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4063 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4064 for new char8_t specializations.
4065 * include/bits/localefwd.h: Add missing declarations of
4066 codecvt<char16_t, char, mbstate_t> and
4067 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4068 codecvt<char16_t, char8_t, mbstate_t> and
4069 codecvt<char32_t, char8_t, mbstate_t>.
4070 * include/bits/postypes.h: Add u8streampos
4071 * include/bits/stringfwd.h: Add declarations of
4072 char_traits<char8_t> and u8string.
4073 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4074 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4076 (path::u8string): Return std::u8string when char8_t support is
4078 (path::generic_u8string): Likewise.
4079 (path::_S_convert): Handle conversion from char8_t input.
4080 (path::_S_str_convert): Likewise.
4081 * include/experimental/string: Add u8string.
4082 * include/experimental/string_view: Add u8string_view,
4083 hash<experimental::u8string_view>, and
4084 operator""sv(const char8_t*, size_t).
4085 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4086 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4087 as a character type.
4088 * include/std/limits: Add numeric_limits<char8_t>.
4089 * include/std/string_view: Add u8string_view,
4090 hash<experimental::u8string_view>, and
4091 operator""sv(const char8_t*, size_t).
4092 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4093 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4094 * libsupc++/atomic_lockfree_defines.h: Define
4095 ATOMIC_CHAR8_T_LOCK_FREE.
4096 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4097 codecvt.cc and limits.cc so that char8_t specializations of
4098 numeric_limits and codecvt and emitted.
4099 * src/c++11/Makefile.in: Likewise.
4100 * src/c++11/codecvt.cc: Define members of
4101 codecvt<char16_t, char8_t, mbstate_t>,
4102 codecvt<char32_t, char8_t, mbstate_t>,
4103 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4104 codecvt_byname<char32_t, char8_t, mbstate_t>.
4105 * src/c++11/limits.cc: Define members of
4106 numeric_limits<char8_t>.
4107 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4108 locale_init.cc and localename.cc.
4109 * src/c++98/Makefile.in: Likewise.
4110 * src/c++98/locale_init.cc: Add initialization for the
4111 codecvt<char16_t, char8_t, mbstate_t> and
4112 codecvt<char32_t, char8_t, mbstate_t> facets.
4113 * src/c++98/localename.cc: Likewise.
4114 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4116 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4118 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4119 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4120 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4122 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4124 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4125 * doc/html/*: Regenerate.
4127 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4128 * doc/html/*: Regenerate.
4130 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4131 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4132 allocator type in is_constructible checks.
4133 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4134 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4135 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4136 problematic type from LWG 2586 discussion.
4137 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4138 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4140 * configure.ac: Check for C11 timespec_get function.
4141 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4143 * config.h.in: Regenerate.
4144 * configure: Regenerate.
4145 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4146 std for C++17 and up.
4148 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4149 * include/bits/stl_queue.h
4150 (priority_queue(const Compare&, const Container&, const Alloc&))
4151 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4153 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4155 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4156 * include/bits/stl_queue.h (queue, priority_queue): Add static
4157 assertions to enforce LWG 2566 requirement on value_type.
4158 * include/bits/stl_stack.h (stack): Likewise.
4161 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4163 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4164 * include/bits/std_abs.h: Add comment about LWG 2735.
4165 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4167 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4170 * include/std/version [__cpp_impl_destroying_delete]
4171 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4172 * libsupc++/new [__cpp_impl_destroying_delete]
4173 (__cpp_lib_destroying_delete): Likewise.
4174 (destroying_delete_t, destroying_delete): Likewise, but define even
4175 when __cpp_impl_destroying_delete is not defined.
4176 * testsuite/18_support/destroying_delete.cc: New test.
4178 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4181 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4182 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4183 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4184 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4186 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4189 * include/bits/fs_path.h (path::has_root_name)
4190 (path::has_root_directory, path::has_root_path)
4191 (path::has_relative_path, path::has_parent_path)
4192 (path::has_filename, path::has_stem, path::has_extension)
4193 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4195 * src/c++17/fs_path.cc (path::has_root_name)
4196 (path::has_root_directory, path::has_root_path)
4197 (path::has_relative_path, path::has_parent_path)
4198 (path::has_filename, path::_M_find_extension): Add noexcept.
4200 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4202 PR libstdc++/89102 (partial)
4203 * include/std/type_traits (common_type<>): Define.
4204 (common_type<T>): Derive from common_type<T, T>.
4205 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4206 Test zero-length template argument list.
4207 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4208 Test additional single argument cases.
4209 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4210 Adjust expected error.
4212 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4215 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4217 * include/bits/stl_stack.h (stack): Likewise.
4218 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4219 * testsuite/23_containers/queue/deduction.cc: New test.
4220 * testsuite/23_containers/stack/deduction.cc: New test.
4223 * include/std/type_traits (__is_convertible_helper)
4224 (__is_convertible_helper<_From, _To, false>): Revert changes to
4225 support is_nothrow_convertible.
4226 (__is_nt_convertible_helper): New helper.
4227 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4229 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4230 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4233 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4234 __is_alloc_insertable_impl. Replace single type member with two
4235 members, one for each of copy and move insertable.
4236 (__is_move_insertable): New trait for internal use.
4237 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4238 (vector::_S_nothrow_relocate(true_type)): New functions to
4239 conditionally check if __relocate_a can throw.
4240 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4241 on __is_move_insertable.
4242 (vector::_S_do_relocate): New overloaded functions to conditionally
4244 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4245 based on _S_use_relocate.
4246 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4247 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4248 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4251 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4252 parameter unnamed. Add message to static assertion.
4253 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4254 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4257 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4260 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4262 (__is_bitwise_relocatable): ... to this.
4263 (__relocate_a_1): Adapt.
4264 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4265 (__is_bitwise_relocatable): ... to this.
4267 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4270 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4271 final component as well as from _M_pathname. Append the dot using
4272 operator+= instead of only to _M_pathname.
4273 (path::_M_find_extension): Reformat slightly.
4274 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4275 Add more test cases.
4277 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4279 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4281 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4283 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4284 constexpr specifiers from arg and proj.
4286 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4287 __shared_ptr instantiations used by gcc4-compatible ABI.
4289 * include/experimental/forward_list (experimental::erase): Qualify
4291 * include/experimental/list (experimental::erase): Likewise.
4292 * include/std/forward_list (std::erase): Likewise.
4293 * include/std/list (std::erase): Likewise.
4295 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4297 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4298 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4299 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4300 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4301 * testsuite/ext/array_allocator/26875.cc: Likewise.
4302 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4303 * testsuite/util/replacement_memory_operators.h: Likewise.
4304 * testsuite/util/testsuite_allocator.h: Likewise.
4306 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4307 normal mode vector, even for debug mode.
4308 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4309 Define alias template for normal mode vector.
4311 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4314 * config/locale/generic/c_locale.h (__convert_from_v)
4315 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4316 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4317 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4318 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4320 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4323 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4324 data member with static member function _S_use_relocate().
4325 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4326 (vector::_M_default_append): Use _S_use_relocate() instead of
4329 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4332 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4335 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4336 write to stderr instead of using printf.
4338 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4341 * include/bits/char_traits.h (__constant_string_p,
4342 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4345 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4347 Implement C++20 P0600r1.
4348 * include/backward/hash_map: Add nodiscard attribute to empty.
4349 * include/backward/hash_set: Likewise.
4350 * backward/hashtable.h: Likewise.
4351 * include/bits/basic_string.h: Likewise.
4352 * include/bits/forward_list.h: Likewise.
4353 * include/bits/hashtable.h: Likewise.
4354 * include/bits/regex.h: Likewise.
4355 * include/bits/stl_deque.h: Likewise.
4356 * include/bits/stl_list.h: Likewise.
4357 * include/bits/stl_map.h: Likewise.
4358 * include/bits/stl_multimap.h: Likewise.
4359 * include/bits/stl_multiset.h: Likewise.
4360 * include/bits/stl_queue.h: Likewise.
4361 * include/bits/stl_set.h: Likewise.
4362 * include/bits/stl_stack.h: Likewise.
4363 * include/bits/stl_tree.h: Likewise.
4364 * include/bits/stl_vector.h: Likewise.
4365 * include/bits/unordered_map.h: Likewise.
4366 * include/bits/unordered_set.h: Likewise.
4367 * include/debug/array: Likewise.
4368 * include/experimental/any: Likewise.
4369 * include/experimental/bits/fs_path.h: Likewise.
4370 * include/experimental/internet: Likewise.
4371 * include/experimental/string_view: Likewise.
4372 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4374 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4376 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4378 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4380 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4382 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4384 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4386 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4388 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4389 info_fn_imps.hpp: Likewise.
4390 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4391 left_child_next_sibling_heap_.hpp: Likewise.
4392 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4394 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4396 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4398 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4400 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4402 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4404 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4406 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4407 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4408 * include/ext/rope: Likewise.
4409 * include/ext/slist: Likewise.
4410 * include/ext/vstring.h: Likewise.
4411 * include/profile/array: Likewise.
4412 * include/std/array: Likewise.
4413 * include/tr1/array: Likewise.
4414 * include/tr1/hashtable.h: Likewise.
4415 * include/tr1/regex: Likewise.
4416 * include/tr2/dynamic_bitset: Likewise.
4417 * include/bits/alloc_traits.h: Add nodiscard attribute to
4419 * include/experimental/memory_resource: Likewise.
4420 * include/ext/alloc_traits.h: Likewise.
4421 * include/ext/array_allocator.h: Likewise.
4422 * include/ext/bitmap_allocator.h: Likewise.
4423 * include/ext/debug_allocator.h: Likewise.
4424 * include/ext/extptr_allocator.h: Likewise.
4425 * include/ext/mt_allocator.h: Likewise.
4426 * include/ext/new_allocator.h: Likewise.
4427 * include/ext/pool_allocator.h: Likewise.
4428 * include/ext/throw_allocator.h: Likewise.
4429 * include/std/scoped_allocator: Likewise.
4430 * libsupc++/eh_alloc.cc: Likewise.
4431 * include/std/future: Add nodiscard attribute to async.
4432 * libsupc++/new: Add nodiscard attribute to new.
4434 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4439 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4440 * include/bits/shared_ptr.h
4441 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4442 (allocate_shared): Change to use new tag type.
4443 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4444 Declare new member function.
4445 (_Sp_alloc_shared_tag): Define new type.
4446 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4447 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4448 _Sp_make_shared_tag::_S_eq to check type_info.
4449 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4450 Constrain to prevent being called with _Sp_alloc_shared_tag.
4451 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4452 Replace constructor with ...
4453 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4454 reference parameter so address of the new object can be returned to
4455 the caller. Obtain the allocator from the tag type.
4456 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4457 constructor with ...
4458 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4459 to the __shared_count constructor.
4460 (__allocate_shared): Change to use new tag type.
4461 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4463 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4465 * src/c++17/fs_ops.cc
4466 (equivalent(const path&, const path&, error_code&))
4467 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4468 compare files instead of relying on incomplete info returned by stat.
4471 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4472 if the path is already absolute.
4473 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4474 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4477 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4478 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4479 of filesystem::exists.
4480 (create_directories(const path&, error_code&)): Add assertions.
4481 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4482 Add workaround for bug in _wstat for paths with trailing slash.
4483 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4484 for expected behaviour on mingw.
4485 * testsuite/experimental/filesystem/operations/create_directories.cc:
4487 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4488 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4489 not test permissions on mingw targets.
4491 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4493 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4494 constructors and open members taking wide strings. Fix patterns for
4495 filesystem::path members to match wstring_view parameters. Add
4496 exports for shared_ptr members used by directory iterators.
4497 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4498 error code parameter if the file doesn't exist.
4499 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4501 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4502 values for mingw targets, where "/" is not an absolute path. Do not
4503 test symlinks on mingw targets.
4504 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4505 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4507 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4508 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4509 that each component of the path is created.
4510 * testsuite/experimental/filesystem/operations/create_directories.cc:
4512 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4513 permissions on mingw targets.
4514 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4515 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4516 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4517 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4519 * testsuite/experimental/filesystem/operations/permissions.cc:
4521 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4522 symlinks or permissions on mingw targets.
4523 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4524 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4525 symlinks on mingw targets.
4526 * testsuite/experimental/filesystem/operations/remove_all.cc:
4528 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4529 permissions on mingw targets.
4530 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4531 test symlinks on mingw targets.
4532 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4535 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4538 Warn about unused comparisons of shared_ptr/unique_ptr
4539 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4540 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4541 <, <=, >, >= for shared_ptr.
4542 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4544 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4546 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4547 as 201611L, because P0497R0 changes are supported.
4548 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4550 * include/bits/erase_if.h [__cplusplus > 201703L]
4551 (__cpp_lib_erase_if): Only define for C++2a.
4552 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4553 (__cpp_lib_null_iterators): Define.
4554 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4555 (__cpp_lib_null_iterators): Define.
4556 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4558 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4560 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4562 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4563 changes are supported.
4564 * include/std/optional (__cpp_lib_optional): Likewise.
4565 * include/std/variant (__cpp_lib_variant): Likewise.
4566 * include/std/version [!__STRICT_ANSI__]
4567 (__cpp_lib_uncaught_exceptions): Define as long integer.
4568 [__cplusplus >= 201703L] (__cpp_lib_any)
4569 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4570 (__cpp_lib_variant): Define for C++17.
4571 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4573 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4576 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4578 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4582 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4584 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4587 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4589 * doc/xml/manual/intro.xml: Include new section.
4590 * doc/xml/manual/status_cxx2017.xml: Document more
4591 implementation-defined properties of the library.
4592 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4593 * doc/html/*: Regenerate.
4595 * include/bits/refwrap.h [__cplusplus > 201703L]
4596 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4597 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4598 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4600 (reference_wrapper::operator()): Add static assertion.
4601 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4603 * include/std/chrono (duration_values::zero(), duration_values::min())
4604 (duration_values::max()): Add noexcept.
4605 (duration::zero(), duration::min(), duration::max()): Likewise.
4606 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4607 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4608 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4610 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4612 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4614 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4615 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4617 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4620 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4621 specialization for C++17 (P0513R0, LWG 2817).
4622 * testsuite/20_util/hash/nullptr.cc: New test.
4625 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4626 pattern for std::basic_stringbuf::str().
4628 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4629 basic_ostream::operator<< patterns.
4631 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4633 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4634 test failures on targets with 32-bit time_t.
4636 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4637 * include/std/deque: Likewise.
4638 * include/std/forward_list: Likewise.
4639 * include/std/list: Likewise.
4640 * include/std/string: Likewise.
4641 * include/std/vector: Likewise.
4642 * include/std/version: Likewise.
4643 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4644 * testsuite/23_containers/deque/erasure.cc: Likewise.
4645 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4646 * testsuite/23_containers/list/erasure.cc: Likewise.
4647 * testsuite/23_containers/map/erasure.cc: Likewise.
4648 * testsuite/23_containers/set/erasure.cc: Likewise.
4649 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4650 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4651 * testsuite/23_containers/vector/erasure.cc: Likewise.
4653 * include/experimental/internet [AI_NUMERICSERV]
4654 (resolver_base::numeric_service): Define conditionally.
4655 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4657 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4660 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4661 Jonathan Wakely <jwakely@redhat.com>
4664 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4665 (GLIBCXX_3.4.26): Add new exports.
4666 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4667 correct list of sources.
4668 * include/Makefile.in: Regenerate.
4669 * include/std/ostream (operator<<(nullptr_t)): New member function.
4670 * src/c++17/ostream-inst.cc: New file.
4671 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4674 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4676 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4677 of the source file containing the caller.
4678 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4679 directories created by test.
4680 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4682 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4684 * testsuite/experimental/filesystem/iterators/
4685 recursive_directory_iterator.cc: Likewise.
4687 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4689 PR tree-optimization/88775
4690 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4691 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4692 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4693 instead of __builtin_constant_p if available. Don't bother with
4694 the pointer comparison in C++11 and earlier.
4696 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4700 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4703 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4705 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4706 for filesystem::path. Give variables more distinctive names.
4708 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4709 member function to perform non-trivial assignment.
4710 (_Optional_payload_base::_M_move_assign): Likewise.
4711 (_Optional_payload<T, true, false, true>::operator=)
4712 (_Optional_payload<T, true, true, false>::operator=)
4713 (_Optional_payload<T, true, false, false>::operator=): Call
4714 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4717 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4718 test std::complex<long double> if long double format is IBM128.
4719 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4722 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4724 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4725 for old std::unique_ptr layout.
4726 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4727 to become valueless. Add filesystem::path tests.
4730 * include/std/optional (_Optional_payload_base): New class template
4731 for common code hoisted from _Optional_payload specializations. Use
4732 a template for the union, to allow a partial specialization for
4733 types with non-trivial destructors. Add constructors for in-place
4734 initialization to the union.
4735 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4736 to perform non-trivial copy construction, instead of relying on
4737 non-standard copy elision in a delegating constructor.
4738 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4739 non-trivial move construction.
4740 (_Optional_payload): Derive from _Optional_payload_base and use it
4741 for everything except the non-trivial assignment operators, which are
4743 (_Optional_payload<false, C, M>): Derive from the specialization
4744 _Optional_payload<true, false, false> and add a destructor.
4745 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4746 Forward to corresponding members of _Optional_payload.
4747 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4748 Hoist common members from _Optional_base.
4749 (_Optional_base): Make all members and base class public.
4750 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4751 _Optional_base_impl.
4752 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4753 support for new std::optional layout.
4754 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4757 * include/bits/locale_conv.h: Use <> for includes not "".
4758 * include/ext/random: Likewise.
4759 * include/ext/vstring.h: Likewise.
4761 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4763 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4764 (GLIBCXX_3.4.21): Likewise.
4766 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4769 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4770 to match the one that controls whether utimbuf and utime are declared.
4772 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4775 * include/bits/char_traits.h (char_traits::move): Do not pass null
4776 pointers to memmove.
4777 * include/bits/locale_facets.h
4778 (ctype<char>::widen(const char*, const char*, char*)): Do not
4779 pass null pointers to memcpy.
4780 (ctype<char>::narrow(const char*, const char*, char, char*)):
4782 (ctype<char>::do_widen(const char*, const char*, char*)):
4784 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4787 * doc/xml/manual/spine.xml: Update copyright years.
4788 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4789 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4790 for C++17 filesystem library.
4791 * doc/html/*: Regenerate.
4793 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4794 * config.h.in: Regenerate.
4795 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4796 alphabetically and add missing entries for copy_symlink,
4797 hard_link_count, rename, and resize_file.
4798 * configure: Regenerate.
4799 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4800 used unconditionally.
4801 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4802 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4803 supports truncating to zero length.
4804 * testsuite/27_io/filesystem/operations/all.cc: New test.
4805 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4807 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4810 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4811 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4812 * config.h.in: Regenerate.
4813 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4814 remaining std::filesystem types and functions.
4815 * configure: Regenerate.
4816 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4817 * src/c++17/Makefile.in: Regenerate.
4818 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4819 here, and change name of included file.
4820 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4821 here, and change name of included file.
4822 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4823 path to dir-common.h.
4824 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4825 path to ops-common.h. Disable -Wunused-parameter warnings.
4826 (internal_file_clock): Define unconditionally.
4827 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4829 (do_copy_file, do_space): Move definitions to ops.common.h.
4830 (copy, file_size, hard_link_count, last_write_time, space): Only
4831 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4833 (last_write_time, read_symlink): Remove unused attributes from
4835 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4836 * src/filesystem/Makefile.in: Regenerate.
4837 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4838 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4839 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4840 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4841 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4842 dummy types and functions instead of using #error.
4843 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4844 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4846 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4847 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4848 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4849 to account for new namespace.
4850 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4851 -lstdc++fs from dg-options.
4852 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4853 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4854 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4855 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4856 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4858 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4859 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4861 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4862 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4863 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4864 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4865 * testsuite/27_io/filesystem/operations/create_directories.cc:
4867 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4868 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4869 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4870 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4871 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4872 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4873 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4874 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4875 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4876 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4877 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4878 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4879 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4880 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4881 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4882 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4883 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4884 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4886 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4890 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4891 typeinfo and vtables less greedy.
4892 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4893 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4894 * src/c++17/Makefile.in: Regenerate.
4895 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4896 here, and change name of included file.
4897 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4898 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4900 * src/filesystem/Makefile.in: Regenerate.
4901 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4902 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4903 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4904 from dg-options and remove dg-require-filesystem-ts.
4905 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4906 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4907 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4908 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4909 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4910 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4911 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4912 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4913 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4914 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4915 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4916 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4917 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4918 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4919 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4920 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4921 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4922 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4923 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4924 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4925 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4927 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4928 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4929 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4930 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4931 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4932 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4933 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4934 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
4935 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
4936 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
4937 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
4938 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
4940 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
4942 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4944 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
4946 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
4947 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4948 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
4949 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
4950 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4951 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4952 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4953 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4954 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
4955 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4957 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4958 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4959 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4960 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
4961 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4964 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
4965 Check is_trivially_copyable instead of is_scalar.
4966 (variant::emplace<N, Args>(Args&&...)): If construction of the new
4967 contained value can throw and its type is trivially copyable then
4968 construct into a temporary variant and move from it, to provide the
4969 strong exception safety guarantee.
4970 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
4972 * testsuite/20_util/variant/87431.cc: New test.
4973 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
4974 conversion causes valueless state.
4977 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
4978 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
4979 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
4980 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
4981 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
4983 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
4985 * include/bits/fs_fwd.h (__file_clock): Define new clock.
4986 (file_time_type): Redefine in terms of __file_clock.
4987 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
4989 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
4991 (internal_file_lock): New helper type for accessing __file_clock.
4992 (do_copy_file): Use internal_file_lock to convert system time to
4994 (last_write_time(const path&, error_code&)): Likewise.
4995 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
4997 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
4999 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
5000 for const member functions of std::basic_string.
5001 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
5003 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
5004 Make non-standard constructor private.
5005 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
5007 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
5008 explicit instantiations for C++17 as well as earlier dialects.
5009 * src/c++17/Makefile.am: Add new source files.
5010 * src/c++17/Makefile.in: Regenerate.
5011 * src/c++17/cow-string-inst.cc: New file defining explicit
5012 instantiations for basic_string member functions added in C++17.
5013 * src/c++17/string-inst.cc: Likewise.
5015 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
5016 copy/move constructors for old std::basic_string.
5017 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
5018 (basic_string::reference, basic_string::const_reference): Define
5019 as plain references for C++11 and later.
5020 (basic_string::basic_string()): Put constructor body outside
5021 preprocessor conditional groups.
5022 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
5023 instead of copying it.
5024 (basic_string::basic_string(const basic_string&, const _Alloc&)):
5026 (basic_string::basic_string(basic_string&&, const _Alloc&)):
5028 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
5029 cases for old basic_string.
5030 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
5031 allocator-extended constructors unconditionally. Add extra members to
5032 allocator type when using old string ABI.
5033 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
5035 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
5037 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
5038 -fno-inline added to test flags.
5040 * testsuite/21_strings/basic_string/requirements/
5041 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
5043 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
5044 assertion failures with old std::string ABI.
5046 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
5048 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
5049 functions that will only erase elements at the end.
5050 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
5051 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
5052 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
5054 (path::_List::pop_back()): Define.
5055 (path::_List::_M_erase_from(const_iterator)): Define.
5056 (path::operator/=(const path&)): Use pop_back to remove last component
5057 and _M_erase_from to remove multiple components.
5058 (path::_M_append(basic_string_view<value_type>)): Likewise.
5059 (path::operator+=(const path&)): Likewise.
5060 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5061 (path::remove_filename()): Likewise.
5062 (path::lexically_normal()): Use _List::_Impl iterators instead of
5063 path::iterator. Use pop_back to remove components from the end. Clear
5064 trailing filename, instead of using erase(const_iterator) to remove
5065 a non-final component.
5066 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5068 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5070 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5071 incorrect treatment of empty filename after trailing slash.
5072 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5074 * testsuite/21_strings/basic_string/modifiers/assign/char/
5075 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5077 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5078 move_assign_optim.cc: Likewise.
5080 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5081 Jakub Jelinek <jakub@redhat.com>
5084 * include/experimental/memory: Replace UTF-8 quote characters.
5085 * include/std/future: Replace UTF-8 "em dash" characters.
5087 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5090 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5091 * include/debug/forward_list: Likewise.
5092 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5094 * include/experimental/chrono: Likewise.
5095 * include/experimental/functional: Likewise.
5096 * include/experimental/ratio: Likewise.
5097 * include/experimental/system_error: Likewise.
5098 * include/experimental/tuple: Likewise.
5099 * include/experimental/type_traits: Likewise.
5100 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5101 * include/parallel/multiseq_selection.h: Likewise.
5104 * config/abi/pre/gnu.ver: Add missing exports.
5105 * testsuite/22_locale/collate_byname/88681.cc: New test.
5106 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5107 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5109 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5111 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5112 initializer_list<value_type> and from input iterator ranges.
5113 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5115 * testsuite/experimental/string_view/element_access/char/empty.cc:
5116 Fix year range in copyright header.
5118 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5120 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5121 Fix year range in copyright header.
5123 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5125 Update copyright years.
5127 Copyright (C) 2019 Free Software Foundation, Inc.
5129 Copying and distribution of this file, with or without modification,
5130 are permitted in any medium without royalty provided the copyright
5131 notice and this notice are preserved.