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