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