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