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