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