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