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