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