Revert ABI changes to std::allocator in C++20
[gcc.git] / libstdc++-v3 / ChangeLog
1 2019-10-24 Jonathan Wakely <jwakely@redhat.com>
2
3 * include/bits/allocator.h (allocator<void>): Restore the explicit
4 specialization for C++20, but make its API consistent with the primary
5 template.
6 (allocator::~allocator()): Restore the destructor for C++20, but make
7 it constexpr.
8 * testsuite/20_util/allocator/rebind_c++20.cc: Check allocator<void>.
9 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: Likewise.
10 * testsuite/20_util/allocator/void.cc: Check that constructors and
11 destructors are trivial. Check for converting constructor in C++20.
12 * testsuite/ext/malloc_allocator/variadic_construct.cc: Simplify
13 dejagnu target selector.
14 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
15
16 * include/experimental/executor (__use_future_ct, use_future_t):
17 Define partial specializations for std::allocator.
18 (__use_future_ch): Overload constructor for completion tokens using
19 std::allocator.
20
21 PR libstdc++/88338 Implement P0898R3, C++20 concepts library
22 * doc/xml/manual/status_cxx2020.xml: Update status.
23 * doc/html/*: Regenerate.
24 * testsuite/std/concepts/1.cc: New test.
25 * testsuite/std/concepts/2.cc: New test.
26
27 * include/bits/random.h (uniform_random_bit_generator): Define for
28 C++20.
29 * testsuite/26_numerics/random/concept.cc: New test.
30 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
31
32 2019-10-23 Jonathan Wakely <jwakely@redhat.com>
33
34 * include/std/functional (invoke): Add constexpr for C++20.
35 * include/std/version (__cpp_lib_constexpr_invoke): Define.
36 * testsuite/20_util/function_objects/invoke/constexpr.cc: New test.
37
38 PR c++/91369 Implement P0784R7 changes to allocation and construction
39 * include/bits/alloc_traits.h: Include <bits/stl_construct.h>.
40 (allocator_traits::_S_allocate, allocator_traits::_S_construct)
41 (allocator_traits::_S_destroy, allocator_traits::_S_max_size)
42 (allocator_traits::_S_select, allocator_traits::allocate)
43 (allocator_traits::deallocate, allocator_traits::construct)
44 (allocator_traits::destroy, allocator_traits::max_size)
45 (allocator_traits::select_on_container_copy_construction)
46 (allocator_traits<allocator<T>>): Add constexpr specifier for C++20.
47 (allocator_traits<allocator<T>>::construct): Use construct_at.
48 (allocator_traits<allocator<T>>::destroy): Use destroy_at.
49 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Add constexpr
50 specifier.
51 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
52 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move here
53 from <bits/stl_construct.h>.
54 * include/bits/allocator.h (allocator::~allocator): Remove for C++20.
55 (allocator::allocate, allocate::deallocate): Define for C++20 and up.
56 (operator==, operator!=): Add constexpr specifier for C++20.
57 * include/bits/stl_construct.h: Don't include <ext/alloc_traits.h>.
58 (destroy_at): For C++20 add constexpr specifier and support for
59 destroying arrays.
60 (construct_at): Define new function for C++20.
61 (_Construct): Return result of placement new-expression. For C++11 and
62 up add constexpr. For C++20 dispatch to std::construct_at during
63 constant evaluation.
64 (_Destroy(pointer)): Add constexpr specifier. For C++20 dispatch to
65 std::destroy_at during constant evaluation.
66 (_Destroy_aux::__destroy, _Destroy_n_aux::__destroy_n): Add constexpr
67 specifier for C++20.
68 (_Destroy(ForwardIterator, ForwardIterator))
69 (_Destroy(ForwardIterator, Size)): Likewise. Do not elide trivial
70 destructors during constant evaluation.
71 (destroy, destroy_n): Add constexpr specifier for C++20.
72 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
73 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move to
74 <bits/alloc_traits.h>, to remove dependency on allocators.
75 * include/bits/stl_uninitialized.h: Include <ext/alloc_traits.h>.
76 Include <bits/stl_pair.h> instead of <utility>.
77 * include/ext/alloc_traits.h: Always include <bits/alloc_traits.h>.
78 (__alloc_traits::construct, __alloc_traits::destroy)
79 (__alloc_traits::_S_select_on_copy, __alloc_traits::_S_on_swap): Add
80 constexpr specifier.
81 * include/ext/malloc_allocator.h (operator==, operator!=): Add
82 constexpr specifier for C++20.
83 * include/ext/new_allocator.h (operator==, operator!=): Likewise.
84 * testsuite/20_util/headers/memory/synopsis.cc: Add constexpr.
85 * testsuite/20_util/scoped_allocator/69293_neg.cc: Ignore additional
86 errors due to constexpr function called after failed static_assert.
87 * testsuite/20_util/specialized_algorithms/construct_at/1.cc: New test.
88 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
89 Ignore additional errors due to constexpr function called after failed
90 static_assert.
91 * testsuite/23_containers/vector/cons/destructible_neg.cc: Likewise.
92
93 * testsuite/20_util/bind/91371.cc: Fix test to compile as C++11.
94
95 * include/debug/helper_functions.h (__valid_range): Change
96 _GLIBCXX_CONSTEXPR to _GLIBCXX14_CONSTEXPR.
97
98 * include/ext/throw_allocator.h (throw_allocator_base): Qualify
99 size_t and ptrdiff_t.
100
101 * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp:
102 Use detail::rebind_traits.
103 * include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp:
104 Likewise.
105 * include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Likewise.
106 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise.
107 * include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp: Likewise.
108 * include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp: Likewise.
109 * include/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp:
110 Likewise.
111 * include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp:
112 Likewise.
113 * include/ext/pb_ds/detail/branch_policy/branch_policy.hpp: Likewise.
114 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Likewise.
115 * include/ext/pb_ds/detail/cond_dealtor.hpp: Likewise.
116 * include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp (has_eq_fn): Likewise.
117 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Likewise.
118 * include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp: Likewise.
119 * include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Likewise.
120 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
121 left_child_next_sibling_heap_.hpp: Likewise.
122 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp:
123 Likewise.
124 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
125 point_const_iterator.hpp: Likewise.
126 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Likewise.
127 * include/ext/pb_ds/detail/ov_tree_map_/
128 constructors_destructor_fn_imps.hpp: Likewise.
129 * include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Likewise.
130 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Likewise.
131 * include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Likewise.
132 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Likewise.
133 * include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Likewise.
134 * include/ext/pb_ds/detail/rb_tree_map_/node.hpp: Likewise.
135 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Likewise.
136 * include/ext/pb_ds/detail/splay_tree_/node.hpp: Likewise.
137 * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Likewise.
138 * include/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp:
139 Likewise.
140 * include/ext/pb_ds/detail/type_utils.hpp: Fix typo in comment.
141 * include/ext/pb_ds/detail/types_traits.hpp (stored_value): Add
142 bool parameter to control whether the hash value is stored.
143 (select_base_type): New class template and partial specialization.
144 (maybe_null_type): Likewise.
145 (rebind_traits): New class template.
146 (type_base): Remove four nearly identical specializations.
147 (type_dispatch): Remove.
148 (type_traits): Use select_base_type and maybe_null_type instead of
149 type_base to control differences between specializations.
150 * include/ext/pb_ds/list_update_policy.hpp: Use detail::rebind_traits.
151 * include/ext/pb_ds/priority_queue.hpp: Likewise.
152 * include/ext/pb_ds/tree_policy.hpp: Likewise.
153 * include/ext/pb_ds/trie_policy.hpp: Likewise.
154
155 * include/backward/hash_set (hash_set): Use __alloc_traits.
156 * include/backward/hashtable.h (_Hashtable): Likewise.
157 * include/ext/alloc_traits.h (__alloc_traits::allocate): Add overload
158 taking a hint.
159 * include/ext/extptr_allocator.h (_ExtPtr_allocator::allocate): Ignore
160 hint.
161 * include/ext/slist (_Slist_base): Use __alloc_traits.
162 * include/tr1/hashtable.h (_Hashtable): Likewise.
163 * include/tr1/regex (match_results): Use vector::const_reference
164 instead of assuming the allocator defines it.
165 * testsuite/backward/hash_map/23528.cc: Use allocator_traits in C++11.
166 * testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc: Use
167 __gnu_test::max_size.
168 * testsuite/tr1/6_containers/unordered_multimap/capacity/
169 29134-multimap.cc: Likewise.
170 * testsuite/tr1/6_containers/unordered_multiset/capacity/
171 29134-multiset.cc: Likewise.
172 * testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc:
173 Likewise.
174
175 2019-10-22 Jonathan Wakely <jwakely@redhat.com>
176
177 * testsuite/util/testsuite_abi.h: Restore use of tr1/unordered_map
178 when compiled as C++98.
179
180 * include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
181 * testsuite/17_intro/names.cc: Check uses_allocator in C++98.
182
183 * include/bits/alloc_traits.h
184 (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20.
185 (allocator_traits<allocator<T>>::construct): Perform placement new
186 directly for C++20, instead of calling allocator<T>::construct.
187 (allocator_traits<allocator<T>>::destroy): Call destructor directly
188 for C++20, instead of calling allocator<T>::destroy.
189 (allocator_traits<allocator<T>>::max_size): Return value directly
190 for C++20, instead of calling std::allocator<T>::max_size().
191 (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not
192 define for C++17 and up.
193 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr
194 for C++17 and up, instead of tag dispatching.
195 * include/bits/allocator.h (allocator<void>): Remove for C++20.
196 (allocator::pointer, allocator::const_pointer, allocator::reference)
197 (allocator::const_reference, allocator::rebind): Remove for C++20.
198 * include/bits/basic_string.h (basic_string): Use __alloc_traits to
199 rebind allocator.
200 * include/bits/memoryfwd.h (allocator<void>): Remove for C++20.
201 * include/ext/debug_allocator.h: Use __alloc_traits for rebinding.
202 * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator)
203 (malloc_allocator::pointer, malloc_allocator::const_pointer)
204 (malloc_allocator::reference, malloc_allocator::const_reference)
205 (malloc_allocator::rebind, malloc_allocator::max_size)
206 (malloc_allocator::construct, malloc_allocator::destroy): Do not
207 define for C++20.
208 (malloc_allocator::_M_max_size): Define new function.
209 * include/ext/new_allocator.h (new_allocator::~new_allocator)
210 (new_allocator::pointer, new_allocator::const_pointer)
211 (new_allocator::reference, new_allocator::const_reference)
212 (new_allocator::rebind, new_allocator::max_size)
213 (new_allocator::construct, new_allocator::destroy): Do not
214 define for C++20.
215 (new_allocator::_M_max_size): Define new function.
216 * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use
217 __alloc_traits to rebind allocator.
218 * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise.
219 (rope::rope(CharT, const allocator_type&)): Use __alloc_traits
220 to construct character.
221 * include/ext/slist (_Slist_base): Use __alloc_traits to rebind
222 allocator.
223 * include/ext/sso_string_base.h (__sso_string_base::_M_max_size):
224 Use __alloc_traits.
225 * include/ext/throw_allocator.h (throw_allocator): Do not use optional
226 members of std::allocator, use __alloc_traits members instead.
227 * include/ext/vstring.h (__versa_string): Use __alloc_traits.
228 * include/ext/vstring_util.h (__vstring_utility): Likewise.
229 * include/std/memory: Include <bits/alloc_traits.h>.
230 * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size.
231 * testsuite/20_util/allocator/rebind_c++20.cc: New test.
232 * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check
233 for pointer, const_pointer, reference, const_reference or rebind in
234 C++20.
235 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test.
236 * testsuite/23_containers/deque/capacity/29134.cc: Use
237 __gnu_test::max_size.
238 * testsuite/23_containers/forward_list/capacity/1.cc: Likewise.
239 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
240 * testsuite/23_containers/map/capacity/29134.cc: Likewise.
241 * testsuite/23_containers/multimap/capacity/29134.cc: Likewise.
242 * testsuite/23_containers/multiset/capacity/29134.cc: Likewise.
243 * testsuite/23_containers/set/capacity/29134.cc: Likewise.
244 * testsuite/23_containers/vector/capacity/29134.cc: Likewise.
245 * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run
246 test for C++20.
247 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
248 * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size.
249 * testsuite/util/replacement_memory_operators.h: Do not assume
250 Alloc::pointer exists.
251 * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define
252 helper to call max_size for any allocator.
253
254 2019-10-22 Andreas Schwab <schwab@suse.de>
255
256 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
257
258 2019-10-18 Jonathan Wakely <jwakely@redhat.com>
259
260 PR libstdc++/92143
261 * libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment
262 to at least sizeof(void*).
263
264 * include/bits/range_cmp.h (ranges::less::operator()): Inline the
265 logic from std::less::operator() to remove the dependency on it.
266
267 2019-10-17 Jonathan Wakely <jwakely@redhat.com>
268
269 * doc/doxygen/user.cfg.in (INPUT): Add new C++17 and C++20 headers.
270
271 * include/Makefile.am: Add new header.
272 * include/Makefile.in: Regenerate.
273 * include/bits/range_cmp.h: New header for C++20 function objects.
274 * include/std/functional: Include new header.
275 * testsuite/20_util/function_objects/identity/1.cc: New test.
276 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: New test.
277 * testsuite/20_util/function_objects/range.cmp/greater.cc: New test.
278 * testsuite/20_util/function_objects/range.cmp/greater_equal.cc: New
279 test.
280 * testsuite/20_util/function_objects/range.cmp/less.cc: New test.
281 * testsuite/20_util/function_objects/range.cmp/less_equal.cc: New test.
282 * testsuite/20_util/function_objects/range.cmp/not_equal_to.cc: New
283 test.
284
285 PR libstdc++/92124
286 * include/bits/forward_list.h
287 (_M_move_assign(forward_list&&, false_type)): Do not use
288 __make_move_if_noexcept, instead move unconditionally.
289 * include/bits/stl_deque.h (_M_move_assign2(deque&&, false_type)):
290 Likewise.
291 * include/bits/stl_list.h (_M_move_assign(list&&, false_type)):
292 Likewise.
293 * include/bits/stl_vector.h (_M_move_assign(vector&&, false_type)):
294 Likewise.
295 * testsuite/23_containers/vector/92124.cc: New test.
296
297 2019-10-16 Jonathan Wakely <jwakely@redhat.com>
298
299 * include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to
300 one of __is_same_as or __is_same when available.
301 * include/std/concepts (__detail::__same_as): Use std::is_same_v.
302 * include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]:
303 Use new macro instead of __is_same_as.
304 (is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial
305 specialization.
306 (is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro.
307 (is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same.
308
309 2019-10-16 François Dumont <fdumont@gcc.gnu.org>
310
311 * src/c++11/debug.cc (print_field): Replace constness_names <unknown>
312 entry with <unknown constness>. Replace state_names <unknown> entry with
313 <unknown state>.
314
315 2019-10-11 Jonathan Wakely <jwakely@redhat.com>
316
317 * include/Makefile.am: Add new header.
318 * include/Makefile.in: Regenerate.
319 * include/precompiled/stdc++.h: Include <concepts>.
320 * include/std/concepts: New header for C++20.
321 * include/std/version (__cpp_lib_concepts): Define.
322 * scripts/create_testsuite_files: Look for test files in new std
323 directory.
324 * testsuite/libstdc++-dg/conformance.exp: Likewise.
325 * testsuite/std/concepts/concepts.callable/invocable.cc: New test.
326 * testsuite/std/concepts/concepts.callable/regular_invocable.cc: New
327 test.
328 * testsuite/std/concepts/concepts.callable/relation.cc: New test.
329 * testsuite/std/concepts/concepts.callable/strictweakorder.cc: New
330 test.
331 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
332 floating_point.cc: New test.
333 * testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc:
334 New test.
335 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
336 signed_integral.cc: New test.
337 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
338 unsigned_integral.cc: New test.
339 * testsuite/std/concepts/concepts.lang/concept.assignable/1.cc: New
340 test.
341 * testsuite/std/concepts/concepts.lang/concept.common/1.cc: New test.
342 * testsuite/std/concepts/concepts.lang/concept.commonref/1.cc: New
343 test.
344 * testsuite/std/concepts/concepts.lang/concept.constructible/1.cc:
345 New test.
346 * testsuite/std/concepts/concepts.lang/concept.convertible/1.cc:
347 New test.
348 * testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc:
349 New test.
350 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/
351 1.cc: New test.
352 * testsuite/std/concepts/concepts.lang/concept.derived/1.cc:
353 New test.
354 * testsuite/std/concepts/concepts.lang/concept.destructible/1.cc:
355 New test.
356 * testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc:
357 New test.
358 * testsuite/std/concepts/concepts.lang/concept.same/1.cc:
359 New test.
360 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
361 New test.
362 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
363 New test.
364 * testsuite/std/concepts/concepts.lang/concept.swappable/
365 swappable_with.cc: New test.
366 * testsuite/std/concepts/concepts.object/copyable.cc: New test.
367 * testsuite/std/concepts/concepts.object/movable.cc: New test.
368 * testsuite/std/concepts/concepts.object/regular.cc: New test.
369 * testsuite/std/concepts/concepts.object/semiregular.cc: New test.
370
371 * include/std/type_traits (is_same): Replace partial specialization
372 by using __is_same_as built-in in primary template.
373 (is_same_v): Use __is_same_as built-in instead of instantiating the
374 is_same trait.
375
376 PR libstdc++/92059
377 * include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
378 special member functions as defaulted. Add noexcept to most members.
379 (__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)):
380 Mask off unwanted bits in the __val parameter. Avoid undefined left
381 shifts.
382 (__dynamic_bitset_base::_M_assign): Remove.
383 (__dynamic_bitset_base::_M_do_reset): Use std::fill.
384 (__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when
385 block_type has lower rank than int.
386 (dynamic_bitset): Add noexcept to most members. Use injected-class-name
387 in return types and parameter types.
388 (dynamic_bitset::_M_Nb): Add default member initializer.
389 (dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as
390 defaulted.
391 (dynamic_bitset(dynamic_bitset&&)): Clear source object after move.
392 (dynamic_bitset::operator=(const dynamic_bitset&)): Define as
393 defaulted.
394 (dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier.
395 Define without using swap, to propagate allocator correctly.
396 (dynamic_bitset(const char*, const _Alloc&)): Use strlen.
397 (dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use
398 casts to avoid unwanted integer promotions.
399 (dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and
400 add default template arguments and default argument to simplify usage.
401 (dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr.
402 (operator==(const dynamic_bitset&, const dynamic_bitset&))
403 (operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb.
404 * include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr):
405 Adjust template parameters to match declaration.
406 * testsuite/tr2/dynamic_bitset/cmp.cc: New test.
407 * testsuite/tr2/dynamic_bitset/cons.cc: New test.
408 * testsuite/tr2/dynamic_bitset/copy.cc: New test.
409 * testsuite/tr2/dynamic_bitset/move.cc: New test.
410 * testsuite/tr2/dynamic_bitset/pr92059.cc: New test.
411
412 * include/bits/charconv.h (__to_chars_len): Avoid -Wsign-compare
413 warnings.
414
415 2019-10-10 Jonathan Wakely <jwakely@redhat.com>
416
417 PR libstdc++/91057
418 * src/c++98/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]
419 (find_ldbl_sync_facet): Fix parameter type and missing return.
420
421 2019-10-09 Marek Polacek <polacek@redhat.com>
422
423 PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound.
424 PR c++/69531 - DR 1307: Differently bounded array parameters.
425 PR c++/88128 - DR 330: Qual convs and pointers to arrays of pointers.
426 * testsuite/23_containers/span/lwg3255.cc: Adjust test to match the
427 post-P0388R4 behavior.
428
429 2019-10-09 Jonathan Wakely <jwakely@redhat.com>
430
431 PR libstdc++/91057
432 * src/c++98/locale.cc (locale::id::_M_id()) [__GTHREADS]: Use atomic
433 compare-exchange or double-checked lock to ensure only one thread sets
434 the _M_index variable.
435 [_GLIBCXX_LONG_DOUBLE_COMPAT]: Call find_ldbl_sync_facet to detect
436 facets that share another facet's ID.
437 [_GLIBCXX_LONG_DOUBLE_COMPAT] (find_ldbl_sync_facet): New function.
438
439 PR libstdc++/78552
440 * src/c++98/locale_init.cc (locale::classic()): Do not construct a new
441 locale object for every call.
442 (locale::_S_initialize_once()): Construct C locale here.
443
444 2019-10-08 Jonathan Wakely <jwakely@redhat.com>
445
446 * doc/Makefile.am (doc-html-docbook-regenerate): New target.
447 (${docbook_outdir}/html): Do not create unused 'html/ext' directory.
448 * doc/Makefile.in: Regenerate.
449 * doc/xml/manual/documentation_hacking.xml: Document new target.
450 * doc/html/*: Regenerate.
451
452 * doc/xml/manual/allocator.xml: Use archived copy of CUJ article.
453 * doc/html/*: Regenerate.
454
455 2019-10-06 François Dumont <fdumont@gcc.gnu.org>
456
457 * include/bits/stl_algo.h
458 (__copy_n_a(_IIte, _Size, _OIte)): New.
459 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
460 (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
461 latter.
462 * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
463 std::__copy_n_a friend.
464 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
465 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
466 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
467 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.
468
469 * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define
470 for C++11.
471 (_RequireInputIte): Likewise and use __enable_if_t.
472 * include/std/numeric
473 (__is_random_access_iter): Use __iterator_category_t.
474
475 * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment
476 debug checks.
477 * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New.
478 * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New.
479
480 2019-10-04 François Dumont <fdumont@gcc.gnu.org>
481
482 * include/debug/forward_list
483 (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign
484 distance when not empty.
485 * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size):
486 Likewise.
487 * include/debug/helper_functions.h (__dp_sign_max_size): New
488 _Distance_precision enum entry.
489 (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type,
490 __false_type)): Adapt.
491 * include/debug/safe_iterator.tcc
492 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review
493 distance computation.
494
495 2019-10-04 Jonathan Wakely <jwakely@redhat.com>
496
497 PR libstdc++/81091
498 PR libstdc++/91947
499 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
500 * config.h.in: Regenerate:
501 * configure: Regenerate:
502 * include/Makefile.am (${host_builddir}/largefile-config.h): New
503 target to generate config header for filesystem library.
504 (${host_builddir}/c++config.h): Rename macros for large file support.
505 * include/Makefile.in: Regenerate.
506 * src/c++17/fs_dir.cc: Include new config header.
507 * src/c++17/fs_ops.cc: Likewise.
508 (filesystem::file_size): Use uintmax_t for size.
509 * src/filesystem/dir.cc: Include new config header.
510 * src/filesystem/ops.cc: Likewise.
511 (experimental::filesystem::file_size): Use uintmax_t for size.
512
513 * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
514 std::tr1::unordered_map.
515 * testsuite/util/testsuite_allocator.h: Likewise.
516
517 * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.
518
519 * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
520 __gnu_cxx::__alloc_traits for allocator construct function.
521 (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function.
522
523 * include/precompiled/stdc++.h: Include <span> for C++20.
524 * testsuite/17_intro/names.cc: Do not define 'e' for C++20.
525
526 2019-10-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
527
528 * include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp.
529
530 2019-10-02 Jonathan Wakely <jwakely@redhat.com>
531
532 * config/abi/pre/gnu.ver: Tighten up greedy wildcards.
533
534 * doc/xml/manual/parallel_mode.xml: Add caveat about support for
535 recent standards.
536 * doc/html/*: Regenerate.
537
538 2019-10-01 Jonathan Wakely <jwakely@redhat.com>
539
540 * include/experimental/algorithm (experimental::sample): Qualify call
541 to __sample correctly.
542 * include/parallel/algo.h (sample, for_each_n): Add using-declarations
543 for algorithms that don't have parallel implementations.
544
545 * include/parallel/algobase.h (equal, lexicographical_compare): Add
546 _GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
547 constant evaluated.
548 * include/parallel/algorithmfwd.h (equal, lexicographical_compare):
549 Add _GLIBCXX20_CONSTEXPR.
550
551 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for
552 parallel mode.
553 * testsuite/20_util/hash/84998.cc: Likewise.
554 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise.
555 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise.
556 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
557 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
558 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
559 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
560 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
561 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
562 Likewise.
563 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
564 Likewise.
565 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
566 Likewise.
567 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
568 Likewise.
569 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
570 Likewise.
571 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise.
572 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
573 * testsuite/25_algorithms/copy/86658.cc: Likewise.
574 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
575 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
576 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
577 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
578
579 * include/parallel/algo.h: Replace non-reserved names.
580 * include/parallel/multiway_merge.h: Likewise.
581 * include/parallel/multiway_mergesort.h: Likewise.
582 * include/parallel/numericfwd.h: Likewise.
583 * testsuite/17_intro/names.cc: Add RAI to test macros.
584
585 2019-09-30 François Dumont <fdumont@gcc.gnu.org>
586
587 * include/debug/array: Add C++20 constexpr to comparison operators.
588 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt
589 dg-error line numbers.
590 * testsuite/23_containers/array/tuple_interface/
591 tuple_element_debug_neg.cc: Likewise.
592
593 2019-09-30 Andreas Tobler <andreast@gcc.gnu.org>
594
595 * include/experimental/internet: Include netinet/in.h if we have
596 _GLIBCXX_HAVE_NETINET_IN_H defined.
597
598 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
599 FreeBSD warning about lower advertised precision of tgammal.
600 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
601 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
602 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
603 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
604 * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
605 * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
606 * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
607 * testsuite/tr1/5_numerical_facilities/special_functions/
608 08_cyl_bessel_i/check_nan.cc: Likewise.
609 * testsuite/tr1/5_numerical_facilities/special_functions/
610 09_cyl_bessel_j/check_nan.cc: Likewise.
611 * testuite/tr1/5_numerical_facilities/special_functions/
612 10_cyl_bessel_k/check_nan.cc: Likewise.
613 * testsuite/tr1/5_numerical_facilities/special_functions/
614 11_cyl_neumann/check_nan.cc: Likewise.
615 * testsuite/tr1/5_numerical_facilities/special_functions/
616 21_sph_bessel/check_nan.cc: Likewise.
617 * testsuite/tr1/5_numerical_facilities/special_functions/
618 23_sph_neumann/check_nan.cc: Likewise.
619
620 2019-09-30 Jonathan Wakely <jwakely@redhat.com>
621
622 * include/std/span (span(element_type(&)[N]))
623 (span(array<value_type, N>&), span(const array<value_type, N>&)):
624 Deduce array element type to allow safe const conversions (LWG 3255).
625 [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use
626 remove_cv_t on arguments to __is_std_span and __is_std_array.
627 * testsuite/23_containers/span/lwg3255.cc: New test.
628
629 PR libstdc++/77936
630 * include/parallel/checkers.h (__is_sorted): Remove unused variable.
631
632 2019-09-28 François Dumont <fdumont@gcc.gnu.org>
633
634 * include/bits/stl_algo.h (merge): Fix documentation.
635 * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr.
636 (__check_sorted): Likewise and remove nested irreflexive check.
637 (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr.
638 (__check_partitioned_lower, __check_partitioned_upper): Likewise.
639 (_Irreflexive_checker::_S_is_valid): Likewise.
640 (__is_irreflexive, __is_irreflexive_pred): Likewise.
641 * include/debug/helper_functions.h (__get_distance): Add constexpr.
642 (__valid_range_aux): Add C++20 constexpr.
643 (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)):
644 Likewise and add std::is_constant_evaluated check.
645 (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New.
646 (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New.
647 (__valid_range_aux(_Integral, _Integral, std::__true_type)): New,
648 use latter.
649 (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and
650 __builtin_is_contant_evaludated check..
651 (__can_advance, __base): Add constexpr.
652 * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED]
653 (_GLIBCXX_DEBUG_VERIFY_COND_AT): New.
654 (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive.
655 (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred.
656 * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive
657 std::less.
658 * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
659 * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix
660 lambda to be irreflexive.
661
662 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
663
664 * configure: Regenerate.
665
666 2019-09-27 Jonathan Wakely <jwakely@redhat.com>
667
668 PR libstdc++/91910
669 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer
670 atomically and lock the mutex before accessing the sequence.
671 (_Safe_local_iterator_base::_M_detach()): Likewise.
672 (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
673
674 2019-09-26 Jonathan Wakely <jwakely@redhat.com>
675
676 * include/debug/array (to_array): Define for debug mode.
677
678 * include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to
679 piecewise construction constructor, assignment operators, and swap.
680 * include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)):
681 Add _GLIBCXX20_CONSTEXPR.
682 (pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise.
683 * testsuite/20_util/pair/constexpr_assign.cc: New test.
684 * testsuite/20_util/pair/constexpr_swap.cc: New test.
685
686 * include/experimental/internet (operator==, operator<): Fix loop
687 condition to avoid reading past the end of the array.
688
689 * include/std/array: Remove references to profile mode.
690 * include/std/bitset: Likewise.
691 * include/std/deque: Likewise.
692 * include/std/forward_list: Likewise.
693 * include/std/list: Likewise.
694 * include/std/map: Likewise.
695 * include/std/set: Likewise.
696 * include/std/unordered_map: Likewise.
697 * include/std/unordered_set: Likewise.
698 * include/std/vector: Likewise.
699 * testsuite/17_intro/headers/c++1998/profile_mode.cc: New test.
700 * testsuite/17_intro/headers/c++2011/profile_mode.cc: New test.
701
702 2019-09-25 Jonathan Wakely <jwakely@redhat.com>
703
704 * include/bits/regex.h
705 (basic_regex::assign(const C*, size_t, flag_type)): Add default
706 argument (LWG 3296).
707 * testsuite/28_regex/basic_regex/assign/char/lwg3296.cc: New test.
708 * testsuite/28_regex/basic_regex/assign/wchar_t/lwg3296.cc: New test.
709
710 2019-09-24 Jonathan Wakely <jwakely@redhat.com>
711
712 * include/std/variant (variant::index()): Remove impossible case.
713
714 PR libstdc++/91871
715 * testsuite/util/testsuite_hooks.h
716 (conversion::iterator_to_const_iterator()): Do not return an invalid
717 iterator. Test direct-initialization and direct-list-initialization
718 as well as implicit conversion.
719
720 2019-09-23 Jonathan Wakely <jwakely@redhat.com>
721
722 PR libstdc++/91788 (partial)
723 * include/std/variant (variant::index()): Improve codegen for cases
724 where conversion to size_t already works correctly.
725
726 2019-09-23 Andreas Schwab <schwab@suse.de>
727
728 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
729
730 2019-09-12 Jonathan Wakely <jwakely@redhat.com>
731
732 PR libstdc++/91748
733 * include/bits/stl_algo.h (for_each_n): Fix random access iterator
734 case.
735 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
736 access iterators.
737
738 2019-09-11 Jonathan Wakely <jwakely@redhat.com>
739
740 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
741 Fix syntax error.
742
743 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
744 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
745 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile
746 for C++2a and up.
747
748 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
749
750 * include/std/type_traits (__do_common_type_impl): Implement
751 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20.
752 (basic_common_reference, common_reference, common_reference_t): Define
753 for C++20.
754 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New
755 test.
756 * testsuite/20_util/common_reference/requirements/
757 explicit_instantiation.cc: New test.
758 * testsuite/20_util/common_reference/requirements/typedefs.cc: New
759 test.
760
761 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
762 non-template overloads for each signed and unsigned integer type and
763 char. Define deleted overload for bool (LWG 3266).
764 * testsuite/20_util/to_chars/1_neg.cc: Remove.
765 * testsuite/20_util/to_chars/3.cc: New test.
766 * testsuite/20_util/to_chars/lwg3266.cc: New test.
767
768 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
769
770 * acinclude.m4: Handle uclinux*.
771 * configure: Regenerate.
772 * configure.host: Handle uclinux*
773
774 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
775 Mickaël Guêné <mickael.guene@st.com>
776
777 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
778 support.
779
780 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
781
782 PR libstdc++/91711
783 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
784 0ul being a valid null pointer constant.
785
786 * include/std/type_traits (__remove_cv_t): New alias template.
787 (is_void, is_integral, is_floating_point, is_pointer)
788 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
789 (is_member_point), __is_signed_integer, __is_unsigned_integer)
790 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
791 (__decay_selector): Use __remove_cv_t.
792 (remove_cv): Add partial specializations for cv-qualified types.
793 (__decay_t): New alias template.
794 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
795 __decay_t.
796 (__enable_if_t): Move earlier in the file.
797 (_Require): Use __enable_if_t.
798 (swap(T&, T&)): Use _Require.
799 (swap(T(&)[N])): Use __enable_if_t.
800
801 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
802
803 Implement C++20 p1424 - 'constexpr' feature macro concerns,
804 Issue 3256 - Feature testing macro for constexpr algorithms,
805 and Issue 3257 - Missing feature testing macro update from P0858.
806 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
807 * include/bits/algorithmfwd.h: Ditto.
808 * include/std/utility: Ditto.
809 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
810 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
811 __cpp_lib_constexpr macro in <algorith>.
812 * testsuite/20_util/exchange/constexpr.cc: Add check for
813 __cpp_lib_constexpr macro in <utility>.
814 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
815 __cpp_lib_constexpr_algorithms.
816 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
817 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
818 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
819 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
820 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
821 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
822 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
823 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
824 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
825 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
826 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
827 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
828 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
829 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
830 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
831 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
832 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
833 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
834 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
835 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
836 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
837 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
838 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
839 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
840 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
841 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
842 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
843 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
844 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
845 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
846 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
847 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
848 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
849 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
850 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
851 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
852 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
853 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
854 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
855 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
856 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
857 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
858 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
859 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
860 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
861 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
862 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
863 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
864 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
865 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
866 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
867 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
868 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
869
870 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
871
872 Update docs for recent <span> and constexpr lib changes.
873 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
874 p1023r0, p1085r2 status.
875 * doc/html/manual/status.html: Regenerate.
876
877 2019-09-09 Antony Polukhin <antoshkka@gmail.com>
878
879 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
880 final offsets with constants.
881
882 2019-09-09 Jonathan Wakely <jwakely@redhat.com>
883
884 * include/bits/range_access.h (__adl_to_address): Remove.
885 * include/std/span (__is_base_derived_safe_convertible_v): Replace
886 with span::__is_compatible.
887 (__is_std_array_v): Replace with __is_std_array class template and
888 partial specializations.
889 (__is_std_array, __is_std_span): New class templates and partial
890 specializations.
891 (span::__is_compatible): New alias template for SFINAE constraints.
892 (span::span(element_type (&)[N])): Remove redundant constraints. Do
893 not use __adl_data to obtain a pointer.
894 (span::span(array<value_type, N>&)): Likewise.
895 (span::span(const array<value_type, N>&)): Likewise.
896 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
897 (span::iter_value_t, span::derived_from): New alias templates for
898 SFINAE constraints, until the equivalents are supported in <concepts>
899 and <iterator>.
900 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
901 for SFINAE constraints.
902 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
903 SFINAE constraints.
904 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
905 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
906 Use std::to_address instead of __adl_to_address.
907 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
908 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
909 template for SFINAE constraints.
910 [!_GLIBCXX_P1394] (span::span(Container&))
911 (span::span(const Container&)): Improve constraints.
912 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
913 (span::span(pointer, pointer)): Remove redundant cast of pointer.
914 (span(const span<OType, OExtent>&)): New constructor.
915
916 2019-09-06 Jonathan Wakely <jwakely@redhat.com>
917
918 * include/bits/range_access.h (ssize): Define for C++20.
919 * testsuite/24_iterators/range_access_cpp20.cc: New test.
920 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
921 * doc/html/*: Regenerate.
922
923 2019-09-06 Florian Weimer <fweimer@redhat.com>
924
925 * configure: Regenerate.
926
927 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
928
929 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
930 P1024R3. Remove entry for P0920R2.
931 * include/std/span (__cpp_lib_span): Change value.
932 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
933 constructor.
934 (span): Replace __extent_storage base class with data member.
935 (span::_S_subspan_extent): New function.
936 (span::empty()): Add nodiscard attribute.
937 (span::front, span::back, span::operator[]): Check preconditions.
938 (span::first, span::last, span::subspan): Add noexcept. Improve
939 precondition checks (LWG 3103).
940 (get): Remove redundant condition from static_assert.
941 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
942 (as_writable_bytes): Add inline specifier.
943 * include/std/version (__cpp_lib_span): Change value.
944 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
945 * testsuite/23_containers/span/front_neg.cc: Likewise.
946 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
947 * testsuite/23_containers/span/last_neg.cc: Improve test.
948 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
949 * testsuite/23_containers/span/1.cc: New test.
950 * testsuite/23_containers/span/2.cc: New test.
951 * testsuite/23_containers/span/back_assert_neg.cc: New test.
952 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
953 * testsuite/23_containers/span/first_assert_neg.cc: New test.
954 * testsuite/23_containers/span/first_neg.cc: New test.
955 * testsuite/23_containers/span/front_assert_neg.cc: New test.
956 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
957 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
958 * testsuite/23_containers/span/last_assert_neg.cc: New test.
959 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
960 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
961 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
962 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
963 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
964 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
965
966 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
967
968 * include/Makefile.am: Add <span> header.
969 * include/Makefile.in: Regenerate.
970 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
971 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
972 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
973 New functions for performing argument-dependent lookup of range
974 customization points.
975 * include/bits/stl_iterator.h (__normal_iterator): Add
976 _GLIBCXX20_CONSTEXPR to all functions.
977 * include/std/span: New header.
978 * include/std/version (__cpp_lib_span): Define feature test macro.
979 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
980 * testsuite/23_containers/span/everything.cc: New test.
981 * testsuite/23_containers/span/get_neg.cc: New test.
982 * testsuite/23_containers/span/last_neg.cc: New test.
983 * testsuite/23_containers/span/subspan_neg.cc: New test.
984 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
985 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
986 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
987
988 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
989
990 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
991 * doc/html/*: Regenerate.
992
993 2019-09-04 Mike Crowe <mac@mcrowe.com>
994
995 PR libstdc++/41861
996 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
997 pthread_cond_clockwait function.
998 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
999 * configure: Regenerate.
1000 * config.h.in: Regenerate.
1001 * include/std/condition_variable: (condition_variable): Rename
1002 __steady_clock_t typedef and add system_clock. Change __clock_t to be
1003 a typedef for the preferred clock to convert arbitrary other clocks to.
1004 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
1005 overload.
1006 (wait_until): Change __clock_t overload to use system_clock.
1007 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
1008 steady_clock overload that calls pthread_cond_clockwait.
1009 (__wait_until_impl): Change __clock_t overload to use system_clock.
1010 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
1011 steady_clock for __clock_t if pthread_cond_clockwait is available.
1012
1013 2019-09-04 Mike Crowe <mac@mcrowe.com>
1014
1015 * testsuite/30_threads/condition_variable/members/2.cc (test01):
1016 Parameterise so that test can be run against an arbitrary clock.
1017 (main): Test using std::chrono::steady_clock and a user-defined
1018 clock in addition to the previous std::chrono::system_clock.
1019 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
1020
1021 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
1022
1023 * crossconfig.m4: Remove references to spu.
1024 * configure: Regenerate.
1025 * doc/xml/manual/appendix_contributing.xml: Remove references
1026 to __ea as "badword" for spu.
1027 * doc/html/manual/source_code_style.html: Regenerate.
1028 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
1029 to avoid __ea (as "badword" for spu).
1030 (__ellint_rj): Likewise.
1031
1032 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
1033
1034 PR other/79543
1035 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
1036 scanning to conform to the GNU Coding Standards.
1037 * configure: Regenerate.
1038
1039 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1040
1041 * src/c++17/memory_resource.cc: Use __constinit keyword.
1042
1043 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1044
1045 * doc/xml/manual/abi.xml: Document 9.x library versions.
1046 * doc/html/*: Regenerate.
1047
1048 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1049
1050 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
1051 (__detail::__to_chars_8_len): Remove.
1052 (__detail::__to_chars_8): Inline length calculation here.
1053 (__detail::__from_chars_binary): Use numeric_limits instead of
1054 CHAR_BIT.
1055
1056 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1057
1058 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
1059 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
1060 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
1061 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
1062 Likewise.
1063
1064 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
1065
1066 * testsuite_files/util/testsuite_performance.h
1067 (resource_counter::start): Ignore unused malloc(0) result.
1068
1069 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1070
1071 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
1072 Model Object Technologies): Adjust name and link.
1073
1074 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
1075
1076 * include/std/charconv (__detail::__to_chars_8)
1077 __detail::__to_chars_16): Replace array of precomputed digits with
1078 arithmetic operations to avoid CPU cache misses. Remove zero
1079 termination from array of digits to allow symbol merge with generic
1080 implementation of __detail::__to_chars. Replace final offsets with
1081 constants. Use __detail::__to_chars_len_2 instead of a generic
1082 __detail::__to_chars_len.
1083 (__detail::__to_chars): Remove zero termination from array of digits.
1084 (__detail::__to_chars_2): Leading digit is always '1'.
1085
1086 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
1087
1088 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
1089
1090 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
1091
1092 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
1093
1094 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
1095
1096 PR libstdc++/89164
1097 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
1098 to template parameters.
1099 * include/bits/stl_uninitialized.h (uninitialized_copy)
1100 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
1101 diagnose invalid uses.
1102 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
1103 Adjust expected error.
1104 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
1105 New test.
1106 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
1107 89164.cc: New test.
1108 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
1109 New test.
1110 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
1111 89164.cc: New test.
1112 * testsuite/23_containers/vector/cons/89164.cc: New test.
1113 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
1114
1115 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
1116
1117 PR libstdc++/91067
1118 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
1119 * configure: Regenerate.
1120 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
1121 missing symbols.
1122 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
1123 constructors.
1124 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1125
1126 2019-08-29 Jakub Jelinek <jakub@redhat.com>
1127
1128 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1129 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1130
1131 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
1132
1133 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1134 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1135 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1136 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1137 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1138 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1139 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1140
1141 2019-08-23 Joseph Myers <joseph@codesourcery.com>
1142
1143 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1144 (std::filesystem::__gnu_posix::lstat): Add return type.
1145
1146 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
1147
1148 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
1149
1150 * include/std/numeric (reduce): Fix Doxygen markup.
1151
1152 PR libstdc++/91371
1153 * include/std/type_traits (is_function): Simplify definition. Remove
1154 partial specializations for function types.
1155 (__is_referenceable): Simplify definition.
1156 * testsuite/20_util/bind/91371.cc: New test.
1157 * testsuite/20_util/is_function/91371.cc: New test.
1158 * testsuite/20_util/is_function/value.cc: Check more pointer types.
1159 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
1160 * testsuite/20_util/is_object/91371.cc: New test.
1161
1162 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
1163
1164 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
1165
1166 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
1167
1168 PR libstdc++/91456
1169 * include/bits/std_function.h (__check_func_return_type): Remove.
1170 (function::_Callable): Use std::__is_invocable_impl instead of
1171 __check_func_return_type.
1172 * include/std/type_traits (__is_invocable_impl): Add another defaulted
1173 template parameter. Define a separate partial specialization for
1174 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
1175 with a check that models delayed temporary materialization.
1176 * testsuite/20_util/function/91456.cc: New test.
1177 * testsuite/20_util/is_invocable/91456.cc: New test.
1178
1179 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
1180
1181 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
1182
1183 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
1184
1185 Implement C++20 p0879 - Constexpr for swap and swap related functions.
1186 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
1187 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
1188 New macro.
1189 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
1190 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
1191 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
1192 * include/bits/move.h (swap): Add constexpr.
1193 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
1194 (__gcd, __rotate, rotate, __partition, __heap_select)
1195 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
1196 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
1197 (__introselect, __chunk_insertion_sort, next_permutation)
1198 (prev_permutation, partition, partial_sort, nth_element, sort)
1199 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
1200 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
1201 (swap_ranges): Add constexpr.
1202 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
1203 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
1204 Add constexpr.
1205 * include/std/type_traits (swap): Add constexpr.
1206 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
1207 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
1208 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
1209 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
1210 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
1211 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
1212 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
1213 * testsuite/25_algorithms/partition/constexpr.cc: New test.
1214 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
1215 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
1216 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
1217 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
1218 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
1219 * testsuite/25_algorithms/sort/constexpr.cc: New test.
1220 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
1221 * testsuite/25_algorithms/swap/constexpr.cc: New test.
1222 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
1223
1224 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
1225
1226 PR libstdc++/90361
1227 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
1228
1229 * include/std/tuple (__unpack_std_tuple): New variable template and
1230 partial specializations.
1231 (apply, make_from_tuple): Add noexcept-specifier.
1232 * testsuite/20_util/tuple/apply/2.cc: New test.
1233 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
1234
1235 2019-08-09 Corentin Gay <gay@adacore.com>
1236
1237 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
1238 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
1239 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
1240 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
1241 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
1242 Add call to `VERIFY`.
1243
1244 2019-08-09 Alexandre Oliva <oliva@adacore.com>
1245
1246 * include/ext/random
1247 (normal_mv_distribution::param_type::param_type): New private
1248 ctor taking a decomposed varcov matrix, for use by...
1249 (operator>>): ... this, befriended.
1250 * include/ext/random.tcc (operator>>): Use it.
1251 (normal_mv_distribution::param_type::_M_init_lower): Adjust
1252 member function name in exception message.
1253
1254 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
1255
1256 P0325R4 to_array from LFTS with updates
1257 * include/experimental/array (to_array): Qualify call to __to_array.
1258 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
1259 * include/std/version (__cpp_lib_to_array): Likewise.
1260 * testsuite/23_containers/array/creation/1.cc: New test.
1261 * testsuite/23_containers/array/creation/2.cc: New test.
1262 * testsuite/23_containers/array/creation/3_neg.cc: New test.
1263 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
1264 Use zero for dg-error line number.
1265
1266 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
1267
1268 P1651R0 bind_front should not unwrap reference_wrapper
1269 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
1270 * include/std/version (__cpp_lib_bind_front): Update value.
1271 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
1272 feature test macro.
1273 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
1274
1275 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
1276 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
1277 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
1278 specializations for __float128.
1279 * testsuite/26_numerics/numbers/float128.cc: New test.
1280
1281 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
1282
1283 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
1284 doxygen.nl.
1285
1286 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1287
1288 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
1289 in <algorithm> and <utility> Headers.
1290 Implement C++20 p1023 - constexpr comparison operators for std::array.
1291 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
1292 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
1293 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
1294 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
1295 none_of, partition_copy, partition_point, remove, remove_if,
1296 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
1297 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
1298 count_if, equal, find, find_first_of, find_if, for_each, generate,
1299 generate_n, lexicographical_compare, merge, mismatch, replace,
1300 replace_if, search, search_n, set_difference, set_intersection,
1301 set_symmetric_difference, set_union, transform, unique_copy):
1302 Mark constexpr.
1303 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
1304 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
1305 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
1306 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
1307 Use const ref instead of ref arg;
1308 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
1309 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
1310 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
1311 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
1312 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
1313 __iter_comp_iter): Mark constexpr.
1314 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
1315 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
1316 none_of, any_of, find_if_not, is_partitioned, partition_point,
1317 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
1318 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
1319 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
1320 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
1321 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
1322 __equal_range, equal_range, binary_search, __includes, includes,
1323 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
1324 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
1325 is_sorted_until, __is_permutation, is_permutation, for_each, find,
1326 find_if, find_first_of, adjacent_find, count, count_if, search,
1327 search_n, transform, replace, replace_if, generate, generate_n,
1328 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
1329 set_intersection, __set_difference, set_difference,
1330 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
1331 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
1332 wrappers around __builtin_memmove and __builtin_memcmp
1333 respectively;
1334 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
1335 copy, move, __copy_move_b, __copy_move_backward_a,
1336 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
1337 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
1338 __lexicographical_compare_impl, __lexicographical_compare,
1339 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
1340 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
1341 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
1342 is_heap): Mark constexpr.
1343 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
1344 is_heap): Mark constexpr.
1345 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
1346 * include/std/array: Make comparison ops constexpr.
1347 * include/std/utility: Make exchange constexpr.
1348 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
1349 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
1350 * testsuite/23_containers/array/tuple_interface/
1351 tuple_element_neg.cc: Adjust.
1352 * testsuite/20_util/exchange/constexpr.cc: New.
1353 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
1354 * testsuite/25_algorithms/constexpr_macro.cc: New.
1355 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
1356 * testsuite/25_algorithms/all_of/constexpr.cc: New.
1357 * testsuite/25_algorithms/any_of/constexpr.cc: New.
1358 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
1359 * testsuite/25_algorithms/copy/constexpr.cc: New.
1360 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
1361 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
1362 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
1363 * testsuite/25_algorithms/count/constexpr.cc: New.
1364 * testsuite/25_algorithms/count_if/constexpr.cc: New.
1365 * testsuite/25_algorithms/equal/constexpr.cc: New.
1366 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
1367 * testsuite/25_algorithms/fill/constexpr.cc: New.
1368 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
1369 * testsuite/25_algorithms/find/constexpr.cc: New.
1370 * testsuite/25_algorithms/find_end/constexpr.cc: New.
1371 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
1372 * testsuite/25_algorithms/find_if/constexpr.cc: New.
1373 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
1374 * testsuite/25_algorithms/for_each/constexpr.cc: New.
1375 * testsuite/25_algorithms/generate/constexpr.cc: New.
1376 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
1377 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
1378 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
1379 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
1380 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
1381 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
1382 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
1383 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
1384 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
1385 * testsuite/25_algorithms/merge/constexpr.cc: New.
1386 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
1387 * testsuite/25_algorithms/none_of/constexpr.cc: New.
1388 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
1389 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
1390 * testsuite/25_algorithms/remove/constexpr.cc: New.
1391 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
1392 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
1393 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
1394 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
1395 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
1396 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
1397 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
1398 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
1399 * testsuite/25_algorithms/search/constexpr.cc: New.
1400 * testsuite/25_algorithms/search_n/constexpr.cc: New.
1401 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
1402 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
1403 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
1404 * testsuite/25_algorithms/set_union/constexpr.cc: New.
1405 * testsuite/25_algorithms/transform/constexpr.cc: New.
1406 * testsuite/25_algorithms/unique/constexpr.cc: New.
1407 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
1408 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
1409
1410 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
1411
1412 * include/std/memory (make_obj_using_allocator): Qualify call to
1413 uses_allocator_construction_args.
1414
1415 P0631R4 Math Constants
1416 * include/Makefile.am: Add new header.
1417 * include/Makefile.in: Regenerate.
1418 * include/precompiled/stdc++.h: Include new header.
1419 * include/std/numbers: New header.
1420 * include/std/version (__cpp_lib_math_constants): Define.
1421 * testsuite/26_numerics/numbers/1.cc: New test.
1422 * testsuite/26_numerics/numbers/2.cc: New test.
1423 * testsuite/26_numerics/numbers/3.cc: New test.
1424 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
1425
1426 * include/std/bit: Add Doxygen comments.
1427
1428 PR libstdc++/91308
1429 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
1430 constraints on deleter that should only apply to the constructor.
1431 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
1432 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
1433 constraints on deleter here.
1434 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
1435
1436 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
1437
1438 PR libstdc++/51333
1439 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
1440 constructor inline.
1441 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
1442 constructor.
1443 * testsuite/18_support/51333.cc: New test.
1444
1445 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
1446
1447 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
1448 to the Doxygen manual. Avoid a "here" link on the way.
1449 Fix another broken link to Doxygen docblocks.
1450
1451 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
1452
1453 * include/std/bit (__cpp_lib_endian): Define.
1454 * include/std/version (__cpp_lib_endian): Define.
1455 * testsuite/26_numerics/endian/2.cc: New.
1456 * testsuite/26_numerics/endian/3.cc: New.
1457 * testsuite/26_numerics/endian/4.cc: New.
1458
1459 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
1460
1461 * testsuite/util/testsuite_iterators.h
1462 (bidirectional_iterator_wrapper): Fix type comment.
1463 (random_access_iterator_wrapper): Likewise.
1464
1465 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
1466
1467 * include/std/bit (endian): Move definition here as per P1612R1.
1468 * include/std/type_traits (endian): Remove definition from here.
1469 * testsuite/20_util/endian/1.cc: Rename to ...
1470 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
1471
1472 2019-07-25 Martin Liska <mliska@suse.cz>
1473 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1474
1475 PR c++/23383
1476 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
1477 -fno-allocation-dce.
1478 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
1479 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
1480 * testsuite/ext/new_allocator/check_new.cc: Likewise.
1481
1482 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
1483
1484 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
1485 * testsuite/26_numerics/bit/bit.count/*: Here.
1486
1487 * include/std/bit (__rotl, __rotr): Change second parameter from
1488 unsigned int to int and handle negative values.
1489 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
1490 parameter from unsigned int to int. Add nodiscard attribute.
1491 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
1492 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
1493 shifts.
1494 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
1495 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
1496 shifts.
1497
1498 * include/std/bit (__ceil2): Make unrepresentable results undefined,
1499 as per P1355R2. Add debug assertion. Perform one left shift, not two,
1500 so that out of range values cause undefined behaviour. Ensure that
1501 shift will still be undefined if left operand is promoted.
1502 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
1503 unrepresentable values with checks that they are not core constant
1504 expressions.
1505 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
1506
1507 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
1508
1509 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
1510 sized deallocation size computation.
1511
1512 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
1513
1514 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
1515
1516 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
1517
1518 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
1519 (~_Temporary_buffer()): Use latter.
1520 (_Temporary_buffer(_FIterator, size_type)): Likewise.
1521
1522 2019-07-17 Andreas Schwab <schwab@suse.de>
1523
1524 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1525
1526 2019-07-16 Jason Merrill <jason@redhat.com>
1527
1528 * include/std/memory (uses_allocator_construction_args): Add parens
1529 around constraint.
1530
1531 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
1532
1533 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
1534
1535 * include/experimental/string_view (__detail::__idt): Remove.
1536 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1537 Use __type_identity_t instead of __detail::__idt;
1538 * include/std/string_view (__detail::__idt): Remove.
1539 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1540 Use __type_identity_t instead of __detail::__idt;
1541 * include/std/type_traits (__type_identity_t): New alias template.
1542
1543 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
1544 and floating point atomics.
1545
1546 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
1547
1548 * doc/xml/manual/configure.xml: Improve documentation of
1549 --enable-libstdcxx-time option.
1550
1551 * include/bits/atomic_base.h (__atomic_impl): New namespace for
1552 wrappers around atomic built-ins.
1553 (__atomic_float, __atomic_ref): New class templates for use as base
1554 classes.
1555 * include/std/atomic (atomic<float>, atomic<double>)
1556 (atomic<long double>): New explicit specializations.
1557 (atomic_ref): New class template.
1558 (__cpp_lib_atomic_ref): Define.
1559 * include/std/version (__cpp_lib_atomic_ref): Define.
1560 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
1561 * testsuite/29_atomics/atomic_float/1.cc: New test.
1562 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
1563 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
1564 * testsuite/29_atomics/atomic_ref/float.cc: New test.
1565 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
1566 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
1567 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
1568 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
1569
1570 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
1571
1572 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
1573 throw() with _GLIBCXX_NOTHROW.
1574 (__atomic_add_dispatch): Return after performing atomic increment.
1575
1576 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
1577
1578 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
1579 (__exchange_and_add): Replace static specifier with always_inline
1580 attribute.
1581 (__exchange_and_add_single, __atomic_add_single): Likewise.
1582 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
1583 combine !__gthread_active_p() and !__GTHREADS branches.
1584
1585 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
1586
1587 PR libstdc++/91067
1588 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
1589 * configure: Regenerate.
1590 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
1591 missing symbols.
1592 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
1593 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1594
1595 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
1596
1597 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
1598 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
1599 instead of __is_identifier to detect Clang support.
1600
1601 2019-07-02 Jim Wilson <jimw@sifive.com>
1602
1603 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
1604 and xmllint.
1605 * configure: Regenerate.
1606
1607 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
1608
1609 PR libstdc++/91012
1610 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
1611 for the what_arg parameters.
1612 (filesystem_error::filesystem_error): Pass system_error::what() to
1613 the _Impl constructor.
1614 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
1615 filesystem_error::what() contains system_error::what().
1616
1617 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
1618
1619 * include/std/charconv (chars_format): Define bitmask type.
1620 * testsuite/20_util/to_chars/chars_format.cc: New test.
1621
1622 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
1623 * include/std/bit (_If_is_unsigned_integer_type): Remove.
1624 (_If_is_unsigned_integer): Use __is_unsigned_integer.
1625 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
1626 (countl_one(byte), countr_zero(byte), countr_one(byte))
1627 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
1628 (log2p1(byte)): Remove.
1629 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
1630 (__detail::__is_int_to_chars_type): Remove.
1631 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
1632 and __is_unsigned_integer.
1633 * include/std/type_traits (__is_one_of): Move here from <charconv>.
1634 (__is_signed_integer, __is_unsigned_integer): New helpers.
1635 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
1636 std::byte overload.
1637 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
1638 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
1639 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
1640 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
1641 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
1642 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
1643 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
1644 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
1645 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
1646 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
1647
1648 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
1649
1650 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
1651 function.
1652
1653 2019-06-25 Jakub Jelinek <jakub@redhat.com>
1654
1655 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
1656 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
1657 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
1658 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
1659
1660 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
1661
1662 * include/std/numeric (midpoint(T, T)): Change implementation for
1663 floating-point types to avoid incorrect rounding of denormals.
1664 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
1665 rounding with denormals.
1666 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
1667 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1668
1669 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
1670
1671 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
1672
1673 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
1674 stage of bootstrap.
1675 * configure: Regenerate.
1676
1677 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
1678 Qualify calls to __never_valueless.
1679
1680 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
1681 C++17 working draft.
1682
1683 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
1684 vector<bool> for test.
1685 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1686
1687 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1688
1689 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
1690 private.
1691 (istream_iterator::_M_read()): Do not check stream state before
1692 attempting extraction. Set stream pointer to null when extraction
1693 fails (P0738R2).
1694 (operator==(const istream_iterator&, const istream_iterator&)): Change
1695 to be a hidden friend of istream_iterator.
1696 (operator!=(const istream_iterator&, const istream_iterator&)):
1697 Likewise.
1698 (ostream_iterator::ostream_iterator()): Add default constructor.
1699 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
1700 addressof.
1701 * testsuite/24_iterators/istream_iterator/1.cc: New test.
1702 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
1703 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
1704 constructor taking a string.
1705 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
1706 New test.
1707
1708 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
1709 Jonathan Wakely <jwakely@redhat.com>
1710
1711 PR libstdc++/90945
1712 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
1713 values of type bool for vector<bool> elements.
1714 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
1715 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1716
1717 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
1718
1719 PR libstdc++/90920 partially revert r263433
1720 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
1721 (rotate): Remove checks.
1722 * testsuite/25_algorithms/rotate/90920.cc: New test.
1723
1724 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
1725 category used in invocable check.
1726 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
1727 * testsuite/26_numerics/reduce/2.cc: New test.
1728
1729 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
1730
1731 * include/bits/algorithmfwd.h: Change title of doc group.
1732 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
1733 P0024R2.
1734 * include/bits/stl_numeric.h: Define doc group and add algos to it.
1735 * include/std/numeric (__is_random_access_iter): New internal trait.
1736 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
1737 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
1738 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
1739 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
1740 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
1741 * testsuite/26_numerics/reduce/1.cc: New test.
1742 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
1743 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
1744 * testsuite/26_numerics/transform_reduce/1.cc: New test.
1745 * testsuite/util/testsuite_iterators.h (test_container::size()): New
1746 member function.
1747
1748 * include/c_global/cstddef (std::byte): Perform arithmetic operations
1749 in unsigned int to avoid promotion (LWG 2950).
1750
1751 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1752
1753 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
1754 failure on AIX.
1755
1756 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
1757
1758 PR libstdc++/90281 Fix string conversions for filesystem::path
1759 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
1760 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
1761 __str_codecvt_in_all to fail for partial conversions and throw on
1762 error.
1763 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
1764 (path::_Cvt<char8_t>): Add explicit specialization.
1765 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
1766 overloads.
1767 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1768 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
1769 instead of codecvt_utf8. Use __str_codecvt_in_all and
1770 __str_codecvt_out_all.
1771 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1772 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1773 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1774 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1775 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
1776 after converting to UTF-8.
1777 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
1778 __str_codecvt_in_all.
1779 (path::string): Fix initialization of string types with different
1780 allocators.
1781 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1782 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1783 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
1784 runtime conditions.
1785 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
1786 return false for partial conversions.
1787 * include/experimental/bits/fs_path.h (u8path):
1788 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
1789 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
1790 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
1791 instead of codecvt_utf8. Use __str_codecvt_in_all and
1792 __str_codecvt_out_all.
1793 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
1794 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
1795 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1796 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
1797 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
1798 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1799 __str_codecvt_in_all.
1800 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
1801 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
1802 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
1803 __str_codecvt_in_all.
1804 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
1805 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
1806 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
1807 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
1808 strings and with Unicode characters outside the basic multilingual
1809 plane.
1810 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
1811 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
1812 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
1813 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
1814 * testsuite/experimental/filesystem/path/native/string.cc: Test with
1815 empty strings and with Unicode characters outside the basic
1816 multilingual plane.
1817
1818 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
1819 Jonathan Wakely <jwakely@redhat.com>
1820
1821 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
1822 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
1823 deallocate node if insertion fails.
1824 (_Hashtable::_M_insert_multi_node): Likewise.
1825 (_Hashtable::_M_reinsert_node): Pass additional key argument.
1826 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
1827 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
1828 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
1829 (_Hashtable::extract(const _Key&)): Likewise.
1830 (_Hashtable::_M_merge_unique): Pass additional key argument.
1831 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
1832 _Scoped_node.
1833 (_Hashtable::_M_insert): Likewise.
1834 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
1835 (_Hashtable_alloc): Add comments to functions with misleading names.
1836
1837 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
1838
1839 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
1840 for std::string.
1841 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
1842 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
1843 header for std::allocator.
1844 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
1845 using-declaration for std::size_t.
1846 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
1847 Likewise.
1848 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
1849 std::istream.
1850 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
1851 * testsuite/experimental/map/erasure.cc: Include <string> for
1852 std::string.
1853 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
1854
1855 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
1856
1857 * include/experimental/type_traits (experimental::nonesuch): Use
1858 pragma to disable -Wctor-dtor-privacy warnings.
1859 * include/std/type_traits (__is_convertible_helper<From, To, false>)
1860 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
1861
1862 * include/std/version (__cpp_lib_bind_front): Add missing macro.
1863
1864 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
1865
1866 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
1867 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
1868 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
1869 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
1870
1871 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
1872 (variant::emplace): Change static_assert messages from "should be"
1873 to "must be".
1874 (hash<monostate>::operator()): Remove name of unused parameter.
1875
1876 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
1877 expression.
1878
1879 * include/Makefile.am: Add new <bits/charconv.h> header.
1880 * include/Makefile.in: Regenerate.
1881 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
1882 (to_string(long), to_string(unsigned long), to_string(long long))
1883 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
1884 * include/bits/charconv.h: New header.
1885 (__detail::__to_chars_len): Move here from <charconv>.
1886 (__detail::__to_chars_10_impl): New function extracted from
1887 __detail::__to_chars_10.
1888 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
1889 (__to_chars_unsigned_type): New class template that reuses
1890 __make_unsigned_selector_base::__select to pick a type.
1891 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
1892 (__detail::__to_chars_len): Move to new header.
1893 (__detail::__to_chars_10): Add inline specifier. Move code doing the
1894 output to __detail::__to_chars_10_impl and call that.
1895 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
1896 * testsuite/21_strings/basic_string/numeric_conversions/char/
1897 to_string.cc: Fix reference in comment. Remove unused variable.
1898 * testsuite/21_strings/basic_string/numeric_conversions/char/
1899 to_string_int.cc: New test.
1900
1901 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1902
1903 Fix ConstexprIterator requirements tests - No constexpr algorithms!
1904 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1905 Replace copy with hand-rolled loop.
1906 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1907 Ditto.
1908
1909 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
1910
1911 Test for C++20 p0858 - ConstexprIterator requirements.
1912 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
1913 New test.
1914 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1915 New test.
1916
1917 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
1918
1919 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
1920 project) standards.
1921 * include/bits/c++config: Rename all macros of the form __PSTL* to
1922 _PSTL*.
1923 * include/std/algorithm: Likewise.
1924 * include/std/execution: Likewise.
1925 * include/std/numeric: Likewise.
1926 * include/std/memory: Likewise.
1927 * include/pstl/glue_memory_impl.h: Likewise.
1928 * include/pstl/numeric_impl.h: Likewise.
1929 * include/pstl/glue_memory_defs.h: Likewise.
1930 * include/pstl/execution_defs.h: Likewise.
1931 * include/pstl/utils.h: Likewise.
1932 * include/pstl/algorithm_fwd.h: Likewise.
1933 * include/pstl/unseq_backend_simd.h: Likewise.
1934 * include/pstl/glue_execution_defs.h: Likewise.
1935 * include/pstl/algorithm_impl.h: Likewise.
1936 * include/pstl/parallel_impl.h: Likewise.
1937 * include/pstl/memory_impl.h: Likewise.
1938 * include/pstl/glue_numeric_defs.h: Likewise.
1939 * include/pstl/parallel_backend_utils.h: Likewise.
1940 * include/pstl/glue_algorithm_defs.h: Likewise.
1941 * include/pstl/parallel_backend.h: Likewise.
1942 * include/pstl/glue_numeric_impl.h: Likewise.
1943 * include/pstl/parallel_backend_tbb.h: Likewise.
1944 * include/pstl/numeric_fwd.h: Likewise.
1945 * include/pstl/glue_algorithm_impl.h: Likewise.
1946 * include/pstl/execution_impl.h: Likewise.
1947 * include/pstl/pstl_config.h: Likewise.
1948 * testsuite/util/pstl/pstl_test_config.h: Likewise.
1949 * testsuite/util/pstl/test_utils.h: Likewise.
1950 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
1951 Likewise.
1952 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
1953 Likewise.
1954 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
1955 Likewise.
1956 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
1957 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
1958 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
1959 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
1960 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
1961 Likewise.
1962 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
1963 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
1964 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
1965 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
1966 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
1967 Likewise.
1968 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
1969 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
1970 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
1971 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
1972 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
1973 Likewise.
1974 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
1975 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
1976 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
1977 Likewise.
1978 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
1979 Likewise.
1980 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
1981 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
1982 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
1983 Likewise.
1984 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
1985 Likewise.
1986 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
1987 Likewise.
1988 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
1989 Likewise.
1990 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
1991 Likewise.
1992 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
1993 Likewise.
1994 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
1995 Likewise.
1996 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
1997 Likewise.
1998 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
1999 Likewise.
2000 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
2001 Likewise.
2002 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
2003 Likewise.
2004 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
2005
2006 Rename header guards to be consistent with upstream project's
2007 conventions.
2008 * include/pstl/glue_memory_impl.h: Rename all macros of the form
2009 _PSTL_(.*)_H to _PSTL_\U\1_H.
2010 * include/pstl/numeric_impl.h: Likewise.
2011 * include/pstl/glue_memory_defs.h: Likewise.
2012 * include/pstl/execution_defs.h: Likewise.
2013 * include/pstl/utils.h: Likewise.
2014 * include/pstl/algorithm_fwd.h: Likewise.
2015 * include/pstl/unseq_backend_simd.h: Likewise.
2016 * include/pstl/glue_execution_defs.h: Likewise.
2017 * include/pstl/algorithm_impl.h: Likewise.
2018 * include/pstl/parallel_impl.h: Likewise.
2019 * include/pstl/memory_impl.h: Likewise.
2020 * include/pstl/glue_numeric_defs.h: Likewise.
2021 * include/pstl/parallel_backend_utils.h: Likewise.
2022 * include/pstl/glue_algorithm_defs.h: Likewise.
2023 * include/pstl/parallel_backend.h: Likewise.
2024 * include/pstl/glue_numeric_impl.h: Likewise.
2025 * include/pstl/parallel_backend_tbb.h: Likewise.
2026 * include/pstl/numeric_fwd.h: Likewise.
2027 * include/pstl/glue_algorithm_impl.h: Likewise.
2028 * include/pstl/execution_impl.h: Likewise.
2029 * include/pstl/pstl_config.h: Likewise.
2030 * testsuite/util/pstl/pstl_test_config.h: Likewise.
2031
2032 Synchronize libstdc++ parallel algorithms with upstream
2033 project.
2034 * include/pstl/algorithm_fwd.h: Synchronize with
2035 upstream PSTL project.
2036 * include/pstl/algorithm_impl.h: Likewise.
2037 * include/pstl/execution_defs.h: Likewise.
2038 * include/pstl/execution_impl.h: Likewise.
2039 * include/pstl/glue_algorithm_impl.h: Likewise.
2040 * include/pstl/glue_execution_defs.h: Likewise.
2041 * include/pstl/numeric_fwd.h: Likewise.
2042 * include/pstl/numeric_impl.h: Likewise.
2043 * include/pstl/parallel_backend.h: Likewise.
2044 * include/pstl/pstl_config.h: Likewise.
2045 * include/pstl/unseq_backend_simd.h: Likewise.
2046 * include/pstl/parallel_backend_serial.h: New file.
2047 * include/Makefile.am (pstl_headers): Add
2048 parallel_backend_serial.h.
2049 * include/Makefile.in: Regenerate.
2050
2051 Clean up non-conforming names
2052 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
2053 Uglfiy copy_range1 and copy_range2
2054 (__pattern_walk2_n): Rename local n to __n
2055 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
2056 Rename parameter _T to _Tp.
2057
2058 Integrate non-TBB serial backend support
2059 * include/bits/c++config: Adjust TBB detection logic to select serial
2060 PSTL backend if no TBB present.
2061 * testsuite/utils/pstl/test_utils.h: Remove check for
2062 _PSTL_USE_PAR_POLICIES
2063
2064 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
2065
2066 * testsuite/24_iterators/container_access.cc: Move dg-options before
2067 dg-do directive so the target check uses the -std option.
2068
2069 PR libstdc++/90770
2070 * configure: Regenerate.
2071 * src/Makefile.am (stamp-debug): Also test for missing makefile.
2072 * src/Makefile.in: Regenerate.
2073
2074 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
2075
2076 * include/std/array: Do not include <stdexcept>.
2077 * include/std/optional: Include <exception> and
2078 <bits/exception_defines.h> instead of <stdexcept>.
2079 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
2080 for std::isalnum.
2081 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
2082 std::allocator.
2083 * testsuite/23_containers/map/erasure.cc: Include <string>.
2084 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2085
2086 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
2087 dg-prune-output for different C++98 diagnostic.
2088 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
2089 Likewise.
2090 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
2091 Likewise.
2092 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
2093 Likewise.
2094 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
2095 Likewise.
2096 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
2097 Likewise.
2098 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
2099 Likewise.
2100 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
2101 Likewise.
2102 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
2103 Likewise.
2104 * testsuite/23_containers/vector/requirements/dr438/
2105 constructor_1_neg.cc: Likewise.
2106 * testsuite/23_containers/vector/requirements/dr438/
2107 constructor_2_neg.cc: Likewise.
2108 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
2109 Likewise.
2110 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
2111
2112 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
2113 Do not test allocator rebinding extension for C++2a.
2114 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2115 dg-do directive for C++17 and C++2a.
2116
2117 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2118 1_c++0x.cc: Remove redundant test.
2119 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2120 2.cc: Use target selector instead of preprocessor condition.
2121 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2122 3.cc: Do not run test for C++2a.
2123 * testsuite/23_containers/forward_list/requirements/
2124 explicit_instantiation/3.cc: Likewise.
2125 * testsuite/23_containers/forward_list/requirements/
2126 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2127 for C++2a.
2128 * testsuite/23_containers/list/requirements/explicit_instantiation/
2129 1_c++0x.cc: Remove redundant test.
2130 * testsuite/23_containers/list/requirements/explicit_instantiation/
2131 2.cc: Use target selector instead of preprocessor condition.
2132 * testsuite/23_containers/list/requirements/explicit_instantiation/
2133 3.cc: Do not run test for C++2a.
2134 * testsuite/23_containers/list/requirements/explicit_instantiation/
2135 5.cc: Do not test allocator rebinding extension for C++2a.
2136 * testsuite/23_containers/map/requirements/explicit_instantiation/
2137 1_c++0x.cc: Remove redundant test.
2138 * testsuite/23_containers/map/requirements/explicit_instantiation/
2139 2.cc: Adjust comment.
2140 * testsuite/23_containers/map/requirements/explicit_instantiation/
2141 3.cc: Do not run test for C++2a.
2142 * testsuite/23_containers/map/requirements/explicit_instantiation/
2143 5.cc: Do not test allocator rebinding extension for C++2a.
2144 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2145 1_c++0x.cc: Remove redundant test.
2146 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2147 3.cc: Do not run test for C++2a.
2148 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2149 5.cc: Do not test allocator rebinding extension for C++2a.
2150 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
2151 3.cc: Do not run test for C++2a.
2152 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
2153 5.cc: Do not test allocator rebinding extension for C++2a.
2154 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
2155 Do not run test for C++2a.
2156 * testsuite/23_containers/set/requirements/explicit_instantiation/
2157 1_c++0x.cc: Remove redundant test.
2158 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
2159 Do not test allocator rebinding extension for C++2a.
2160 * testsuite/23_containers/unordered_map/requirements/
2161 explicit_instantiation/3.cc: Likewise.
2162 * testsuite/23_containers/unordered_map/requirements/
2163 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2164 for C++2a.
2165 * testsuite/23_containers/unordered_multimap/requirements/
2166 explicit_instantiation/3.cc: Do not run test for C++2a.
2167 * testsuite/23_containers/unordered_multimap/requirements/
2168 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2169 for C++2a.
2170 * testsuite/23_containers/unordered_multiset/requirements/
2171 explicit_instantiation/3.cc: Do not run test for C++2a.
2172 * testsuite/23_containers/unordered_multiset/requirements/
2173 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2174 for C++2a.
2175 * testsuite/23_containers/unordered_set/requirements/
2176 explicit_instantiation/3.cc: Do not run test for C++2a.
2177 * testsuite/23_containers/unordered_set/requirements/
2178 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2179 for C++2a.
2180 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2181 2.cc: Remove redundant test.
2182 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2183 3.cc: Do not run test for C++2a.
2184 * testsuite/23_containers/vector/requirements/explicit_instantiation/
2185 3.cc: Likewise.
2186
2187 * include/std/type_traits (is_empty, is_polymorphic, is_final)
2188 (is_abstract, is_aggregate): Remove static_assert.
2189 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
2190 from builtin only.
2191 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
2192 missing -std=gnu++17 option.
2193 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
2194 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
2195 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
2196 from builtin only.
2197
2198 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
2199 * testsuite/18_support/set_unexpected.cc: Likewise.
2200 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
2201 void.
2202 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
2203 function to be valid in C++11.
2204 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
2205 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
2206 include Library Fundamentals or Networking headers in C++11 mode.
2207 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
2208
2209 * include/std/tuple (_TC): Replace with _TupleConstraints.
2210 (_TupleConstraints): New helper for SFINAE constraints, with more
2211 expressive member functions to reduce duplication when used.
2212 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
2213 (tuple::_TCC): Replace dummy type parameter with bool non-type
2214 parameter that can be used to check the pack size.
2215 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
2216 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
2217 checking constraints in constructors.
2218 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
2219 New SFINAE helpers.
2220 (tuple::tuple): Use new helpers to reduce repitition in constraints.
2221 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
2222 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
2223 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
2224 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
2225 constraints in constructors.
2226 (tuple::__is_alloc_arg()): New SFINAE helpers.
2227 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
2228 constraints.
2229 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
2230 * testsuite/20_util/tuple/cons/90700.cc: New test.
2231 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
2232 to meet new constraint on allocator-extended default constructor.
2233
2234 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2235
2236 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
2237 * include/bits/stl_multimap.h (multimap): Likewise.
2238
2239 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
2240
2241 Rename variables and cleanup comments.
2242 * include/bits/hashtable_policy.h
2243 * include/bits/hashtable.h
2244
2245 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2246
2247 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
2248 Fix bgcolor for P0340R3.
2249 * doc/html/*: Regenerate.
2250
2251 PR libstdc++/90686
2252 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
2253 <experimental/memory_resource>.
2254 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
2255 P0339R6, P0340R3, P1164R1 and P1357R1.
2256 * doc/html/*: Regenerate.
2257
2258 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
2259 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
2260 allocator::value_type assertion for C++2a.
2261 * include/bits/hashtable.h: Likewise.
2262 * include/bits/stl_deque.h: Likewise.
2263 * include/bits/stl_list.h: Likewise.
2264 * include/bits/stl_map.h: Likewise.
2265 * include/bits/stl_multimap.h: Likewise.
2266 * include/bits/stl_multiset.h: Likewise.
2267 * include/bits/stl_set.h: Likewise.
2268 * include/bits/stl_vector.h: Likewise.
2269 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
2270 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
2271 * testsuite/23_containers/list/48101-3_neg.cc: New test.
2272 * testsuite/23_containers/map/48101-3_neg.cc: New test.
2273 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
2274 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
2275 * testsuite/23_containers/set/48101-3_neg.cc: New test.
2276 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
2277 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
2278 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
2279 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
2280 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
2281
2282 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
2283
2284 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
2285
2286 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2287
2288 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
2289 constructors.
2290 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
2291 function.
2292 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
2293
2294 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2295
2296 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
2297
2298 PR libstdc++/90682
2299 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
2300 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
2301 * libsupc++/eh_term_handler.h: New header defining
2302 _GLIBCXX_DEFAULT_TERM_HANDLER.
2303 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
2304 (set_terminate): Restore default handler when argument is null.
2305 (set_unexpected): Likewise.
2306 * testsuite/18_support/set_terminate.cc: New test.
2307 * testsuite/18_support/set_unexpected.cc: New test.
2308
2309 * include/backward/hashtable.h (size_t, ptrdiff_t)
2310 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
2311 (distance, vector, pair, __iterator_category): Remove
2312 using-declarations that add these names to namespace __gnu_cxx.
2313 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
2314 * include/ext/debug_allocator.h (size_t): Likewise.
2315 * include/ext/functional (size_t, unary_function, binary_function)
2316 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
2317 Likewise.
2318 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
2319 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
2320 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
2321 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
2322 * include/ext/numeric (iota): Fix outdated comment.
2323 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
2324 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
2325 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
2326 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
2327 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
2328 Likewise.
2329 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
2330 (allocator, __true_type, __false_type): Likewise.
2331
2332 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
2333
2334 PR libstdc++/71579
2335 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
2336 New helpers for checking preconditions in traits.
2337 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
2338 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
2339 (is_destructible, is_nothrow_destructible, is_constructible)
2340 (is_default_constructible, is_copy_constructible)
2341 (is_move_constructible, is_nothrow_default_constructible)
2342 (is_nothrow_constructible, is_nothrow_copy_constructible)
2343 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
2344 (is_nothrow_assignable, is_nothrow_copy_assignable)
2345 (is_nothrow_move_assignable, is_trivially_constructible)
2346 (is_trivially_copy_constructible, is_trivially_move_constructible)
2347 is_trivially_assignable, is_trivially_copy_assignable)
2348 (is_trivially_move_assignable, is_trivially_destructible)
2349 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
2350 (is_invocable_r, is_nothrow_invocable)
2351 (has_unique_object_representations, is_aggregate): Add static_asserts
2352 to make sure that type traits are not misused with incomplete types.
2353 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
2354 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
2355 base characteristics without assertions that can be reused in other
2356 traits.
2357 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
2358 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
2359 test.
2360 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
2361 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
2362 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
2363 * testsuite/20_util/is_class/value.cc: Check incomplete type.
2364 * testsuite/20_util/is_function/value.cc: Likewise.
2365 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
2366 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
2367 test.
2368 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
2369 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
2370 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2371 * testsuite/20_util/is_union/value.cc: Likewise.
2372 * testsuite/20_util/is_void/value.cc: Likewise.
2373 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
2374
2375 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2376
2377 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
2378 Add new private member function.
2379 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
2380 (random_device::_M_init_pretr1(const string&)): Call new private
2381 member with string data.
2382 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
2383 Define.
2384 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
2385 test using COW strings.
2386 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
2387 a value from the device.
2388 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
2389 Fix typo in token string.
2390
2391 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
2392
2393 LWG2788 basic_string spurious use of a default constructible allocator
2394 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
2395 (basic_string::_M_replace_dispatch): Construct temporary string with
2396 the current allocator.
2397 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
2398 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
2399
2400 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
2401
2402 * doc/xml/manual/diagnostics.xml: Update list of headers that define
2403 exception classes.
2404 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
2405 section about new/delete overloads. Improve section on verbose
2406 terminate handler.
2407 * doc/html/*: Regenerate.
2408
2409 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
2410 P0811R3. Change status of P1353R0.
2411 * doc/html/*: Regenerate.
2412
2413 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
2414 documentation of implementation-defined types for [thread.req.native].
2415 * doc/xml/manual/status_cxx2017.xml: Update documentation of
2416 implementation-defined strings for [variant.bad.access]. Fix typo in
2417 documentation of implementation-defined support for [fs.conform.9945].
2418 * doc/html/*: Regenerate.
2419
2420 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
2421
2422 PR libstdc++/85494
2423 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
2424 that fails on mingw-w64.
2425
2426 PR libstdc++/88881
2427 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2428 (status(const path&, error_code&)): Use parent_path() to remove
2429 trailing slash.
2430 (symlink_status(const path&, error_code&)): Duplicate workaround for
2431 bug in _wstat for paths with trailing slash.
2432 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
2433 with trailing slash.
2434 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2435 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2436
2437 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
2438 once instead of building it iteratively.
2439
2440 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
2441
2442 PR libstdc++/85494 use rdseed and rand_s in std::random_device
2443 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
2444 the assembler supports rdseed.
2445 * config.h.in: Regenerate.
2446 * configure: Regenerate.
2447 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
2448 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
2449 * doc/html/*: Regenerate.
2450 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
2451 * include/bits/random.h (random_device::random_device()): Always call
2452 _M_init rather than _M_init_pretr1.
2453 (random_device::random_device(const string&)): Likewise.
2454 (random_device::operator()()): Always call _M_getval().
2455 (random_device::_M_file): Replace first member of union with an
2456 anonymous struct, with _M_file as its first member.
2457 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
2458 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
2459 (USE_MT19937): Define if none of the above are defined.
2460 (USE_POSIX_FILE_IO): Define.
2461 (_M_strtoul): Remove.
2462 [USE_RDSEED] (__x86_rdseed): Define new function.
2463 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
2464 (random_device::_M_init(const string&)): Initialize new union members.
2465 Add support for "rdseed" and "rand_s" tokens. Decide what the
2466 "default" token does according to which USE_* macros are defined.
2467 [USE_POSIX_FILE_IO]: Store a file descriptor.
2468 [USE_MT19937]: Forward to _M_init_pretr1 instead.
2469 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
2470 code from _M_strtoul.
2471 [!USE_MT19937]: Call _M_init, transforming the old default token or
2472 numeric tokens to "default".
2473 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
2474 (random_device::_M_getval()): Use new union members to obtain a
2475 random number from the stored function pointer or file descriptor.
2476 [USE_MT19937]: Obtain a value from the mt19937 engine.
2477 (random_device::_M_getval_pretr1()): Call _M_getval().
2478 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
2479 instead of fileno.
2480 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
2481 * testsuite/26_numerics/random/random_device/85494.cc: New test.
2482
2483 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
2484
2485 PR libstdc++/90634
2486 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
2487 _M_split_cmpts() for a path with multiple components.
2488 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
2489 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
2490 components and reserve space in vector. Return early when there is
2491 only one component.
2492 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
2493 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
2494
2495 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
2496 form of std::equals for C++11 compatibility.
2497
2498 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
2499
2500 * doc/xml/manual/appendix_contributing.xml: Update pointer to
2501 C++ standard at ansi.org.
2502
2503 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
2504
2505 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
2506 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
2507 to "run".
2508
2509 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
2510 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
2511
2512 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2513
2514 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
2515 tests to ...
2516 * testsuite/20_util/function_objects/invoke/3.cc: New test.
2517 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2518 "compile" test to "run".
2519
2520 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
2521 * doc/html/*: Regenerate.
2522 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
2523 rvalue aliasing constructor.
2524 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
2525 (reinterpret_pointer_cast): Add overloads taking rvalues.
2526 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
2527 Add rvalue aliasing constructor.
2528 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
2529 "run" and check return values as well as types.
2530 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
2531 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
2532 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
2533 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
2534 values.
2535
2536 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
2537 * doc/xml/manual/intro.xml: Likewise.
2538 * include/std/future (__create_task_state): Add default arguments
2539 to make providing an allocator optional.
2540 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
2541 instead of delegating to another constructor.
2542 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
2543 define allocator-extended constructors for C++17 and later.
2544 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
2545 C++11 and C++14.
2546 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
2547 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
2548 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
2549
2550 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
2551
2552 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
2553 Don't run the libstdc++/83237 part on simulator targets.
2554
2555 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2556
2557 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
2558 P0040R3.
2559 * doc/html/*: Regenerate.
2560
2561 * include/experimental/any (__any_caster): Use RTTI if comparing
2562 addresses fails, to support non-unique addresses in shared libraries.
2563 * include/std/any (__any_caster): Likewise.
2564
2565 PR libstdc++/90220
2566 * include/experimental/any (__any_caster): Constrain to only be
2567 callable for object types. Use remove_cv_t instead of decay_t.
2568 If the type decays or isn't copy constructible, compare the manager
2569 function to a dummy specialization.
2570 (__any_caster): Add overload constrained for non-object types.
2571 (any::_Manager_internal<_Op>): Add dummy specialization.
2572 * testsuite/experimental/any/misc/any_cast.cc: Test function types
2573 and array types.
2574
2575 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
2576
2577 PR libstdc++/90557
2578 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
2579 reversed arguments to uninitialized_copy_n.
2580 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
2581 is unchanged by copy assignment.
2582 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
2583 compare path components.
2584
2585 PR libstdc++/77691
2586 * include/experimental/memory_resource: Add system header pragma and
2587 do not define anything unless compiled as C++14 or later.
2588 (__resource_adaptor_common::__guaranteed_alignment): Remove.
2589 (__resource_adaptor_imp::do_allocate): If the requested alignment
2590 is a fundamental alignment then either allocate directly from _M_alloc
2591 or call the new _M_allocate function.
2592 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
2593 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
2594 of the allocator rebound to a POD type with the specified alignment.
2595 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
2596 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2597 Adjust expected allocation sizes.
2598 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
2599 xfail for Solaris x86.
2600
2601 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
2602
2603 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
2604 * include/pstl/execution_defs.h (__enable_if_execution_policy):
2605 Use std::__remove_cvref_t when building with GCC.
2606
2607 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
2608
2609 PR libstdc++/90252
2610 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2611 Use "additional_flags" to pass -ltbb to v3_target_compile command.
2612 Use check_v3_target_prop_cached to cache the result of the test.
2613
2614 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
2615
2616 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2617
2618 PR libstdc++/90252
2619 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2620 Changed v3_target_compile check from preprocess to executable.
2621 Added "-ltbb" to v3_target_compile flags.
2622
2623 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
2624
2625 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
2626 Add check for Thread Building Blocks 2018 or later.
2627
2628 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2629
2630 * testsuite/experimental/names.cc: Only include Networking TS headers
2631 on targets with the necessary Gthreads support.
2632
2633 2019-05-20 Marek Polacek <polacek@redhat.com>
2634
2635 CWG 2094 - volatile scalars are trivially copyable.
2636 PR c++/85679
2637 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
2638 result for volatile int.
2639
2640 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2641
2642 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
2643 * testsuite/experimental/names.cc: Include <experimental/filesystem>
2644 conditionally.
2645
2646 PR c++/90532 Ensure __is_constructible(T[]) is false
2647 * include/std/type_traits (__do_is_default_constructible_impl)
2648 (__is_default_constructible_atom, __is_default_constructible_safe):
2649 Remove.
2650 (is_default_constructible): Use is_constructible.
2651 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
2652 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
2653 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
2654 * testsuite/20_util/is_trivially_default_constructible/value.cc:
2655 Likewise.
2656
2657 2019-05-20 Pádraig Brady <pbrady@fb.com>
2658
2659 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
2660 to the deallocator with -fsized-deallocation.
2661
2662 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
2663
2664 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
2665 test by passing correct alignment to deallocate function.
2666
2667 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
2668
2669 PR libstdc++/90520
2670 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2671 Raise exception if unique_ptr tuple member has unknown structure.
2672 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
2673 Adjust worker to support new __uniq_ptr_data base class. Do not
2674 assume field called _M_head_impl is the first tuple element.
2675
2676 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2677
2678 * include/bits/stl_deque.h
2679 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
2680 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
2681 (_Deque_base::_Deque_impl_data): New.
2682 (_Deque_base::_Deque_impl): Inherit latter.
2683 (_Deque_base::_Deque_impl::_M_swap_data): Move...
2684 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
2685 (_Deque_base::_Deque_impl()): Add noexcept qualification.
2686 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
2687 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
2688 (deque<>::deque()): Default.
2689 (deque<>::deque(deque&&)): Default.
2690 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
2691 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
2692 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
2693 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
2694 _M_range_initialize.
2695 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
2696 (deque<>::resize(size_type, const value_type&)): Share a single
2697 implementation.
2698 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
2699 _M_range_insert_aux.
2700 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
2701 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
2702 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
2703 * testsuite/23_containers/deque/allocator/default_init.cc: New.
2704
2705 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
2706
2707 PR libstdc++/90246
2708 * include/std/variant (holds_alternative, get, get_if): Improve
2709 static assertion messages.
2710 (bad_variant_access::bad_variant_access()): Change default message.
2711 (__throw_bad_variant_access(bool)): New overload.
2712 (get): Use new overload.
2713 (visit, visit<R>): Improve exception message.
2714
2715 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
2716 targets. Add more cases from P0608R3.
2717 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
2718
2719 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
2720 * include/experimental/type_traits (is_detected_exact)
2721 (is_detected_exact_v): Likewise.
2722 * include/pstl/execution_defs.h (is_execution_policy)
2723 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
2724 * include/pstl/execution_impl.h (__policy_traits): Likewise.
2725 * testsuite/17_intro/names.cc: Check for more non-reserved names.
2726 * testsuite/experimental/names.cc: New test.
2727
2728 PR libstdc++/85965
2729 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
2730 assertions from the destructor.
2731 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
2732 Move static_assert for hash function to here.
2733 (_Hash_table_base::_M_equals): Move static_assert for equality
2734 predicate to here.
2735 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
2736 Remove.
2737 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
2738 the value directly instead of calling _S_value.
2739 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
2740 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
2741 _S_key(_Const_Link_type).
2742 * testsuite/23_containers/set/85965.cc: Check construction,
2743 destruction, assignment and size() do not trigger the assertions.
2744 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
2745 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
2746 expected errors.
2747 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
2748 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
2749 * testsuite/23_containers/set/48101_neg.cc: Likewise.
2750 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
2751 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
2752 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
2753 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
2754
2755 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
2756 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
2757 in C++11.
2758
2759 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
2760 P1165R1 entries.
2761 * doc/html/*: Regenerate.
2762 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
2763 of decay_t (P0777R1).
2764
2765 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
2766
2767 Move from state of allocators (LWG2593)
2768 * include/bits/stl_deque.h
2769 (_Deque_base(_Deque_base&&, false_type)): Remove.
2770 (_Deque_base(_Deque_base&&, true_type)): Remove.
2771 (_Deque_base(_Deque_base&&)): Adapt.
2772 (_Deque_base::_M_move_impl()): Remove.
2773 * testsuite/util/testsuite_allocator.h
2774 (propagating_allocator(propagating_allocator&&)): Preserve move from
2775 state.
2776 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
2777 Adapt.
2778 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
2779 Adapt.
2780 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
2781 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
2782 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
2783 Adapt.
2784 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
2785 Adapt.
2786 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
2787 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
2788 (test02): Adapt.
2789 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
2790 (test02): Adapt.
2791 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
2792 (test02): Adapt.
2793 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
2794 (test02): Adapt.
2795 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
2796 Adapt.
2797 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
2798 Adapt.
2799 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
2800 (test02): Adapt.
2801 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
2802 (test02): Adapt.
2803
2804 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
2805
2806 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
2807 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
2808
2809 * include/std/variant (__overload_set): Remove.
2810 (_Arr): New helper.
2811 (_Build_FUN): New class template to define a single FUN overload,
2812 with specializations to prevent unwanted conversions, as per P0608R3.
2813 (_Build_FUNs): New class template to build an overload set of FUN.
2814 (_FUN_type): New alias template to perform overload resolution.
2815 (__accepted_type): Use integer_constant base for failure case. Use
2816 _FUN_type for successful case.
2817 (variant::__accepted_index): Use _Tp instead of _Tp&&.
2818 (variant::variant(_Tp&&)): Likewise.
2819 (variant::operator=(_Tp&&)): Likewise.
2820
2821 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
2822 Replace raw visitation with a runtime check for the valueless state
2823 and a non-raw visitor.
2824 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
2825 (variant::index()): Remove branch.
2826 (variant::swap(variant&)): Use valueless_by_exception() instead of
2827 comparing the index to variant_npos, and add likelihood attribute.
2828
2829 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
2830 (_Hashtable_base::_Equal_hash_code): Define new class template.
2831 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
2832 _Equal_helper.
2833
2834 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
2835 Replace with _M_get non-static member function.
2836 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
2837 member function.
2838 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
2839 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
2840
2841 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
2842 _S_get accessors for members in EBO helpers.
2843 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
2844 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
2845 overloads.
2846 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
2847 helpers.
2848 (_Hashtable_base::_M_eq()): Remove non-const overload.
2849
2850 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
2851
2852 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
2853
2854 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2855
2856 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
2857 Fix return value.
2858
2859 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2860
2861 * config/os/solaris/solaris2.10: Move to ...
2862 * config/os/solaris: ... this.
2863 * configure.host (os_include_dir): Adapt.
2864 (abi_baseline_pair): Remove Solaris 10 handling.
2865 * config/abi/post/i386-solaris2.10: Remove.
2866 * config/abi/post/sparc-solaris2.10: Remove.
2867 * config/abi/post/i386-solaris2.11: Rename to ...
2868 * config/abi/post/i386-solaris: ... this.
2869 * config/abi/post/sparc-solaris2.11: Rename to ...
2870 * config/abi/post/sparc-solaris: ... this.
2871
2872 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
2873 workaround.
2874
2875 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
2876 xfail.
2877
2878 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2879
2880 * include/std/variant (__visit_with_index): Remove typedef.
2881 (__deduce_visit_result): New tag type.
2882 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
2883 visitation of possibly-valueless variants, forwarding to __do_visit
2884 with the relevant tag type.
2885 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
2886 and make lambda return void.
2887 (__variant_construct): Likewise.
2888 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
2889 __raw_idx_visit and make lambda return void.
2890 (_Multi_array::__untag_result): Add metafunction to check the function
2891 pointer type for a tag type that dictates the kind of visitation.
2892 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
2893 Use decltype(auto) instead of tagged function pointer type.
2894 (__gen_vtable_impl): Remove bool non-type parameter and unused
2895 _Variant_tuple parameter.
2896 (__gen_vtable_impl::__visit_invoke_impl): Remove.
2897 (__gen_vtable_impl::__do_visit_invoke): Remove.
2898 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
2899 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
2900 for the visit<R> case, rather than dispatching to separate functions.
2901 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
2902 lambda return void.
2903 (variant::swap): Likewise.
2904 (__do_visit): Replace two non-type template parameters with a single
2905 type parameter, so that the caller must specify the visitor's return
2906 type (or one of the tag types).
2907 (visit): Deduce a return type from the visitor and use the
2908 __deduce_visit_result tag to enforce that all overloads return the
2909 same type.
2910 (visit<R>): Call __do_visit<R> with explicit result type.
2911 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
2912 lambda return void.
2913
2914 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2915
2916 nonesuch is insufficiently useless (lwg2996)
2917 * include/std/type_traits (struct __nonesuch): Added private base
2918 class to make __nonesuch not an aggregate and removed deleted default
2919 constructor.
2920 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
2921 (operator=(const pair&)): Use __nonesuch instead of
2922 __nonesuch_no_braces.
2923 (operator=(pair&&)): Likewise
2924 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
2925 of __nonesuch_no_braces.
2926 (operator=(tuple&&)): Likewise
2927 * include/experimental/type_traits (struct nonesuch): Added private
2928 base class to make nonesuch not an aggregate and removed deleted
2929 default constructor.
2930 * testsuite/20_util/nonesuch/nonesuch.cc: New.
2931 * testsuite/experimental/type_traits/nonesuch.cc: New.
2932
2933 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
2934
2935 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
2936 (_Function_handler): Remove partial specializations for void return
2937 types and pointers to member.
2938 (_Function_handler::_M_manager): Adapt to removal of
2939 _Simple_type_wrapper.
2940 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
2941 * include/std/functional (_Bind_result::__enable_if_void)
2942 (_Bind_result::__disable_if_void): Remove sfinae helpers.
2943 (_Bind_result::__call): Use __invoke_r and remove overloads for void
2944 return types.
2945 * include/std/future (__future_base::_Task_state::_M_run)
2946 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
2947 change return type of lambda expressions.
2948
2949 * include/bits/invoke.h (__invoke_r): Define new function implementing
2950 the INVOKE<R> pseudo-function.
2951 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
2952 * testsuite/20_util/function_objects/invoke/2.cc: New test.
2953
2954 * include/std/type_traits (__is_nt_convertible_helper): Define it
2955 unconditionally, not only for C++20.
2956 (__is_nothrow_convertible): Define internal trait for use in C++11.
2957 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
2958 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
2959 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
2960 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
2961 that has nothrow explicit conversion but potentially-throwing implicit
2962 conversion.
2963 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
2964 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
2965 function to only consider implicit conversions.
2966 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
2967
2968 * include/std/iterator: Include <iosfwd> instead of <istream> and
2969 <ostream>.
2970
2971 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
2972 Remove unused, non-standard function.
2973
2974 * include/bits/regex.h (match_results::max_size()): Adjust return
2975 value to account for prefix/suffix/unmatched subs.
2976 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
2977 reset the contained sub matches.
2978 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
2979 function to set result state following a failed match.
2980 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
2981 sub_match states after _M_resize. Use _M_establish_failed_match.
2982
2983 PR libstdc++/69724
2984 * include/std/thread (thread::_State_impl, thread::_S_make_state):
2985 Replace single _Callable parameter with variadic _Args pack, to
2986 forward them directly to the tuple of decayed copies.
2987 * testsuite/30_threads/thread/cons/69724.cc: New test.
2988
2989 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
2990
2991 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
2992 * include/bits/basic_string.h: (operator=(const basic_string&):
2993 Move allocator decision to assign.
2994 (assign(const basic_string&)): Move allocator decision here.
2995 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2996 Add tests.
2997 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2998 Add tests.
2999
3000 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3001
3002 * testsuite/util/testsuite_allocator.h (memory_resource)
3003 (default_resource_mgr): Fix indentation.
3004
3005 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
3006 Use operator-> to access raw pointer member.
3007 * testsuite/23_containers/vector/59829.cc: Likewise.
3008 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
3009 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
3010 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
3011 for tests.
3012 (PointerBase, PointerBase_void): Derive from NullablePointer and use
3013 its constructors and equality operators. Change converting
3014 constructors to use operator-> to access private member of the other
3015 pointer type.
3016 (PointerBase_void::operator->()): Add, for access to private member.
3017 (operator-(PointerBase, PointerBase)): Change to hidden friend.
3018 (operator==(PointerBase, PointerBase)): Remove.
3019 (operator!=(PointerBase, PointerBase)): Remove.
3020
3021 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
3022 not assume field called _M_head_impl is the first tuple element.
3023 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
3024 implementation more accurate.
3025 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
3026 empty pointer type and non-empty deleter.
3027
3028 LWG 2899 - Make is_move_constructible correct for unique_ptr
3029 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
3030 move assignment operator.
3031 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
3032 (__uniq_ptr_data): New class template with conditionally deleted
3033 special members.
3034 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
3035 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
3036 constructor and move assignment operator as defaulted.
3037 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
3038 __uniq_ptr_impl::release().
3039 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
3040 to __uniq_ptr_impl::reset(pointer).
3041 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
3042 Check for new __uniq_ptr_data type.
3043 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
3044
3045 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
3046
3047 PR libstdc++/90454.cc path construction from void*
3048 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
3049 pointers to void are rejected as well as void.
3050 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
3051 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
3052 pointers to void.
3053 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
3054
3055 * doc/xml/manual/policy_data_structures.xml: Comment out stray
3056 <remark> elements. Fix formatting of bibliography references.
3057
3058 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
3059
3060 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
3061
3062 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
3063
3064 Remove Profile Mode, deprecated since 7.1.0
3065 * doc/Makefile.am: Remove XML file for profile mode docs.
3066 * doc/Makefile.in: Regenerate.
3067 * doc/xml/authors.xml: Remove authors of profile mode docs.
3068 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
3069 mode.
3070 * doc/xml/manual/debug.xml: Likewise.
3071 * doc/xml/manual/evolution.xml: Document removal of profile mode.
3072 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
3073 * doc/xml/manual/spine.xml: Remove profile mode author credit.
3074 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
3075 directive.
3076 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
3077 macro.
3078 * doc/html/*: Regenerate.
3079 * include/Makefile.am: Remove profile mode headers.
3080 * include/Makefile.in: Regenerate.
3081 * include/bits/c++config (std::__profile): Remove namespace.
3082 [_GLIBCXX_PROFILE]: Remove checks for macro.
3083 * include/profile/array: Remove.
3084 * include/profile/base.h: Remove.
3085 * include/profile/bitset: Remove.
3086 * include/profile/deque: Remove.
3087 * include/profile/forward_list: Remove.
3088 * include/profile/impl/profiler.h: Remove.
3089 * include/profile/impl/profiler_algos.h: Remove.
3090 * include/profile/impl/profiler_container_size.h: Remove.
3091 * include/profile/impl/profiler_hash_func.h: Remove.
3092 * include/profile/impl/profiler_hashtable_size.h: Remove.
3093 * include/profile/impl/profiler_list_to_slist.h: Remove.
3094 * include/profile/impl/profiler_list_to_vector.h: Remove.
3095 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
3096 * include/profile/impl/profiler_node.h: Remove.
3097 * include/profile/impl/profiler_state.h: Remove.
3098 * include/profile/impl/profiler_trace.h: Remove.
3099 * include/profile/impl/profiler_vector_size.h: Remove.
3100 * include/profile/impl/profiler_vector_to_list.h: Remove.
3101 * include/profile/iterator_tracker.h: Remove.
3102 * include/profile/list: Remove.
3103 * include/profile/map: Remove.
3104 * include/profile/map.h: Remove.
3105 * include/profile/multimap.h: Remove.
3106 * include/profile/multiset.h: Remove.
3107 * include/profile/ordered_base.h: Remove.
3108 * include/profile/set: Remove.
3109 * include/profile/set.h: Remove.
3110 * include/profile/unordered_base.h: Remove.
3111 * include/profile/unordered_map: Remove.
3112 * include/profile/unordered_set: Remove.
3113 * include/profile/vector: Remove.
3114 * scripts/run_doxygen: Do not process profile mode headers.
3115 * testsuite/23_containers/array/element_access/60497.cc: Don't use
3116 profile mode type.
3117 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
3118 Remove dg-skip-if for profile mode.
3119 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
3120 preprocessor check for profile mode.
3121 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
3122 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
3123 for profile mode.
3124 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
3125 Likewise.
3126 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
3127 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
3128 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
3129 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
3130 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
3131 Likewise.
3132 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
3133 Likewise.
3134 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
3135 Likewise.
3136 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
3137 Likewise.
3138 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
3139 preprocessor check for profile mode.
3140 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
3141 Likewise.
3142 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
3143 Remove dg-skip-if for profile mode.
3144 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
3145 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
3146 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
3147 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
3148 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
3149 * testsuite/Makefile.am: Remove profile_flags variable and
3150 * testsuite/Makefile.am: Remove profile_flags variable and
3151 check-profile target.
3152 * testsuite/Makefile.in: Regenerate.
3153 * testsuite/ext/profile/all.cc: Remove.
3154 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
3155 * testsuite/ext/profile/profiler_algos.cc: Remove.
3156 * testsuite/ext/profile/replace_new.cc: Remove.
3157 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
3158 preprocessor check for profile mode.
3159 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
3160 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
3161 (check_v3_target_normal_mode): Do not check for profile mode macro.
3162 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
3163 profile mode.
3164 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
3165 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3166 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
3167 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
3168 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
3169 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3170 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3171 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3172 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3173 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3174
3175 Remove array_allocator extension, deprecated since 4.9.0
3176 * doc/xml/manual/allocator.xml: Remove documentation for
3177 array_allocator.
3178 * doc/xml/manual/evolution.xml: Document array_allocator removal.
3179 * doc/xml/manual/using.xml: Remove header from documentation.
3180 * include/Makefile.am: Remove <ext/array_allocator.h> header.
3181 * include/Makefile.in: Regenerate.
3182 * include/ext/array_allocator.h: Remove.
3183 * include/precompiled/extc++.h: Do not include removed header.
3184 * testsuite/ext/array_allocator/1.cc: Remove.
3185 * testsuite/ext/array_allocator/2.cc: Remove.
3186 * testsuite/ext/array_allocator/26875.cc: Remove.
3187 * testsuite/ext/array_allocator/3.cc: Remove.
3188 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
3189 * testsuite/ext/array_allocator/check_delete.cc: Remove.
3190 * testsuite/ext/array_allocator/check_new.cc: Remove.
3191 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
3192 * testsuite/ext/headers.cc: Do not include removed header.
3193
3194 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
3195
3196 * include/bits/stl_bvector.h
3197 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3198 Make hidden friend.
3199 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3200 Likewise.
3201 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3202 Likewise.
3203 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3204 Likewise.
3205 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3206 Likewise.
3207 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3208 Likewise.
3209 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3210 Likewise.
3211 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
3212 copy elision.
3213 (_Bit_iterator::operator-(difference_type)): Likewise.
3214 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
3215 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
3216 NRVO copy elision.
3217 (_Bit_const_iterator::operator-(difference_type)): Likewise.
3218 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
3219
3220 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
3221
3222 PR libstdc++/81266
3223 * testsuite/util/thread/all.h: Do not use remove_pointer for
3224 std::thread::native_handle_type.
3225
3226 PR libstdc++/90397
3227 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
3228 (_Variant_storage<true, Types...>::_M_reset()))
3229 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
3230 (__get_storage): Likewise.
3231 (variant): Add noexcept to friend declarations for __get and
3232 __get_storage.
3233
3234 PR libstdc++/90388
3235 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
3236 Use _Require for constraints.
3237 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
3238 per the standard.
3239 (__uniq_ptr_hash): New base class with conditionally-disabled call
3240 operator.
3241 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
3242 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
3243 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
3244
3245 * include/bits/shared_ptr.h: Improve docs.
3246 * include/bits/shared_ptr_base.h: Likewise.
3247 * include/bits/stl_uninitialized.h: Likewise.
3248 * include/bits/unique_ptr.h: Likewise.
3249 * libsupc++/new: Likewise.
3250
3251 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
3252
3253 * include/bits/stl_deque.h
3254 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3255 Make hidden friend.
3256 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3257 Likewise.
3258 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3259 Likewise.
3260 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3261 Likewise.
3262 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3263 Likewise.
3264 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3265 Likewise.
3266 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
3267 copy elision.
3268 (_Deque_iterator<>::operator-(difference_type)): Likewise.
3269
3270 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
3271
3272 PR libstdc++/90277
3273 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
3274 (test01): Reserve for number of insertions to avoid rehash during test.
3275 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3276 (test01): Likewise.
3277 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3278 (test01): Likewise.
3279 (test02): Likewise.
3280 (test03): Likewise.
3281
3282 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
3283
3284 * include/experimental/bits/fs_path.h: Improve docs.
3285 * include/experimental/bits/net.h: Fix wrong header name in comment.
3286 Do not document implementation details.
3287 * include/experimental/netfwd: Fix doxygen grouping.
3288
3289 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3290
3291 * include/bits/stl_pair.h: Improve docs.
3292 * include/std/tuple: Likewise.
3293
3294 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
3295 inline namespace.
3296 * include/std/chrono: Improve docs.
3297 * include/std/ratio: Do not document implementation details.
3298 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
3299 line numbers.
3300 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
3301
3302 PR libstdc++/89102
3303 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
3304 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
3305 (__duration_common_type): New helper.
3306 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
3307 __duration_common_type.
3308 (__timepoint_common_type_wrapper): Replace with ...
3309 (__timepoint_common_type): New helper.
3310 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
3311 Use __time_point_common_type.
3312 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
3313 (__common_type_impl): If either argument is transformed by decay,
3314 use the common_type of the decayed types.
3315 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
3316 decayed, use __do_common_type_impl to get the common_type.
3317 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
3318 (__do_member_type_wrapper, __member_type_wrapper)
3319 (__expanded_common_type_wrapper): Remove.
3320 (__common_type_pack, __common_type_fold): New helpers.
3321 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
3322 __member_type_wrapper and __expanded_common_type_wrapper.
3323 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3324 Test zero-length template argument list.
3325 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3326 Test single argument cases and argument types that should decay.
3327 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3328 Adjust expected error.
3329 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
3330 dg-error lineno.
3331 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
3332 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
3333 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
3334
3335 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
3336
3337 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
3338
3339 Make allocator propagation more consistent for
3340 operator+(basic_string) (P1165R1)
3341 * include/bits/basic_string.h
3342 (operator+(basic_string&&, basic_string&&): Changed resulting
3343 allocator to always be the one from the first parameter.
3344 * include/bits/basic_string.tcc
3345 (operator+(const _CharT*, const basic_string&)): Changed
3346 resulting allocator to be SOCCC on the second parameter's allocator.
3347 (operator+(_CharT, const basic_string&)): Likewise.
3348 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
3349 New.
3350 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
3351 New.
3352
3353 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3354
3355 * include/bits/regex.h: Improve docs.
3356 * include/bits/regex.tcc: Do not document implementation details.
3357
3358 * testsuite/19_diagnostics/error_code/hash.cc: New test.
3359
3360 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
3361
3362 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
3363 Add type printer for container types in std::__debug namespace.
3364 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
3365 (gdb-tests): Use distinct parameters for the type of test and use of
3366 regex.
3367 (gdb-test): Check for regex test even if 'whatis' test.
3368 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
3369 mode.
3370 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3371 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
3372 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3373 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3374 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3375 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3376 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3377
3378 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
3379
3380 * include/std/system_error (error_category): Fix comment.
3381
3382 PR libstdc++/90299
3383 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
3384 argument is an empty path.
3385 (absolute(const path&, error_code&)): Use invalid_argument as error
3386 code instead of no_such_file_or_directory.
3387 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
3388 of non-existent paths and empty paths with both overloads of absolute.
3389
3390 * include/std/system_error (error_category, error_code)
3391 (error_condition): Improve docs.
3392 * libsupc++/exception: Add missing @addtogroup Doxygen command.
3393 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
3394 to class documentation. Suppress documentation for implementation
3395 details.
3396 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
3397 Suppress documentation for implementation details.
3398
3399 * include/std/system_error (error_code): Remove friend declaration
3400 for hash<error_code>.
3401 (hash<error_code>::operator()): Use public member functions to access
3402 value and category.
3403 (hash<error_condition>::operator()): Use address of category, not
3404 its object representation.
3405 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
3406 Use public member functions to access value and category.
3407 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
3408
3409 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
3410
3411 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
3412 * include/bits/hashtable_policy.h
3413 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
3414 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
3415 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
3416 smaller than input value rather than always greater. Preserve
3417 _M_next_resize if called with 0 input. Use __builtin_floorl.
3418 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
3419 elements + number of insertions is greater than _M_next_resize. Start
3420 with 11 buckets if not told otherwise. Use __builtin_floorl.
3421 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
3422 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
3423 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
3424 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
3425 told otherwise. Use __builtin_floorl.
3426 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
3427 to also validate _Power2_rehash_policy.
3428 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
3429 Adapt.
3430
3431 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
3432
3433 PR libstdc++/61761
3434 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
3435 std::copysign.
3436
3437 PR libstdc++/52119
3438 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
3439 overflow warning with -Wpedantic -Wsystem-headers.
3440
3441 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
3442
3443 PR libstdc++/90314
3444 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
3445 * include/bits/move.h (swap): Remove extra parentheses.
3446
3447 * include/experimental/bits/lfts_config.h: Improve doc markup.
3448 * include/experimental/optional: Improve docs.
3449 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
3450 (__constexpr_addressof): Remove.
3451 (optional::operator->()): Use std::__addressof().
3452 * include/std/optional (optional::operator->()): Adjust whitespace.
3453 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
3454 that operator-> is still constexpr with overloaded operator&. Change
3455 to compile-only test.
3456 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
3457 compile-only test.
3458
3459 * include/bits/shared_ptr.h: Improve docs.
3460 * include/bits/shared_ptr_atomic.h: Likewise.
3461 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
3462
3463 * include/bits/basic_string.h: Fix iterator/index confusion in
3464 Doxygen comments.
3465 * include/bits/range_access.h: Fix Doxygen warnings.
3466 * include/bits/refwrap.h: Do not document implementation details.
3467 (ref, cref): Group docs with reference_wrapper.
3468 * include/std/fstream: Fix Doxygen markup.
3469 * libsupc++/initializer_list (begin, end): Group docs with
3470 initializer_list.
3471
3472 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
3473
3474 * include/bits/unique_lock.h: Fix/improve doxygen markup.
3475 * include/std/mutex: Likewise.
3476 * include/std/shared_mutex: Likewise.
3477
3478 * include/bits/fs_dir.h: Fix/improve doxygen markup.
3479 * include/bits/fs_fwd.h: Likewise.
3480 * include/bits/fs_ops.h: Likewise.
3481 * include/bits/fs_path.h: Likewise.
3482 * include/std/filesystem: Likewise.
3483
3484 * include/experimental/bits/net.h: Fix/improve doxygen markup.
3485 * include/experimental/buffer: Likewise.
3486 * include/experimental/executor: Likewise.
3487 * include/experimental/internet: Likewise.
3488 * include/experimental/io_context: Likewise.
3489 * include/experimental/net: Likewise.
3490 * include/experimental/netfwd: Likewise.
3491 * include/experimental/socket: Likewise.
3492 * include/experimental/timer: Likewise.
3493
3494 * doc/doxygen/doxygroups.cc: Move description of experimental group
3495 here.
3496 * include/experimental/algorithm: Add to libfund-ts doc group.
3497 * include/experimental/any: Likewise. Do not document implementation
3498 details.
3499 * include/experimental/array: Add to libfund-ts doc group.
3500 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
3501 for Library Fundamentals.
3502 * include/experimental/chrono: Add to libfund-ts doc group.
3503 * include/experimental/deque: Likewise.
3504 * include/experimental/forward_list: Likewise.
3505 * include/experimental/functional: Likewise.
3506 * include/experimental/iterator: Likewise.
3507 * include/experimental/list: Likewise.
3508 * include/experimental/map: Likewise.
3509 * include/experimental/memory: Likewise.
3510 * include/experimental/memory_resource: Likewise. Improve docs.
3511 details.
3512 * include/experimental/numeric: Add to libfund-ts doc group.
3513 * include/experimental/optional: Likewise.
3514 * include/experimental/propagate_const: Likewise.
3515 * include/experimental/random: Likewise.
3516 * include/experimental/ratio: Likewise.
3517 * include/experimental/regex: Likewise.
3518 * include/experimental/set: Likewise.
3519 * include/experimental/source_location: Likewise.
3520 * include/experimental/string: Likewise.
3521 * include/experimental/string_view: Likewise.
3522 * include/experimental/system_error: Likewise.
3523 * include/experimental/tuple: Likewise.
3524 * include/experimental/type_traits: Likewise.
3525 * include/experimental/unordered_map: Likewise.
3526 * include/experimental/unordered_set: Likewise.
3527 * include/experimental/utility: Likewise.
3528 * include/experimental/vector: Likewise.
3529 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
3530 * testsuite/experimental/array/neg.cc: Adjust dg-error.
3531 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
3532 Likewise.
3533 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
3534 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
3535 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
3536 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
3537 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
3538
3539 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
3540 * include/experimental/bits/fs_fwd.h: Improve docs.
3541 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
3542 * include/experimental/bits/fs_path.h: Likewise.
3543 (path, filesystem_error, u8path): Improve docs.
3544 * include/experimental/filesystem: Link to docs for TS.
3545
3546 * config/allocator/new_allocator_base.h (__allocator_base): Add
3547 workaround for Doxygen bug #6945.
3548 * include/std/memory: Improve docs. Define group for pointer safety.
3549 * include/std/scoped_allocator: Improve docs. Use "undocumented"
3550 conditional to suppress documentation for implementation details.
3551
3552 * include/bits/specfun.h: Improve docs.
3553 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
3554 and namespaces.
3555
3556 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
3557 (std::experimental): Add docs.
3558 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
3559 namespace to nothing when generating docs.
3560 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
3561 * include/std/chrono (std::chrono): Likewise.
3562 * include/std/functional (std::placeholders): Likewise.
3563 * include/std/thread (std::this_thread): Likewise.
3564
3565 * include/parallel/settings.h: Fix Doxygen markup.
3566
3567 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
3568 anything unless PB_DS_CLASS_C_DEC is defined.
3569 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
3570 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
3571 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
3572 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
3573 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
3574 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
3575 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
3576 Likewise.
3577 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
3578 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
3579 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
3580 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
3581 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
3582 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
3583 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
3584 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
3585 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
3586 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
3587 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
3588 Likewise.
3589 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
3590 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
3591 Likewise.
3592 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
3593 Likewise.
3594
3595 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
3596 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
3597 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
3598 Doxygen expands.
3599
3600 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3601
3602 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
3603 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
3604 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
3605 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
3606 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
3607 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
3608 Likewise.
3609 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
3610 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
3611 Likewise.
3612
3613 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
3614
3615 PR libstdc++/61761
3616 * include/std/complex (__complex_proj): Return parameter unchanged.
3617 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
3618 floating-point types to take std::complex arguments.
3619 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
3620 floating-point types.
3621 * testsuite/26_numerics/complex/proj.cc: New test.
3622
3623 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3624
3625 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
3626 to _Lock_policyE[012].
3627 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3628
3629 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
3630
3631 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
3632 macros accidentally left in.
3633 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
3634 unnecessary -lstdc++fs option. Fix test for mingw.
3635 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
3636 Fix test for mingw.
3637
3638 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3639
3640 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
3641
3642 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
3643
3644 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
3645
3646 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
3647 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
3648
3649 PR libstdc++/71312
3650 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
3651
3652 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
3653 attribute.
3654
3655 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
3656 class template and partial specialization.
3657
3658 PR libstdc++/87982
3659 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
3660 an integral type.
3661 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
3662 functions to convert a value to an integral type.
3663 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
3664 (fill_n): Convert _Size parameter to an integral type.
3665 * testsuite/25_algorithms/fill_n/87982.cc: New test.
3666 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
3667 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
3668 * testsuite/25_algorithms/generate_n/87982.cc: New test.
3669 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
3670 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
3671
3672 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
3673
3674 Adding noexcept-specification on tuple constructors (LWG 2899)
3675 * libstdc++-v3/include/std/tuple:
3676 (tuple()): Add noexcept-specification.
3677 (tuple(const _Elements&...)): Likewise
3678 (tuple(_UElements&&...)): Likewise
3679 (tuple(const tuple<_UElements...>&)): Likewise
3680 (tuple(tuple<_UElements...>&&)): Likewise
3681 (tuple(const _T1&, const _T2&)): Likewise
3682 (tuple(_U1&&, _U2&&)): Likewise
3683 (tuple(const tuple<_U1, _U2>&): Likewise
3684 (tuple(tuple<_U1, _U2>&&): Likewise
3685 (tuple(const pair<_U1, _U2>&): Likewise
3686 (tuple(pair<_U1, _U2>&&): Likewise
3687 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
3688
3689 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
3690
3691 PR libstdc++/87106
3692 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
3693 arguments with __restrict.
3694
3695 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
3696
3697 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3698
3699 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
3700
3701 * include/experimental/bits/fs_path.h
3702 (path::_S_convert_loc<_InputIterator>): Create const std::string to
3703 avoid redundant call to _S_convert_loc with non-const pointers.
3704
3705 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
3706 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
3707 * testsuite/21_strings/basic_string/hash/hash.cc
3708 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
3709 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
3710 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
3711
3712 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
3713 wstring::_M_replace_dispatch with more specific patterns.
3714 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
3715 Create const std::string to avoid redundant call to _S_convert_loc
3716 with non-const pointers.
3717 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
3718 avoid unnecessary basic_string::assign instantiations.
3719
3720 * include/std/memory (__uses_alloc_args): Add string-literal to
3721 static_assert, to match the one in __uses_alloc.
3722 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
3723 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
3724 for recursive uses-allocator construction of nested pairs.
3725 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
3726 comment.
3727
3728 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3729
3730 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
3731 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
3732 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
3733 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
3734
3735 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3736 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3737 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
3738 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3739 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3740 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3741 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3742
3743 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
3744
3745 PR libstdc++/90239
3746 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
3747 * include/std/scoped_allocator [__cplusplus > 201703L]
3748 (scoped_allocator_adaptor::construct): Define in terms of
3749 uses_allocator_construction_args, as per P0591R4.
3750 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
3751 * testsuite/util/testsuite_allocator.h: Remove name of unused
3752 parameter.
3753
3754 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
3755
3756 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
3757 * doc/html/*: Regenerate.
3758
3759 * include/bits/fs_path.h (operator<, operator<=, operator>)
3760 (operator>=, operator==, operator!=): Make hidden friends, as per
3761 LWG 3065.
3762 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
3763 string type in test.
3764 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
3765
3766 * include/std/any (any::any(ValueType&&)): Use __and_v.
3767 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
3768 Likewise.
3769
3770 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
3771 as per P0777R1.
3772 * include/std/type_traits (__result_of_memfun): Use remove_reference
3773 instead of __remove_cvref_t and remove redundant is_same check.
3774 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
3775
3776 * include/experimental/string_view (basic_string_view::pointer)
3777 (basic_string_view::reference): Fix to refer to non-const value_type.
3778 * include/bits/basic_string.h (basic_string): Use __sv_check and
3779 __sv_limit instead of basic_string_view::_M_check and
3780 basic_string_view::_M_limit.
3781 * include/std/string_view (__sv_check, __sv_limit): New
3782 helper functions to replace basic_string_view::_M_check and
3783 basic_string_view::_M_limit.
3784 (basic_string_view): Add static assertions to enforce ill-formed
3785 requirement for traits_type::char_type from P1148R0, and to enforce
3786 required properties of char-like types.
3787 (basic_string_view::pointer, basic_string_view::reference): Fix to
3788 refer to non-const value_type.
3789 (basic_string_view::operator[], basic_string_view::at)
3790 (basic_string_view::front, basic_string_view::back)
3791 (basic_string_view::data): Use const_reference and const_pointer
3792 typedefs for return types.
3793 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
3794 (hash<wstring_view>): Fix argument_type typedef.
3795 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3796 char/1.cc: Fix expected return type of basic_string_view::data().
3797 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
3798 wchar_t/1.cc: Likewise.
3799 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3800 char/1.cc: Likewise.
3801 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
3802 wchar_t/1.cc: Likewise.
3803 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
3804 New test.
3805 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3806 Check reference and pointer typedefs.
3807 * testsuite/experimental/string_view/requirements/typedefs.cc:
3808 Likewise.
3809 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
3810 Fix expected return type of basic_string_view::data().
3811 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
3812 1.cc: Likewise.
3813 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
3814 Likewise.
3815 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
3816 1.cc: Likewise.
3817
3818 PR libstdc++/90220
3819 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
3820 Avoid a runtime check for types that can never be stored in std::any.
3821 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3822 array types.
3823
3824 PR libstdc++/90220 (partial)
3825 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
3826 not attempt ill-formed static_cast to pointers to non-object types.
3827 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
3828 function types.
3829
3830 * testsuite/20_util/variant/run.cc: Catch exception by reference to
3831 prevent -Wcatch-value warning.
3832
3833 * include/std/variant (__variant_construct): Use template parameter
3834 type instead of equivalent decltype-specifier.
3835 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
3836 Replace forward with move.
3837 (_Move_ctor_base<false, Types...>::_M_destructive_move)
3838 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
3839 (_Move_ctor_base<true, Types...>::_M_destructive_move)
3840 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
3841 index after construction succeeds.
3842 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
3843 if-constexpr checks that are always true. Use __remove_cvref_t instead
3844 of remove_reference so that is_nothrow_move_constructible check
3845 doesn't use a const rvalue parameter. In the potentially-throwing case
3846 construct a temporary and move assign it, as per LWG 2904.
3847 (_Move_assign_base<false, Types...>::operator=): Remove redundant
3848 if-constexpr checks that are always true. Use emplace as per LWG 2904.
3849 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
3850 construct a temporary and move assign from it, as per LWG 2904.
3851 * testsuite/20_util/variant/exception_safety.cc: Check that
3852 assignment operators have strong exception safety guarantee.
3853
3854 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
3855
3856 Document PSTL linker flags
3857
3858 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
3859
3860 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3861
3862 * include/std/variant (__detail::__variant::_Traits): Make
3863 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
3864 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
3865 P0602R4.
3866 (__detail::__variant::_Copy_assign_alias): Only depend on
3867 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
3868 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
3869 move assignment operators.
3870
3871 PR libstdc++/90165
3872 * include/std/variant (variant::__not_self): New helper for the
3873 is_same_v<remove_cvref_t<T>, variant>==false constraints.
3874 (variant::__to_type_impl): Remove.
3875 (variant::__to_type): Add default argument to check pack size, instead
3876 of using __to_type_impl.
3877 (variant::__accepted_type): Add default argument using __not_self.
3878 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
3879 for variant(T&&) constructor constraint.
3880 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
3881 Extract __accepted_type into a named template parameter for reuse in
3882 other constraints and in the exception specification.
3883 (variant::variant(in_place_type_t<T>, Args&&...))
3884 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
3885 (variant::variant(in_place_index_t<T>, Args&&...))
3886 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
3887 (variant::operator=T&&)): Remove redundant && from trait arguments.
3888 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
3889 isn't used for in_place_type or in_place_index arguments.
3890
3891 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
3892 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
3893 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
3894
3895 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3896 Bernd Edlinger <bernd.edlinger@hotmail.de>
3897 Jakub Jelinek <jakub@redhat.com>
3898
3899 PR target/89093
3900 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
3901 general-regs-only target attribute for ARM.
3902
3903 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
3904
3905 PR libstdc++/87431
3906 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
3907 specialization also depend on is_nothrow_move_constructible.
3908 * include/std/variant (__detail::__variant::__never_valueless()):
3909 Only true if the variant would have a move assignment operator.
3910 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
3911 Check __never_valueless<T...>().
3912 (variant::emplace): Only perform non-throwing move assignments
3913 for never-valueless alternatives if the variant has a move assignment
3914 operator.
3915 * testsuite/20_util/variant/compile.cc: Check that never-valueless
3916 types can be emplaced into non-assignable variants.
3917 * testsuite/20_util/variant/run.cc: Check that never-valueless types
3918 don't get copied when emplaced into non-assignable variants.
3919
3920 * include/std/variant (__detail::__variant::__ref_cast): Remove
3921 unused function.
3922 (__detail::__variant::_Uninitialized::_M_get)
3923 (__detail::__variant::__get)
3924 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
3925
3926 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
3927
3928 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
3929 to Darwin10.
3930 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3931 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3932 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3933 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3934
3935 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3936
3937 Delegate PSTL configuration to pstl/pstl_config.h
3938
3939 * include/bits/c++config: Remove explicit PSTL configuration
3940 macros and use definitions from <pstl/pstl_config.h>.
3941
3942 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
3943
3944 Cleanup algorithm implementations
3945 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
3946 execution policy.
3947 (mismatch): Forward execution policy.
3948 (equal): Qualify call to std::equal().
3949 (partial_sort): Forward execution policy.
3950 (inplace_merge): Forward execution policy.
3951
3952 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
3953
3954 Improve implementation of parallel equal()
3955 * include/pstl/algorithm_impl.h
3956 (__internal::__brick_equal): use "4 iterator" version of
3957 std::equal().
3958 (__internal::__brick_equal): use simd for random access
3959 iterators on unsequenced execution policies.
3960 (__internal::__pattern_equal): add "4 iterator" version
3961 (__internal::__pattern_equal): dispatch to simd __brick_equal
3962 for vector-only execution policies.
3963 (__internal::__pattern_equal): dispatch to __parallel_or for
3964 parallel execution policies.
3965 * include/pstl/glue_algorithm_impl.h
3966 (std::equal): dispatch to "4 iterator" version of
3967 __internal::__pattern_equal().
3968
3969 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
3970
3971 PR libstdc++/90105
3972 * include/bits/forward_list.h (operator==): Do not use operator!= to
3973 compare elements.
3974 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
3975 earlier in the list, so that sort is stable.
3976 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
3977 * testsuite/23_containers/forward_list/comparable.cc: Test with
3978 types that meet the minimum EqualityComparable and LessThanComparable
3979 requirements. Remove irrelevant comment.
3980
3981 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
3982 Do not depend on whether all alternative types are move constructible.
3983 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
3984 from the operand when deciding whether to perform the assignment.
3985 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
3986 with deleted move constructor and deleted move assignment operator.
3987 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
3988 behaviour of variants with DeletedMoves as an alternative.
3989 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
3990 (move_ctor, move_assign): Check that moving a variant with a
3991 DeletedMoves alternative falls back to copying instead of moving.
3992
3993 * testsuite/20_util/variant/compile.cc: Remove empty string literals
3994 from static_assert declarations.
3995
3996 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
3997 actually match its name.
3998 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
3999 (test_swap()): Fix result for MoveCtorOnly and check
4000 MoveCtorAndSwapOnly.
4001
4002 * include/std/optional (optional::value_or(U&&) &&): Add missing
4003 constexpr specifier.
4004 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
4005 for disengaged optionals and rvalue optionals.
4006 * testsuite/20_util/optional/observers/4.cc: Likewise.
4007
4008 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
4009
4010 * include/pstl/algorithm_impl.h: Uglify identfiers.
4011 * include/pstl/numeric_impl.h: Uglify identfiers.
4012 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
4013
4014 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
4015
4016 * include/bits/c++config:
4017 Add definition for __PSTL_ASSERT.
4018 Add definition for __PSTL_ASSERT_MSG.
4019 * include/pstl/algorithm_impl.h: Replace use of assert().
4020 * include/pstl/numeric_impl.h: Replace use of assert().
4021 * include/pstl/parallel_backend_tbb.h:
4022 Replace use of assert().
4023 Replace use of __TBB_ASSERT().
4024 * include/pstl/parallel_backend_utils.h: Replace use of assert().
4025
4026 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
4027
4028 PR libstdc++/90046
4029 * src/c++17/memory_resource.cc
4030 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
4031 needed to allow placing a _Chunk at the end of the buffer.
4032 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
4033
4034 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
4035
4036 * doc/xml/faq.xml: Add information about emergency EH pool.
4037 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
4038 Move outdated information on mt_allocator to a separate section.
4039 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
4040 doesn't affect the default allocator.
4041
4042 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
4043 typo.
4044
4045 PR libstdc++/89851
4046 * testsuite/20_util/variant/89851.cc: New test.
4047
4048 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
4049
4050 * include/std/variant: Adjust whitespace. Add comments.
4051 (_Multi_array): Leave primary template undefined.
4052 (_Multi_array<_Tp>): Define partial specialization for base case of
4053 recursion.
4054 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
4055 which is always a reference.
4056 (__gen_vtable::_S_apply()): Remove function, inline body into
4057 default member initializer.
4058 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
4059
4060 * include/std/variant (__variant_idx_cookie): Add member type.
4061 (__visitor_result_type): Remove.
4062 (__do_visit): Use invoke_result instead of __visitor_result_type.
4063 * testsuite/20_util/variant/visit.cc: New test.
4064
4065 PR libstdc++/90008
4066 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
4067 unused capture.
4068 * testsuite/20_util/variant/90008.cc: New test.
4069
4070 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
4071
4072 * include/pstl/algorithm_impl.h: Add namespace qualification.
4073 * include/pstl/execution_defs.h: Add namespace qualification.
4074 * include/pstl/execution_impl.h: Add namespace qualification.
4075 * include/pstl/numeric_impl.h: Add namespace qualification.
4076 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
4077 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
4078 * include/pstl/parallel_backend_utils.h: Include <cassert>.
4079
4080 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
4081
4082 Fix visit<R> for variant.
4083 * include/std/variant (__do_visit): Add a template parameter
4084 for enforcing same return types for visit.
4085 (__gen_vtable_impl): Likewise.
4086 (_S_apply_single_alt): Adjust.
4087 (__visit_invoke_impl): New. Handle casting to void.
4088 (__do_visit_invoke): New. Enforces same return types.
4089 (__do_visit_invoke_r): New. Converts return types.
4090 (__visit_invoke): Adjust.
4091 (__gen_vtable): Add a template parameter for enforcing
4092 same return types for visit.
4093 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
4094 different return types.
4095 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
4096 visitors with different return types don't accidentally
4097 compile with regular visitation.
4098
4099 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
4100
4101 * testsuite/27_io/filesystem/iterators/caching.cc: Add
4102 dg-require-filesystem-ts.
4103
4104 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
4105
4106 * doc/xml/manual/status_cxx2020.xml: Update status.
4107 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
4108 * testsuite/20_util/variant/visit_r.cc: New test.
4109
4110 * include/bits/fs_dir.h (directory_iterator::operator*)
4111 (directory_iterator::operator->): Add noexcept.
4112 (operator==, operator!=): Replace namespace-scope equality operators
4113 for directory iterators with hidden friends.
4114
4115 PR libstdc++/89986
4116 * config/abi/pre/gnu.ver: Add missing exports.
4117 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
4118 increment member.
4119
4120 * config/abi/pre/gnu.ver: Export new symbols.
4121 * include/bits/fs_dir.h (recursive_directory_iterator::options())
4122 (recursive_directory_iterator::recursion_pending())
4123 (recursive_directory_iterator::disable_recursion_pending()): Remove
4124 inline definitions. Make noexcept.
4125 (recursive_directory_iterator::depth())
4126 (recursive_directory_iterator::operator*())
4127 (recursive_directory_iterator::operator->()): Make noexcept.
4128 (recursive_directory_iterator::_M_options)
4129 (recursive_directory_iterator::_M_pending): Remove data members.
4130 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
4131 (recursive_directory_iterator::recursive_directory_iterator): Remove
4132 ctor-initializer. Use new constructor for _Dir_stack.
4133 (recursive_directory_iterator::options())
4134 (recursive_directory_iterator::recursion_pending())
4135 (recursive_directory_iterator::disable_recursion_pending()): Add
4136 non-inline definitions.
4137 (recursive_directory_iterator::depth()): Make noexcept.
4138 (recursive_directory_iterator::increment(error_code&))
4139 (recursive_directory_iterator::pop(error_code&)): Adjust to new
4140 location of options and recursion_pending members.
4141 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
4142 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
4143 user-declared move constructor and assignment operator, to make the
4144 type move-only.
4145
4146 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
4147 d_type == DT_UNKNOWN immediately.
4148 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
4149 handling here.
4150 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
4151
4152 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
4153 assignment.
4154 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
4155 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
4156 assignment.
4157
4158 PR libstdc++/87431 (again)
4159 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
4160 Define partial specialization for basic_string.
4161 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
4162 shared_ptr and weak_ptr.
4163 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
4164 function.
4165 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
4166 vector.
4167 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
4168 unique_ptr.
4169 * include/debug/vector (_Never_valueless_alt): Likewise for debug
4170 vector.
4171 * include/std/any (_Never_valueless_alt): Define explicit
4172 specialization for any.
4173 * include/std/variant (_Never_valueless_alt): Define primary template.
4174 (__never_valueless): Use _Never_valueless_alt instead of
4175 is_trivially_copyable.
4176 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
4177 initializations to avoid try-catch overhead. Add special case for
4178 scalars produced by potentially-throwing conversions. Use
4179 _Never_valueless_alt instead of is_trivially_copyable for the
4180 remaining strong exception-safety cases.
4181 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
4182 * testsuite/20_util/variant/87431.cc: Run both test functions.
4183 * testsuite/20_util/variant/exception_safety.cc: New test.
4184 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
4185 so the variant becomes valueless.
4186
4187 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
4188
4189 PR libstdc++/85184
4190 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
4191 Remove assertions.
4192 (variant::emplace<_Tp>): Return result of emplace<N> directly.
4193
4194 * include/std/string (__hash_string_base): New class template defining
4195 operator() for hashing strings.
4196 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
4197 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
4198 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
4199 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
4200
4201 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
4202
4203 Use single-visitation in variant assignment and swap and relops.
4204 Also use indices instead of types when checking whether
4205 variants hold the same thing.
4206 * include/std/variant (__do_visit): Add a template parameter
4207 for index visitation, invoke with indices if index visitation
4208 is used.
4209 (__variant_idx_cookie): New.
4210 (__visit_with_index): Likewise.
4211 (_Copy_assign_base::operator=): Do single-visitation with
4212 an index visitor.
4213 (_Move_assign_base::operator=): Likewise.
4214 (_Extra_visit_slot_needed): Adjust.
4215 (__visit_invoke): Call with indices if it's an index visitor.
4216 (relops): Do single-visitation with an index visitor.
4217 (swap): Likewise.
4218 (__visitor_result_type): New.
4219
4220 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
4221
4222 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
4223
4224 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4225
4226 Don't revisit a variant we are already visiting.
4227 * include/std/variant (__variant_construct_single): New.
4228 (__variant_construct): Use it.
4229 (_M_destructive_move): Likewise.
4230 (_M_destructive_copy): Likewise.
4231 (_Copy_assign_base::operator=): Adjust.
4232 (_Move_assign_base::operator=): Likewise.
4233 (swap): Likewise.
4234
4235 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
4236
4237 PR libstdc++/85965
4238 * include/bits/hashtable.h (_Hashtable): Move static assertions to
4239 destructor so they are not evaluated until the _Key type is complete.
4240 * include/bits/stl_tree.h (_Rb_tree): Likewise.
4241 * testsuite/23_containers/set/85965.cc: New test.
4242 * testsuite/23_containers/unordered_set/85965.cc: New test.
4243 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
4244 with regexp matching the corresponding _Rb_tree specialization.
4245 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
4246 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
4247 * testsuite/23_containers/set/48101_neg.cc: Likewise.
4248 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
4249 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
4250 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
4251 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
4252
4253 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4254
4255 PR libstdc++/89825
4256 Fix based on a suggestion by Antony Polukhin.
4257 * include/std/variant (__never_valueless): New.
4258 (_M_valid): Use it.
4259 (_Extra_visit_slot_needed): New.
4260 (_Multi_array): Use it.
4261 (_S_apply_all_alts): Likewise.
4262
4263 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4264
4265 PR libstdc++/89824
4266 Fix based on a suggestion by Antony Polukhin.
4267 * include/std/variant (__gen_vtable): Don't reserve an
4268 additional table slot, _Multi_array already does that.
4269
4270 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4271
4272 PR libstdc++/89816
4273 Fix based on a suggestion by Antony Polukhin.
4274 * include/std/variant (__variant_construct): Capture a pointer
4275 to the storage and visit just one variant.
4276
4277 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
4278
4279 * doc/xml/manual/backwards_compatibility.xml: Remove link to
4280 Doxygen-generated pages with unstable URL.
4281 * doc/xml/manual/concurrency_extensions.xml: Likewise.
4282 * doc/xml/manual/extensions.xml: Likewise.
4283 * doc/xml/manual/parallel_mode.xml: Likewise.
4284 * doc/xml/manual/support.xml: Likewise.
4285
4286 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
4287 avoid -Wconversion warnings.
4288
4289 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
4290
4291 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
4292 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
4293 (allstamped): Add stamp-pstl.
4294 (install-headers): Add ptsl_builddir.
4295 * include/Makefile.in: Regenerate.
4296 * include/bits/c++config: Add pstl configuration.
4297 * include/pstl/LICENSE.txt: New file.
4298 * include/pstl/algorithm_fwd.h: New file.
4299 * include/pstl/algorithm_impl.h: New file.
4300 * include/pstl/execution_defs.h: New file.
4301 * include/pstl/execution_impl.h: New file.
4302 * include/pstl/glue_algorithm_defs.h: New file.
4303 * include/pstl/glue_algorithm_impl.h: New file.
4304 * include/pstl/glue_execution_defs.h: New file.
4305 * include/pstl/glue_memory_defs.h: New file.
4306 * include/pstl/glue_memory_impl.h: New file.
4307 * include/pstl/glue_numeric_defs.h: New file.
4308 * include/pstl/glue_numeric_impl.h: New file.
4309 * include/pstl/memory_impl.h: New file.
4310 * include/pstl/numeric_fwd.h: New file.
4311 * include/pstl/numeric_impl.h: New file.
4312 * include/pstl/parallel_backend.h: New file.
4313 * include/pstl/parallel_backend_tbb.h: New file.
4314 * include/pstl/parallel_backend_utils.h: New file.
4315 * include/pstl/parallel_impl.h: New file.
4316 * include/pstl/pstl_config.h: New file.
4317 * include/pstl/unseq_backend_simd.h: New file.
4318 * include/pstl/utils.h: New file.
4319 * include/std/algorithm: Include parallel algorithm implementations.
4320 * include/std/execution: New file.
4321 * include/std/memory: Include parallel algorithm implementations.
4322 * include/std/numeric: Include parallel algorithm implementations.
4323 * include/std/version: Add parallel algorithms feature test macro.
4324 * testsuite/util/pstl/pstl_test_config.h: New file.
4325 * testsuite/util/pstl/test_utils.h: New file.
4326 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4327 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4328 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4329 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4330 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4331 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4332 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4333 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4334 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4335 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4336 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4337 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4338 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4339 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4340 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4341 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4342 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4343 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4344 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4345 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4346 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4347 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4348 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4349 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4350 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4351 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4352 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4353 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4354 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4355 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4356 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4357 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4358 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4359 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4360 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4361 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4362 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4363 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4364 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4365 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4366 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4367 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4368 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4369 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4370 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4371 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4372 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4373 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4374 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4375 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4376 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4377 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4378 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4379 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4380 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4381 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4382 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4383 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4384 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4385 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4386 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4387 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4388 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4389 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4390 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4391 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4392 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4393 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4394 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4395 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4396 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4397 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4398 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4399 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4400 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4401 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4402 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4403 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4404 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4405 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4406 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4407 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4408 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4409 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4410 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4411 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4412 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4413 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4414 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4415 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4416 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4417 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4418 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4419 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4420 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4421 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4422 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4423 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4424 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4425 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4426 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4427 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4428 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4429 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4430 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4431 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4432
4433 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
4434
4435 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
4436 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
4437 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
4438 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
4439 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
4440 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
4441 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
4442 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
4443 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
4444 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
4445 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
4446 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
4447 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
4448 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
4449 when the special functions IS is enabled, not for C++17.
4450 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
4451 Replace with ...
4452 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
4453 without checks for special functions in C++17.
4454 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4455 New test.
4456
4457 PR libstdc++/88066
4458 * include/backward/hash_map: Use <> for includes not "".
4459 * include/backward/hash_set: Likewise.
4460 * include/backward/strstream: Likewise.
4461 * include/tr1/bessel_function.tcc: Likewise.
4462 * include/tr1/exp_integral.tcc: Likewise.
4463 * include/tr1/legendre_function.tcc: Likewise.
4464 * include/tr1/modified_bessel_func.tcc: Likewise.
4465 * include/tr1/riemann_zeta.tcc: Likewise.
4466
4467 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
4468
4469 * doc/xml/manual/allocator.xml: Link to table documenting evolution
4470 of extension allocators.
4471 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
4472 Document new headers in 7.2, 8.1 and 9.1 releases.
4473 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
4474 * doc/html/*: Regenerate.
4475
4476 2019-03-12 John David Anglin <dave.anglin@bell.net>
4477
4478 PR libstdc++/89461
4479 * testsuite/lib/libstdc++.exp: Locate libatomic.
4480 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
4481 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
4482 libatomic options.
4483 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
4484 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
4485 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
4486 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
4487
4488 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
4489
4490 PR libstdc++/89460
4491 * configure.ac: Check for sockatmark.
4492 * crossconfig.m4: Check for sockatmark.
4493 * config.h.in: Regenerate.
4494 * configure: Regenerate.
4495 * include/experimental/internet (address_v4::_S_hton): Rename
4496 overloaded functions to _S_hton_16 and _S_ntoh_16.
4497 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
4498 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
4499 * include/experimental/socket (basic_socket::at_mark): Check
4500 _GLIBCXX_HAVE_SOCKATMARK.
4501
4502 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
4503 const variables instead of macros.
4504
4505 PR libstdc++/89629
4506 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
4507 Use correct type for len_aligned.
4508 * testsuite/20_util/hash/89629.cc: New test.
4509
4510 2019-03-11 Jakub Jelinek <jakub@redhat.com>
4511
4512 PR libstdc++/89641
4513 * include/std/atomic (atomic<T>::store, atomic<T>::load,
4514 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
4515 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
4516 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
4517 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
4518 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
4519 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
4520 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
4521 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
4522 memory_order_seq_cst to int.
4523
4524 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
4525
4526 * doc/xml/manual/using.xml: Use link element instead of xref.
4527 * doc/html/*: Regenerate.
4528
4529 * include/bits/fs_path.h (path::format): Add fixed underlying type.
4530
4531 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
4532
4533 PR libstdc++/89477
4534 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
4535 parameters in deduction guides.
4536 * include/debug/multimap.h (multimap): Likewise.
4537 * include/debug/set.h (multimap): Likewise.
4538 * include/debug/multiset.h (multimap): Likewise.
4539 * include/debug/unordered_map (unordered_map): Likewise.
4540 (unordered_multimap): Likewise.
4541 * include/debug/unordered_set (unordered_set): Likewise.
4542 (unordered_multiset): Likewise.
4543
4544 PR libstdc++/89608
4545 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
4546 Invalidate all iterators in case of rehash.
4547 (unordered_multimap<>::_M_check_rehashed): Likewise.
4548 * include/debug/unordered_set
4549 (unordered_set<>::_M_check_rehashed): Likewise.
4550 (unordered_multiset<>::_M_check_rehashed): Likewise.
4551 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
4552
4553 2019-03-07 Andreas Schwab <schwab@suse.de>
4554
4555 * config/abi/post/riscv64-linux-gnu: New directory.
4556 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
4557
4558 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
4559
4560 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
4561 compile test to run. Fix typo.
4562
4563 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
4564 * doc/html/*: Regenerate.
4565
4566 P0356R5 Simplified partial function application
4567 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
4568 helpers for bind_front.
4569 (bind_front, __cpp_lib_bind_front): Define.
4570 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
4571
4572 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4573
4574 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
4575 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
4576 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
4577 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
4578
4579 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
4580
4581 PR libstdc++/86655 - std::assoc_legendre should not constrain
4582 the value of m (or x).
4583 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
4584 __sph_legendre): If degree > order Don't throw, return 0.
4585 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
4586 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
4587 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
4588 * testsuite/tr1/5_numerical_facilities/special_functions/
4589 02_assoc_legendre/pr86655.cc: New test.
4590 * testsuite/tr1/5_numerical_facilities/special_functions/
4591 22_sph_legendre/pr86655.cc: New test.
4592
4593 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
4594
4595 Rewrite variant.
4596 Also PR libstdc++/85517
4597 * include/std/variant (__do_visit): New.
4598 (__variant_cast): Likewise.
4599 (__variant_cookie): Likewise.
4600 (__erased_*): Remove.
4601 (_Variant_storage::_S_vtable): Likewise.
4602 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
4603 (_Variant_storage::__M_reset): Adjust.
4604 (__variant_construct): New.
4605 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
4606 __variant_construct.
4607 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
4608 (_Move_ctor_base::__M_destructive_copy): New.
4609 (_Move_ctor_base::__M_destructive_move): Adjust to use
4610 __variant_construct.
4611 (_Copy_assign_base::operator=): Adjust to use __do_visit.
4612 (_Copy_assign_alias): Adjust to check both copy assignment
4613 and copy construction for triviality.
4614 (_Move_assign_base::operator=): Adjust to use __do_visit.
4615 (_Multi_array): Add support for visitors that accept and return
4616 a __variant_cookie.
4617 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
4618 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
4619 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
4620 a __variant_cookie temporary for a variant that is valueless and..
4621 (__gen_vtable_impl::__visit_invoke): ..adjust here.
4622 (__gen_vtable::_Array_type): Conditionally make space for
4623 the __variant_cookie visitor case.
4624 (__variant_construct_by_index): New.
4625 (get_if): Adjust to use std::addressof.
4626 (relops): Adjust to use __do_visit.
4627 (variant): Add __variant_cast and __variant_construct_by_index
4628 as friends.
4629 (variant::emplace): Use _M_reset() and __variant_construct_by_index
4630 instead of self-destruction.
4631 (variant::swap): Adjust to use __do_visit.
4632 (visit): Reimplement in terms of __do_visit.
4633 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
4634 * testsuite/20_util/variant/compile.cc: Adjust.
4635 * testsuite/20_util/variant/run.cc: Likewise.
4636
4637 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
4638
4639 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
4640 constant.
4641 * testsuite/experimental/feat-char8_t.cc: Likewise.
4642
4643 * include/std/type_traits [C++20] (is_bounded_array)
4644 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
4645 Define.
4646 * testsuite/20_util/is_bounded_array/requirements/
4647 explicit_instantiation.cc: New test.
4648 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
4649 test.
4650 * testsuite/20_util/is_bounded_array/value.cc: New test.
4651 * testsuite/20_util/is_unbounded_array/requirements/
4652 explicit_instantiation.cc: New test.
4653 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
4654 * test.
4655 * testsuite/20_util/is_unbounded_array/value.cc: New test.
4656
4657 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
4658 Add constexpr.
4659 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
4660
4661 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
4662
4663 * include/c_compatibility/math.h [C++20] (lerp): Add using
4664 declaration.
4665 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
4666 (__lerp): Define function template to implement lerp.
4667 (lerp(float, float, float), lerp(double, double, double))
4668 (lerp(long double, long double, long double)): Define for C++20.
4669 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
4670 (midpoint(T, T), midpoint(T*, T*)): Define.
4671 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
4672 * testsuite/26_numerics/lerp.cc: New test.
4673 * testsuite/26_numerics/midpoint/floating.cc: New test.
4674 * testsuite/26_numerics/midpoint/integral.cc: New test.
4675 * testsuite/26_numerics/midpoint/pointer.cc: New test.
4676
4677 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
4678
4679 PR libstdc++/88996 Implement P0439R0
4680 Make std::memory_order a scoped enumeration.
4681 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
4682 add variables for the old enumerators. Adjust calls.
4683 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
4684 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
4685
4686 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
4687
4688 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
4689 directive.
4690
4691 * include/std/memory_resource (polymorphic_allocator): Add default
4692 template argument for C++20.
4693 (polymorphic_allocator::allocate_bytes)
4694 (polymorphic_allocator::deallocate_bytes)
4695 (polymorphic_allocator::allocate_object)
4696 (polymorphic_allocator::deallocate_object)
4697 (polymorphic_allocator::new_object)
4698 (polymorphic_allocator::delete_object): New member functions for
4699 C++20.
4700 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
4701 test.
4702
4703 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
4704
4705 PR libstdc++/89562
4706 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
4707 mode for mingw.
4708
4709 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
4710
4711 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
4712 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
4713
4714 * include/std/memory (uses_allocator_construction_args): New set of
4715 overloaded functions.
4716 (make_obj_using_allocator, uninitialized_construct_using_allocator):
4717 New functions.
4718 * include/std/memory_resource (polymorphic_allocator::construct)
4719 [__cplusplus > 201703l]: Replace all overloads with a single function
4720 using uses_allocator_construction_args.
4721 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
4722 test.
4723 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
4724
4725 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
4726
4727 PR libstdc++/89466
4728 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
4729 stylesheet directories before check for xsltproc. Try to use
4730 xmlcatalog to find local stylesheet directory before trying hardcoded
4731 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
4732 check to look for the same stylesheet as doc/Makefile.am uses. Don't
4733 use xsltproc if xmlcatalog fails to find a local stylesheet.
4734 * configure.ac: Check for xmlcatalog.
4735 * Makefile.in: Regenerate.
4736 * configure: Likewise.
4737 * doc/Makefile.in: Likewise.
4738 * include/Makefile.in: Likewise.
4739 * libsupc++/Makefile.in: Likewise.
4740 * po/Makefile.in: Likewise.
4741 * python/Makefile.in: Likewise.
4742 * src/Makefile.in: Likewise.
4743 * src/c++11/Makefile.in: Likewise.
4744 * src/c++17/Makefile.in: Likewise.
4745 * src/c++98/Makefile.in: Likewise.
4746 * src/filesystem/Makefile.in: Likewise.
4747 * testsuite/Makefile.in: Likewise.
4748
4749 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
4750
4751 PR libstdc++/89477
4752 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
4753 container deduction guides.
4754 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
4755 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
4756 parameters in deduction guides.
4757 * include/bits/stl_multimap.h (multimap): Likewise.
4758 * include/bits/stl_multiset.h (multiset): Likewise.
4759 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
4760 * include/bits/stl_set.h (set): Likewise.
4761 * include/bits/stl_stack.h (stack): Likewise.
4762 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4763 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
4764 constrain parameters in deduction guides.
4765 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4766 Likewise.
4767 * testsuite/23_containers/map/cons/deduction.cc: Test additional
4768 deduction cases.
4769 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4770 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4771 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
4772 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4773 Likewise.
4774 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4775 Likewise.
4776 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4777
4778 PR libstdc++/89416
4779 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
4780 to class template and partial specialization using void_t.
4781 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4782
4783 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
4784
4785 PR libstdc++/89416
4786 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
4787 copy and move members public.
4788
4789 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
4790
4791 * include/std/type_traits (__underlying_type_impl): New helper to
4792 make underlying_type SFINAE-friendly.
4793 (underlying_type): Derive from __underlying_type_impl.
4794 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
4795 test.
4796
4797 PR libstdc++/89446
4798 * include/bits/char_traits.h (__constant_char_array): Check index is
4799 in range before dereferencing.
4800 (char_traits<char>::compare, char_traits<char>::find)
4801 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
4802 immediately if n is zero.
4803 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
4804 Remove workarounds for PR 67026.
4805 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
4806 New test.
4807 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
4808 New test.
4809
4810 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4811
4812 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
4813 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4814
4815 2019-02-22 Jakub Jelinek <jakub@redhat.com>
4816
4817 PR libstdc++/89402
4818 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
4819 type to std::size_t and argument to type to long double.
4820
4821 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
4822
4823 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
4824 * config/abi/post/sparc64-linux-gnu: New directory.
4825 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
4826 * config/abi/post/sparc64-linux-gnu/32: New directory.
4827 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
4828
4829 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4830
4831 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
4832 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
4833 test.
4834
4835 2019-02-22 Tom Honermann <tom@honermann.net>
4836
4837 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
4838 printers for u8string and u8string_view.
4839
4840 2019-02-22 Tom Honermann <tom@honermann.net>
4841
4842 * testsuite/18_support/byte/ops.cc: Validate
4843 std::to_integer<char8_t>, std::to_integer<char16_t>, and
4844 std::to_integer<char32_t>.
4845 * testsuite/18_support/numeric_limits/dr559.cc: Validate
4846 std::numeric_limits<char8_t>.
4847 * testsuite/18_support/numeric_limits/lowest.cc: Validate
4848 std::numeric_limits<char8_t>::lowest().
4849 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
4850 std::numeric_limits<char8_t>::max_digits10.
4851 * testsuite/18_support/type_info/fundamental.cc: Validate
4852 typeinfo for char8_t.
4853 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
4854 std::from_chars with char8_t.
4855 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
4856 Validate explicit instantiation of std::hash<char8_t>.
4857 * testsuite/20_util/is_integral/value.cc: Validate
4858 std::is_integral<char8_t>.
4859 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
4860 Validate std::make_signed<char8_t>.
4861 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
4862 Validate u8string construction from char8_t sources.
4863 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
4864 std::pmr::u8string.
4865 * testsuite/21_strings/basic_string_view/operations/compare/
4866 char/70483.cc: Validate substr operations on u8string_view.
4867 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
4868 the u8string_view typedef is defined.
4869 * testsuite/21_strings/char_traits/requirements/
4870 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
4871 member functions.
4872 * testsuite/21_strings/char_traits/requirements/
4873 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
4874 constexpr member functions.
4875 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
4876 that the u8string typedef is defined.
4877 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
4878 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
4879 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
4880 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
4881 numbers.
4882 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
4883 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
4884 Likewise.
4885 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
4886 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4887 Validate std::atomic<char8_t>::is_always_lock_free
4888 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
4889 Update line numbers.
4890 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
4891 Likewise.
4892 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
4893 Likewise.
4894 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
4895 Validate std::experimental::pmr::u8string.
4896 * testsuite/experimental/string_view/typedefs.cc: Validate that the
4897 u8string_view typedef is defined.
4898 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
4899 char32_t to the typelists.
4900
4901 2019-02-22 Tom Honermann <tom@honermann.net>
4902
4903 * include/ext/typelist.h: Constrain a partial specialization of
4904 typelist::detail::append_ to only match chain<T1,T2>.
4905
4906 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
4907
4908 PR libstdc++/89416
4909 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
4910 class template with class. Replace move and copy member types with
4911 member alias templates, so they are only instantiated when needed.
4912 (__is_copy_insertable, __is_move_insertable): Adjust base class.
4913 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
4914 test for C++11/14/17 as well.
4915 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
4916 test.
4917
4918 2019-02-20 Jakub Jelinek <jakub@redhat.com>
4919
4920 PR libstdc++/89402
4921 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
4922 _GLIBCXX_PURE to the alias declaration.
4923
4924 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
4925
4926 * testsuite/21_strings/basic_string/literals/types.cc
4927 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
4928 * testsuite/21_strings/basic_string/literals/values.cc
4929 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4930 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
4931 potentially having different type.
4932 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
4933 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
4934 to char.
4935 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
4936 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
4937 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
4938 string literals only using basic character set.
4939 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
4940 u8 literals to char.
4941 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
4942 Test ATOMIC_CHAR8_T_LOCK_FREE.
4943 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
4944 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
4945 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
4946 * testsuite/experimental/string_view/literals/types.cc
4947 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
4948 literal.
4949 * testsuite/experimental/string_view/literals/values.cc
4950 [_GLIBCXX_USE_CHAR8_T]: Likewise.
4951
4952 2019-02-19 Tom Honermann <tom@honermann.net>
4953
4954 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
4955 from char16_32_t.cc; validates numeric_limits<char8_t>.
4956 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
4957 test cloned from types.cc; validates operator""s for char8_t
4958 returns u8string.
4959 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
4960 test cloned from values.cc; validates construction and comparison
4961 of u8string values.
4962 * testsuite/21_strings/basic_string/requirements/
4963 /explicit_instantiation/char8_t/1.cc: New test cloned from
4964 char16_t/1.cc; validates explicit instantiation of
4965 basic_string<char8_t>.
4966 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4967 New test cloned from types.cc; validates operator""sv for char8_t
4968 returns u8string_view.
4969 * testsuite/21_strings/basic_string_view/literals/
4970 values-char8_t.cc: New test cloned from values.cc; validates
4971 construction and comparison of u8string_view values.
4972 * testsuite/21_strings/basic_string_view/requirements/
4973 explicit_instantiation/char8_t/1.cc: New test cloned from
4974 char16_t/1.cc; validates explicit instantiation of
4975 basic_string_view<char8_t>.
4976 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
4977 New test cloned from char16_t/65049.cc; validates that
4978 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
4979 * testsuite/21_strings/char_traits/requirements/char8_t/
4980 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
4981 that char_traits<char8_t> member typedefs are present and correct.
4982 * testsuite/21_strings/char_traits/requirements/
4983 explicit_instantiation/char8_t/1.cc: New test cloned from
4984 char16_t/1.cc; validates explicit instantiation of
4985 char_traits<char8_t>.
4986 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
4987 from char16_t.cc: validates
4988 codecvt<char16_t, char8_t, mbstate_t>.
4989 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
4990 from char32_t.cc: validates
4991 codecvt<char32_t, char8_t, mbstate_t>.
4992 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
4993 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
4994 codecvt<char32_t, char8_t, std::mbstate_t>.
4995 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
4996 test cloned from string.cc; validates filesystem::path construction
4997 from char8_t input.
4998 * testsuite/experimental/feat-char8_t.cc: New test; validates that
4999 the __cpp_lib_char8_t feature test macro is defined with the
5000 correct value.
5001 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
5002 New test cloned from string.cc; validates filesystem::path
5003 construction from char8_t input.
5004 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
5005 test cloned from types.cc; validates operator""sv for char8_t
5006 returns u8string_view.
5007 * testsuite/experimental/string_view/literals/values-char8_t.cc:
5008 New test cloned from values.cc; validates construction and
5009 comparison of u8string_view values.
5010 * testsuite/experimental/string_view/requirements/
5011 explicit_instantiation/char8_t/1.cc: New test cloned from
5012 char16_t/1.cc; validates explicit instantiation of
5013 basic_string_view<char8_t>.
5014 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
5015 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
5016 enabled.
5017
5018 2019-02-19 Tom Honermann <tom@honermann.net>
5019
5020 P0482R5 char8_t: Standard library support
5021 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
5022 typeinfo symbols for char8_t.
5023 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
5024 (GLIBCXX_3.4.26): Add symbols for specializations of
5025 numeric_limits and codecvt that involve char8_t.
5026 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
5027 * include/bits/atomic_base.h: Add atomic_char8_t.
5028 * include/bits/basic_string.h: Add std::hash<u8string> and
5029 operator""s(const char8_t*, size_t).
5030 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
5031 __cpp_lib_char8_t.
5032 * include/bits/char_traits.h: Add char_traits<char8_t>.
5033 * include/bits/codecvt.h: Add
5034 codecvt<char16_t, char8_t, mbstate_t>,
5035 codecvt<char32_t, char8_t, mbstate_t>,
5036 codecvt_byname<char16_t, char8_t, mbstate_t>, and
5037 codecvt_byname<char32_t, char8_t, mbstate_t>.
5038 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
5039 recognize char8_t as an integral type.
5040 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
5041 char8_t.
5042 (path::u8string): Return std::u8string when char8_t support is
5043 enabled.
5044 (path::generic_u8string): Likewise.
5045 (path::_S_convert): Handle conversion from char8_t input.
5046 (path::_S_str_convert): Likewise.
5047 * include/bits/functional_hash.h: Add hash<char8_t>.
5048 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
5049 char8_t.
5050 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
5051 for new char8_t specializations.
5052 * include/bits/localefwd.h: Add missing declarations of
5053 codecvt<char16_t, char, mbstate_t> and
5054 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
5055 codecvt<char16_t, char8_t, mbstate_t> and
5056 codecvt<char32_t, char8_t, mbstate_t>.
5057 * include/bits/postypes.h: Add u8streampos
5058 * include/bits/stringfwd.h: Add declarations of
5059 char_traits<char8_t> and u8string.
5060 * include/c_global/cstddef: Add __byte_operand<char8_t>.
5061 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
5062 Recognize char8_t.
5063 (path::u8string): Return std::u8string when char8_t support is
5064 enabled.
5065 (path::generic_u8string): Likewise.
5066 (path::_S_convert): Handle conversion from char8_t input.
5067 (path::_S_str_convert): Likewise.
5068 * include/experimental/string: Add u8string.
5069 * include/experimental/string_view: Add u8string_view,
5070 hash<experimental::u8string_view>, and
5071 operator""sv(const char8_t*, size_t).
5072 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
5073 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
5074 as a character type.
5075 * include/std/limits: Add numeric_limits<char8_t>.
5076 * include/std/string_view: Add u8string_view,
5077 hash<experimental::u8string_view>, and
5078 operator""sv(const char8_t*, size_t).
5079 * include/std/type_traits: Add __is_integral_helper<char8_t>,
5080 __make_unsigned<char8_t>, and __make_signed<char8_t>.
5081 * libsupc++/atomic_lockfree_defines.h: Define
5082 ATOMIC_CHAR8_T_LOCK_FREE.
5083 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
5084 codecvt.cc and limits.cc so that char8_t specializations of
5085 numeric_limits and codecvt and emitted.
5086 * src/c++11/Makefile.in: Likewise.
5087 * src/c++11/codecvt.cc: Define members of
5088 codecvt<char16_t, char8_t, mbstate_t>,
5089 codecvt<char32_t, char8_t, mbstate_t>,
5090 codecvt_byname<char16_t, char8_t, mbstate_t>, and
5091 codecvt_byname<char32_t, char8_t, mbstate_t>.
5092 * src/c++11/limits.cc: Define members of
5093 numeric_limits<char8_t>.
5094 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
5095 locale_init.cc and localename.cc.
5096 * src/c++98/Makefile.in: Likewise.
5097 * src/c++98/locale_init.cc: Add initialization for the
5098 codecvt<char16_t, char8_t, mbstate_t> and
5099 codecvt<char32_t, char8_t, mbstate_t> facets.
5100 * src/c++98/localename.cc: Likewise.
5101 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
5102
5103 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
5104
5105 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
5106 * 27_io/filesystem/operations/resize_file.cc: Likewise.
5107 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
5108
5109 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
5110
5111 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
5112 * doc/html/*: Regenerate.
5113
5114 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
5115 * doc/html/*: Regenerate.
5116
5117 * doc/xml/manual/intro.xml: Document LWG 2586 status.
5118 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
5119 allocator type in is_constructible checks.
5120 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
5121 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
5122 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
5123 problematic type from LWG 2586 discussion.
5124 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
5125 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
5126
5127 * configure.ac: Check for C11 timespec_get function.
5128 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
5129 (openbsd): Likewise
5130 * config.h.in: Regenerate.
5131 * configure: Regenerate.
5132 * include/c_global/ctime (timespec, timespec_get): Add to namespace
5133 std for C++17 and up.
5134
5135 * doc/xml/manual/intro.xml: Document LWG 2537 status.
5136 * include/bits/stl_queue.h
5137 (priority_queue(const Compare&, const Container&, const Alloc&))
5138 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
5139 make_heap.
5140 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
5141
5142 * doc/xml/manual/intro.xml: Document LWG 2566 status.
5143 * include/bits/stl_queue.h (queue, priority_queue): Add static
5144 assertions to enforce LWG 2566 requirement on value_type.
5145 * include/bits/stl_stack.h (stack): Likewise.
5146
5147 PR middle-end/89303
5148 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
5149
5150 * doc/xml/manual/intro.xml: Document LWG 2735 status.
5151 * include/bits/std_abs.h: Add comment about LWG 2735.
5152 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
5153
5154 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
5155
5156 PR libstdc++/89345
5157 * include/std/version [__cpp_impl_destroying_delete]
5158 (__cpp_lib_destroying_delete): Only define for C++2a and later.
5159 * libsupc++/new [__cpp_impl_destroying_delete]
5160 (__cpp_lib_destroying_delete): Likewise.
5161 (destroying_delete_t, destroying_delete): Likewise, but define even
5162 when __cpp_impl_destroying_delete is not defined.
5163 * testsuite/18_support/destroying_delete.cc: New test.
5164
5165 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
5166
5167 PR libstdc++/89023
5168 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
5169 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
5170 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
5171 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
5172
5173 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
5174
5175 PR libstdc++/71044
5176 * include/bits/fs_path.h (path::has_root_name)
5177 (path::has_root_directory, path::has_root_path)
5178 (path::has_relative_path, path::has_parent_path)
5179 (path::has_filename, path::has_stem, path::has_extension)
5180 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
5181 noexcept.
5182 * src/c++17/fs_path.cc (path::has_root_name)
5183 (path::has_root_directory, path::has_root_path)
5184 (path::has_relative_path, path::has_parent_path)
5185 (path::has_filename, path::_M_find_extension): Add noexcept.
5186
5187 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
5188
5189 PR libstdc++/89102 (partial)
5190 * include/std/type_traits (common_type<>): Define.
5191 (common_type<T>): Derive from common_type<T, T>.
5192 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
5193 Test zero-length template argument list.
5194 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
5195 Test additional single argument cases.
5196 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
5197 Adjust expected error.
5198
5199 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
5200
5201 PR libstdc++/89128
5202 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
5203 guides.
5204 * include/bits/stl_stack.h (stack): Likewise.
5205 * testsuite/23_containers/priority_queue/deduction.cc: New test.
5206 * testsuite/23_containers/queue/deduction.cc: New test.
5207 * testsuite/23_containers/stack/deduction.cc: New test.
5208
5209 PR libstdc++/89194
5210 * include/std/type_traits (__is_convertible_helper)
5211 (__is_convertible_helper<_From, _To, false>): Revert changes to
5212 support is_nothrow_convertible.
5213 (__is_nt_convertible_helper): New helper.
5214 (is_nothrow_convertible): Use __is_nt_convertible_helper.
5215
5216 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
5217 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
5218
5219 PR libstdc++/89130
5220 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
5221 __is_alloc_insertable_impl. Replace single type member with two
5222 members, one for each of copy and move insertable.
5223 (__is_move_insertable): New trait for internal use.
5224 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
5225 (vector::_S_nothrow_relocate(true_type)): New functions to
5226 conditionally check if __relocate_a can throw.
5227 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
5228 on __is_move_insertable.
5229 (vector::_S_do_relocate): New overloaded functions to conditionally
5230 call __relocate_a.
5231 (vector::_S_relocate): New function that dispatches to _S_do_relocate
5232 based on _S_use_relocate.
5233 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5234 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
5235 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
5236
5237 PR libstdc++/89090
5238 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
5239 parameter unnamed. Add message to static assertion.
5240 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5241 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
5242 in C++11 code.
5243
5244 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
5245
5246 PR libstdc++/87106
5247 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
5248 Rename...
5249 (__is_bitwise_relocatable): ... to this.
5250 (__relocate_a_1): Adapt.
5251 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
5252 (__is_bitwise_relocatable): ... to this.
5253
5254 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
5255
5256 PR libstdc++/89117
5257 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
5258 final component as well as from _M_pathname. Append the dot using
5259 operator+= instead of only to _M_pathname.
5260 (path::_M_find_extension): Reformat slightly.
5261 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5262 Add more test cases.
5263
5264 2019-01-30 Ulrich Drepper <drepper@redhat.com>
5265
5266 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
5267
5268 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
5269
5270 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
5271 constexpr specifiers from arg and proj.
5272
5273 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
5274 __shared_ptr instantiations used by gcc4-compatible ABI.
5275
5276 * include/experimental/forward_list (experimental::erase): Qualify
5277 call to erase_if.
5278 * include/experimental/list (experimental::erase): Likewise.
5279 * include/std/forward_list (std::erase): Likewise.
5280 * include/std/list (std::erase): Likewise.
5281
5282 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
5283 C++2a.
5284 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
5285 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
5286 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
5287 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
5288 * testsuite/ext/array_allocator/26875.cc: Likewise.
5289 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
5290 * testsuite/util/replacement_memory_operators.h: Likewise.
5291 * testsuite/util/testsuite_allocator.h: Likewise.
5292
5293 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
5294 normal mode vector, even for debug mode.
5295 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
5296 Define alias template for normal mode vector.
5297
5298 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
5299
5300 PR libstdc++/68737
5301 * config/locale/generic/c_locale.h (__convert_from_v)
5302 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5303 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5304 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
5305 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5306
5307 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
5308
5309 PR libstdc++/88840
5310 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
5311 data member with static member function _S_use_relocate().
5312 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5313 (vector::_M_default_append): Use _S_use_relocate() instead of
5314 __use_relocate.
5315
5316 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
5317 sign of results.
5318
5319 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
5320
5321 PR libstdc++/88740
5322 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
5323 write to stderr instead of using printf.
5324
5325 2019-01-21 Jakub Jelinek <jakub@redhat.com>
5326
5327 PR libstdc++/86590
5328 * include/bits/char_traits.h (__constant_string_p,
5329 __constant_char_array_p): Use __builtin_is_constant_evaluated if
5330 available.
5331
5332 2019-01-20 Ulrich Drepper <drepper@redhat.com>
5333
5334 Implement C++20 P0600r1.
5335 * include/backward/hash_map: Add nodiscard attribute to empty.
5336 * include/backward/hash_set: Likewise.
5337 * backward/hashtable.h: Likewise.
5338 * include/bits/basic_string.h: Likewise.
5339 * include/bits/forward_list.h: Likewise.
5340 * include/bits/hashtable.h: Likewise.
5341 * include/bits/regex.h: Likewise.
5342 * include/bits/stl_deque.h: Likewise.
5343 * include/bits/stl_list.h: Likewise.
5344 * include/bits/stl_map.h: Likewise.
5345 * include/bits/stl_multimap.h: Likewise.
5346 * include/bits/stl_multiset.h: Likewise.
5347 * include/bits/stl_queue.h: Likewise.
5348 * include/bits/stl_set.h: Likewise.
5349 * include/bits/stl_stack.h: Likewise.
5350 * include/bits/stl_tree.h: Likewise.
5351 * include/bits/stl_vector.h: Likewise.
5352 * include/bits/unordered_map.h: Likewise.
5353 * include/bits/unordered_set.h: Likewise.
5354 * include/debug/array: Likewise.
5355 * include/experimental/any: Likewise.
5356 * include/experimental/bits/fs_path.h: Likewise.
5357 * include/experimental/internet: Likewise.
5358 * include/experimental/string_view: Likewise.
5359 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
5360 Likewise.
5361 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
5362 Likewise.
5363 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
5364 Likewise.
5365 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
5366 Likewise.
5367 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
5368 Likewise.
5369 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
5370 Likewise.
5371 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
5372 Likewise.
5373 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
5374 Likewise.
5375 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5376 info_fn_imps.hpp: Likewise.
5377 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5378 left_child_next_sibling_heap_.hpp: Likewise.
5379 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
5380 Likewise.
5381 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
5382 Likewise.
5383 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
5384 Likewise.
5385 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
5386 Likewise.
5387 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
5388 Likewise.
5389 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
5390 Likewise.
5391 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
5392 Likewise.
5393 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
5394 * include/ext/pb_ds/trie_policy.hpp: Likewise.
5395 * include/ext/rope: Likewise.
5396 * include/ext/slist: Likewise.
5397 * include/ext/vstring.h: Likewise.
5398 * include/profile/array: Likewise.
5399 * include/std/array: Likewise.
5400 * include/tr1/array: Likewise.
5401 * include/tr1/hashtable.h: Likewise.
5402 * include/tr1/regex: Likewise.
5403 * include/tr2/dynamic_bitset: Likewise.
5404 * include/bits/alloc_traits.h: Add nodiscard attribute to
5405 allocate.
5406 * include/experimental/memory_resource: Likewise.
5407 * include/ext/alloc_traits.h: Likewise.
5408 * include/ext/array_allocator.h: Likewise.
5409 * include/ext/bitmap_allocator.h: Likewise.
5410 * include/ext/debug_allocator.h: Likewise.
5411 * include/ext/extptr_allocator.h: Likewise.
5412 * include/ext/mt_allocator.h: Likewise.
5413 * include/ext/new_allocator.h: Likewise.
5414 * include/ext/pool_allocator.h: Likewise.
5415 * include/ext/throw_allocator.h: Likewise.
5416 * include/std/scoped_allocator: Likewise.
5417 * libsupc++/eh_alloc.cc: Likewise.
5418 * include/std/future: Add nodiscard attribute to async.
5419 * libsupc++/new: Add nodiscard attribute to new.
5420
5421 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
5422
5423 PR libstdc++/87514
5424 PR libstdc++/87520
5425 PR libstdc++/88782
5426 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
5427 * include/bits/shared_ptr.h
5428 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
5429 (allocate_shared): Change to use new tag type.
5430 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
5431 Declare new member function.
5432 (_Sp_alloc_shared_tag): Define new type.
5433 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
5434 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
5435 _Sp_make_shared_tag::_S_eq to check type_info.
5436 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
5437 Constrain to prevent being called with _Sp_alloc_shared_tag.
5438 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
5439 Replace constructor with ...
5440 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
5441 reference parameter so address of the new object can be returned to
5442 the caller. Obtain the allocator from the tag type.
5443 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
5444 constructor with ...
5445 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
5446 to the __shared_count constructor.
5447 (__allocate_shared): Change to use new tag type.
5448 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
5449
5450 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
5451
5452 * src/c++17/fs_ops.cc
5453 (equivalent(const path&, const path&, error_code&))
5454 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
5455 compare files instead of relying on incomplete info returned by stat.
5456
5457 PR libstdc++/88884
5458 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
5459 if the path is already absolute.
5460 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
5461 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
5462
5463 PR libstdc++/88881
5464 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
5465 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
5466 of filesystem::exists.
5467 (create_directories(const path&, error_code&)): Add assertions.
5468 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
5469 Add workaround for bug in _wstat for paths with trailing slash.
5470 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
5471 for expected behaviour on mingw.
5472 * testsuite/experimental/filesystem/operations/create_directories.cc:
5473 Likewise.
5474 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
5475 "TMP" instead of "TMPDIR" and clean environment before each test. Do
5476 not test permissions on mingw targets.
5477
5478 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
5479
5480 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
5481 constructors and open members taking wide strings. Fix patterns for
5482 filesystem::path members to match wstring_view parameters. Add
5483 exports for shared_ptr members used by directory iterators.
5484 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
5485 error code parameter if the file doesn't exist.
5486 * src/filesystem/ops.cc (remove(const path&, error_code&)):
5487 Likewise.
5488 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
5489 values for mingw targets, where "/" is not an absolute path. Do not
5490 test symlinks on mingw targets.
5491 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
5492 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
5493 on mingw targets.
5494 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5495 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
5496 that each component of the path is created.
5497 * testsuite/experimental/filesystem/operations/create_directories.cc:
5498 Likewise.
5499 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
5500 permissions on mingw targets.
5501 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
5502 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5503 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
5504 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
5505 mingw targets.
5506 * testsuite/experimental/filesystem/operations/permissions.cc:
5507 Likewise.
5508 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
5509 symlinks or permissions on mingw targets.
5510 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
5511 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
5512 symlinks on mingw targets.
5513 * testsuite/experimental/filesystem/operations/remove_all.cc:
5514 Likewise.
5515 * testsuite/27_io/filesystem/operations/status.cc: Do not test
5516 permissions on mingw targets.
5517 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
5518 test symlinks on mingw targets.
5519 * testsuite/experimental/filesystem/operations/space.cc: Fix test
5520 for mingw targets.
5521
5522 2019-02-14 Ulrich Drepper <drepper@redhat.com>
5523
5524 PR libstdc++/88738
5525 Warn about unused comparisons of shared_ptr/unique_ptr
5526 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
5527 * include/bits/shared_ptr.h: Use it for operator ==, !=,
5528 <, <=, >, >= for shared_ptr.
5529 * include/bits/unique_ptr.h: Likewise for unique_ptr.
5530
5531 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
5532
5533 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
5534 as 201611L, because P0497R0 changes are supported.
5535 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
5536
5537 * include/bits/erase_if.h [__cplusplus > 201703L]
5538 (__cpp_lib_erase_if): Only define for C++2a.
5539 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5540 (__cpp_lib_null_iterators): Define.
5541 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
5542 (__cpp_lib_null_iterators): Define.
5543 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
5544
5545 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
5546 status.
5547 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
5548 Define.
5549 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
5550 changes are supported.
5551 * include/std/optional (__cpp_lib_optional): Likewise.
5552 * include/std/variant (__cpp_lib_variant): Likewise.
5553 * include/std/version [!__STRICT_ANSI__]
5554 (__cpp_lib_uncaught_exceptions): Define as long integer.
5555 [__cplusplus >= 201703L] (__cpp_lib_any)
5556 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
5557 (__cpp_lib_variant): Define for C++17.
5558 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
5559 as long integer.
5560 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
5561 integer.
5562
5563 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
5564
5565 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
5566
5567 PR libstdc++/88811
5568 PR libstdc++/83306
5569 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
5570 before second path.
5571 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
5572 test.
5573
5574 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5575
5576 * doc/xml/manual/intro.xml: Include new section.
5577 * doc/xml/manual/status_cxx2017.xml: Document more
5578 implementation-defined properties of the library.
5579 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
5580 * doc/html/*: Regenerate.
5581
5582 * include/bits/refwrap.h [__cplusplus > 201703L]
5583 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
5584 (_Reference_wrapper_base_memfun): Do not define for C++2a.
5585 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
5586 for C++2a.
5587 (reference_wrapper::operator()): Add static assertion.
5588 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
5589
5590 * include/std/chrono (duration_values::zero(), duration_values::min())
5591 (duration_values::max()): Add noexcept.
5592 (duration::zero(), duration::min(), duration::max()): Likewise.
5593 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
5594 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
5595 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
5596
5597 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
5598
5599 2019-01-11 Jakub Jelinek <jakub@redhat.com>
5600
5601 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
5602 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
5603
5604 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
5605
5606 PR libstdc++/88802
5607 * include/bits/functional_hash.h (hash<nullptr_t>): Define
5608 specialization for C++17 (P0513R0, LWG 2817).
5609 * testsuite/20_util/hash/nullptr.cc: New test.
5610
5611 PR libstdc++/88125
5612 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
5613 pattern for std::basic_stringbuf::str().
5614
5615 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
5616 basic_ostream::operator<< patterns.
5617
5618 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5619
5620 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
5621 test failures on targets with 32-bit time_t.
5622
5623 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
5624 * include/std/deque: Likewise.
5625 * include/std/forward_list: Likewise.
5626 * include/std/list: Likewise.
5627 * include/std/string: Likewise.
5628 * include/std/vector: Likewise.
5629 * include/std/version: Likewise.
5630 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
5631 * testsuite/23_containers/deque/erasure.cc: Likewise.
5632 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5633 * testsuite/23_containers/list/erasure.cc: Likewise.
5634 * testsuite/23_containers/map/erasure.cc: Likewise.
5635 * testsuite/23_containers/set/erasure.cc: Likewise.
5636 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5637 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5638 * testsuite/23_containers/vector/erasure.cc: Likewise.
5639
5640 * include/experimental/internet [AI_NUMERICSERV]
5641 (resolver_base::numeric_service): Define conditionally.
5642 * testsuite/experimental/net/internet/resolver/base.cc: Test it
5643 conditionally.
5644 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
5645 Likewise.
5646
5647 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
5648 Jonathan Wakely <jwakely@redhat.com>
5649
5650 Implement LWG 2221
5651 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
5652 (GLIBCXX_3.4.26): Add new exports.
5653 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
5654 correct list of sources.
5655 * include/Makefile.in: Regenerate.
5656 * include/std/ostream (operator<<(nullptr_t)): New member function.
5657 * src/c++17/ostream-inst.cc: New file.
5658 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
5659 test.
5660
5661 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
5662
5663 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
5664 of the source file containing the caller.
5665 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
5666 directories created by test.
5667 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5668 Likewise.
5669 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
5670 Likewise.
5671 * testsuite/experimental/filesystem/iterators/
5672 recursive_directory_iterator.cc: Likewise.
5673
5674 2019-01-10 Jakub Jelinek <jakub@redhat.com>
5675
5676 PR tree-optimization/88775
5677 * include/bits/stl_function.h (greater<_Tp*>::operator(),
5678 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
5679 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
5680 instead of __builtin_constant_p if available. Don't bother with
5681 the pointer comparison in C++11 and earlier.
5682
5683 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
5684
5685 PR other/16615
5686
5687 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
5688 with "cannot".
5689
5690 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
5691
5692 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
5693 for filesystem::path. Give variables more distinctive names.
5694
5695 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
5696 member function to perform non-trivial assignment.
5697 (_Optional_payload_base::_M_move_assign): Likewise.
5698 (_Optional_payload<T, true, false, true>::operator=)
5699 (_Optional_payload<T, true, true, false>::operator=)
5700 (_Optional_payload<T, true, false, false>::operator=): Call
5701 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
5702
5703 PR libstdc++/88204
5704 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
5705 test std::complex<long double> if long double format is IBM128.
5706 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
5707 Likewise.
5708
5709 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5710
5711 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
5712 for old std::unique_ptr layout.
5713 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
5714 to become valueless. Add filesystem::path tests.
5715
5716 PR libstdc++/87855
5717 * include/std/optional (_Optional_payload_base): New class template
5718 for common code hoisted from _Optional_payload specializations. Use
5719 a template for the union, to allow a partial specialization for
5720 types with non-trivial destructors. Add constructors for in-place
5721 initialization to the union.
5722 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
5723 to perform non-trivial copy construction, instead of relying on
5724 non-standard copy elision in a delegating constructor.
5725 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
5726 non-trivial move construction.
5727 (_Optional_payload): Derive from _Optional_payload_base and use it
5728 for everything except the non-trivial assignment operators, which are
5729 defined as needed.
5730 (_Optional_payload<false, C, M>): Derive from the specialization
5731 _Optional_payload<true, false, false> and add a destructor.
5732 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
5733 Forward to corresponding members of _Optional_payload.
5734 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
5735 Hoist common members from _Optional_base.
5736 (_Optional_base): Make all members and base class public.
5737 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
5738 _Optional_base_impl.
5739 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
5740 support for new std::optional layout.
5741 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
5742
5743 PR libstdc++/88066
5744 * include/bits/locale_conv.h: Use <> for includes not "".
5745 * include/ext/random: Likewise.
5746 * include/ext/vstring.h: Likewise.
5747
5748 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5749
5750 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
5751 (GLIBCXX_3.4.21): Likewise.
5752
5753 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
5754
5755 PR libstdc++/88749
5756 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
5757 to match the one that controls whether utimbuf and utime are declared.
5758
5759 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
5760
5761 PR libstdc++/87787
5762 * include/bits/char_traits.h (char_traits::move): Do not pass null
5763 pointers to memmove.
5764 * include/bits/locale_facets.h
5765 (ctype<char>::widen(const char*, const char*, char*)): Do not
5766 pass null pointers to memcpy.
5767 (ctype<char>::narrow(const char*, const char*, char, char*)):
5768 Likewise.
5769 (ctype<char>::do_widen(const char*, const char*, char*)):
5770 Likewise.
5771 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
5772 Likewise.
5773
5774 * doc/xml/manual/spine.xml: Update copyright years.
5775 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
5776 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
5777 for C++17 filesystem library.
5778 * doc/html/*: Regenerate.
5779
5780 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
5781 * config.h.in: Regenerate.
5782 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
5783 alphabetically and add missing entries for copy_symlink,
5784 hard_link_count, rename, and resize_file.
5785 * configure: Regenerate.
5786 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
5787 used unconditionally.
5788 * src/filesystem/ops-common.h (__gnu_posix::truncate)
5789 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
5790 supports truncating to zero length.
5791 * testsuite/27_io/filesystem/operations/all.cc: New test.
5792 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
5793
5794 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
5795
5796 PR libstdc++/86756
5797 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
5798 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
5799 * config.h.in: Regenerate.
5800 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
5801 remaining std::filesystem types and functions.
5802 * configure: Regenerate.
5803 * src/c++17/Makefile.am: Add C++17 filesystem sources.
5804 * src/c++17/Makefile.in: Regenerate.
5805 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
5806 here, and change name of included file.
5807 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
5808 here, and change name of included file.
5809 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
5810 path to dir-common.h.
5811 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
5812 path to ops-common.h. Disable -Wunused-parameter warnings.
5813 (internal_file_clock): Define unconditionally.
5814 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
5815 define.
5816 (do_copy_file, do_space): Move definitions to ops.common.h.
5817 (copy, file_size, hard_link_count, last_write_time, space): Only
5818 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
5819 report an error.
5820 (last_write_time, read_symlink): Remove unused attributes from
5821 parameters.
5822 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
5823 * src/filesystem/Makefile.in: Regenerate.
5824 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
5825 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
5826 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
5827 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
5828 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
5829 dummy types and functions instead of using #error.
5830 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
5831 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
5832 in terms of stat.
5833 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
5834 (do_copy_file, do_space): Move definitions here from std-ops.cc.
5835 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
5836 to account for new namespace.
5837 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
5838 -lstdc++fs from dg-options.
5839 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
5840 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
5841 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
5842 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
5843 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
5844 Likewise.
5845 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
5846 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5847 Likewise.
5848 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
5849 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
5850 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
5851 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
5852 * testsuite/27_io/filesystem/operations/create_directories.cc:
5853 Likewise.
5854 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
5855 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
5856 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
5857 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
5858 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
5859 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
5860 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5861 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
5862 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
5863 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
5864 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
5865 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
5866 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
5867 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
5868 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
5869 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
5870 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
5871 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
5872 Likewise.
5873 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
5874
5875
5876 PR libstdc++/86756
5877 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
5878 typeinfo and vtables less greedy.
5879 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
5880 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
5881 * src/c++17/Makefile.in: Regenerate.
5882 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
5883 here, and change name of included file.
5884 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
5885 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
5886 from sources.
5887 * src/filesystem/Makefile.in: Regenerate.
5888 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
5889 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
5890 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
5891 from dg-options and remove dg-require-filesystem-ts.
5892 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
5893 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
5894 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
5895 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
5896 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5897 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5898 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5899 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
5900 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
5901 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
5902 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
5903 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
5904 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
5905 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
5906 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
5907 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
5908 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
5909 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
5910 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
5911 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
5912 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
5913 Likewise.
5914 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
5915 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
5916 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
5917 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
5918 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
5919 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
5920 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
5921 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
5922 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
5923 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
5924 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
5925 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
5926 Likewise.
5927 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
5928 Likewise.
5929 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5930 Likewise.
5931 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
5932 Likewise.
5933 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
5934 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
5935 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
5936 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
5937 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
5938 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
5939 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
5940 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
5941 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
5942 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
5943 Likewise.
5944 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
5945 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
5946 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
5947 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
5948 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
5949
5950 PR libstdc++/87431
5951 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
5952 Check is_trivially_copyable instead of is_scalar.
5953 (variant::emplace<N, Args>(Args&&...)): If construction of the new
5954 contained value can throw and its type is trivially copyable then
5955 construct into a temporary variant and move from it, to provide the
5956 strong exception safety guarantee.
5957 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
5958 Likewise.
5959 * testsuite/20_util/variant/87431.cc: New test.
5960 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
5961 conversion causes valueless state.
5962
5963 PR libstdc++/88607
5964 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
5965 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
5966 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
5967 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
5968 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
5969
5970 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
5971
5972 * include/bits/fs_fwd.h (__file_clock): Define new clock.
5973 (file_time_type): Redefine in terms of __file_clock.
5974 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
5975 overflow.
5976 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
5977 internal linkage.
5978 (internal_file_lock): New helper type for accessing __file_clock.
5979 (do_copy_file): Use internal_file_lock to convert system time to
5980 file_time_type.
5981 (last_write_time(const path&, error_code&)): Likewise.
5982 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
5983
5984 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
5985
5986 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
5987 for const member functions of std::basic_string.
5988 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
5989 in C++17.
5990 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
5991 Make non-standard constructor private.
5992 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
5993 Likewise.
5994 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
5995 explicit instantiations for C++17 as well as earlier dialects.
5996 * src/c++17/Makefile.am: Add new source files.
5997 * src/c++17/Makefile.in: Regenerate.
5998 * src/c++17/cow-string-inst.cc: New file defining explicit
5999 instantiations for basic_string member functions added in C++17.
6000 * src/c++17/string-inst.cc: Likewise.
6001
6002 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
6003 copy/move constructors for old std::basic_string.
6004 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
6005 (basic_string::reference, basic_string::const_reference): Define
6006 as plain references for C++11 and later.
6007 (basic_string::basic_string()): Put constructor body outside
6008 preprocessor conditional groups.
6009 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
6010 instead of copying it.
6011 (basic_string::basic_string(const basic_string&, const _Alloc&)):
6012 Define.
6013 (basic_string::basic_string(basic_string&&, const _Alloc&)):
6014 Define.
6015 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
6016 cases for old basic_string.
6017 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
6018 allocator-extended constructors unconditionally. Add extra members to
6019 allocator type when using old string ABI.
6020 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
6021 for old string ABI.
6022 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
6023
6024 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
6025 -fno-inline added to test flags.
6026
6027 * testsuite/21_strings/basic_string/requirements/
6028 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
6029
6030 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
6031 assertion failures with old std::string ABI.
6032
6033 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
6034 with ...
6035 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
6036 functions that will only erase elements at the end.
6037 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
6038 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
6039 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
6040 of erase(p, end()).
6041 (path::_List::pop_back()): Define.
6042 (path::_List::_M_erase_from(const_iterator)): Define.
6043 (path::operator/=(const path&)): Use pop_back to remove last component
6044 and _M_erase_from to remove multiple components.
6045 (path::_M_append(basic_string_view<value_type>)): Likewise.
6046 (path::operator+=(const path&)): Likewise.
6047 (path::_M_concat(basic_string_view<value_type>)): Likewise.
6048 (path::remove_filename()): Likewise.
6049 (path::lexically_normal()): Use _List::_Impl iterators instead of
6050 path::iterator. Use pop_back to remove components from the end. Clear
6051 trailing filename, instead of using erase(const_iterator) to remove
6052 a non-final component.
6053 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
6054 additional cases.
6055 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
6056
6057 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
6058 incorrect treatment of empty filename after trailing slash.
6059 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
6060
6061 * testsuite/21_strings/basic_string/modifiers/assign/char/
6062 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
6063 to test flags.
6064 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
6065 move_assign_optim.cc: Likewise.
6066
6067 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
6068 Jakub Jelinek <jakub@redhat.com>
6069
6070 PR libstdc++/88607
6071 * include/experimental/memory: Replace UTF-8 quote characters.
6072 * include/std/future: Replace UTF-8 "em dash" characters.
6073
6074 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
6075
6076 PR libstdc++/88607
6077 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
6078 * include/debug/forward_list: Likewise.
6079 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
6080 character.
6081 * include/experimental/chrono: Likewise.
6082 * include/experimental/functional: Likewise.
6083 * include/experimental/ratio: Likewise.
6084 * include/experimental/system_error: Likewise.
6085 * include/experimental/tuple: Likewise.
6086 * include/experimental/type_traits: Likewise.
6087 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
6088 * include/parallel/multiseq_selection.h: Likewise.
6089
6090 PR libstdc++/88681
6091 * config/abi/pre/gnu.ver: Add missing exports.
6092 * testsuite/22_locale/collate_byname/88681.cc: New test.
6093 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
6094 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
6095
6096 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
6097
6098 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
6099 initializer_list<value_type> and from input iterator ranges.
6100 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
6101
6102 * testsuite/experimental/string_view/element_access/char/empty.cc:
6103 Fix year range in copyright header.
6104
6105 2019-01-02 Joel Brobecker <brobecker@adacore.com>
6106
6107 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
6108 Fix year range in copyright header.
6109
6110 2019-01-01 Jakub Jelinek <jakub@redhat.com>
6111
6112 Update copyright years.
6113 \f
6114 Copyright (C) 2019 Free Software Foundation, Inc.
6115
6116 Copying and distribution of this file, with or without modification,
6117 are permitted in any medium without royalty provided the copyright
6118 notice and this notice are preserved.