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