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