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