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