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