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