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