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