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