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