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