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