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