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