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