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