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