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