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