1 2019-09-06 Florian Weimer <fweimer@redhat.com>
3 * configure: Regenerate.
5 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
7 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
8 P1024R3. Remove entry for P0920R2.
9 * include/std/span (__cpp_lib_span): Change value.
10 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
12 (span): Replace __extent_storage base class with data member.
13 (span::_S_subspan_extent): New function.
14 (span::empty()): Add nodiscard attribute.
15 (span::front, span::back, span::operator[]): Check preconditions.
16 (span::first, span::last, span::subspan): Add noexcept. Improve
17 precondition checks (LWG 3103).
18 (get): Remove redundant condition from static_assert.
19 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
20 (as_writable_bytes): Add inline specifier.
21 * include/std/version (__cpp_lib_span): Change value.
22 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
23 * testsuite/23_containers/span/front_neg.cc: Likewise.
24 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
25 * testsuite/23_containers/span/last_neg.cc: Improve test.
26 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
27 * testsuite/23_containers/span/1.cc: New test.
28 * testsuite/23_containers/span/2.cc: New test.
29 * testsuite/23_containers/span/back_assert_neg.cc: New test.
30 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
31 * testsuite/23_containers/span/first_assert_neg.cc: New test.
32 * testsuite/23_containers/span/first_neg.cc: New test.
33 * testsuite/23_containers/span/front_assert_neg.cc: New test.
34 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
35 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
36 * testsuite/23_containers/span/last_assert_neg.cc: New test.
37 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
38 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
39 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
40 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
41 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
42 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
44 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
46 * include/Makefile.am: Add <span> header.
47 * include/Makefile.in: Regenerate.
48 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
49 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
50 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
51 New functions for performing argument-dependent lookup of range
53 * include/bits/stl_iterator.h (__normal_iterator): Add
54 _GLIBCXX20_CONSTEXPR to all functions.
55 * include/std/span: New header.
56 * include/std/version (__cpp_lib_span): Define feature test macro.
57 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
58 * testsuite/23_containers/span/everything.cc: New test.
59 * testsuite/23_containers/span/get_neg.cc: New test.
60 * testsuite/23_containers/span/last_neg.cc: New test.
61 * testsuite/23_containers/span/subspan_neg.cc: New test.
62 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
63 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
64 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
66 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
68 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
69 * doc/html/*: Regenerate.
71 2019-09-04 Mike Crowe <mac@mcrowe.com>
74 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
75 pthread_cond_clockwait function.
76 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
77 * configure: Regenerate.
78 * config.h.in: Regenerate.
79 * include/std/condition_variable: (condition_variable): Rename
80 __steady_clock_t typedef and add system_clock. Change __clock_t to be
81 a typedef for the preferred clock to convert arbitrary other clocks to.
82 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
84 (wait_until): Change __clock_t overload to use system_clock.
85 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
86 steady_clock overload that calls pthread_cond_clockwait.
87 (__wait_until_impl): Change __clock_t overload to use system_clock.
88 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
89 steady_clock for __clock_t if pthread_cond_clockwait is available.
91 2019-09-04 Mike Crowe <mac@mcrowe.com>
93 * testsuite/30_threads/condition_variable/members/2.cc (test01):
94 Parameterise so that test can be run against an arbitrary clock.
95 (main): Test using std::chrono::steady_clock and a user-defined
96 clock in addition to the previous std::chrono::system_clock.
97 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
99 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
101 * crossconfig.m4: Remove references to spu.
102 * configure: Regenerate.
103 * doc/xml/manual/appendix_contributing.xml: Remove references
104 to __ea as "badword" for spu.
105 * doc/html/manual/source_code_style.html: Regenerate.
106 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
107 to avoid __ea (as "badword" for spu).
108 (__ellint_rj): Likewise.
110 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
113 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
114 scanning to conform to the GNU Coding Standards.
115 * configure: Regenerate.
117 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
119 * src/c++17/memory_resource.cc: Use __constinit keyword.
121 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
123 * doc/xml/manual/abi.xml: Document 9.x library versions.
124 * doc/html/*: Regenerate.
126 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
128 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
129 (__detail::__to_chars_8_len): Remove.
130 (__detail::__to_chars_8): Inline length calculation here.
131 (__detail::__from_chars_binary): Use numeric_limits instead of
134 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
136 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
137 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
138 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
139 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
142 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
144 * testsuite_files/util/testsuite_performance.h
145 (resource_counter::start): Ignore unused malloc(0) result.
147 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
149 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
150 Model Object Technologies): Adjust name and link.
152 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
154 * include/std/charconv (__detail::__to_chars_8)
155 __detail::__to_chars_16): Replace array of precomputed digits with
156 arithmetic operations to avoid CPU cache misses. Remove zero
157 termination from array of digits to allow symbol merge with generic
158 implementation of __detail::__to_chars. Replace final offsets with
159 constants. Use __detail::__to_chars_len_2 instead of a generic
160 __detail::__to_chars_len.
161 (__detail::__to_chars): Remove zero termination from array of digits.
162 (__detail::__to_chars_2): Leading digit is always '1'.
164 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
166 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
168 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
170 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
172 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
175 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
176 to template parameters.
177 * include/bits/stl_uninitialized.h (uninitialized_copy)
178 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
179 diagnose invalid uses.
180 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
181 Adjust expected error.
182 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
184 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
186 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
188 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
190 * testsuite/23_containers/vector/cons/89164.cc: New test.
191 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
193 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
196 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
197 * configure: Regenerate.
198 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
200 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
202 * testsuite/util/testsuite_abi.cc: Add new symbol version.
204 2019-08-29 Jakub Jelinek <jakub@redhat.com>
206 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
207 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
209 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
211 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
212 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
213 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
214 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
215 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
216 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
217 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
219 2019-08-23 Joseph Myers <joseph@codesourcery.com>
221 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
222 (std::filesystem::__gnu_posix::lstat): Add return type.
224 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
226 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
228 * include/std/numeric (reduce): Fix Doxygen markup.
231 * include/std/type_traits (is_function): Simplify definition. Remove
232 partial specializations for function types.
233 (__is_referenceable): Simplify definition.
234 * testsuite/20_util/bind/91371.cc: New test.
235 * testsuite/20_util/is_function/91371.cc: New test.
236 * testsuite/20_util/is_function/value.cc: Check more pointer types.
237 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
238 * testsuite/20_util/is_object/91371.cc: New test.
240 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
242 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
244 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
247 * include/bits/std_function.h (__check_func_return_type): Remove.
248 (function::_Callable): Use std::__is_invocable_impl instead of
249 __check_func_return_type.
250 * include/std/type_traits (__is_invocable_impl): Add another defaulted
251 template parameter. Define a separate partial specialization for
252 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
253 with a check that models delayed temporary materialization.
254 * testsuite/20_util/function/91456.cc: New test.
255 * testsuite/20_util/is_invocable/91456.cc: New test.
257 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
259 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
261 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
263 Implement C++20 p0879 - Constexpr for swap and swap related functions.
264 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
265 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
267 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
268 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
269 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
270 * include/bits/move.h (swap): Add constexpr.
271 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
272 (__gcd, __rotate, rotate, __partition, __heap_select)
273 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
274 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
275 (__introselect, __chunk_insertion_sort, next_permutation)
276 (prev_permutation, partition, partial_sort, nth_element, sort)
277 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
278 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
279 (swap_ranges): Add constexpr.
280 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
281 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
283 * include/std/type_traits (swap): Add constexpr.
284 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
285 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
286 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
287 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
288 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
289 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
290 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
291 * testsuite/25_algorithms/partition/constexpr.cc: New test.
292 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
293 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
294 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
295 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
296 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
297 * testsuite/25_algorithms/sort/constexpr.cc: New test.
298 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
299 * testsuite/25_algorithms/swap/constexpr.cc: New test.
300 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
302 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
305 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
307 * include/std/tuple (__unpack_std_tuple): New variable template and
308 partial specializations.
309 (apply, make_from_tuple): Add noexcept-specifier.
310 * testsuite/20_util/tuple/apply/2.cc: New test.
311 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
313 2019-08-09 Corentin Gay <gay@adacore.com>
315 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
316 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
317 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
318 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
319 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
320 Add call to `VERIFY`.
322 2019-08-09 Alexandre Oliva <oliva@adacore.com>
325 (normal_mv_distribution::param_type::param_type): New private
326 ctor taking a decomposed varcov matrix, for use by...
327 (operator>>): ... this, befriended.
328 * include/ext/random.tcc (operator>>): Use it.
329 (normal_mv_distribution::param_type::_M_init_lower): Adjust
330 member function name in exception message.
332 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
334 P0325R4 to_array from LFTS with updates
335 * include/experimental/array (to_array): Qualify call to __to_array.
336 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
337 * include/std/version (__cpp_lib_to_array): Likewise.
338 * testsuite/23_containers/array/creation/1.cc: New test.
339 * testsuite/23_containers/array/creation/2.cc: New test.
340 * testsuite/23_containers/array/creation/3_neg.cc: New test.
341 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
342 Use zero for dg-error line number.
344 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
346 P1651R0 bind_front should not unwrap reference_wrapper
347 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
348 * include/std/version (__cpp_lib_bind_front): Update value.
349 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
351 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
353 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
354 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
355 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
356 specializations for __float128.
357 * testsuite/26_numerics/numbers/float128.cc: New test.
359 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
361 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
364 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
366 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
367 in <algorithm> and <utility> Headers.
368 Implement C++20 p1023 - constexpr comparison operators for std::array.
369 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
370 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
371 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
372 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
373 none_of, partition_copy, partition_point, remove, remove_if,
374 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
375 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
376 count_if, equal, find, find_first_of, find_if, for_each, generate,
377 generate_n, lexicographical_compare, merge, mismatch, replace,
378 replace_if, search, search_n, set_difference, set_intersection,
379 set_symmetric_difference, set_union, transform, unique_copy):
381 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
382 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
383 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
384 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
385 Use const ref instead of ref arg;
386 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
387 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
388 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
389 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
390 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
391 __iter_comp_iter): Mark constexpr.
392 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
393 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
394 none_of, any_of, find_if_not, is_partitioned, partition_point,
395 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
396 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
397 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
398 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
399 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
400 __equal_range, equal_range, binary_search, __includes, includes,
401 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
402 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
403 is_sorted_until, __is_permutation, is_permutation, for_each, find,
404 find_if, find_first_of, adjacent_find, count, count_if, search,
405 search_n, transform, replace, replace_if, generate, generate_n,
406 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
407 set_intersection, __set_difference, set_difference,
408 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
409 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
410 wrappers around __builtin_memmove and __builtin_memcmp
412 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
413 copy, move, __copy_move_b, __copy_move_backward_a,
414 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
415 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
416 __lexicographical_compare_impl, __lexicographical_compare,
417 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
418 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
419 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
420 is_heap): Mark constexpr.
421 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
422 is_heap): Mark constexpr.
423 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
424 * include/std/array: Make comparison ops constexpr.
425 * include/std/utility: Make exchange constexpr.
426 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
427 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
428 * testsuite/23_containers/array/tuple_interface/
429 tuple_element_neg.cc: Adjust.
430 * testsuite/20_util/exchange/constexpr.cc: New.
431 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
432 * testsuite/25_algorithms/constexpr_macro.cc: New.
433 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
434 * testsuite/25_algorithms/all_of/constexpr.cc: New.
435 * testsuite/25_algorithms/any_of/constexpr.cc: New.
436 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
437 * testsuite/25_algorithms/copy/constexpr.cc: New.
438 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
439 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
440 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
441 * testsuite/25_algorithms/count/constexpr.cc: New.
442 * testsuite/25_algorithms/count_if/constexpr.cc: New.
443 * testsuite/25_algorithms/equal/constexpr.cc: New.
444 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
445 * testsuite/25_algorithms/fill/constexpr.cc: New.
446 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
447 * testsuite/25_algorithms/find/constexpr.cc: New.
448 * testsuite/25_algorithms/find_end/constexpr.cc: New.
449 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
450 * testsuite/25_algorithms/find_if/constexpr.cc: New.
451 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
452 * testsuite/25_algorithms/for_each/constexpr.cc: New.
453 * testsuite/25_algorithms/generate/constexpr.cc: New.
454 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
455 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
456 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
457 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
458 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
459 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
460 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
461 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
462 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
463 * testsuite/25_algorithms/merge/constexpr.cc: New.
464 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
465 * testsuite/25_algorithms/none_of/constexpr.cc: New.
466 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
467 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
468 * testsuite/25_algorithms/remove/constexpr.cc: New.
469 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
470 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
471 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
472 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
473 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
474 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
475 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
476 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
477 * testsuite/25_algorithms/search/constexpr.cc: New.
478 * testsuite/25_algorithms/search_n/constexpr.cc: New.
479 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
480 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
481 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
482 * testsuite/25_algorithms/set_union/constexpr.cc: New.
483 * testsuite/25_algorithms/transform/constexpr.cc: New.
484 * testsuite/25_algorithms/unique/constexpr.cc: New.
485 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
486 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
488 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
490 * include/std/memory (make_obj_using_allocator): Qualify call to
491 uses_allocator_construction_args.
493 P0631R4 Math Constants
494 * include/Makefile.am: Add new header.
495 * include/Makefile.in: Regenerate.
496 * include/precompiled/stdc++.h: Include new header.
497 * include/std/numbers: New header.
498 * include/std/version (__cpp_lib_math_constants): Define.
499 * testsuite/26_numerics/numbers/1.cc: New test.
500 * testsuite/26_numerics/numbers/2.cc: New test.
501 * testsuite/26_numerics/numbers/3.cc: New test.
502 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
504 * include/std/bit: Add Doxygen comments.
507 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
508 constraints on deleter that should only apply to the constructor.
509 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
510 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
511 constraints on deleter here.
512 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
514 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
517 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
519 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
521 * testsuite/18_support/51333.cc: New test.
523 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
525 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
526 to the Doxygen manual. Avoid a "here" link on the way.
527 Fix another broken link to Doxygen docblocks.
529 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
531 * include/std/bit (__cpp_lib_endian): Define.
532 * include/std/version (__cpp_lib_endian): Define.
533 * testsuite/26_numerics/endian/2.cc: New.
534 * testsuite/26_numerics/endian/3.cc: New.
535 * testsuite/26_numerics/endian/4.cc: New.
537 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
539 * testsuite/util/testsuite_iterators.h
540 (bidirectional_iterator_wrapper): Fix type comment.
541 (random_access_iterator_wrapper): Likewise.
543 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
545 * include/std/bit (endian): Move definition here as per P1612R1.
546 * include/std/type_traits (endian): Remove definition from here.
547 * testsuite/20_util/endian/1.cc: Rename to ...
548 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
550 2019-07-25 Martin Liska <mliska@suse.cz>
551 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
554 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
556 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
557 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
558 * testsuite/ext/new_allocator/check_new.cc: Likewise.
560 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
562 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
563 * testsuite/26_numerics/bit/bit.count/*: Here.
565 * include/std/bit (__rotl, __rotr): Change second parameter from
566 unsigned int to int and handle negative values.
567 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
568 parameter from unsigned int to int. Add nodiscard attribute.
569 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
570 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
572 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
573 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
576 * include/std/bit (__ceil2): Make unrepresentable results undefined,
577 as per P1355R2. Add debug assertion. Perform one left shift, not two,
578 so that out of range values cause undefined behaviour. Ensure that
579 shift will still be undefined if left operand is promoted.
580 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
581 unrepresentable values with checks that they are not core constant
583 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
585 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
587 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
588 sized deallocation size computation.
590 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
592 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
594 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
596 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
597 (~_Temporary_buffer()): Use latter.
598 (_Temporary_buffer(_FIterator, size_type)): Likewise.
600 2019-07-17 Andreas Schwab <schwab@suse.de>
602 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
604 2019-07-16 Jason Merrill <jason@redhat.com>
606 * include/std/memory (uses_allocator_construction_args): Add parens
609 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
611 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
613 * include/experimental/string_view (__detail::__idt): Remove.
614 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
615 Use __type_identity_t instead of __detail::__idt;
616 * include/std/string_view (__detail::__idt): Remove.
617 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
618 Use __type_identity_t instead of __detail::__idt;
619 * include/std/type_traits (__type_identity_t): New alias template.
621 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
622 and floating point atomics.
624 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
626 * doc/xml/manual/configure.xml: Improve documentation of
627 --enable-libstdcxx-time option.
629 * include/bits/atomic_base.h (__atomic_impl): New namespace for
630 wrappers around atomic built-ins.
631 (__atomic_float, __atomic_ref): New class templates for use as base
633 * include/std/atomic (atomic<float>, atomic<double>)
634 (atomic<long double>): New explicit specializations.
635 (atomic_ref): New class template.
636 (__cpp_lib_atomic_ref): Define.
637 * include/std/version (__cpp_lib_atomic_ref): Define.
638 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
639 * testsuite/29_atomics/atomic_float/1.cc: New test.
640 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
641 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
642 * testsuite/29_atomics/atomic_ref/float.cc: New test.
643 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
644 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
645 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
646 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
648 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
650 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
651 throw() with _GLIBCXX_NOTHROW.
652 (__atomic_add_dispatch): Return after performing atomic increment.
654 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
656 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
657 (__exchange_and_add): Replace static specifier with always_inline
659 (__exchange_and_add_single, __atomic_add_single): Likewise.
660 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
661 combine !__gthread_active_p() and !__GTHREADS branches.
663 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
666 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
667 * configure: Regenerate.
668 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
670 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
671 * testsuite/util/testsuite_abi.cc: Add new symbol version.
673 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
675 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
676 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
677 instead of __is_identifier to detect Clang support.
679 2019-07-02 Jim Wilson <jimw@sifive.com>
681 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
683 * configure: Regenerate.
685 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
688 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
689 for the what_arg parameters.
690 (filesystem_error::filesystem_error): Pass system_error::what() to
691 the _Impl constructor.
692 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
693 filesystem_error::what() contains system_error::what().
695 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
697 * include/std/charconv (chars_format): Define bitmask type.
698 * testsuite/20_util/to_chars/chars_format.cc: New test.
700 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
701 * include/std/bit (_If_is_unsigned_integer_type): Remove.
702 (_If_is_unsigned_integer): Use __is_unsigned_integer.
703 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
704 (countl_one(byte), countr_zero(byte), countr_one(byte))
705 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
706 (log2p1(byte)): Remove.
707 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
708 (__detail::__is_int_to_chars_type): Remove.
709 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
710 and __is_unsigned_integer.
711 * include/std/type_traits (__is_one_of): Move here from <charconv>.
712 (__is_signed_integer, __is_unsigned_integer): New helpers.
713 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
715 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
716 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
717 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
718 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
719 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
720 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
721 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
722 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
723 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
724 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
726 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
728 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
731 2019-06-25 Jakub Jelinek <jakub@redhat.com>
733 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
734 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
735 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
736 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
738 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
740 * include/std/numeric (midpoint(T, T)): Change implementation for
741 floating-point types to avoid incorrect rounding of denormals.
742 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
743 rounding with denormals.
744 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
745 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
747 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
749 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
751 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
753 * configure: Regenerate.
755 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
756 Qualify calls to __never_valueless.
758 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
761 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
762 vector<bool> for test.
763 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
765 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
767 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
769 (istream_iterator::_M_read()): Do not check stream state before
770 attempting extraction. Set stream pointer to null when extraction
772 (operator==(const istream_iterator&, const istream_iterator&)): Change
773 to be a hidden friend of istream_iterator.
774 (operator!=(const istream_iterator&, const istream_iterator&)):
776 (ostream_iterator::ostream_iterator()): Add default constructor.
777 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
779 * testsuite/24_iterators/istream_iterator/1.cc: New test.
780 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
781 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
782 constructor taking a string.
783 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
786 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
787 Jonathan Wakely <jwakely@redhat.com>
790 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
791 values of type bool for vector<bool> elements.
792 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
793 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
795 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
797 PR libstdc++/90920 partially revert r263433
798 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
799 (rotate): Remove checks.
800 * testsuite/25_algorithms/rotate/90920.cc: New test.
802 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
803 category used in invocable check.
804 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
805 * testsuite/26_numerics/reduce/2.cc: New test.
807 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
809 * include/bits/algorithmfwd.h: Change title of doc group.
810 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
812 * include/bits/stl_numeric.h: Define doc group and add algos to it.
813 * include/std/numeric (__is_random_access_iter): New internal trait.
814 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
815 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
816 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
817 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
818 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
819 * testsuite/26_numerics/reduce/1.cc: New test.
820 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
821 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
822 * testsuite/26_numerics/transform_reduce/1.cc: New test.
823 * testsuite/util/testsuite_iterators.h (test_container::size()): New
826 * include/c_global/cstddef (std::byte): Perform arithmetic operations
827 in unsigned int to avoid promotion (LWG 2950).
829 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
831 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
834 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
836 PR libstdc++/90281 Fix string conversions for filesystem::path
837 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
838 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
839 __str_codecvt_in_all to fail for partial conversions and throw on
841 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
842 (path::_Cvt<char8_t>): Add explicit specialization.
843 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
845 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
846 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
847 instead of codecvt_utf8. Use __str_codecvt_in_all and
848 __str_codecvt_out_all.
849 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
850 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
851 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
852 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
853 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
854 after converting to UTF-8.
855 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
856 __str_codecvt_in_all.
857 (path::string): Fix initialization of string types with different
859 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
860 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
861 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
863 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
864 return false for partial conversions.
865 * include/experimental/bits/fs_path.h (u8path):
866 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
867 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
868 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
869 instead of codecvt_utf8. Use __str_codecvt_in_all and
870 __str_codecvt_out_all.
871 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
872 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
873 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
874 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
875 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
876 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
877 __str_codecvt_in_all.
878 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
879 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
880 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
881 __str_codecvt_in_all.
882 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
883 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
884 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
885 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
886 strings and with Unicode characters outside the basic multilingual
888 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
889 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
890 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
891 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
892 * testsuite/experimental/filesystem/path/native/string.cc: Test with
893 empty strings and with Unicode characters outside the basic
896 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
897 Jonathan Wakely <jwakely@redhat.com>
899 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
900 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
901 deallocate node if insertion fails.
902 (_Hashtable::_M_insert_multi_node): Likewise.
903 (_Hashtable::_M_reinsert_node): Pass additional key argument.
904 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
905 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
906 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
907 (_Hashtable::extract(const _Key&)): Likewise.
908 (_Hashtable::_M_merge_unique): Pass additional key argument.
909 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
911 (_Hashtable::_M_insert): Likewise.
912 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
913 (_Hashtable_alloc): Add comments to functions with misleading names.
915 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
917 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
919 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
920 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
921 header for std::allocator.
922 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
923 using-declaration for std::size_t.
924 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
926 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
928 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
929 * testsuite/experimental/map/erasure.cc: Include <string> for
931 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
933 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
935 * include/experimental/type_traits (experimental::nonesuch): Use
936 pragma to disable -Wctor-dtor-privacy warnings.
937 * include/std/type_traits (__is_convertible_helper<From, To, false>)
938 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
940 * include/std/version (__cpp_lib_bind_front): Add missing macro.
942 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
944 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
945 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
946 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
947 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
949 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
950 (variant::emplace): Change static_assert messages from "should be"
952 (hash<monostate>::operator()): Remove name of unused parameter.
954 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
957 * include/Makefile.am: Add new <bits/charconv.h> header.
958 * include/Makefile.in: Regenerate.
959 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
960 (to_string(long), to_string(unsigned long), to_string(long long))
961 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
962 * include/bits/charconv.h: New header.
963 (__detail::__to_chars_len): Move here from <charconv>.
964 (__detail::__to_chars_10_impl): New function extracted from
965 __detail::__to_chars_10.
966 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
967 (__to_chars_unsigned_type): New class template that reuses
968 __make_unsigned_selector_base::__select to pick a type.
969 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
970 (__detail::__to_chars_len): Move to new header.
971 (__detail::__to_chars_10): Add inline specifier. Move code doing the
972 output to __detail::__to_chars_10_impl and call that.
973 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
974 * testsuite/21_strings/basic_string/numeric_conversions/char/
975 to_string.cc: Fix reference in comment. Remove unused variable.
976 * testsuite/21_strings/basic_string/numeric_conversions/char/
977 to_string_int.cc: New test.
979 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
981 Fix ConstexprIterator requirements tests - No constexpr algorithms!
982 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
983 Replace copy with hand-rolled loop.
984 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
987 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
989 Test for C++20 p0858 - ConstexprIterator requirements.
990 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
992 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
995 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
997 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
999 * include/bits/c++config: Rename all macros of the form __PSTL* to
1001 * include/std/algorithm: Likewise.
1002 * include/std/execution: Likewise.
1003 * include/std/numeric: Likewise.
1004 * include/std/memory: Likewise.
1005 * include/pstl/glue_memory_impl.h: Likewise.
1006 * include/pstl/numeric_impl.h: Likewise.
1007 * include/pstl/glue_memory_defs.h: Likewise.
1008 * include/pstl/execution_defs.h: Likewise.
1009 * include/pstl/utils.h: Likewise.
1010 * include/pstl/algorithm_fwd.h: Likewise.
1011 * include/pstl/unseq_backend_simd.h: Likewise.
1012 * include/pstl/glue_execution_defs.h: Likewise.
1013 * include/pstl/algorithm_impl.h: Likewise.
1014 * include/pstl/parallel_impl.h: Likewise.
1015 * include/pstl/memory_impl.h: Likewise.
1016 * include/pstl/glue_numeric_defs.h: Likewise.
1017 * include/pstl/parallel_backend_utils.h: Likewise.
1018 * include/pstl/glue_algorithm_defs.h: Likewise.
1019 * include/pstl/parallel_backend.h: Likewise.
1020 * include/pstl/glue_numeric_impl.h: Likewise.
1021 * include/pstl/parallel_backend_tbb.h: Likewise.
1022 * include/pstl/numeric_fwd.h: Likewise.
1023 * include/pstl/glue_algorithm_impl.h: Likewise.
1024 * include/pstl/execution_impl.h: Likewise.
1025 * include/pstl/pstl_config.h: Likewise.
1026 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1027 * testsuite/util/pstl/test_utils.h: Likewise.
1028 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
1030 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
1032 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
1034 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
1035 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
1036 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
1037 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
1038 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
1040 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
1041 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
1042 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
1043 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
1044 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
1046 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
1047 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
1048 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
1049 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
1050 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
1052 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
1053 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
1054 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
1056 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
1058 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
1059 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
1060 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
1062 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
1064 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
1066 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
1068 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
1070 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
1072 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
1074 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
1076 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
1078 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
1080 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
1082 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
1084 Rename header guards to be consistent with upstream project's
1086 * include/pstl/glue_memory_impl.h: Rename all macros of the form
1087 _PSTL_(.*)_H to _PSTL_\U\1_H.
1088 * include/pstl/numeric_impl.h: Likewise.
1089 * include/pstl/glue_memory_defs.h: Likewise.
1090 * include/pstl/execution_defs.h: Likewise.
1091 * include/pstl/utils.h: Likewise.
1092 * include/pstl/algorithm_fwd.h: Likewise.
1093 * include/pstl/unseq_backend_simd.h: Likewise.
1094 * include/pstl/glue_execution_defs.h: Likewise.
1095 * include/pstl/algorithm_impl.h: Likewise.
1096 * include/pstl/parallel_impl.h: Likewise.
1097 * include/pstl/memory_impl.h: Likewise.
1098 * include/pstl/glue_numeric_defs.h: Likewise.
1099 * include/pstl/parallel_backend_utils.h: Likewise.
1100 * include/pstl/glue_algorithm_defs.h: Likewise.
1101 * include/pstl/parallel_backend.h: Likewise.
1102 * include/pstl/glue_numeric_impl.h: Likewise.
1103 * include/pstl/parallel_backend_tbb.h: Likewise.
1104 * include/pstl/numeric_fwd.h: Likewise.
1105 * include/pstl/glue_algorithm_impl.h: Likewise.
1106 * include/pstl/execution_impl.h: Likewise.
1107 * include/pstl/pstl_config.h: Likewise.
1108 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1110 Synchronize libstdc++ parallel algorithms with upstream
1112 * include/pstl/algorithm_fwd.h: Synchronize with
1113 upstream PSTL project.
1114 * include/pstl/algorithm_impl.h: Likewise.
1115 * include/pstl/execution_defs.h: Likewise.
1116 * include/pstl/execution_impl.h: Likewise.
1117 * include/pstl/glue_algorithm_impl.h: Likewise.
1118 * include/pstl/glue_execution_defs.h: Likewise.
1119 * include/pstl/numeric_fwd.h: Likewise.
1120 * include/pstl/numeric_impl.h: Likewise.
1121 * include/pstl/parallel_backend.h: Likewise.
1122 * include/pstl/pstl_config.h: Likewise.
1123 * include/pstl/unseq_backend_simd.h: Likewise.
1124 * include/pstl/parallel_backend_serial.h: New file.
1125 * include/Makefile.am (pstl_headers): Add
1126 parallel_backend_serial.h.
1127 * include/Makefile.in: Regenerate.
1129 Clean up non-conforming names
1130 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
1131 Uglfiy copy_range1 and copy_range2
1132 (__pattern_walk2_n): Rename local n to __n
1133 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
1134 Rename parameter _T to _Tp.
1136 Integrate non-TBB serial backend support
1137 * include/bits/c++config: Adjust TBB detection logic to select serial
1138 PSTL backend if no TBB present.
1139 * testsuite/utils/pstl/test_utils.h: Remove check for
1140 _PSTL_USE_PAR_POLICIES
1142 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
1144 * testsuite/24_iterators/container_access.cc: Move dg-options before
1145 dg-do directive so the target check uses the -std option.
1148 * configure: Regenerate.
1149 * src/Makefile.am (stamp-debug): Also test for missing makefile.
1150 * src/Makefile.in: Regenerate.
1152 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
1154 * include/std/array: Do not include <stdexcept>.
1155 * include/std/optional: Include <exception> and
1156 <bits/exception_defines.h> instead of <stdexcept>.
1157 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
1159 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
1161 * testsuite/23_containers/map/erasure.cc: Include <string>.
1162 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1164 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
1165 dg-prune-output for different C++98 diagnostic.
1166 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
1168 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
1170 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
1172 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
1174 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
1176 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
1178 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
1180 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
1182 * testsuite/23_containers/vector/requirements/dr438/
1183 constructor_1_neg.cc: Likewise.
1184 * testsuite/23_containers/vector/requirements/dr438/
1185 constructor_2_neg.cc: Likewise.
1186 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
1188 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
1190 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
1191 Do not test allocator rebinding extension for C++2a.
1192 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1193 dg-do directive for C++17 and C++2a.
1195 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1196 1_c++0x.cc: Remove redundant test.
1197 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1198 2.cc: Use target selector instead of preprocessor condition.
1199 * testsuite/23_containers/deque/requirements/explicit_instantiation/
1200 3.cc: Do not run test for C++2a.
1201 * testsuite/23_containers/forward_list/requirements/
1202 explicit_instantiation/3.cc: Likewise.
1203 * testsuite/23_containers/forward_list/requirements/
1204 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1206 * testsuite/23_containers/list/requirements/explicit_instantiation/
1207 1_c++0x.cc: Remove redundant test.
1208 * testsuite/23_containers/list/requirements/explicit_instantiation/
1209 2.cc: Use target selector instead of preprocessor condition.
1210 * testsuite/23_containers/list/requirements/explicit_instantiation/
1211 3.cc: Do not run test for C++2a.
1212 * testsuite/23_containers/list/requirements/explicit_instantiation/
1213 5.cc: Do not test allocator rebinding extension for C++2a.
1214 * testsuite/23_containers/map/requirements/explicit_instantiation/
1215 1_c++0x.cc: Remove redundant test.
1216 * testsuite/23_containers/map/requirements/explicit_instantiation/
1217 2.cc: Adjust comment.
1218 * testsuite/23_containers/map/requirements/explicit_instantiation/
1219 3.cc: Do not run test for C++2a.
1220 * testsuite/23_containers/map/requirements/explicit_instantiation/
1221 5.cc: Do not test allocator rebinding extension for C++2a.
1222 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1223 1_c++0x.cc: Remove redundant test.
1224 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1225 3.cc: Do not run test for C++2a.
1226 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
1227 5.cc: Do not test allocator rebinding extension for C++2a.
1228 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1229 3.cc: Do not run test for C++2a.
1230 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
1231 5.cc: Do not test allocator rebinding extension for C++2a.
1232 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
1233 Do not run test for C++2a.
1234 * testsuite/23_containers/set/requirements/explicit_instantiation/
1235 1_c++0x.cc: Remove redundant test.
1236 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
1237 Do not test allocator rebinding extension for C++2a.
1238 * testsuite/23_containers/unordered_map/requirements/
1239 explicit_instantiation/3.cc: Likewise.
1240 * testsuite/23_containers/unordered_map/requirements/
1241 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1243 * testsuite/23_containers/unordered_multimap/requirements/
1244 explicit_instantiation/3.cc: Do not run test for C++2a.
1245 * testsuite/23_containers/unordered_multimap/requirements/
1246 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1248 * testsuite/23_containers/unordered_multiset/requirements/
1249 explicit_instantiation/3.cc: Do not run test for C++2a.
1250 * testsuite/23_containers/unordered_multiset/requirements/
1251 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1253 * testsuite/23_containers/unordered_set/requirements/
1254 explicit_instantiation/3.cc: Do not run test for C++2a.
1255 * testsuite/23_containers/unordered_set/requirements/
1256 explicit_instantiation/5.cc: Do not test allocator rebinding extension
1258 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1259 2.cc: Remove redundant test.
1260 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
1261 3.cc: Do not run test for C++2a.
1262 * testsuite/23_containers/vector/requirements/explicit_instantiation/
1265 * include/std/type_traits (is_empty, is_polymorphic, is_final)
1266 (is_abstract, is_aggregate): Remove static_assert.
1267 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
1269 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
1270 missing -std=gnu++17 option.
1271 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
1272 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
1273 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
1276 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
1277 * testsuite/18_support/set_unexpected.cc: Likewise.
1278 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
1280 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
1281 function to be valid in C++11.
1282 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
1283 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
1284 include Library Fundamentals or Networking headers in C++11 mode.
1285 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
1287 * include/std/tuple (_TC): Replace with _TupleConstraints.
1288 (_TupleConstraints): New helper for SFINAE constraints, with more
1289 expressive member functions to reduce duplication when used.
1290 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
1291 (tuple::_TCC): Replace dummy type parameter with bool non-type
1292 parameter that can be used to check the pack size.
1293 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
1294 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
1295 checking constraints in constructors.
1296 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
1298 (tuple::tuple): Use new helpers to reduce repitition in constraints.
1299 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
1300 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
1301 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
1302 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
1303 constraints in constructors.
1304 (tuple::__is_alloc_arg()): New SFINAE helpers.
1305 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
1307 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
1308 * testsuite/20_util/tuple/cons/90700.cc: New test.
1309 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
1310 to meet new constraint on allocator-extended default constructor.
1312 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1314 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
1315 * include/bits/stl_multimap.h (multimap): Likewise.
1317 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
1319 Rename variables and cleanup comments.
1320 * include/bits/hashtable_policy.h
1321 * include/bits/hashtable.h
1323 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
1325 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
1326 Fix bgcolor for P0340R3.
1327 * doc/html/*: Regenerate.
1330 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
1331 <experimental/memory_resource>.
1332 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
1333 P0339R6, P0340R3, P1164R1 and P1357R1.
1334 * doc/html/*: Regenerate.
1336 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
1337 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
1338 allocator::value_type assertion for C++2a.
1339 * include/bits/hashtable.h: Likewise.
1340 * include/bits/stl_deque.h: Likewise.
1341 * include/bits/stl_list.h: Likewise.
1342 * include/bits/stl_map.h: Likewise.
1343 * include/bits/stl_multimap.h: Likewise.
1344 * include/bits/stl_multiset.h: Likewise.
1345 * include/bits/stl_set.h: Likewise.
1346 * include/bits/stl_vector.h: Likewise.
1347 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
1348 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
1349 * testsuite/23_containers/list/48101-3_neg.cc: New test.
1350 * testsuite/23_containers/map/48101-3_neg.cc: New test.
1351 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
1352 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
1353 * testsuite/23_containers/set/48101-3_neg.cc: New test.
1354 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
1355 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
1356 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
1357 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
1358 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
1360 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
1362 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
1364 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1366 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
1368 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
1370 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
1372 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1374 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
1377 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
1378 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
1379 * libsupc++/eh_term_handler.h: New header defining
1380 _GLIBCXX_DEFAULT_TERM_HANDLER.
1381 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
1382 (set_terminate): Restore default handler when argument is null.
1383 (set_unexpected): Likewise.
1384 * testsuite/18_support/set_terminate.cc: New test.
1385 * testsuite/18_support/set_unexpected.cc: New test.
1387 * include/backward/hashtable.h (size_t, ptrdiff_t)
1388 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
1389 (distance, vector, pair, __iterator_category): Remove
1390 using-declarations that add these names to namespace __gnu_cxx.
1391 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
1392 * include/ext/debug_allocator.h (size_t): Likewise.
1393 * include/ext/functional (size_t, unary_function, binary_function)
1394 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
1396 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
1397 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
1398 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
1399 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
1400 * include/ext/numeric (iota): Fix outdated comment.
1401 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
1402 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
1403 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
1404 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
1405 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
1407 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
1408 (allocator, __true_type, __false_type): Likewise.
1410 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
1413 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
1414 New helpers for checking preconditions in traits.
1415 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
1416 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
1417 (is_destructible, is_nothrow_destructible, is_constructible)
1418 (is_default_constructible, is_copy_constructible)
1419 (is_move_constructible, is_nothrow_default_constructible)
1420 (is_nothrow_constructible, is_nothrow_copy_constructible)
1421 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
1422 (is_nothrow_assignable, is_nothrow_copy_assignable)
1423 (is_nothrow_move_assignable, is_trivially_constructible)
1424 (is_trivially_copy_constructible, is_trivially_move_constructible)
1425 is_trivially_assignable, is_trivially_copy_assignable)
1426 (is_trivially_move_assignable, is_trivially_destructible)
1427 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
1428 (is_invocable_r, is_nothrow_invocable)
1429 (has_unique_object_representations, is_aggregate): Add static_asserts
1430 to make sure that type traits are not misused with incomplete types.
1431 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
1432 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
1433 base characteristics without assertions that can be reused in other
1435 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
1436 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
1438 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
1439 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
1440 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
1441 * testsuite/20_util/is_class/value.cc: Check incomplete type.
1442 * testsuite/20_util/is_function/value.cc: Likewise.
1443 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
1444 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
1446 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
1447 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
1448 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
1449 * testsuite/20_util/is_union/value.cc: Likewise.
1450 * testsuite/20_util/is_void/value.cc: Likewise.
1451 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
1453 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
1455 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
1456 Add new private member function.
1457 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
1458 (random_device::_M_init_pretr1(const string&)): Call new private
1459 member with string data.
1460 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
1462 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
1463 test using COW strings.
1464 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
1465 a value from the device.
1466 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
1467 Fix typo in token string.
1469 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
1471 LWG2788 basic_string spurious use of a default constructible allocator
1472 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
1473 (basic_string::_M_replace_dispatch): Construct temporary string with
1474 the current allocator.
1475 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
1476 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
1478 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
1480 * doc/xml/manual/diagnostics.xml: Update list of headers that define
1482 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
1483 section about new/delete overloads. Improve section on verbose
1485 * doc/html/*: Regenerate.
1487 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
1488 P0811R3. Change status of P1353R0.
1489 * doc/html/*: Regenerate.
1491 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
1492 documentation of implementation-defined types for [thread.req.native].
1493 * doc/xml/manual/status_cxx2017.xml: Update documentation of
1494 implementation-defined strings for [variant.bad.access]. Fix typo in
1495 documentation of implementation-defined support for [fs.conform.9945].
1496 * doc/html/*: Regenerate.
1498 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
1501 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
1502 that fails on mingw-w64.
1505 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1506 (status(const path&, error_code&)): Use parent_path() to remove
1508 (symlink_status(const path&, error_code&)): Duplicate workaround for
1509 bug in _wstat for paths with trailing slash.
1510 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
1511 with trailing slash.
1512 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1513 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1515 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
1516 once instead of building it iteratively.
1518 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
1520 PR libstdc++/85494 use rdseed and rand_s in std::random_device
1521 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
1522 the assembler supports rdseed.
1523 * config.h.in: Regenerate.
1524 * configure: Regenerate.
1525 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
1526 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
1527 * doc/html/*: Regenerate.
1528 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
1529 * include/bits/random.h (random_device::random_device()): Always call
1530 _M_init rather than _M_init_pretr1.
1531 (random_device::random_device(const string&)): Likewise.
1532 (random_device::operator()()): Always call _M_getval().
1533 (random_device::_M_file): Replace first member of union with an
1534 anonymous struct, with _M_file as its first member.
1535 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
1536 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
1537 (USE_MT19937): Define if none of the above are defined.
1538 (USE_POSIX_FILE_IO): Define.
1539 (_M_strtoul): Remove.
1540 [USE_RDSEED] (__x86_rdseed): Define new function.
1541 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
1542 (random_device::_M_init(const string&)): Initialize new union members.
1543 Add support for "rdseed" and "rand_s" tokens. Decide what the
1544 "default" token does according to which USE_* macros are defined.
1545 [USE_POSIX_FILE_IO]: Store a file descriptor.
1546 [USE_MT19937]: Forward to _M_init_pretr1 instead.
1547 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
1548 code from _M_strtoul.
1549 [!USE_MT19937]: Call _M_init, transforming the old default token or
1550 numeric tokens to "default".
1551 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
1552 (random_device::_M_getval()): Use new union members to obtain a
1553 random number from the stored function pointer or file descriptor.
1554 [USE_MT19937]: Obtain a value from the mt19937 engine.
1555 (random_device::_M_getval_pretr1()): Call _M_getval().
1556 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
1558 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
1559 * testsuite/26_numerics/random/random_device/85494.cc: New test.
1561 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
1564 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
1565 _M_split_cmpts() for a path with multiple components.
1566 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
1567 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
1568 components and reserve space in vector. Return early when there is
1570 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
1571 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
1573 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
1574 form of std::equals for C++11 compatibility.
1576 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
1578 * doc/xml/manual/appendix_contributing.xml: Update pointer to
1579 C++ standard at ansi.org.
1581 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
1583 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
1584 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
1587 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
1588 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
1590 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1592 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
1594 * testsuite/20_util/function_objects/invoke/3.cc: New test.
1595 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
1596 "compile" test to "run".
1598 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
1599 * doc/html/*: Regenerate.
1600 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
1601 rvalue aliasing constructor.
1602 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
1603 (reinterpret_pointer_cast): Add overloads taking rvalues.
1604 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
1605 Add rvalue aliasing constructor.
1606 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
1607 "run" and check return values as well as types.
1608 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1609 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
1610 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
1611 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
1614 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
1615 * doc/xml/manual/intro.xml: Likewise.
1616 * include/std/future (__create_task_state): Add default arguments
1617 to make providing an allocator optional.
1618 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
1619 instead of delegating to another constructor.
1620 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
1621 define allocator-extended constructors for C++17 and later.
1622 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
1624 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1625 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1626 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1628 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
1630 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1631 Don't run the libstdc++/83237 part on simulator targets.
1633 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
1635 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
1637 * doc/html/*: Regenerate.
1639 * include/experimental/any (__any_caster): Use RTTI if comparing
1640 addresses fails, to support non-unique addresses in shared libraries.
1641 * include/std/any (__any_caster): Likewise.
1644 * include/experimental/any (__any_caster): Constrain to only be
1645 callable for object types. Use remove_cv_t instead of decay_t.
1646 If the type decays or isn't copy constructible, compare the manager
1647 function to a dummy specialization.
1648 (__any_caster): Add overload constrained for non-object types.
1649 (any::_Manager_internal<_Op>): Add dummy specialization.
1650 * testsuite/experimental/any/misc/any_cast.cc: Test function types
1653 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
1656 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
1657 reversed arguments to uninitialized_copy_n.
1658 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
1659 is unchanged by copy assignment.
1660 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
1661 compare path components.
1664 * include/experimental/memory_resource: Add system header pragma and
1665 do not define anything unless compiled as C++14 or later.
1666 (__resource_adaptor_common::__guaranteed_alignment): Remove.
1667 (__resource_adaptor_imp::do_allocate): If the requested alignment
1668 is a fundamental alignment then either allocate directly from _M_alloc
1669 or call the new _M_allocate function.
1670 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
1671 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
1672 of the allocator rebound to a POD type with the specified alignment.
1673 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
1674 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1675 Adjust expected allocation sizes.
1676 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
1677 xfail for Solaris x86.
1679 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
1681 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
1682 * include/pstl/execution_defs.h (__enable_if_execution_policy):
1683 Use std::__remove_cvref_t when building with GCC.
1685 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
1688 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1689 Use "additional_flags" to pass -ltbb to v3_target_compile command.
1690 Use check_v3_target_prop_cached to cache the result of the test.
1692 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
1694 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1697 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1698 Changed v3_target_compile check from preprocess to executable.
1699 Added "-ltbb" to v3_target_compile flags.
1701 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
1703 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
1704 Add check for Thread Building Blocks 2018 or later.
1706 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1708 * testsuite/experimental/names.cc: Only include Networking TS headers
1709 on targets with the necessary Gthreads support.
1711 2019-05-20 Marek Polacek <polacek@redhat.com>
1713 CWG 2094 - volatile scalars are trivially copyable.
1715 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
1716 result for volatile int.
1718 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1720 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
1721 * testsuite/experimental/names.cc: Include <experimental/filesystem>
1724 PR c++/90532 Ensure __is_constructible(T[]) is false
1725 * include/std/type_traits (__do_is_default_constructible_impl)
1726 (__is_default_constructible_atom, __is_default_constructible_safe):
1728 (is_default_constructible): Use is_constructible.
1729 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
1730 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
1731 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
1732 * testsuite/20_util/is_trivially_default_constructible/value.cc:
1735 2019-05-20 Pádraig Brady <pbrady@fb.com>
1737 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
1738 to the deallocator with -fsized-deallocation.
1740 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1742 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
1743 test by passing correct alignment to deallocate function.
1745 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
1748 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1749 Raise exception if unique_ptr tuple member has unknown structure.
1750 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
1751 Adjust worker to support new __uniq_ptr_data base class. Do not
1752 assume field called _M_head_impl is the first tuple element.
1754 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1756 * include/bits/stl_deque.h
1757 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
1758 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
1759 (_Deque_base::_Deque_impl_data): New.
1760 (_Deque_base::_Deque_impl): Inherit latter.
1761 (_Deque_base::_Deque_impl::_M_swap_data): Move...
1762 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
1763 (_Deque_base::_Deque_impl()): Add noexcept qualification.
1764 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
1765 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
1766 (deque<>::deque()): Default.
1767 (deque<>::deque(deque&&)): Default.
1768 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
1769 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
1770 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
1771 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
1772 _M_range_initialize.
1773 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
1774 (deque<>::resize(size_type, const value_type&)): Share a single
1776 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
1777 _M_range_insert_aux.
1778 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
1779 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
1780 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
1781 * testsuite/23_containers/deque/allocator/default_init.cc: New.
1783 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
1786 * include/std/variant (holds_alternative, get, get_if): Improve
1787 static assertion messages.
1788 (bad_variant_access::bad_variant_access()): Change default message.
1789 (__throw_bad_variant_access(bool)): New overload.
1790 (get): Use new overload.
1791 (visit, visit<R>): Improve exception message.
1793 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
1794 targets. Add more cases from P0608R3.
1795 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
1797 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
1798 * include/experimental/type_traits (is_detected_exact)
1799 (is_detected_exact_v): Likewise.
1800 * include/pstl/execution_defs.h (is_execution_policy)
1801 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
1802 * include/pstl/execution_impl.h (__policy_traits): Likewise.
1803 * testsuite/17_intro/names.cc: Check for more non-reserved names.
1804 * testsuite/experimental/names.cc: New test.
1807 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
1808 assertions from the destructor.
1809 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
1810 Move static_assert for hash function to here.
1811 (_Hash_table_base::_M_equals): Move static_assert for equality
1813 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
1815 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
1816 the value directly instead of calling _S_value.
1817 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
1818 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
1819 _S_key(_Const_Link_type).
1820 * testsuite/23_containers/set/85965.cc: Check construction,
1821 destruction, assignment and size() do not trigger the assertions.
1822 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
1823 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
1825 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
1826 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
1827 * testsuite/23_containers/set/48101_neg.cc: Likewise.
1828 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
1829 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
1830 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
1831 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
1833 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
1834 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
1837 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
1839 * doc/html/*: Regenerate.
1840 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
1841 of decay_t (P0777R1).
1843 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
1845 Move from state of allocators (LWG2593)
1846 * include/bits/stl_deque.h
1847 (_Deque_base(_Deque_base&&, false_type)): Remove.
1848 (_Deque_base(_Deque_base&&, true_type)): Remove.
1849 (_Deque_base(_Deque_base&&)): Adapt.
1850 (_Deque_base::_M_move_impl()): Remove.
1851 * testsuite/util/testsuite_allocator.h
1852 (propagating_allocator(propagating_allocator&&)): Preserve move from
1854 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
1856 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
1858 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
1859 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
1860 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
1862 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
1864 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
1865 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
1867 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
1869 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
1871 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
1873 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
1875 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
1877 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
1879 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
1882 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
1884 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
1885 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
1887 * include/std/variant (__overload_set): Remove.
1889 (_Build_FUN): New class template to define a single FUN overload,
1890 with specializations to prevent unwanted conversions, as per P0608R3.
1891 (_Build_FUNs): New class template to build an overload set of FUN.
1892 (_FUN_type): New alias template to perform overload resolution.
1893 (__accepted_type): Use integer_constant base for failure case. Use
1894 _FUN_type for successful case.
1895 (variant::__accepted_index): Use _Tp instead of _Tp&&.
1896 (variant::variant(_Tp&&)): Likewise.
1897 (variant::operator=(_Tp&&)): Likewise.
1899 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
1900 Replace raw visitation with a runtime check for the valueless state
1901 and a non-raw visitor.
1902 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
1903 (variant::index()): Remove branch.
1904 (variant::swap(variant&)): Use valueless_by_exception() instead of
1905 comparing the index to variant_npos, and add likelihood attribute.
1907 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
1908 (_Hashtable_base::_Equal_hash_code): Define new class template.
1909 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
1912 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
1913 Replace with _M_get non-static member function.
1914 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
1916 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
1917 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
1919 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
1920 _S_get accessors for members in EBO helpers.
1921 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
1922 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
1924 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
1926 (_Hashtable_base::_M_eq()): Remove non-const overload.
1928 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
1930 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
1932 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1934 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
1937 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1939 * config/os/solaris/solaris2.10: Move to ...
1940 * config/os/solaris: ... this.
1941 * configure.host (os_include_dir): Adapt.
1942 (abi_baseline_pair): Remove Solaris 10 handling.
1943 * config/abi/post/i386-solaris2.10: Remove.
1944 * config/abi/post/sparc-solaris2.10: Remove.
1945 * config/abi/post/i386-solaris2.11: Rename to ...
1946 * config/abi/post/i386-solaris: ... this.
1947 * config/abi/post/sparc-solaris2.11: Rename to ...
1948 * config/abi/post/sparc-solaris: ... this.
1950 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
1953 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
1956 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
1958 * include/std/variant (__visit_with_index): Remove typedef.
1959 (__deduce_visit_result): New tag type.
1960 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
1961 visitation of possibly-valueless variants, forwarding to __do_visit
1962 with the relevant tag type.
1963 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
1964 and make lambda return void.
1965 (__variant_construct): Likewise.
1966 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
1967 __raw_idx_visit and make lambda return void.
1968 (_Multi_array::__untag_result): Add metafunction to check the function
1969 pointer type for a tag type that dictates the kind of visitation.
1970 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
1971 Use decltype(auto) instead of tagged function pointer type.
1972 (__gen_vtable_impl): Remove bool non-type parameter and unused
1973 _Variant_tuple parameter.
1974 (__gen_vtable_impl::__visit_invoke_impl): Remove.
1975 (__gen_vtable_impl::__do_visit_invoke): Remove.
1976 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
1977 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
1978 for the visit<R> case, rather than dispatching to separate functions.
1979 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
1981 (variant::swap): Likewise.
1982 (__do_visit): Replace two non-type template parameters with a single
1983 type parameter, so that the caller must specify the visitor's return
1984 type (or one of the tag types).
1985 (visit): Deduce a return type from the visitor and use the
1986 __deduce_visit_result tag to enforce that all overloads return the
1988 (visit<R>): Call __do_visit<R> with explicit result type.
1989 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
1992 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
1994 nonesuch is insufficiently useless (lwg2996)
1995 * include/std/type_traits (struct __nonesuch): Added private base
1996 class to make __nonesuch not an aggregate and removed deleted default
1998 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
1999 (operator=(const pair&)): Use __nonesuch instead of
2000 __nonesuch_no_braces.
2001 (operator=(pair&&)): Likewise
2002 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
2003 of __nonesuch_no_braces.
2004 (operator=(tuple&&)): Likewise
2005 * include/experimental/type_traits (struct nonesuch): Added private
2006 base class to make nonesuch not an aggregate and removed deleted
2007 default constructor.
2008 * testsuite/20_util/nonesuch/nonesuch.cc: New.
2009 * testsuite/experimental/type_traits/nonesuch.cc: New.
2011 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2013 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
2014 (_Function_handler): Remove partial specializations for void return
2015 types and pointers to member.
2016 (_Function_handler::_M_manager): Adapt to removal of
2017 _Simple_type_wrapper.
2018 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
2019 * include/std/functional (_Bind_result::__enable_if_void)
2020 (_Bind_result::__disable_if_void): Remove sfinae helpers.
2021 (_Bind_result::__call): Use __invoke_r and remove overloads for void
2023 * include/std/future (__future_base::_Task_state::_M_run)
2024 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
2025 change return type of lambda expressions.
2027 * include/bits/invoke.h (__invoke_r): Define new function implementing
2028 the INVOKE<R> pseudo-function.
2029 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
2030 * testsuite/20_util/function_objects/invoke/2.cc: New test.
2032 * include/std/type_traits (__is_nt_convertible_helper): Define it
2033 unconditionally, not only for C++20.
2034 (__is_nothrow_convertible): Define internal trait for use in C++11.
2035 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
2036 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
2037 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
2038 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
2039 that has nothrow explicit conversion but potentially-throwing implicit
2041 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
2042 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
2043 function to only consider implicit conversions.
2044 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
2046 * include/std/iterator: Include <iosfwd> instead of <istream> and
2049 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
2050 Remove unused, non-standard function.
2052 * include/bits/regex.h (match_results::max_size()): Adjust return
2053 value to account for prefix/suffix/unmatched subs.
2054 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
2055 reset the contained sub matches.
2056 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
2057 function to set result state following a failed match.
2058 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
2059 sub_match states after _M_resize. Use _M_establish_failed_match.
2062 * include/std/thread (thread::_State_impl, thread::_S_make_state):
2063 Replace single _Callable parameter with variadic _Args pack, to
2064 forward them directly to the tuple of decayed copies.
2065 * testsuite/30_threads/thread/cons/69724.cc: New test.
2067 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2069 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
2070 * include/bits/basic_string.h: (operator=(const basic_string&):
2071 Move allocator decision to assign.
2072 (assign(const basic_string&)): Move allocator decision here.
2073 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2075 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2078 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2080 * testsuite/util/testsuite_allocator.h (memory_resource)
2081 (default_resource_mgr): Fix indentation.
2083 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
2084 Use operator-> to access raw pointer member.
2085 * testsuite/23_containers/vector/59829.cc: Likewise.
2086 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
2087 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
2088 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
2090 (PointerBase, PointerBase_void): Derive from NullablePointer and use
2091 its constructors and equality operators. Change converting
2092 constructors to use operator-> to access private member of the other
2094 (PointerBase_void::operator->()): Add, for access to private member.
2095 (operator-(PointerBase, PointerBase)): Change to hidden friend.
2096 (operator==(PointerBase, PointerBase)): Remove.
2097 (operator!=(PointerBase, PointerBase)): Remove.
2099 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
2100 not assume field called _M_head_impl is the first tuple element.
2101 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
2102 implementation more accurate.
2103 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
2104 empty pointer type and non-empty deleter.
2106 LWG 2899 - Make is_move_constructible correct for unique_ptr
2107 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
2108 move assignment operator.
2109 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
2110 (__uniq_ptr_data): New class template with conditionally deleted
2112 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
2113 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
2114 constructor and move assignment operator as defaulted.
2115 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
2116 __uniq_ptr_impl::release().
2117 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
2118 to __uniq_ptr_impl::reset(pointer).
2119 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2120 Check for new __uniq_ptr_data type.
2121 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
2123 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2125 PR libstdc++/90454.cc path construction from void*
2126 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
2127 pointers to void are rejected as well as void.
2128 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
2129 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
2131 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
2133 * doc/xml/manual/policy_data_structures.xml: Comment out stray
2134 <remark> elements. Fix formatting of bibliography references.
2136 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
2138 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
2140 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
2142 Remove Profile Mode, deprecated since 7.1.0
2143 * doc/Makefile.am: Remove XML file for profile mode docs.
2144 * doc/Makefile.in: Regenerate.
2145 * doc/xml/authors.xml: Remove authors of profile mode docs.
2146 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
2148 * doc/xml/manual/debug.xml: Likewise.
2149 * doc/xml/manual/evolution.xml: Document removal of profile mode.
2150 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
2151 * doc/xml/manual/spine.xml: Remove profile mode author credit.
2152 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
2154 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
2156 * doc/html/*: Regenerate.
2157 * include/Makefile.am: Remove profile mode headers.
2158 * include/Makefile.in: Regenerate.
2159 * include/bits/c++config (std::__profile): Remove namespace.
2160 [_GLIBCXX_PROFILE]: Remove checks for macro.
2161 * include/profile/array: Remove.
2162 * include/profile/base.h: Remove.
2163 * include/profile/bitset: Remove.
2164 * include/profile/deque: Remove.
2165 * include/profile/forward_list: Remove.
2166 * include/profile/impl/profiler.h: Remove.
2167 * include/profile/impl/profiler_algos.h: Remove.
2168 * include/profile/impl/profiler_container_size.h: Remove.
2169 * include/profile/impl/profiler_hash_func.h: Remove.
2170 * include/profile/impl/profiler_hashtable_size.h: Remove.
2171 * include/profile/impl/profiler_list_to_slist.h: Remove.
2172 * include/profile/impl/profiler_list_to_vector.h: Remove.
2173 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
2174 * include/profile/impl/profiler_node.h: Remove.
2175 * include/profile/impl/profiler_state.h: Remove.
2176 * include/profile/impl/profiler_trace.h: Remove.
2177 * include/profile/impl/profiler_vector_size.h: Remove.
2178 * include/profile/impl/profiler_vector_to_list.h: Remove.
2179 * include/profile/iterator_tracker.h: Remove.
2180 * include/profile/list: Remove.
2181 * include/profile/map: Remove.
2182 * include/profile/map.h: Remove.
2183 * include/profile/multimap.h: Remove.
2184 * include/profile/multiset.h: Remove.
2185 * include/profile/ordered_base.h: Remove.
2186 * include/profile/set: Remove.
2187 * include/profile/set.h: Remove.
2188 * include/profile/unordered_base.h: Remove.
2189 * include/profile/unordered_map: Remove.
2190 * include/profile/unordered_set: Remove.
2191 * include/profile/vector: Remove.
2192 * scripts/run_doxygen: Do not process profile mode headers.
2193 * testsuite/23_containers/array/element_access/60497.cc: Don't use
2195 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2196 Remove dg-skip-if for profile mode.
2197 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
2198 preprocessor check for profile mode.
2199 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
2200 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
2202 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2204 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2205 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2206 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2207 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2208 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2210 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2212 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2214 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2216 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
2217 preprocessor check for profile mode.
2218 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
2220 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
2221 Remove dg-skip-if for profile mode.
2222 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
2223 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
2224 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
2225 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
2226 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
2227 * testsuite/Makefile.am: Remove profile_flags variable and
2228 * testsuite/Makefile.am: Remove profile_flags variable and
2229 check-profile target.
2230 * testsuite/Makefile.in: Regenerate.
2231 * testsuite/ext/profile/all.cc: Remove.
2232 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
2233 * testsuite/ext/profile/profiler_algos.cc: Remove.
2234 * testsuite/ext/profile/replace_new.cc: Remove.
2235 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
2236 preprocessor check for profile mode.
2237 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2238 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
2239 (check_v3_target_normal_mode): Do not check for profile mode macro.
2240 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
2242 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
2243 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2244 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2245 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
2246 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
2247 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2248 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2249 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2250 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2251 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2253 Remove array_allocator extension, deprecated since 4.9.0
2254 * doc/xml/manual/allocator.xml: Remove documentation for
2256 * doc/xml/manual/evolution.xml: Document array_allocator removal.
2257 * doc/xml/manual/using.xml: Remove header from documentation.
2258 * include/Makefile.am: Remove <ext/array_allocator.h> header.
2259 * include/Makefile.in: Regenerate.
2260 * include/ext/array_allocator.h: Remove.
2261 * include/precompiled/extc++.h: Do not include removed header.
2262 * testsuite/ext/array_allocator/1.cc: Remove.
2263 * testsuite/ext/array_allocator/2.cc: Remove.
2264 * testsuite/ext/array_allocator/26875.cc: Remove.
2265 * testsuite/ext/array_allocator/3.cc: Remove.
2266 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
2267 * testsuite/ext/array_allocator/check_delete.cc: Remove.
2268 * testsuite/ext/array_allocator/check_new.cc: Remove.
2269 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
2270 * testsuite/ext/headers.cc: Do not include removed header.
2272 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
2274 * include/bits/stl_bvector.h
2275 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2277 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2279 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2281 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2283 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2285 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2287 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
2289 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
2291 (_Bit_iterator::operator-(difference_type)): Likewise.
2292 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
2293 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
2295 (_Bit_const_iterator::operator-(difference_type)): Likewise.
2296 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
2298 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
2301 * testsuite/util/thread/all.h: Do not use remove_pointer for
2302 std::thread::native_handle_type.
2305 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
2306 (_Variant_storage<true, Types...>::_M_reset()))
2307 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
2308 (__get_storage): Likewise.
2309 (variant): Add noexcept to friend declarations for __get and
2313 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
2314 Use _Require for constraints.
2315 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
2317 (__uniq_ptr_hash): New base class with conditionally-disabled call
2319 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
2320 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
2321 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
2323 * include/bits/shared_ptr.h: Improve docs.
2324 * include/bits/shared_ptr_base.h: Likewise.
2325 * include/bits/stl_uninitialized.h: Likewise.
2326 * include/bits/unique_ptr.h: Likewise.
2327 * libsupc++/new: Likewise.
2329 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
2331 * include/bits/stl_deque.h
2332 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2334 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2336 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2338 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2340 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2342 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
2344 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
2346 (_Deque_iterator<>::operator-(difference_type)): Likewise.
2348 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
2351 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
2352 (test01): Reserve for number of insertions to avoid rehash during test.
2353 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2355 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
2360 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
2362 * include/experimental/bits/fs_path.h: Improve docs.
2363 * include/experimental/bits/net.h: Fix wrong header name in comment.
2364 Do not document implementation details.
2365 * include/experimental/netfwd: Fix doxygen grouping.
2367 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2369 * include/bits/stl_pair.h: Improve docs.
2370 * include/std/tuple: Likewise.
2372 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
2374 * include/std/chrono: Improve docs.
2375 * include/std/ratio: Do not document implementation details.
2376 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
2378 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2381 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
2382 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
2383 (__duration_common_type): New helper.
2384 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
2385 __duration_common_type.
2386 (__timepoint_common_type_wrapper): Replace with ...
2387 (__timepoint_common_type): New helper.
2388 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
2389 Use __time_point_common_type.
2390 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
2391 (__common_type_impl): If either argument is transformed by decay,
2392 use the common_type of the decayed types.
2393 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
2394 decayed, use __do_common_type_impl to get the common_type.
2395 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
2396 (__do_member_type_wrapper, __member_type_wrapper)
2397 (__expanded_common_type_wrapper): Remove.
2398 (__common_type_pack, __common_type_fold): New helpers.
2399 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
2400 __member_type_wrapper and __expanded_common_type_wrapper.
2401 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
2402 Test zero-length template argument list.
2403 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
2404 Test single argument cases and argument types that should decay.
2405 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
2406 Adjust expected error.
2407 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
2409 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2410 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2411 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2413 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
2415 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
2417 Make allocator propagation more consistent for
2418 operator+(basic_string) (P1165R1)
2419 * include/bits/basic_string.h
2420 (operator+(basic_string&&, basic_string&&): Changed resulting
2421 allocator to always be the one from the first parameter.
2422 * include/bits/basic_string.tcc
2423 (operator+(const _CharT*, const basic_string&)): Changed
2424 resulting allocator to be SOCCC on the second parameter's allocator.
2425 (operator+(_CharT, const basic_string&)): Likewise.
2426 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2428 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2431 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
2433 * include/bits/regex.h: Improve docs.
2434 * include/bits/regex.tcc: Do not document implementation details.
2436 * testsuite/19_diagnostics/error_code/hash.cc: New test.
2438 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
2440 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
2441 Add type printer for container types in std::__debug namespace.
2442 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
2443 (gdb-tests): Use distinct parameters for the type of test and use of
2445 (gdb-test): Check for regex test even if 'whatis' test.
2446 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
2448 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
2449 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
2450 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2451 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2452 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2453 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2454 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
2456 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
2458 * include/std/system_error (error_category): Fix comment.
2461 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
2462 argument is an empty path.
2463 (absolute(const path&, error_code&)): Use invalid_argument as error
2464 code instead of no_such_file_or_directory.
2465 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
2466 of non-existent paths and empty paths with both overloads of absolute.
2468 * include/std/system_error (error_category, error_code)
2469 (error_condition): Improve docs.
2470 * libsupc++/exception: Add missing @addtogroup Doxygen command.
2471 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
2472 to class documentation. Suppress documentation for implementation
2474 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
2475 Suppress documentation for implementation details.
2477 * include/std/system_error (error_code): Remove friend declaration
2478 for hash<error_code>.
2479 (hash<error_code>::operator()): Use public member functions to access
2481 (hash<error_condition>::operator()): Use address of category, not
2482 its object representation.
2483 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
2484 Use public member functions to access value and category.
2485 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
2487 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
2489 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
2490 * include/bits/hashtable_policy.h
2491 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
2492 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
2493 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
2494 smaller than input value rather than always greater. Preserve
2495 _M_next_resize if called with 0 input. Use __builtin_floorl.
2496 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
2497 elements + number of insertions is greater than _M_next_resize. Start
2498 with 11 buckets if not told otherwise. Use __builtin_floorl.
2499 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
2500 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
2501 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
2502 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
2503 told otherwise. Use __builtin_floorl.
2504 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
2505 to also validate _Power2_rehash_policy.
2506 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
2509 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
2512 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
2516 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
2517 overflow warning with -Wpedantic -Wsystem-headers.
2519 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
2522 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
2523 * include/bits/move.h (swap): Remove extra parentheses.
2525 * include/experimental/bits/lfts_config.h: Improve doc markup.
2526 * include/experimental/optional: Improve docs.
2527 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
2528 (__constexpr_addressof): Remove.
2529 (optional::operator->()): Use std::__addressof().
2530 * include/std/optional (optional::operator->()): Adjust whitespace.
2531 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
2532 that operator-> is still constexpr with overloaded operator&. Change
2533 to compile-only test.
2534 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
2537 * include/bits/shared_ptr.h: Improve docs.
2538 * include/bits/shared_ptr_atomic.h: Likewise.
2539 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
2541 * include/bits/basic_string.h: Fix iterator/index confusion in
2543 * include/bits/range_access.h: Fix Doxygen warnings.
2544 * include/bits/refwrap.h: Do not document implementation details.
2545 (ref, cref): Group docs with reference_wrapper.
2546 * include/std/fstream: Fix Doxygen markup.
2547 * libsupc++/initializer_list (begin, end): Group docs with
2550 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
2552 * include/bits/unique_lock.h: Fix/improve doxygen markup.
2553 * include/std/mutex: Likewise.
2554 * include/std/shared_mutex: Likewise.
2556 * include/bits/fs_dir.h: Fix/improve doxygen markup.
2557 * include/bits/fs_fwd.h: Likewise.
2558 * include/bits/fs_ops.h: Likewise.
2559 * include/bits/fs_path.h: Likewise.
2560 * include/std/filesystem: Likewise.
2562 * include/experimental/bits/net.h: Fix/improve doxygen markup.
2563 * include/experimental/buffer: Likewise.
2564 * include/experimental/executor: Likewise.
2565 * include/experimental/internet: Likewise.
2566 * include/experimental/io_context: Likewise.
2567 * include/experimental/net: Likewise.
2568 * include/experimental/netfwd: Likewise.
2569 * include/experimental/socket: Likewise.
2570 * include/experimental/timer: Likewise.
2572 * doc/doxygen/doxygroups.cc: Move description of experimental group
2574 * include/experimental/algorithm: Add to libfund-ts doc group.
2575 * include/experimental/any: Likewise. Do not document implementation
2577 * include/experimental/array: Add to libfund-ts doc group.
2578 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
2579 for Library Fundamentals.
2580 * include/experimental/chrono: Add to libfund-ts doc group.
2581 * include/experimental/deque: Likewise.
2582 * include/experimental/forward_list: Likewise.
2583 * include/experimental/functional: Likewise.
2584 * include/experimental/iterator: Likewise.
2585 * include/experimental/list: Likewise.
2586 * include/experimental/map: Likewise.
2587 * include/experimental/memory: Likewise.
2588 * include/experimental/memory_resource: Likewise. Improve docs.
2590 * include/experimental/numeric: Add to libfund-ts doc group.
2591 * include/experimental/optional: Likewise.
2592 * include/experimental/propagate_const: Likewise.
2593 * include/experimental/random: Likewise.
2594 * include/experimental/ratio: Likewise.
2595 * include/experimental/regex: Likewise.
2596 * include/experimental/set: Likewise.
2597 * include/experimental/source_location: Likewise.
2598 * include/experimental/string: Likewise.
2599 * include/experimental/string_view: Likewise.
2600 * include/experimental/system_error: Likewise.
2601 * include/experimental/tuple: Likewise.
2602 * include/experimental/type_traits: Likewise.
2603 * include/experimental/unordered_map: Likewise.
2604 * include/experimental/unordered_set: Likewise.
2605 * include/experimental/utility: Likewise.
2606 * include/experimental/vector: Likewise.
2607 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
2608 * testsuite/experimental/array/neg.cc: Adjust dg-error.
2609 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
2611 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
2612 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
2613 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
2614 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
2615 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
2617 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
2618 * include/experimental/bits/fs_fwd.h: Improve docs.
2619 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
2620 * include/experimental/bits/fs_path.h: Likewise.
2621 (path, filesystem_error, u8path): Improve docs.
2622 * include/experimental/filesystem: Link to docs for TS.
2624 * config/allocator/new_allocator_base.h (__allocator_base): Add
2625 workaround for Doxygen bug #6945.
2626 * include/std/memory: Improve docs. Define group for pointer safety.
2627 * include/std/scoped_allocator: Improve docs. Use "undocumented"
2628 conditional to suppress documentation for implementation details.
2630 * include/bits/specfun.h: Improve docs.
2631 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
2634 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
2635 (std::experimental): Add docs.
2636 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
2637 namespace to nothing when generating docs.
2638 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
2639 * include/std/chrono (std::chrono): Likewise.
2640 * include/std/functional (std::placeholders): Likewise.
2641 * include/std/thread (std::this_thread): Likewise.
2643 * include/parallel/settings.h: Fix Doxygen markup.
2645 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
2646 anything unless PB_DS_CLASS_C_DEC is defined.
2647 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
2648 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
2649 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
2650 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
2651 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
2652 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
2653 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
2655 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
2656 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
2657 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
2658 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
2659 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
2660 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
2661 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
2662 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
2663 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
2664 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
2665 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
2667 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
2668 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
2670 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
2673 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
2674 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
2675 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
2678 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2680 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
2681 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
2682 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
2683 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
2684 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
2685 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
2687 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
2688 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
2691 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
2694 * include/std/complex (__complex_proj): Return parameter unchanged.
2695 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
2696 floating-point types to take std::complex arguments.
2697 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
2698 floating-point types.
2699 * testsuite/26_numerics/complex/proj.cc: New test.
2701 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2703 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
2704 to _Lock_policyE[012].
2705 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2707 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
2709 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
2710 macros accidentally left in.
2711 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
2712 unnecessary -lstdc++fs option. Fix test for mingw.
2713 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2716 2019-04-30 Jakub Jelinek <jakub@redhat.com>
2718 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
2720 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
2722 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
2724 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
2725 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
2728 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
2730 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
2733 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
2734 class template and partial specialization.
2737 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
2739 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
2740 functions to convert a value to an integral type.
2741 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
2742 (fill_n): Convert _Size parameter to an integral type.
2743 * testsuite/25_algorithms/fill_n/87982.cc: New test.
2744 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
2745 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
2746 * testsuite/25_algorithms/generate_n/87982.cc: New test.
2747 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
2748 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
2750 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
2752 Adding noexcept-specification on tuple constructors (LWG 2899)
2753 * libstdc++-v3/include/std/tuple:
2754 (tuple()): Add noexcept-specification.
2755 (tuple(const _Elements&...)): Likewise
2756 (tuple(_UElements&&...)): Likewise
2757 (tuple(const tuple<_UElements...>&)): Likewise
2758 (tuple(tuple<_UElements...>&&)): Likewise
2759 (tuple(const _T1&, const _T2&)): Likewise
2760 (tuple(_U1&&, _U2&&)): Likewise
2761 (tuple(const tuple<_U1, _U2>&): Likewise
2762 (tuple(tuple<_U1, _U2>&&): Likewise
2763 (tuple(const pair<_U1, _U2>&): Likewise
2764 (tuple(pair<_U1, _U2>&&): Likewise
2765 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
2767 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
2770 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
2771 arguments with __restrict.
2773 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2775 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2777 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
2779 * include/experimental/bits/fs_path.h
2780 (path::_S_convert_loc<_InputIterator>): Create const std::string to
2781 avoid redundant call to _S_convert_loc with non-const pointers.
2783 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
2784 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
2785 * testsuite/21_strings/basic_string/hash/hash.cc
2786 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
2787 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
2788 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
2790 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
2791 wstring::_M_replace_dispatch with more specific patterns.
2792 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
2793 Create const std::string to avoid redundant call to _S_convert_loc
2794 with non-const pointers.
2795 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
2796 avoid unnecessary basic_string::assign instantiations.
2798 * include/std/memory (__uses_alloc_args): Add string-literal to
2799 static_assert, to match the one in __uses_alloc.
2800 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
2801 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
2802 for recursive uses-allocator construction of nested pairs.
2803 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
2806 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2808 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2809 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2810 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2811 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2813 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2814 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2815 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2816 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2817 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2818 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2819 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2821 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
2824 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
2825 * include/std/scoped_allocator [__cplusplus > 201703L]
2826 (scoped_allocator_adaptor::construct): Define in terms of
2827 uses_allocator_construction_args, as per P0591R4.
2828 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
2829 * testsuite/util/testsuite_allocator.h: Remove name of unused
2832 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
2834 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
2835 * doc/html/*: Regenerate.
2837 * include/bits/fs_path.h (operator<, operator<=, operator>)
2838 (operator>=, operator==, operator!=): Make hidden friends, as per
2840 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
2841 string type in test.
2842 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2844 * include/std/any (any::any(ValueType&&)): Use __and_v.
2845 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
2848 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
2850 * include/std/type_traits (__result_of_memfun): Use remove_reference
2851 instead of __remove_cvref_t and remove redundant is_same check.
2852 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
2854 * include/experimental/string_view (basic_string_view::pointer)
2855 (basic_string_view::reference): Fix to refer to non-const value_type.
2856 * include/bits/basic_string.h (basic_string): Use __sv_check and
2857 __sv_limit instead of basic_string_view::_M_check and
2858 basic_string_view::_M_limit.
2859 * include/std/string_view (__sv_check, __sv_limit): New
2860 helper functions to replace basic_string_view::_M_check and
2861 basic_string_view::_M_limit.
2862 (basic_string_view): Add static assertions to enforce ill-formed
2863 requirement for traits_type::char_type from P1148R0, and to enforce
2864 required properties of char-like types.
2865 (basic_string_view::pointer, basic_string_view::reference): Fix to
2866 refer to non-const value_type.
2867 (basic_string_view::operator[], basic_string_view::at)
2868 (basic_string_view::front, basic_string_view::back)
2869 (basic_string_view::data): Use const_reference and const_pointer
2870 typedefs for return types.
2871 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
2872 (hash<wstring_view>): Fix argument_type typedef.
2873 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2874 char/1.cc: Fix expected return type of basic_string_view::data().
2875 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
2876 wchar_t/1.cc: Likewise.
2877 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2878 char/1.cc: Likewise.
2879 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
2880 wchar_t/1.cc: Likewise.
2881 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
2883 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2884 Check reference and pointer typedefs.
2885 * testsuite/experimental/string_view/requirements/typedefs.cc:
2887 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
2888 Fix expected return type of basic_string_view::data().
2889 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
2891 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
2893 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
2897 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
2898 Avoid a runtime check for types that can never be stored in std::any.
2899 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2902 PR libstdc++/90220 (partial)
2903 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
2904 not attempt ill-formed static_cast to pointers to non-object types.
2905 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
2908 * testsuite/20_util/variant/run.cc: Catch exception by reference to
2909 prevent -Wcatch-value warning.
2911 * include/std/variant (__variant_construct): Use template parameter
2912 type instead of equivalent decltype-specifier.
2913 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
2914 Replace forward with move.
2915 (_Move_ctor_base<false, Types...>::_M_destructive_move)
2916 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
2917 (_Move_ctor_base<true, Types...>::_M_destructive_move)
2918 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
2919 index after construction succeeds.
2920 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
2921 if-constexpr checks that are always true. Use __remove_cvref_t instead
2922 of remove_reference so that is_nothrow_move_constructible check
2923 doesn't use a const rvalue parameter. In the potentially-throwing case
2924 construct a temporary and move assign it, as per LWG 2904.
2925 (_Move_assign_base<false, Types...>::operator=): Remove redundant
2926 if-constexpr checks that are always true. Use emplace as per LWG 2904.
2927 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
2928 construct a temporary and move assign from it, as per LWG 2904.
2929 * testsuite/20_util/variant/exception_safety.cc: Check that
2930 assignment operators have strong exception safety guarantee.
2932 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
2934 Document PSTL linker flags
2936 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
2938 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2940 * include/std/variant (__detail::__variant::_Traits): Make
2941 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
2942 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
2944 (__detail::__variant::_Copy_assign_alias): Only depend on
2945 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
2946 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
2947 move assignment operators.
2950 * include/std/variant (variant::__not_self): New helper for the
2951 is_same_v<remove_cvref_t<T>, variant>==false constraints.
2952 (variant::__to_type_impl): Remove.
2953 (variant::__to_type): Add default argument to check pack size, instead
2954 of using __to_type_impl.
2955 (variant::__accepted_type): Add default argument using __not_self.
2956 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
2957 for variant(T&&) constructor constraint.
2958 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
2959 Extract __accepted_type into a named template parameter for reuse in
2960 other constraints and in the exception specification.
2961 (variant::variant(in_place_type_t<T>, Args&&...))
2962 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
2963 (variant::variant(in_place_index_t<T>, Args&&...))
2964 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
2965 (variant::operator=T&&)): Remove redundant && from trait arguments.
2966 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
2967 isn't used for in_place_type or in_place_index arguments.
2969 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
2970 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
2971 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
2973 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2974 Bernd Edlinger <bernd.edlinger@hotmail.de>
2975 Jakub Jelinek <jakub@redhat.com>
2978 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
2979 general-regs-only target attribute for ARM.
2981 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
2984 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
2985 specialization also depend on is_nothrow_move_constructible.
2986 * include/std/variant (__detail::__variant::__never_valueless()):
2987 Only true if the variant would have a move assignment operator.
2988 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
2989 Check __never_valueless<T...>().
2990 (variant::emplace): Only perform non-throwing move assignments
2991 for never-valueless alternatives if the variant has a move assignment
2993 * testsuite/20_util/variant/compile.cc: Check that never-valueless
2994 types can be emplaced into non-assignable variants.
2995 * testsuite/20_util/variant/run.cc: Check that never-valueless types
2996 don't get copied when emplaced into non-assignable variants.
2998 * include/std/variant (__detail::__variant::__ref_cast): Remove
3000 (__detail::__variant::_Uninitialized::_M_get)
3001 (__detail::__variant::__get)
3002 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
3004 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
3006 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
3008 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3009 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3010 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3011 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3013 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3015 Delegate PSTL configuration to pstl/pstl_config.h
3017 * include/bits/c++config: Remove explicit PSTL configuration
3018 macros and use definitions from <pstl/pstl_config.h>.
3020 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3022 Cleanup algorithm implementations
3023 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
3025 (mismatch): Forward execution policy.
3026 (equal): Qualify call to std::equal().
3027 (partial_sort): Forward execution policy.
3028 (inplace_merge): Forward execution policy.
3030 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
3032 Improve implementation of parallel equal()
3033 * include/pstl/algorithm_impl.h
3034 (__internal::__brick_equal): use "4 iterator" version of
3036 (__internal::__brick_equal): use simd for random access
3037 iterators on unsequenced execution policies.
3038 (__internal::__pattern_equal): add "4 iterator" version
3039 (__internal::__pattern_equal): dispatch to simd __brick_equal
3040 for vector-only execution policies.
3041 (__internal::__pattern_equal): dispatch to __parallel_or for
3042 parallel execution policies.
3043 * include/pstl/glue_algorithm_impl.h
3044 (std::equal): dispatch to "4 iterator" version of
3045 __internal::__pattern_equal().
3047 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
3050 * include/bits/forward_list.h (operator==): Do not use operator!= to
3052 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
3053 earlier in the list, so that sort is stable.
3054 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
3055 * testsuite/23_containers/forward_list/comparable.cc: Test with
3056 types that meet the minimum EqualityComparable and LessThanComparable
3057 requirements. Remove irrelevant comment.
3059 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
3060 Do not depend on whether all alternative types are move constructible.
3061 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
3062 from the operand when deciding whether to perform the assignment.
3063 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
3064 with deleted move constructor and deleted move assignment operator.
3065 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
3066 behaviour of variants with DeletedMoves as an alternative.
3067 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
3068 (move_ctor, move_assign): Check that moving a variant with a
3069 DeletedMoves alternative falls back to copying instead of moving.
3071 * testsuite/20_util/variant/compile.cc: Remove empty string literals
3072 from static_assert declarations.
3074 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
3075 actually match its name.
3076 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
3077 (test_swap()): Fix result for MoveCtorOnly and check
3078 MoveCtorAndSwapOnly.
3080 * include/std/optional (optional::value_or(U&&) &&): Add missing
3081 constexpr specifier.
3082 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
3083 for disengaged optionals and rvalue optionals.
3084 * testsuite/20_util/optional/observers/4.cc: Likewise.
3086 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
3088 * include/pstl/algorithm_impl.h: Uglify identfiers.
3089 * include/pstl/numeric_impl.h: Uglify identfiers.
3090 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
3092 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
3094 * include/bits/c++config:
3095 Add definition for __PSTL_ASSERT.
3096 Add definition for __PSTL_ASSERT_MSG.
3097 * include/pstl/algorithm_impl.h: Replace use of assert().
3098 * include/pstl/numeric_impl.h: Replace use of assert().
3099 * include/pstl/parallel_backend_tbb.h:
3100 Replace use of assert().
3101 Replace use of __TBB_ASSERT().
3102 * include/pstl/parallel_backend_utils.h: Replace use of assert().
3104 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
3107 * src/c++17/memory_resource.cc
3108 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
3109 needed to allow placing a _Chunk at the end of the buffer.
3110 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
3112 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
3114 * doc/xml/faq.xml: Add information about emergency EH pool.
3115 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
3116 Move outdated information on mt_allocator to a separate section.
3117 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
3118 doesn't affect the default allocator.
3120 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
3124 * testsuite/20_util/variant/89851.cc: New test.
3126 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
3128 * include/std/variant: Adjust whitespace. Add comments.
3129 (_Multi_array): Leave primary template undefined.
3130 (_Multi_array<_Tp>): Define partial specialization for base case of
3132 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
3133 which is always a reference.
3134 (__gen_vtable::_S_apply()): Remove function, inline body into
3135 default member initializer.
3136 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
3138 * include/std/variant (__variant_idx_cookie): Add member type.
3139 (__visitor_result_type): Remove.
3140 (__do_visit): Use invoke_result instead of __visitor_result_type.
3141 * testsuite/20_util/variant/visit.cc: New test.
3144 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
3146 * testsuite/20_util/variant/90008.cc: New test.
3148 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
3150 * include/pstl/algorithm_impl.h: Add namespace qualification.
3151 * include/pstl/execution_defs.h: Add namespace qualification.
3152 * include/pstl/execution_impl.h: Add namespace qualification.
3153 * include/pstl/numeric_impl.h: Add namespace qualification.
3154 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
3155 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
3156 * include/pstl/parallel_backend_utils.h: Include <cassert>.
3158 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
3160 Fix visit<R> for variant.
3161 * include/std/variant (__do_visit): Add a template parameter
3162 for enforcing same return types for visit.
3163 (__gen_vtable_impl): Likewise.
3164 (_S_apply_single_alt): Adjust.
3165 (__visit_invoke_impl): New. Handle casting to void.
3166 (__do_visit_invoke): New. Enforces same return types.
3167 (__do_visit_invoke_r): New. Converts return types.
3168 (__visit_invoke): Adjust.
3169 (__gen_vtable): Add a template parameter for enforcing
3170 same return types for visit.
3171 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
3172 different return types.
3173 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
3174 visitors with different return types don't accidentally
3175 compile with regular visitation.
3177 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
3179 * testsuite/27_io/filesystem/iterators/caching.cc: Add
3180 dg-require-filesystem-ts.
3182 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
3184 * doc/xml/manual/status_cxx2020.xml: Update status.
3185 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
3186 * testsuite/20_util/variant/visit_r.cc: New test.
3188 * include/bits/fs_dir.h (directory_iterator::operator*)
3189 (directory_iterator::operator->): Add noexcept.
3190 (operator==, operator!=): Replace namespace-scope equality operators
3191 for directory iterators with hidden friends.
3194 * config/abi/pre/gnu.ver: Add missing exports.
3195 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
3198 * config/abi/pre/gnu.ver: Export new symbols.
3199 * include/bits/fs_dir.h (recursive_directory_iterator::options())
3200 (recursive_directory_iterator::recursion_pending())
3201 (recursive_directory_iterator::disable_recursion_pending()): Remove
3202 inline definitions. Make noexcept.
3203 (recursive_directory_iterator::depth())
3204 (recursive_directory_iterator::operator*())
3205 (recursive_directory_iterator::operator->()): Make noexcept.
3206 (recursive_directory_iterator::_M_options)
3207 (recursive_directory_iterator::_M_pending): Remove data members.
3208 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
3209 (recursive_directory_iterator::recursive_directory_iterator): Remove
3210 ctor-initializer. Use new constructor for _Dir_stack.
3211 (recursive_directory_iterator::options())
3212 (recursive_directory_iterator::recursion_pending())
3213 (recursive_directory_iterator::disable_recursion_pending()): Add
3214 non-inline definitions.
3215 (recursive_directory_iterator::depth()): Make noexcept.
3216 (recursive_directory_iterator::increment(error_code&))
3217 (recursive_directory_iterator::pop(error_code&)): Adjust to new
3218 location of options and recursion_pending members.
3219 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
3220 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
3221 user-declared move constructor and assignment operator, to make the
3224 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
3225 d_type == DT_UNKNOWN immediately.
3226 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
3228 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
3230 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
3232 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
3233 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
3236 PR libstdc++/87431 (again)
3237 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
3238 Define partial specialization for basic_string.
3239 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
3240 shared_ptr and weak_ptr.
3241 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
3243 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
3245 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
3247 * include/debug/vector (_Never_valueless_alt): Likewise for debug
3249 * include/std/any (_Never_valueless_alt): Define explicit
3250 specialization for any.
3251 * include/std/variant (_Never_valueless_alt): Define primary template.
3252 (__never_valueless): Use _Never_valueless_alt instead of
3253 is_trivially_copyable.
3254 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
3255 initializations to avoid try-catch overhead. Add special case for
3256 scalars produced by potentially-throwing conversions. Use
3257 _Never_valueless_alt instead of is_trivially_copyable for the
3258 remaining strong exception-safety cases.
3259 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
3260 * testsuite/20_util/variant/87431.cc: Run both test functions.
3261 * testsuite/20_util/variant/exception_safety.cc: New test.
3262 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
3263 so the variant becomes valueless.
3265 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
3268 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
3270 (variant::emplace<_Tp>): Return result of emplace<N> directly.
3272 * include/std/string (__hash_string_base): New class template defining
3273 operator() for hashing strings.
3274 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
3275 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
3276 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
3277 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
3279 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
3281 Use single-visitation in variant assignment and swap and relops.
3282 Also use indices instead of types when checking whether
3283 variants hold the same thing.
3284 * include/std/variant (__do_visit): Add a template parameter
3285 for index visitation, invoke with indices if index visitation
3287 (__variant_idx_cookie): New.
3288 (__visit_with_index): Likewise.
3289 (_Copy_assign_base::operator=): Do single-visitation with
3291 (_Move_assign_base::operator=): Likewise.
3292 (_Extra_visit_slot_needed): Adjust.
3293 (__visit_invoke): Call with indices if it's an index visitor.
3294 (relops): Do single-visitation with an index visitor.
3296 (__visitor_result_type): New.
3298 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
3300 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
3302 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3304 Don't revisit a variant we are already visiting.
3305 * include/std/variant (__variant_construct_single): New.
3306 (__variant_construct): Use it.
3307 (_M_destructive_move): Likewise.
3308 (_M_destructive_copy): Likewise.
3309 (_Copy_assign_base::operator=): Adjust.
3310 (_Move_assign_base::operator=): Likewise.
3313 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
3316 * include/bits/hashtable.h (_Hashtable): Move static assertions to
3317 destructor so they are not evaluated until the _Key type is complete.
3318 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3319 * testsuite/23_containers/set/85965.cc: New test.
3320 * testsuite/23_containers/unordered_set/85965.cc: New test.
3321 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
3322 with regexp matching the corresponding _Rb_tree specialization.
3323 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3324 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
3325 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3326 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3327 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3328 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3329 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3331 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3334 Fix based on a suggestion by Antony Polukhin.
3335 * include/std/variant (__never_valueless): New.
3337 (_Extra_visit_slot_needed): New.
3338 (_Multi_array): Use it.
3339 (_S_apply_all_alts): Likewise.
3341 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3344 Fix based on a suggestion by Antony Polukhin.
3345 * include/std/variant (__gen_vtable): Don't reserve an
3346 additional table slot, _Multi_array already does that.
3348 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
3351 Fix based on a suggestion by Antony Polukhin.
3352 * include/std/variant (__variant_construct): Capture a pointer
3353 to the storage and visit just one variant.
3355 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
3357 * doc/xml/manual/backwards_compatibility.xml: Remove link to
3358 Doxygen-generated pages with unstable URL.
3359 * doc/xml/manual/concurrency_extensions.xml: Likewise.
3360 * doc/xml/manual/extensions.xml: Likewise.
3361 * doc/xml/manual/parallel_mode.xml: Likewise.
3362 * doc/xml/manual/support.xml: Likewise.
3364 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
3365 avoid -Wconversion warnings.
3367 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
3369 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
3370 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
3371 (allstamped): Add stamp-pstl.
3372 (install-headers): Add ptsl_builddir.
3373 * include/Makefile.in: Regenerate.
3374 * include/bits/c++config: Add pstl configuration.
3375 * include/pstl/LICENSE.txt: New file.
3376 * include/pstl/algorithm_fwd.h: New file.
3377 * include/pstl/algorithm_impl.h: New file.
3378 * include/pstl/execution_defs.h: New file.
3379 * include/pstl/execution_impl.h: New file.
3380 * include/pstl/glue_algorithm_defs.h: New file.
3381 * include/pstl/glue_algorithm_impl.h: New file.
3382 * include/pstl/glue_execution_defs.h: New file.
3383 * include/pstl/glue_memory_defs.h: New file.
3384 * include/pstl/glue_memory_impl.h: New file.
3385 * include/pstl/glue_numeric_defs.h: New file.
3386 * include/pstl/glue_numeric_impl.h: New file.
3387 * include/pstl/memory_impl.h: New file.
3388 * include/pstl/numeric_fwd.h: New file.
3389 * include/pstl/numeric_impl.h: New file.
3390 * include/pstl/parallel_backend.h: New file.
3391 * include/pstl/parallel_backend_tbb.h: New file.
3392 * include/pstl/parallel_backend_utils.h: New file.
3393 * include/pstl/parallel_impl.h: New file.
3394 * include/pstl/pstl_config.h: New file.
3395 * include/pstl/unseq_backend_simd.h: New file.
3396 * include/pstl/utils.h: New file.
3397 * include/std/algorithm: Include parallel algorithm implementations.
3398 * include/std/execution: New file.
3399 * include/std/memory: Include parallel algorithm implementations.
3400 * include/std/numeric: Include parallel algorithm implementations.
3401 * include/std/version: Add parallel algorithms feature test macro.
3402 * testsuite/util/pstl/pstl_test_config.h: New file.
3403 * testsuite/util/pstl/test_utils.h: New file.
3404 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3405 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3406 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3407 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3408 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3409 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3410 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3411 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3412 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3413 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3414 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3415 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3416 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3417 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3418 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3419 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3420 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3421 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3422 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3423 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3424 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3425 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3426 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3427 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3428 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3429 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3430 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3431 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3432 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3433 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3434 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3435 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3436 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3437 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3438 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3439 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3440 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3441 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3442 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3443 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3444 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3445 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3446 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3447 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3448 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3449 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3450 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3451 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3452 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3453 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3454 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3455 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3456 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3457 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
3458 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
3459 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
3460 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
3461 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
3462 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
3463 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
3464 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
3465 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
3466 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
3467 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
3468 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
3469 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
3470 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
3471 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
3472 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
3473 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
3474 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
3475 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
3476 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
3477 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
3478 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
3479 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
3480 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
3481 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
3482 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
3483 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
3484 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
3485 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
3486 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
3487 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
3488 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
3489 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
3490 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
3491 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
3492 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
3493 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
3494 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
3495 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
3496 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
3497 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
3498 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
3499 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
3500 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
3501 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
3502 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
3503 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
3504 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
3505 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
3506 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
3507 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
3508 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
3509 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
3511 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
3513 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
3514 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
3515 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
3516 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
3517 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
3518 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
3519 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
3520 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
3521 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
3522 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
3523 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
3524 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
3525 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
3526 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
3527 when the special functions IS is enabled, not for C++17.
3528 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
3530 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
3531 without checks for special functions in C++17.
3532 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3536 * include/backward/hash_map: Use <> for includes not "".
3537 * include/backward/hash_set: Likewise.
3538 * include/backward/strstream: Likewise.
3539 * include/tr1/bessel_function.tcc: Likewise.
3540 * include/tr1/exp_integral.tcc: Likewise.
3541 * include/tr1/legendre_function.tcc: Likewise.
3542 * include/tr1/modified_bessel_func.tcc: Likewise.
3543 * include/tr1/riemann_zeta.tcc: Likewise.
3545 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
3547 * doc/xml/manual/allocator.xml: Link to table documenting evolution
3548 of extension allocators.
3549 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
3550 Document new headers in 7.2, 8.1 and 9.1 releases.
3551 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
3552 * doc/html/*: Regenerate.
3554 2019-03-12 John David Anglin <dave.anglin@bell.net>
3557 * testsuite/lib/libstdc++.exp: Locate libatomic.
3558 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
3559 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
3561 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
3562 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
3563 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
3564 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
3566 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
3569 * configure.ac: Check for sockatmark.
3570 * crossconfig.m4: Check for sockatmark.
3571 * config.h.in: Regenerate.
3572 * configure: Regenerate.
3573 * include/experimental/internet (address_v4::_S_hton): Rename
3574 overloaded functions to _S_hton_16 and _S_ntoh_16.
3575 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
3576 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
3577 * include/experimental/socket (basic_socket::at_mark): Check
3578 _GLIBCXX_HAVE_SOCKATMARK.
3580 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
3581 const variables instead of macros.
3584 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
3585 Use correct type for len_aligned.
3586 * testsuite/20_util/hash/89629.cc: New test.
3588 2019-03-11 Jakub Jelinek <jakub@redhat.com>
3591 * include/std/atomic (atomic<T>::store, atomic<T>::load,
3592 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
3593 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
3594 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
3595 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
3596 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
3597 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
3598 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
3599 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
3600 memory_order_seq_cst to int.
3602 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
3604 * doc/xml/manual/using.xml: Use link element instead of xref.
3605 * doc/html/*: Regenerate.
3607 * include/bits/fs_path.h (path::format): Add fixed underlying type.
3609 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
3612 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
3613 parameters in deduction guides.
3614 * include/debug/multimap.h (multimap): Likewise.
3615 * include/debug/set.h (multimap): Likewise.
3616 * include/debug/multiset.h (multimap): Likewise.
3617 * include/debug/unordered_map (unordered_map): Likewise.
3618 (unordered_multimap): Likewise.
3619 * include/debug/unordered_set (unordered_set): Likewise.
3620 (unordered_multiset): Likewise.
3623 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
3624 Invalidate all iterators in case of rehash.
3625 (unordered_multimap<>::_M_check_rehashed): Likewise.
3626 * include/debug/unordered_set
3627 (unordered_set<>::_M_check_rehashed): Likewise.
3628 (unordered_multiset<>::_M_check_rehashed): Likewise.
3629 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
3631 2019-03-07 Andreas Schwab <schwab@suse.de>
3633 * config/abi/post/riscv64-linux-gnu: New directory.
3634 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
3636 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
3638 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
3639 compile test to run. Fix typo.
3641 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
3642 * doc/html/*: Regenerate.
3644 P0356R5 Simplified partial function application
3645 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
3646 helpers for bind_front.
3647 (bind_front, __cpp_lib_bind_front): Define.
3648 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
3650 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3652 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
3653 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
3654 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
3655 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3657 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3659 PR libstdc++/86655 - std::assoc_legendre should not constrain
3660 the value of m (or x).
3661 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
3662 __sph_legendre): If degree > order Don't throw, return 0.
3663 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
3664 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
3665 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
3666 * testsuite/tr1/5_numerical_facilities/special_functions/
3667 02_assoc_legendre/pr86655.cc: New test.
3668 * testsuite/tr1/5_numerical_facilities/special_functions/
3669 22_sph_legendre/pr86655.cc: New test.
3671 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3674 Also PR libstdc++/85517
3675 * include/std/variant (__do_visit): New.
3676 (__variant_cast): Likewise.
3677 (__variant_cookie): Likewise.
3678 (__erased_*): Remove.
3679 (_Variant_storage::_S_vtable): Likewise.
3680 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
3681 (_Variant_storage::__M_reset): Adjust.
3682 (__variant_construct): New.
3683 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
3684 __variant_construct.
3685 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
3686 (_Move_ctor_base::__M_destructive_copy): New.
3687 (_Move_ctor_base::__M_destructive_move): Adjust to use
3688 __variant_construct.
3689 (_Copy_assign_base::operator=): Adjust to use __do_visit.
3690 (_Copy_assign_alias): Adjust to check both copy assignment
3691 and copy construction for triviality.
3692 (_Move_assign_base::operator=): Adjust to use __do_visit.
3693 (_Multi_array): Add support for visitors that accept and return
3695 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
3696 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
3697 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
3698 a __variant_cookie temporary for a variant that is valueless and..
3699 (__gen_vtable_impl::__visit_invoke): ..adjust here.
3700 (__gen_vtable::_Array_type): Conditionally make space for
3701 the __variant_cookie visitor case.
3702 (__variant_construct_by_index): New.
3703 (get_if): Adjust to use std::addressof.
3704 (relops): Adjust to use __do_visit.
3705 (variant): Add __variant_cast and __variant_construct_by_index
3707 (variant::emplace): Use _M_reset() and __variant_construct_by_index
3708 instead of self-destruction.
3709 (variant::swap): Adjust to use __do_visit.
3710 (visit): Reimplement in terms of __do_visit.
3711 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
3712 * testsuite/20_util/variant/compile.cc: Adjust.
3713 * testsuite/20_util/variant/run.cc: Likewise.
3715 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
3717 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
3719 * testsuite/experimental/feat-char8_t.cc: Likewise.
3721 * include/std/type_traits [C++20] (is_bounded_array)
3722 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
3724 * testsuite/20_util/is_bounded_array/requirements/
3725 explicit_instantiation.cc: New test.
3726 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
3728 * testsuite/20_util/is_bounded_array/value.cc: New test.
3729 * testsuite/20_util/is_unbounded_array/requirements/
3730 explicit_instantiation.cc: New test.
3731 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
3733 * testsuite/20_util/is_unbounded_array/value.cc: New test.
3735 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
3737 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
3739 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
3741 * include/c_compatibility/math.h [C++20] (lerp): Add using
3743 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
3744 (__lerp): Define function template to implement lerp.
3745 (lerp(float, float, float), lerp(double, double, double))
3746 (lerp(long double, long double, long double)): Define for C++20.
3747 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
3748 (midpoint(T, T), midpoint(T*, T*)): Define.
3749 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
3750 * testsuite/26_numerics/lerp.cc: New test.
3751 * testsuite/26_numerics/midpoint/floating.cc: New test.
3752 * testsuite/26_numerics/midpoint/integral.cc: New test.
3753 * testsuite/26_numerics/midpoint/pointer.cc: New test.
3755 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
3757 PR libstdc++/88996 Implement P0439R0
3758 Make std::memory_order a scoped enumeration.
3759 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
3760 add variables for the old enumerators. Adjust calls.
3761 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
3762 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
3764 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
3766 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
3769 * include/std/memory_resource (polymorphic_allocator): Add default
3770 template argument for C++20.
3771 (polymorphic_allocator::allocate_bytes)
3772 (polymorphic_allocator::deallocate_bytes)
3773 (polymorphic_allocator::allocate_object)
3774 (polymorphic_allocator::deallocate_object)
3775 (polymorphic_allocator::new_object)
3776 (polymorphic_allocator::delete_object): New member functions for
3778 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
3781 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
3784 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
3787 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
3789 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
3790 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
3792 * include/std/memory (uses_allocator_construction_args): New set of
3793 overloaded functions.
3794 (make_obj_using_allocator, uninitialized_construct_using_allocator):
3796 * include/std/memory_resource (polymorphic_allocator::construct)
3797 [__cplusplus > 201703l]: Replace all overloads with a single function
3798 using uses_allocator_construction_args.
3799 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
3801 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
3803 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
3806 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
3807 stylesheet directories before check for xsltproc. Try to use
3808 xmlcatalog to find local stylesheet directory before trying hardcoded
3809 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
3810 check to look for the same stylesheet as doc/Makefile.am uses. Don't
3811 use xsltproc if xmlcatalog fails to find a local stylesheet.
3812 * configure.ac: Check for xmlcatalog.
3813 * Makefile.in: Regenerate.
3814 * configure: Likewise.
3815 * doc/Makefile.in: Likewise.
3816 * include/Makefile.in: Likewise.
3817 * libsupc++/Makefile.in: Likewise.
3818 * po/Makefile.in: Likewise.
3819 * python/Makefile.in: Likewise.
3820 * src/Makefile.in: Likewise.
3821 * src/c++11/Makefile.in: Likewise.
3822 * src/c++17/Makefile.in: Likewise.
3823 * src/c++98/Makefile.in: Likewise.
3824 * src/filesystem/Makefile.in: Likewise.
3825 * testsuite/Makefile.in: Likewise.
3827 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
3830 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
3831 container deduction guides.
3832 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
3833 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
3834 parameters in deduction guides.
3835 * include/bits/stl_multimap.h (multimap): Likewise.
3836 * include/bits/stl_multiset.h (multiset): Likewise.
3837 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
3838 * include/bits/stl_set.h (set): Likewise.
3839 * include/bits/stl_stack.h (stack): Likewise.
3840 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3841 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
3842 constrain parameters in deduction guides.
3843 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3845 * testsuite/23_containers/map/cons/deduction.cc: Test additional
3847 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
3848 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
3849 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
3850 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
3852 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
3854 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
3857 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
3858 to class template and partial specialization using void_t.
3859 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3861 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
3864 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
3865 copy and move members public.
3867 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
3869 * include/std/type_traits (__underlying_type_impl): New helper to
3870 make underlying_type SFINAE-friendly.
3871 (underlying_type): Derive from __underlying_type_impl.
3872 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
3876 * include/bits/char_traits.h (__constant_char_array): Check index is
3877 in range before dereferencing.
3878 (char_traits<char>::compare, char_traits<char>::find)
3879 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
3880 immediately if n is zero.
3881 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
3882 Remove workarounds for PR 67026.
3883 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
3885 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
3888 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3890 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
3891 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3893 2019-02-22 Jakub Jelinek <jakub@redhat.com>
3896 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
3897 type to std::size_t and argument to type to long double.
3899 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
3901 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
3902 * config/abi/post/sparc64-linux-gnu: New directory.
3903 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
3904 * config/abi/post/sparc64-linux-gnu/32: New directory.
3905 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
3907 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3909 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
3910 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
3913 2019-02-22 Tom Honermann <tom@honermann.net>
3915 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
3916 printers for u8string and u8string_view.
3918 2019-02-22 Tom Honermann <tom@honermann.net>
3920 * testsuite/18_support/byte/ops.cc: Validate
3921 std::to_integer<char8_t>, std::to_integer<char16_t>, and
3922 std::to_integer<char32_t>.
3923 * testsuite/18_support/numeric_limits/dr559.cc: Validate
3924 std::numeric_limits<char8_t>.
3925 * testsuite/18_support/numeric_limits/lowest.cc: Validate
3926 std::numeric_limits<char8_t>::lowest().
3927 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
3928 std::numeric_limits<char8_t>::max_digits10.
3929 * testsuite/18_support/type_info/fundamental.cc: Validate
3930 typeinfo for char8_t.
3931 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
3932 std::from_chars with char8_t.
3933 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
3934 Validate explicit instantiation of std::hash<char8_t>.
3935 * testsuite/20_util/is_integral/value.cc: Validate
3936 std::is_integral<char8_t>.
3937 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
3938 Validate std::make_signed<char8_t>.
3939 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3940 Validate u8string construction from char8_t sources.
3941 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
3943 * testsuite/21_strings/basic_string_view/operations/compare/
3944 char/70483.cc: Validate substr operations on u8string_view.
3945 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
3946 the u8string_view typedef is defined.
3947 * testsuite/21_strings/char_traits/requirements/
3948 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
3950 * testsuite/21_strings/char_traits/requirements/
3951 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
3952 constexpr member functions.
3953 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
3954 that the u8string typedef is defined.
3955 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
3956 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
3957 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
3958 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
3960 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3961 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3963 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3964 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3965 Validate std::atomic<char8_t>::is_always_lock_free
3966 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3967 Update line numbers.
3968 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3970 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3972 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
3973 Validate std::experimental::pmr::u8string.
3974 * testsuite/experimental/string_view/typedefs.cc: Validate that the
3975 u8string_view typedef is defined.
3976 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
3977 char32_t to the typelists.
3979 2019-02-22 Tom Honermann <tom@honermann.net>
3981 * include/ext/typelist.h: Constrain a partial specialization of
3982 typelist::detail::append_ to only match chain<T1,T2>.
3984 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
3987 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
3988 class template with class. Replace move and copy member types with
3989 member alias templates, so they are only instantiated when needed.
3990 (__is_copy_insertable, __is_move_insertable): Adjust base class.
3991 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
3992 test for C++11/14/17 as well.
3993 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
3996 2019-02-20 Jakub Jelinek <jakub@redhat.com>
3999 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
4000 _GLIBCXX_PURE to the alias declaration.
4002 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
4004 * testsuite/21_strings/basic_string/literals/types.cc
4005 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
4006 * testsuite/21_strings/basic_string/literals/values.cc
4007 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4008 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
4009 potentially having different type.
4010 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
4011 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
4013 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
4014 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
4015 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
4016 string literals only using basic character set.
4017 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
4018 u8 literals to char.
4019 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
4020 Test ATOMIC_CHAR8_T_LOCK_FREE.
4021 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
4022 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
4023 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
4024 * testsuite/experimental/string_view/literals/types.cc
4025 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
4027 * testsuite/experimental/string_view/literals/values.cc
4028 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4030 2019-02-19 Tom Honermann <tom@honermann.net>
4032 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
4033 from char16_32_t.cc; validates numeric_limits<char8_t>.
4034 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
4035 test cloned from types.cc; validates operator""s for char8_t
4037 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
4038 test cloned from values.cc; validates construction and comparison
4040 * testsuite/21_strings/basic_string/requirements/
4041 /explicit_instantiation/char8_t/1.cc: New test cloned from
4042 char16_t/1.cc; validates explicit instantiation of
4043 basic_string<char8_t>.
4044 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4045 New test cloned from types.cc; validates operator""sv for char8_t
4046 returns u8string_view.
4047 * testsuite/21_strings/basic_string_view/literals/
4048 values-char8_t.cc: New test cloned from values.cc; validates
4049 construction and comparison of u8string_view values.
4050 * testsuite/21_strings/basic_string_view/requirements/
4051 explicit_instantiation/char8_t/1.cc: New test cloned from
4052 char16_t/1.cc; validates explicit instantiation of
4053 basic_string_view<char8_t>.
4054 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
4055 New test cloned from char16_t/65049.cc; validates that
4056 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
4057 * testsuite/21_strings/char_traits/requirements/char8_t/
4058 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
4059 that char_traits<char8_t> member typedefs are present and correct.
4060 * testsuite/21_strings/char_traits/requirements/
4061 explicit_instantiation/char8_t/1.cc: New test cloned from
4062 char16_t/1.cc; validates explicit instantiation of
4063 char_traits<char8_t>.
4064 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
4065 from char16_t.cc: validates
4066 codecvt<char16_t, char8_t, mbstate_t>.
4067 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
4068 from char32_t.cc: validates
4069 codecvt<char32_t, char8_t, mbstate_t>.
4070 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
4071 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
4072 codecvt<char32_t, char8_t, std::mbstate_t>.
4073 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
4074 test cloned from string.cc; validates filesystem::path construction
4076 * testsuite/experimental/feat-char8_t.cc: New test; validates that
4077 the __cpp_lib_char8_t feature test macro is defined with the
4079 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
4080 New test cloned from string.cc; validates filesystem::path
4081 construction from char8_t input.
4082 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
4083 test cloned from types.cc; validates operator""sv for char8_t
4084 returns u8string_view.
4085 * testsuite/experimental/string_view/literals/values-char8_t.cc:
4086 New test cloned from values.cc; validates construction and
4087 comparison of u8string_view values.
4088 * testsuite/experimental/string_view/requirements/
4089 explicit_instantiation/char8_t/1.cc: New test cloned from
4090 char16_t/1.cc; validates explicit instantiation of
4091 basic_string_view<char8_t>.
4092 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
4093 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
4096 2019-02-19 Tom Honermann <tom@honermann.net>
4098 P0482R5 char8_t: Standard library support
4099 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
4100 typeinfo symbols for char8_t.
4101 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
4102 (GLIBCXX_3.4.26): Add symbols for specializations of
4103 numeric_limits and codecvt that involve char8_t.
4104 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
4105 * include/bits/atomic_base.h: Add atomic_char8_t.
4106 * include/bits/basic_string.h: Add std::hash<u8string> and
4107 operator""s(const char8_t*, size_t).
4108 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
4110 * include/bits/char_traits.h: Add char_traits<char8_t>.
4111 * include/bits/codecvt.h: Add
4112 codecvt<char16_t, char8_t, mbstate_t>,
4113 codecvt<char32_t, char8_t, mbstate_t>,
4114 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4115 codecvt_byname<char32_t, char8_t, mbstate_t>.
4116 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
4117 recognize char8_t as an integral type.
4118 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
4120 (path::u8string): Return std::u8string when char8_t support is
4122 (path::generic_u8string): Likewise.
4123 (path::_S_convert): Handle conversion from char8_t input.
4124 (path::_S_str_convert): Likewise.
4125 * include/bits/functional_hash.h: Add hash<char8_t>.
4126 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
4128 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
4129 for new char8_t specializations.
4130 * include/bits/localefwd.h: Add missing declarations of
4131 codecvt<char16_t, char, mbstate_t> and
4132 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
4133 codecvt<char16_t, char8_t, mbstate_t> and
4134 codecvt<char32_t, char8_t, mbstate_t>.
4135 * include/bits/postypes.h: Add u8streampos
4136 * include/bits/stringfwd.h: Add declarations of
4137 char_traits<char8_t> and u8string.
4138 * include/c_global/cstddef: Add __byte_operand<char8_t>.
4139 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4141 (path::u8string): Return std::u8string when char8_t support is
4143 (path::generic_u8string): Likewise.
4144 (path::_S_convert): Handle conversion from char8_t input.
4145 (path::_S_str_convert): Likewise.
4146 * include/experimental/string: Add u8string.
4147 * include/experimental/string_view: Add u8string_view,
4148 hash<experimental::u8string_view>, and
4149 operator""sv(const char8_t*, size_t).
4150 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
4151 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
4152 as a character type.
4153 * include/std/limits: Add numeric_limits<char8_t>.
4154 * include/std/string_view: Add u8string_view,
4155 hash<experimental::u8string_view>, and
4156 operator""sv(const char8_t*, size_t).
4157 * include/std/type_traits: Add __is_integral_helper<char8_t>,
4158 __make_unsigned<char8_t>, and __make_signed<char8_t>.
4159 * libsupc++/atomic_lockfree_defines.h: Define
4160 ATOMIC_CHAR8_T_LOCK_FREE.
4161 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
4162 codecvt.cc and limits.cc so that char8_t specializations of
4163 numeric_limits and codecvt and emitted.
4164 * src/c++11/Makefile.in: Likewise.
4165 * src/c++11/codecvt.cc: Define members of
4166 codecvt<char16_t, char8_t, mbstate_t>,
4167 codecvt<char32_t, char8_t, mbstate_t>,
4168 codecvt_byname<char16_t, char8_t, mbstate_t>, and
4169 codecvt_byname<char32_t, char8_t, mbstate_t>.
4170 * src/c++11/limits.cc: Define members of
4171 numeric_limits<char8_t>.
4172 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
4173 locale_init.cc and localename.cc.
4174 * src/c++98/Makefile.in: Likewise.
4175 * src/c++98/locale_init.cc: Add initialization for the
4176 codecvt<char16_t, char8_t, mbstate_t> and
4177 codecvt<char32_t, char8_t, mbstate_t> facets.
4178 * src/c++98/localename.cc: Likewise.
4179 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
4181 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
4183 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
4184 * 27_io/filesystem/operations/resize_file.cc: Likewise.
4185 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
4187 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
4189 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
4190 * doc/html/*: Regenerate.
4192 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
4193 * doc/html/*: Regenerate.
4195 * doc/xml/manual/intro.xml: Document LWG 2586 status.
4196 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
4197 allocator type in is_constructible checks.
4198 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
4199 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
4200 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
4201 problematic type from LWG 2586 discussion.
4202 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
4203 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
4205 * configure.ac: Check for C11 timespec_get function.
4206 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
4208 * config.h.in: Regenerate.
4209 * configure: Regenerate.
4210 * include/c_global/ctime (timespec, timespec_get): Add to namespace
4211 std for C++17 and up.
4213 * doc/xml/manual/intro.xml: Document LWG 2537 status.
4214 * include/bits/stl_queue.h
4215 (priority_queue(const Compare&, const Container&, const Alloc&))
4216 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
4218 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
4220 * doc/xml/manual/intro.xml: Document LWG 2566 status.
4221 * include/bits/stl_queue.h (queue, priority_queue): Add static
4222 assertions to enforce LWG 2566 requirement on value_type.
4223 * include/bits/stl_stack.h (stack): Likewise.
4226 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
4228 * doc/xml/manual/intro.xml: Document LWG 2735 status.
4229 * include/bits/std_abs.h: Add comment about LWG 2735.
4230 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
4232 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
4235 * include/std/version [__cpp_impl_destroying_delete]
4236 (__cpp_lib_destroying_delete): Only define for C++2a and later.
4237 * libsupc++/new [__cpp_impl_destroying_delete]
4238 (__cpp_lib_destroying_delete): Likewise.
4239 (destroying_delete_t, destroying_delete): Likewise, but define even
4240 when __cpp_impl_destroying_delete is not defined.
4241 * testsuite/18_support/destroying_delete.cc: New test.
4243 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
4246 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
4247 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
4248 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
4249 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
4251 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
4254 * include/bits/fs_path.h (path::has_root_name)
4255 (path::has_root_directory, path::has_root_path)
4256 (path::has_relative_path, path::has_parent_path)
4257 (path::has_filename, path::has_stem, path::has_extension)
4258 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
4260 * src/c++17/fs_path.cc (path::has_root_name)
4261 (path::has_root_directory, path::has_root_path)
4262 (path::has_relative_path, path::has_parent_path)
4263 (path::has_filename, path::_M_find_extension): Add noexcept.
4265 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
4267 PR libstdc++/89102 (partial)
4268 * include/std/type_traits (common_type<>): Define.
4269 (common_type<T>): Derive from common_type<T, T>.
4270 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4271 Test zero-length template argument list.
4272 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4273 Test additional single argument cases.
4274 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4275 Adjust expected error.
4277 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
4280 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
4282 * include/bits/stl_stack.h (stack): Likewise.
4283 * testsuite/23_containers/priority_queue/deduction.cc: New test.
4284 * testsuite/23_containers/queue/deduction.cc: New test.
4285 * testsuite/23_containers/stack/deduction.cc: New test.
4288 * include/std/type_traits (__is_convertible_helper)
4289 (__is_convertible_helper<_From, _To, false>): Revert changes to
4290 support is_nothrow_convertible.
4291 (__is_nt_convertible_helper): New helper.
4292 (is_nothrow_convertible): Use __is_nt_convertible_helper.
4294 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
4295 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
4298 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
4299 __is_alloc_insertable_impl. Replace single type member with two
4300 members, one for each of copy and move insertable.
4301 (__is_move_insertable): New trait for internal use.
4302 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
4303 (vector::_S_nothrow_relocate(true_type)): New functions to
4304 conditionally check if __relocate_a can throw.
4305 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
4306 on __is_move_insertable.
4307 (vector::_S_do_relocate): New overloaded functions to conditionally
4309 (vector::_S_relocate): New function that dispatches to _S_do_relocate
4310 based on _S_use_relocate.
4311 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4312 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
4313 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
4316 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
4317 parameter unnamed. Add message to static assertion.
4318 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4319 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
4322 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
4325 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
4327 (__is_bitwise_relocatable): ... to this.
4328 (__relocate_a_1): Adapt.
4329 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
4330 (__is_bitwise_relocatable): ... to this.
4332 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
4335 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
4336 final component as well as from _M_pathname. Append the dot using
4337 operator+= instead of only to _M_pathname.
4338 (path::_M_find_extension): Reformat slightly.
4339 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
4340 Add more test cases.
4342 2019-01-30 Ulrich Drepper <drepper@redhat.com>
4344 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
4346 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
4348 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
4349 constexpr specifiers from arg and proj.
4351 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
4352 __shared_ptr instantiations used by gcc4-compatible ABI.
4354 * include/experimental/forward_list (experimental::erase): Qualify
4356 * include/experimental/list (experimental::erase): Likewise.
4357 * include/std/forward_list (std::erase): Likewise.
4358 * include/std/list (std::erase): Likewise.
4360 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
4362 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
4363 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
4364 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
4365 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
4366 * testsuite/ext/array_allocator/26875.cc: Likewise.
4367 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
4368 * testsuite/util/replacement_memory_operators.h: Likewise.
4369 * testsuite/util/testsuite_allocator.h: Likewise.
4371 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
4372 normal mode vector, even for debug mode.
4373 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
4374 Define alias template for normal mode vector.
4376 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
4379 * config/locale/generic/c_locale.h (__convert_from_v)
4380 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4381 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4382 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
4383 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
4385 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
4388 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
4389 data member with static member function _S_use_relocate().
4390 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
4391 (vector::_M_default_append): Use _S_use_relocate() instead of
4394 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
4397 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
4400 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
4401 write to stderr instead of using printf.
4403 2019-01-21 Jakub Jelinek <jakub@redhat.com>
4406 * include/bits/char_traits.h (__constant_string_p,
4407 __constant_char_array_p): Use __builtin_is_constant_evaluated if
4410 2019-01-20 Ulrich Drepper <drepper@redhat.com>
4412 Implement C++20 P0600r1.
4413 * include/backward/hash_map: Add nodiscard attribute to empty.
4414 * include/backward/hash_set: Likewise.
4415 * backward/hashtable.h: Likewise.
4416 * include/bits/basic_string.h: Likewise.
4417 * include/bits/forward_list.h: Likewise.
4418 * include/bits/hashtable.h: Likewise.
4419 * include/bits/regex.h: Likewise.
4420 * include/bits/stl_deque.h: Likewise.
4421 * include/bits/stl_list.h: Likewise.
4422 * include/bits/stl_map.h: Likewise.
4423 * include/bits/stl_multimap.h: Likewise.
4424 * include/bits/stl_multiset.h: Likewise.
4425 * include/bits/stl_queue.h: Likewise.
4426 * include/bits/stl_set.h: Likewise.
4427 * include/bits/stl_stack.h: Likewise.
4428 * include/bits/stl_tree.h: Likewise.
4429 * include/bits/stl_vector.h: Likewise.
4430 * include/bits/unordered_map.h: Likewise.
4431 * include/bits/unordered_set.h: Likewise.
4432 * include/debug/array: Likewise.
4433 * include/experimental/any: Likewise.
4434 * include/experimental/bits/fs_path.h: Likewise.
4435 * include/experimental/internet: Likewise.
4436 * include/experimental/string_view: Likewise.
4437 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
4439 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
4441 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
4443 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
4445 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
4447 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
4449 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
4451 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
4453 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4454 info_fn_imps.hpp: Likewise.
4455 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
4456 left_child_next_sibling_heap_.hpp: Likewise.
4457 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
4459 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
4461 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
4463 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
4465 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
4467 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
4469 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
4471 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
4472 * include/ext/pb_ds/trie_policy.hpp: Likewise.
4473 * include/ext/rope: Likewise.
4474 * include/ext/slist: Likewise.
4475 * include/ext/vstring.h: Likewise.
4476 * include/profile/array: Likewise.
4477 * include/std/array: Likewise.
4478 * include/tr1/array: Likewise.
4479 * include/tr1/hashtable.h: Likewise.
4480 * include/tr1/regex: Likewise.
4481 * include/tr2/dynamic_bitset: Likewise.
4482 * include/bits/alloc_traits.h: Add nodiscard attribute to
4484 * include/experimental/memory_resource: Likewise.
4485 * include/ext/alloc_traits.h: Likewise.
4486 * include/ext/array_allocator.h: Likewise.
4487 * include/ext/bitmap_allocator.h: Likewise.
4488 * include/ext/debug_allocator.h: Likewise.
4489 * include/ext/extptr_allocator.h: Likewise.
4490 * include/ext/mt_allocator.h: Likewise.
4491 * include/ext/new_allocator.h: Likewise.
4492 * include/ext/pool_allocator.h: Likewise.
4493 * include/ext/throw_allocator.h: Likewise.
4494 * include/std/scoped_allocator: Likewise.
4495 * libsupc++/eh_alloc.cc: Likewise.
4496 * include/std/future: Add nodiscard attribute to async.
4497 * libsupc++/new: Add nodiscard attribute to new.
4499 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
4504 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
4505 * include/bits/shared_ptr.h
4506 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
4507 (allocate_shared): Change to use new tag type.
4508 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
4509 Declare new member function.
4510 (_Sp_alloc_shared_tag): Define new type.
4511 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
4512 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
4513 _Sp_make_shared_tag::_S_eq to check type_info.
4514 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
4515 Constrain to prevent being called with _Sp_alloc_shared_tag.
4516 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
4517 Replace constructor with ...
4518 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
4519 reference parameter so address of the new object can be returned to
4520 the caller. Obtain the allocator from the tag type.
4521 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
4522 constructor with ...
4523 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
4524 to the __shared_count constructor.
4525 (__allocate_shared): Change to use new tag type.
4526 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
4528 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
4530 * src/c++17/fs_ops.cc
4531 (equivalent(const path&, const path&, error_code&))
4532 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
4533 compare files instead of relying on incomplete info returned by stat.
4536 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
4537 if the path is already absolute.
4538 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
4539 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
4542 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
4543 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
4544 of filesystem::exists.
4545 (create_directories(const path&, error_code&)): Add assertions.
4546 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
4547 Add workaround for bug in _wstat for paths with trailing slash.
4548 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
4549 for expected behaviour on mingw.
4550 * testsuite/experimental/filesystem/operations/create_directories.cc:
4552 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
4553 "TMP" instead of "TMPDIR" and clean environment before each test. Do
4554 not test permissions on mingw targets.
4556 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
4558 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
4559 constructors and open members taking wide strings. Fix patterns for
4560 filesystem::path members to match wstring_view parameters. Add
4561 exports for shared_ptr members used by directory iterators.
4562 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
4563 error code parameter if the file doesn't exist.
4564 * src/filesystem/ops.cc (remove(const path&, error_code&)):
4566 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
4567 values for mingw targets, where "/" is not an absolute path. Do not
4568 test symlinks on mingw targets.
4569 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4570 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
4572 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4573 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
4574 that each component of the path is created.
4575 * testsuite/experimental/filesystem/operations/create_directories.cc:
4577 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
4578 permissions on mingw targets.
4579 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4580 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4581 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4582 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
4584 * testsuite/experimental/filesystem/operations/permissions.cc:
4586 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
4587 symlinks or permissions on mingw targets.
4588 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4589 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
4590 symlinks on mingw targets.
4591 * testsuite/experimental/filesystem/operations/remove_all.cc:
4593 * testsuite/27_io/filesystem/operations/status.cc: Do not test
4594 permissions on mingw targets.
4595 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
4596 test symlinks on mingw targets.
4597 * testsuite/experimental/filesystem/operations/space.cc: Fix test
4600 2019-02-14 Ulrich Drepper <drepper@redhat.com>
4603 Warn about unused comparisons of shared_ptr/unique_ptr
4604 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
4605 * include/bits/shared_ptr.h: Use it for operator ==, !=,
4606 <, <=, >, >= for shared_ptr.
4607 * include/bits/unique_ptr.h: Likewise for unique_ptr.
4609 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
4611 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
4612 as 201611L, because P0497R0 changes are supported.
4613 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
4615 * include/bits/erase_if.h [__cplusplus > 201703L]
4616 (__cpp_lib_erase_if): Only define for C++2a.
4617 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4618 (__cpp_lib_null_iterators): Define.
4619 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
4620 (__cpp_lib_null_iterators): Define.
4621 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
4623 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
4625 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
4627 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
4628 changes are supported.
4629 * include/std/optional (__cpp_lib_optional): Likewise.
4630 * include/std/variant (__cpp_lib_variant): Likewise.
4631 * include/std/version [!__STRICT_ANSI__]
4632 (__cpp_lib_uncaught_exceptions): Define as long integer.
4633 [__cplusplus >= 201703L] (__cpp_lib_any)
4634 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
4635 (__cpp_lib_variant): Define for C++17.
4636 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
4638 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
4641 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
4643 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
4647 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
4649 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
4652 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4654 * doc/xml/manual/intro.xml: Include new section.
4655 * doc/xml/manual/status_cxx2017.xml: Document more
4656 implementation-defined properties of the library.
4657 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
4658 * doc/html/*: Regenerate.
4660 * include/bits/refwrap.h [__cplusplus > 201703L]
4661 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
4662 (_Reference_wrapper_base_memfun): Do not define for C++2a.
4663 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
4665 (reference_wrapper::operator()): Add static assertion.
4666 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
4668 * include/std/chrono (duration_values::zero(), duration_values::min())
4669 (duration_values::max()): Add noexcept.
4670 (duration::zero(), duration::min(), duration::max()): Likewise.
4671 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
4672 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
4673 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
4675 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
4677 2019-01-11 Jakub Jelinek <jakub@redhat.com>
4679 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
4680 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
4682 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
4685 * include/bits/functional_hash.h (hash<nullptr_t>): Define
4686 specialization for C++17 (P0513R0, LWG 2817).
4687 * testsuite/20_util/hash/nullptr.cc: New test.
4690 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
4691 pattern for std::basic_stringbuf::str().
4693 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
4694 basic_ostream::operator<< patterns.
4696 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4698 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
4699 test failures on targets with 32-bit time_t.
4701 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
4702 * include/std/deque: Likewise.
4703 * include/std/forward_list: Likewise.
4704 * include/std/list: Likewise.
4705 * include/std/string: Likewise.
4706 * include/std/vector: Likewise.
4707 * include/std/version: Likewise.
4708 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
4709 * testsuite/23_containers/deque/erasure.cc: Likewise.
4710 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4711 * testsuite/23_containers/list/erasure.cc: Likewise.
4712 * testsuite/23_containers/map/erasure.cc: Likewise.
4713 * testsuite/23_containers/set/erasure.cc: Likewise.
4714 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4715 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4716 * testsuite/23_containers/vector/erasure.cc: Likewise.
4718 * include/experimental/internet [AI_NUMERICSERV]
4719 (resolver_base::numeric_service): Define conditionally.
4720 * testsuite/experimental/net/internet/resolver/base.cc: Test it
4722 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4725 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
4726 Jonathan Wakely <jwakely@redhat.com>
4729 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
4730 (GLIBCXX_3.4.26): Add new exports.
4731 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
4732 correct list of sources.
4733 * include/Makefile.in: Regenerate.
4734 * include/std/ostream (operator<<(nullptr_t)): New member function.
4735 * src/c++17/ostream-inst.cc: New file.
4736 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
4739 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
4741 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
4742 of the source file containing the caller.
4743 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
4744 directories created by test.
4745 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4747 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4749 * testsuite/experimental/filesystem/iterators/
4750 recursive_directory_iterator.cc: Likewise.
4752 2019-01-10 Jakub Jelinek <jakub@redhat.com>
4754 PR tree-optimization/88775
4755 * include/bits/stl_function.h (greater<_Tp*>::operator(),
4756 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
4757 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
4758 instead of __builtin_constant_p if available. Don't bother with
4759 the pointer comparison in C++11 and earlier.
4761 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
4765 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
4768 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
4770 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
4771 for filesystem::path. Give variables more distinctive names.
4773 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
4774 member function to perform non-trivial assignment.
4775 (_Optional_payload_base::_M_move_assign): Likewise.
4776 (_Optional_payload<T, true, false, true>::operator=)
4777 (_Optional_payload<T, true, true, false>::operator=)
4778 (_Optional_payload<T, true, false, false>::operator=): Call
4779 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
4782 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
4783 test std::complex<long double> if long double format is IBM128.
4784 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
4787 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4789 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
4790 for old std::unique_ptr layout.
4791 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
4792 to become valueless. Add filesystem::path tests.
4795 * include/std/optional (_Optional_payload_base): New class template
4796 for common code hoisted from _Optional_payload specializations. Use
4797 a template for the union, to allow a partial specialization for
4798 types with non-trivial destructors. Add constructors for in-place
4799 initialization to the union.
4800 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
4801 to perform non-trivial copy construction, instead of relying on
4802 non-standard copy elision in a delegating constructor.
4803 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
4804 non-trivial move construction.
4805 (_Optional_payload): Derive from _Optional_payload_base and use it
4806 for everything except the non-trivial assignment operators, which are
4808 (_Optional_payload<false, C, M>): Derive from the specialization
4809 _Optional_payload<true, false, false> and add a destructor.
4810 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
4811 Forward to corresponding members of _Optional_payload.
4812 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
4813 Hoist common members from _Optional_base.
4814 (_Optional_base): Make all members and base class public.
4815 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
4816 _Optional_base_impl.
4817 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
4818 support for new std::optional layout.
4819 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
4822 * include/bits/locale_conv.h: Use <> for includes not "".
4823 * include/ext/random: Likewise.
4824 * include/ext/vstring.h: Likewise.
4826 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4828 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
4829 (GLIBCXX_3.4.21): Likewise.
4831 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
4834 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
4835 to match the one that controls whether utimbuf and utime are declared.
4837 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
4840 * include/bits/char_traits.h (char_traits::move): Do not pass null
4841 pointers to memmove.
4842 * include/bits/locale_facets.h
4843 (ctype<char>::widen(const char*, const char*, char*)): Do not
4844 pass null pointers to memcpy.
4845 (ctype<char>::narrow(const char*, const char*, char, char*)):
4847 (ctype<char>::do_widen(const char*, const char*, char*)):
4849 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
4852 * doc/xml/manual/spine.xml: Update copyright years.
4853 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
4854 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
4855 for C++17 filesystem library.
4856 * doc/html/*: Regenerate.
4858 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
4859 * config.h.in: Regenerate.
4860 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
4861 alphabetically and add missing entries for copy_symlink,
4862 hard_link_count, rename, and resize_file.
4863 * configure: Regenerate.
4864 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
4865 used unconditionally.
4866 * src/filesystem/ops-common.h (__gnu_posix::truncate)
4867 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
4868 supports truncating to zero length.
4869 * testsuite/27_io/filesystem/operations/all.cc: New test.
4870 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
4872 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
4875 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
4876 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
4877 * config.h.in: Regenerate.
4878 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
4879 remaining std::filesystem types and functions.
4880 * configure: Regenerate.
4881 * src/c++17/Makefile.am: Add C++17 filesystem sources.
4882 * src/c++17/Makefile.in: Regenerate.
4883 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
4884 here, and change name of included file.
4885 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
4886 here, and change name of included file.
4887 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
4888 path to dir-common.h.
4889 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
4890 path to ops-common.h. Disable -Wunused-parameter warnings.
4891 (internal_file_clock): Define unconditionally.
4892 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
4894 (do_copy_file, do_space): Move definitions to ops.common.h.
4895 (copy, file_size, hard_link_count, last_write_time, space): Only
4896 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
4898 (last_write_time, read_symlink): Remove unused attributes from
4900 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
4901 * src/filesystem/Makefile.in: Regenerate.
4902 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
4903 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
4904 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
4905 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
4906 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
4907 dummy types and functions instead of using #error.
4908 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
4909 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
4911 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
4912 (do_copy_file, do_space): Move definitions here from std-ops.cc.
4913 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
4914 to account for new namespace.
4915 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
4916 -lstdc++fs from dg-options.
4917 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
4918 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
4919 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
4920 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
4921 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
4923 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
4924 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4926 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
4927 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
4928 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
4929 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4930 * testsuite/27_io/filesystem/operations/create_directories.cc:
4932 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
4933 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
4934 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
4935 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
4936 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
4937 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
4938 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
4939 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
4940 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
4941 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
4942 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
4943 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
4944 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
4945 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
4946 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
4947 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
4948 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4949 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
4951 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
4955 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
4956 typeinfo and vtables less greedy.
4957 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
4958 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
4959 * src/c++17/Makefile.in: Regenerate.
4960 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
4961 here, and change name of included file.
4962 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
4963 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
4965 * src/filesystem/Makefile.in: Regenerate.
4966 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
4967 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
4968 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
4969 from dg-options and remove dg-require-filesystem-ts.
4970 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
4971 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
4972 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
4973 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
4974 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4975 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4976 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4977 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
4978 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
4979 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
4980 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
4981 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
4982 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
4983 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
4984 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
4985 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
4986 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
4987 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
4988 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
4989 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
4990 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
4992 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
4993 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
4994 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
4995 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
4996 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
4997 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
4998 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
4999 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
5000 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
5001 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
5002 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
5003 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
5005 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
5007 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5009 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
5011 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
5012 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
5013 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
5014 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
5015 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
5016 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
5017 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
5018 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
5019 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
5020 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
5022 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
5023 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
5024 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
5025 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
5026 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
5029 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
5030 Check is_trivially_copyable instead of is_scalar.
5031 (variant::emplace<N, Args>(Args&&...)): If construction of the new
5032 contained value can throw and its type is trivially copyable then
5033 construct into a temporary variant and move from it, to provide the
5034 strong exception safety guarantee.
5035 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
5037 * testsuite/20_util/variant/87431.cc: New test.
5038 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
5039 conversion causes valueless state.
5042 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
5043 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
5044 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
5045 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
5046 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
5048 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
5050 * include/bits/fs_fwd.h (__file_clock): Define new clock.
5051 (file_time_type): Redefine in terms of __file_clock.
5052 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
5054 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
5056 (internal_file_lock): New helper type for accessing __file_clock.
5057 (do_copy_file): Use internal_file_lock to convert system time to
5059 (last_write_time(const path&, error_code&)): Likewise.
5060 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
5062 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
5064 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
5065 for const member functions of std::basic_string.
5066 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
5068 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
5069 Make non-standard constructor private.
5070 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
5072 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
5073 explicit instantiations for C++17 as well as earlier dialects.
5074 * src/c++17/Makefile.am: Add new source files.
5075 * src/c++17/Makefile.in: Regenerate.
5076 * src/c++17/cow-string-inst.cc: New file defining explicit
5077 instantiations for basic_string member functions added in C++17.
5078 * src/c++17/string-inst.cc: Likewise.
5080 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
5081 copy/move constructors for old std::basic_string.
5082 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
5083 (basic_string::reference, basic_string::const_reference): Define
5084 as plain references for C++11 and later.
5085 (basic_string::basic_string()): Put constructor body outside
5086 preprocessor conditional groups.
5087 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
5088 instead of copying it.
5089 (basic_string::basic_string(const basic_string&, const _Alloc&)):
5091 (basic_string::basic_string(basic_string&&, const _Alloc&)):
5093 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
5094 cases for old basic_string.
5095 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
5096 allocator-extended constructors unconditionally. Add extra members to
5097 allocator type when using old string ABI.
5098 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
5100 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
5102 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
5103 -fno-inline added to test flags.
5105 * testsuite/21_strings/basic_string/requirements/
5106 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
5108 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
5109 assertion failures with old std::string ABI.
5111 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
5113 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
5114 functions that will only erase elements at the end.
5115 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
5116 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
5117 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
5119 (path::_List::pop_back()): Define.
5120 (path::_List::_M_erase_from(const_iterator)): Define.
5121 (path::operator/=(const path&)): Use pop_back to remove last component
5122 and _M_erase_from to remove multiple components.
5123 (path::_M_append(basic_string_view<value_type>)): Likewise.
5124 (path::operator+=(const path&)): Likewise.
5125 (path::_M_concat(basic_string_view<value_type>)): Likewise.
5126 (path::remove_filename()): Likewise.
5127 (path::lexically_normal()): Use _List::_Impl iterators instead of
5128 path::iterator. Use pop_back to remove components from the end. Clear
5129 trailing filename, instead of using erase(const_iterator) to remove
5130 a non-final component.
5131 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
5133 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
5135 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
5136 incorrect treatment of empty filename after trailing slash.
5137 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
5139 * testsuite/21_strings/basic_string/modifiers/assign/char/
5140 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
5142 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
5143 move_assign_optim.cc: Likewise.
5145 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5146 Jakub Jelinek <jakub@redhat.com>
5149 * include/experimental/memory: Replace UTF-8 quote characters.
5150 * include/std/future: Replace UTF-8 "em dash" characters.
5152 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
5155 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
5156 * include/debug/forward_list: Likewise.
5157 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
5159 * include/experimental/chrono: Likewise.
5160 * include/experimental/functional: Likewise.
5161 * include/experimental/ratio: Likewise.
5162 * include/experimental/system_error: Likewise.
5163 * include/experimental/tuple: Likewise.
5164 * include/experimental/type_traits: Likewise.
5165 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
5166 * include/parallel/multiseq_selection.h: Likewise.
5169 * config/abi/pre/gnu.ver: Add missing exports.
5170 * testsuite/22_locale/collate_byname/88681.cc: New test.
5171 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
5172 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
5174 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
5176 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
5177 initializer_list<value_type> and from input iterator ranges.
5178 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5180 * testsuite/experimental/string_view/element_access/char/empty.cc:
5181 Fix year range in copyright header.
5183 2019-01-02 Joel Brobecker <brobecker@adacore.com>
5185 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5186 Fix year range in copyright header.
5188 2019-01-01 Jakub Jelinek <jakub@redhat.com>
5190 Update copyright years.
5192 Copyright (C) 2019 Free Software Foundation, Inc.
5194 Copying and distribution of this file, with or without modification,
5195 are permitted in any medium without royalty provided the copyright
5196 notice and this notice are preserved.