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