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