1 2019-11-16 Jonathan Wakely <jwakely@redhat.com>
3 * include/std/ranges: Revert accidentally committed changes.
5 * include/std/thread (jthread::jthread()): Use nostopstate constant.
6 (jthread::jthread(Callable&&, Args&&...)): Use helper function to
7 create std::thread instead of indirection through a lambda. Use
8 remove_cvref_t instead of decay_t.
9 (jthread::joinable(), jthread::get_id(), jthread::native_handle())
10 (jthread::hardware_concurrency()): Add nodiscard attribute.
11 (swap(jthread&. jthread&)): Define hidden friend.
12 (jthread::_S_create): New helper function for constructor.
14 2019-11-15 Edward Smith-Rowland <3dw4rd@verizon.net>
16 Implement the <tuple> part of C++20 p1032 Misc constexpr bits.
17 * include/std/tuple (_Head_base, _Tuple_impl(allocator_arg_t,...)
18 (_M_assign, tuple(allocator_arg_t,...), _Inherited, operator=, _M_swap)
19 (swap, pair(piecewise_construct_t,): Constexpr.
20 * (__uses_alloc0::_Sink::operator=, __uses_alloc_t): Constexpr.
21 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: New test.
22 * testsuite/20_util/tuple/constexpr_swap.cc : New test.
23 * testsuite/20_util/uses_allocator/69293_neg.cc: Extra error for C++20.
24 * testsuite/20_util/uses_allocator/cons_neg.cc: : Extra error for C++20.
26 2019-11-15 Jonathan Wakely <jwakely@redhat.com>
28 * include/std/stop_token: Reduce header dependencies by including
30 (stop_token::swap(stop_token&), swap(stop_token&, stop_token&)):
32 (operator!=(const stop_token&, const stop_token&)): Fix return value.
33 (stop_token::_Stop_cb::_Stop_cb(Cb&&)): Use std::forward instead of
34 (stop_token::_Stop_state_t) [_GLIBCXX_HAS_GTHREADS]: Use lock_guard
35 instead of unique_lock.
36 [!_GLIBCXX_HAS_GTHREADS]: Do not use mutex.
37 (stop_token::stop_token(_Stop_state)): Change parameter to lvalue
39 (stop_source): Remove unnecessary using-declarations for names only
41 (swap(stop_source&, stop_source&)): Define.
42 (stop_callback(const stop_token&, _Cb&&))
43 (stop_callback(stop_token&&, _Cb&&)): Replace lambdas with a named
44 function. Use std::forward instead of std::move. Run callbacks if a
45 stop request has already been made.
46 (stop_source::_M_execute()): Remove.
47 (stop_source::_S_execute(_Stop_cb*)): Define.
48 * include/std/version (__cpp_lib_jthread): Define conditionally.
49 * testsuite/30_threads/stop_token/stop_callback.cc: New test.
50 * testsuite/30_threads/stop_token/stop_source.cc: New test.
51 * testsuite/30_threads/stop_token/stop_token.cc: Enable test for
52 immediate execution of callback.
54 2019-11-15 Edward Smith-Rowland <3dw4rd@verizon.net>
56 Implement the default_searcher part of C++20 p1032 Misc constexpr bits.
57 * include/std/functional
58 (default_searcher, default_searcher::operator()): Constexpr.
59 * testsuite/20_util/function_objects/constexpr_searcher.cc: New.
61 2019-11-15 Jonathan Wakely <jwakely@redhat.com>
63 * include/bits/iterator_concepts.h (weakly_incrementable): Adjust.
64 * include/std/concepts (default_constructible): Rename to
65 default_initializable and require default-list-initialization and
66 default-initialization to be valid (LWG 3149).
67 (semiregular): Adjust to new name.
68 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/
69 1.cc: Rename directory to concept.defaultinitializable and adjust to
71 * testsuite/std/concepts/concepts.lang/concept.defaultinitializable/
73 * testsuite/util/testsuite_iterators.h (test_range): Adjust.
75 * src/c++17/fs_path.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
76 (is_disk_designator): New helper function.
77 (path::_Parser::root_path()): Use is_disk_designator.
78 (path::lexically_relative(const path&)): Implement resolution of
80 * testsuite/27_io/filesystem/path/generation/relative.cc: Check with
81 path components that look like a root-name.
83 * doc/doxygen/user.cfg.in: Add <stop_token>.
84 * include/precompiled/stdc++.h: Likewise.
85 * include/std/stop_token: Fix definition of std::nostopstate.
86 * testsuite/30_threads/headers/stop_token/synopsis.cc: New test.
87 * testsuite/30_threads/headers/thread/types_std_c++20.cc: New test.
88 * testsuite/30_threads/stop_token/stop_source.cc: New test.
89 * testsuite/30_threads/stop_token/stop_token.cc: Remove unnecessary
90 dg-require directives. Remove I/O and inclusion of <iostream>.
92 2019-11-14 Thomas Rodgers <trodgers@redhat.com>
94 * include/Makefile.am: Add <stop_token> header.
95 * include/Makefile.in: Regenerate.
96 * include/std/condition_variable: Add overloads for stop_token support
97 to condition_variable_any.
98 * include/std/stop_token: New file.
99 * include/std/thread: Add jthread type.
100 * include/std/version (__cpp_lib_jthread): New value.
101 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: New test.
102 * testsuite/30_threads/condition_variable_any/stop_token/2.cc: New test.
103 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
105 * testsuite/30_threads/jthread/1.cc: New test.
106 * testsuite/30_threads/jthread/2.cc: New test.
107 * testsuite/30_threads/jthread/jthread.cc: New test.
108 * testsuite/30_threads/stop_token/1.cc: New test.
109 * testsuite/30_threads/stop_token/2.cc: New test.
110 * testsuite/30_threads/stop_token/stop_token.cc: New test.
112 2019-11-14 Edward Smith-Rowland <3dw4rd@verizon.net>
114 Implement the <array> part of C++20 p1032 Misc constexpr bits.
115 * include/std/array (fill, swap): Make constexpr.
116 * testsuite/23_containers/array/requirements/constexpr_fill.cc: New.
117 * testsuite/23_containers/array/requirements/constexpr_swap.cc: New.
119 2019-11-14 Jonathan Wakely <jwakely@redhat.com>
121 * include/bits/iterator_concepts.h (__iter_concept_impl): Add
123 (indirect_relation): Rename to indirect_binary_predicate and adjust
124 definition as per P1716R3.
125 (indirect_equivalence_relation): Define.
126 (indirectly_comparable): Adjust definition.
127 * include/std/concepts (equivalence_relation): Define.
128 * testsuite/std/concepts/concepts.callable/relation.cc: Add tests for
129 equivalence_relation.
131 * include/bits/iterator_concepts.h (disable_sized_sentinel): Rename to
132 disable_sized_sentinel_for.
133 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust.
135 2019-11-13 Jonathan Wakely <jwakely@redhat.com>
137 * libsupc++/compare (strong_order, weak_order, partial_order)
138 (compare_strong_order_fallback, compare_weak_order_fallback)
139 (compare_partial_order_fallback): Define customization point objects
141 * testsuite/18_support/comparisons/algorithms/partial_order.cc: New
143 * testsuite/18_support/comparisons/algorithms/strong_order.cc: New
145 * testsuite/18_support/comparisons/algorithms/weak_order.cc: New test.
147 2019-11-11 Gerald Pfeifer <gerald@pfeifer.com>
149 * doc/xml/gnu/gpl-3.0.xml: Adjust link to "Why not LGPL".
151 2019-11-10 Gerald Pfeifer <gerald@pfeifer.com>
153 * doc/xml/manual/using.xml: Switch www.hboehm.info to https.
155 2019-11-07 Jonathan Wakely <jwakely@redhat.com>
157 * doc/doxygen/user.cfg.in (INPUT): Add <compare> header.
158 * include/precompiled/stdc++.h: Include <compare> header.
160 * libsupc++/compare (common_comparison_category)
161 (common_comparison_category_t): Define for C++20.
162 * testsuite/18_support/comparisons/common/1.cc: New test.
164 * include/bits/stl_algo.h (for_each_n): Handle negative count.
165 * testsuite/25_algorithms/for_each/for_each_n_debug.cc: New test.
167 2019-11-07 Jason Merrill <jason@redhat.com>
169 * libsupc++/compare: Remove strong_equality and weak_equality.
171 2019-11-06 Jonathan Wakely <jwakely@redhat.com>
173 * include/Makefile.in: Regenerate.
174 * libsupc++/Makefile.in: Regenerate.
175 * libsupc++/compare (__3way_builtin_ptr_cmp): Define helper.
176 (compare_three_way): Add missing implementation.
178 * include/bits/iterator_concepts.h (unreachable_sentinel_t): Remove
179 redundant equality operators.
180 * testsuite/util/testsuite_iterators.h (test_range::sentinel):
183 2019-11-05 Jonathan Wakely <jwakely@redhat.com>
185 * libsupc++/compare: New header.
186 * libsupc++/Makefile.am (std_HEADERS): Add compare.
187 * include/std/version: Define __cpp_lib_three_way_comparison.
188 * include/std/functional: #include <compare>.
190 * include/std/version [!_GLIBCXX_HOSTED]: Do not define feature test
191 macros for features that are only present in hosted builds.
193 * include/bits/iterator_concepts.h (__iter_without_nested_types):
194 Remove incorrect comment.
196 2019-10-31 Jonathan Wakely <jwakely@redhat.com>
198 * doc/html/*: Regenerate.
200 * include/bits/refwrap.h (reference_wrapper, ref, cref): Add constexpr
201 specifiers for C++20.
202 * include/std/functional (_Mem_fn, mem_fn, _Bind, _Bind_result, bind)
203 (bind_front, _Not_fn, not_fn): Likewise.
204 * testsuite/20_util/bind/constexpr.cc: New test.
205 * testsuite/20_util/function_objects/bind_front/constexpr.cc: New test.
206 * testsuite/20_util/function_objects/mem_fn/constexpr.cc: New test.
207 * testsuite/20_util/function_objects/not_fn/constexpr.cc: New test.
208 * testsuite/20_util/reference_wrapper/constexpr.cc: New test.
210 * doc/doxygen/user.cfg.in: Add new header.
211 * include/Makefile.am: Add new header.
212 * include/Makefile.in: Regenerate.
213 * include/precompiled/stdc++.h: Include new header.
214 * include/std/ranges: New header.
215 (ranges::sentinel_t, ranges::range_value_t, ranges::range_reference_t)
216 (ranges::range_rvalue_reference_t, ranges::sized_range)
217 (ranges::output_range, ranges::input_ranges, ranges::forward_range)
218 (ranges::bidirectional_range, ranges::random_access_range)
219 (ranges::contiguous_range, ranges::common::range): Define.
220 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Check
221 that disabled_sized_sentinel can be specialized.
222 * testsuite/std/ranges/access/begin.cc: Include <ranges> instead of
224 * testsuite/std/ranges/access/cbegin.cc: Likewise.
225 * testsuite/std/ranges/access/cdata.cc: Likewise.
226 * testsuite/std/ranges/access/cend.cc: Likewise.
227 * testsuite/std/ranges/access/crbegin.cc: Likewise.
228 * testsuite/std/ranges/access/crend.cc: Likewise.
229 * testsuite/std/ranges/access/data.cc: Likewise.
230 * testsuite/std/ranges/access/empty.cc: Likewise.
231 * testsuite/std/ranges/access/end.cc: Likewise.
232 * testsuite/std/ranges/access/end_neg.cc: Likewise.
233 * testsuite/std/ranges/access/rbegin.cc: Likewise.
234 * testsuite/std/ranges/access/rend.cc: Likewise.
235 * testsuite/std/ranges/access/size.cc: Likewise.
236 * testsuite/std/ranges/access/size_neg.cc: Likewise.
237 * testsuite/std/ranges/headers/ranges/synopsis.cc: New test.
238 * testsuite/std/ranges/range.cc: New test.
239 * testsuite/std/ranges/refinements.cc: New test.
240 * testsuite/std/ranges/sized.cc: New test.
241 * testsuite/util/testsuite_iterators.h: Add aliases for range types.
242 (output_iterator_wrapper::WritableObject::operator=): Add const
243 qualifier so that output_iterator_wrapper satisfies writable.
245 * testsuite/20_util/add_pointer/value.cc: Check void types.
247 * include/bits/range_access.h (__sizable): Rename to __sentinel_size.
248 Remove workaround for PR c++/92268 and remove redundant requirements
249 that are already checked by sized_sentinel_for.
250 * testsuite/std/ranges/access/cend.cc: Fix failures.
251 * testsuite/std/ranges/access/end.cc: Likewise.
253 * include/bits/range_access.h (ranges::begin): Combine array and
254 non-array overloads into one function template. Only use ADL for
256 (ranges::end, ranges::size): Likewise. Make unbounded arrays
258 (ranges::rbegin, ranges::rend): Only use ADL for classes and enums.
259 Reformat _S_noexcept() functions to mirror operator() structure.
260 * testsuite/std/ranges/access/begin.cc: Check incomplete array.
261 * testsuite/std/ranges/access/end_neg.cc: New test.
262 * testsuite/std/ranges/access/size.cc: Check array of incomplete type.
263 * testsuite/std/ranges/access/size_neg.cc: New test.
265 * testsuite/24_iterators/range_access*.cc: Move to ...
266 * testsuite/24_iterators/range_access/range_access*.cc: ... here.
267 * testsuite/24_iterators/range_access/range_access_cpp20_neg.cc: New
270 2019-10-30 Jonathan Wakely <jwakely@redhat.com>
272 * include/std/concepts (std::ranges::swap): Use a single overload for
273 the non-array cases, and switch using if-constexpr.
275 * include/bits/stl_iterator.h (__normal_iterator::iterator_concept):
276 Guard with __cpp_lib_concepts macro.
278 * include/std/bit (__cpp_lib_bitops): Define.
279 * include/std/version (__cpp_lib_constexpr): Remove.
280 (__cpp_lib_bitops, __cpp_lib_constexpr_dynamic_alloc): Define.
281 * testsuite/26_numerics/bit/header.cc: New test.
282 * testsuite/26_numerics/bit/header-2.cc: New test.
283 * testsuite/20_util/allocator_traits/header.cc: New test.
284 * testsuite/20_util/allocator_traits/header-2.cc: New test.
286 * include/bits/stl_iterator.h (namespace __gnu_cxx): Remove
287 using-declarations for std::iterator and std::iterator_traits.
288 (__gnu_cxx::__normal_iterator): Qualify iterator_traits.
289 * include/ext/algorithm (namespace __gnu_cxx): Remove
290 using-declarations for std names and qualify those names when used.
291 Also refer to std::min in parentheses to protect against function-like
293 * include/ext/rc_string_base.h: Qualify iterator_traits.
294 * include/ext/sso_string_base.h: Qualify iterator_traits.
297 * include/bits/stl_bvector.h (_Bit_iterator::pointer)
298 (_Bit_const_iterator::pointer): Define as void for C++20.
299 * include/bits/stl_iterator.h (reverse_iterator::operator->()): Add
300 constraints for C++20.
301 (__normal_iterator::iterator_concept): Define for C++20.
302 * include/bits/streambuf_iterator.h (istreambuf_iterator::pointer):
303 Define as void for C++20.
304 (ostreambuf_iterator::difference_type): Define as ptrdiff_t for C++20.
305 (ostreambuf_iterator::ostreambuf_iterator()): Add default constructor
307 * testsuite/23_containers/vector/bool/iterator_c++20.cc: New test.
308 * testsuite/24_iterators/bidirectional/concept.cc: New test.
309 * testsuite/24_iterators/bidirectional/tag.cc: New test.
310 * testsuite/24_iterators/contiguous/concept.cc: New test.
311 * testsuite/24_iterators/contiguous/tag.cc: New test.
312 * testsuite/24_iterators/forward/concept.cc: New test.
313 * testsuite/24_iterators/forward/tag.cc: New test.
314 * testsuite/24_iterators/input/concept.cc: New test.
315 * testsuite/24_iterators/input/tag.cc: New test.
316 * testsuite/24_iterators/istreambuf_iterator/requirements/typedefs.cc:
318 * testsuite/24_iterators/ostreambuf_iterator/requirements/typedefs.cc:
320 * testsuite/24_iterators/output/concept.cc: New test.
321 * testsuite/24_iterators/output/tag.cc: New test.
322 * testsuite/24_iterators/random_access/concept.cc: New test.
323 * testsuite/24_iterators/random_access/tag.cc: New test.
324 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: New
326 * testsuite/24_iterators/random_access_iterator/26020.cc: Move to ...
327 * testsuite/24_iterators/operations/26020.cc: ... here.
328 * testsuite/24_iterators/random_access_iterator/
329 string_vector_iterators.cc: Move to ...
330 * testsuite/24_iterators/random_access/string_vector_iterators.cc: ...
333 * testsuite/util/testsuite_iterators.h: Fix typo in __cplusplus check.
335 2019-10-29 Jonathan Wakely <jwakely@redhat.com>
337 * include/bits/range_access.h (ranges::disable_sized_range)
338 (ranges::begin, ranges::end, ranges::cbegin, ranges::cend)
339 (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend)
340 (ranges::size, ranges::empty, ranges::data, ranges::cdata)
341 (ranges::range, ranges::sized_range, ranges::advance, ranges::distance)
342 (ranges::next, ranges::prev): Guard with __cpp_lib_concepts.
343 * include/bits/stl_iterator.h (disable_sized_sentinel): Likewise.
345 * include/bits/alloc_traits.h (__cpp_lib_constexpr_dynamic_alloc):
347 (allocator_traits::_S_construct, allocator_traits::_S_destroy)
348 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use
349 _GLIBCXX14_CONSTEXPR instead of constexpr.
350 * include/bits/stl_construct.h (_Destroy): Likewise.
352 * include/Makefile.am: Add new header.
353 * include/Makefile.in: Regenerate.
354 * include/bits/iterator_concepts.h: New header.
355 (contiguous_iterator_tag, iter_reference_t, ranges::iter_move)
356 (iter_rvalue_reference_t, incrementable_traits, iter_difference_t)
357 (readable_traits, iter_value_t, readable, iter_common_reference_t)
358 (writable, waekly_incrementable, incrementable)
359 (input_or_output_iterator, sentinel_for, disable_sized_sentinel)
360 (sized_sentinel_for, input_iterator, output_iterator)
361 (forward_iterator, bidirectional_iterator, random_access_iterator)
362 (contiguous_iterator, indirectly_unary_invocable)
363 (indirectly_regular_unary_invocable, indirect_unary_predicate)
364 (indirect_relation, indirect_strict_weak_order, indirect_result_t)
365 (projected, indirectly_movable, indirectly_movable_storable)
366 (indirectly_copyable, indirectly_copyable_storable, ranges::iter_swap)
367 (indirectly_swappable, indirectly_comparable, permutable, mergeable)
368 (sortable, unreachable_sentinel_t, unreachable_sentinel)
369 (default_sentinel_t, default_sentinel): Define.
370 (__detail::__cpp17_iterator, __detail::__cpp17_input_iterator)
371 (__detail::__cpp17_fwd_iterator, __detail::__cpp17_bidi_iterator)
372 (__detail::__cpp17_randacc_iterator): Define.
373 (__iterator_traits): Define constrained specializations.
374 * include/bits/move.h (move): Only use old concept check for C++98.
375 * include/bits/range_access.h (ranges::disable_sized_range)
376 (ranges::begin, ranges::end, ranges::cbegin, ranges::cend)
377 (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend)
378 (ranges::size, ranges::empty, ranges::data, ranges::cdata): Define
379 new customization points for C++20.
380 (ranges::range, ranges::sized_range): Define new concepts for C++20.
381 (ranges::advance, ranges::distance, ranges::next, ranges::prev):
382 Define new functions for C++20.
383 (__adl_end, __adl_cdata, __adl_cbegin, __adl_cend, __adl_rbegin)
384 (__adl_rend, __adl_crbegin, __adl_crend, __adl_cdata, __adl_size)
385 (__adl_empty): Remove.
386 * include/bits/stl_iterator.h (disable_sized_sentinel): Specialize
387 for reverse_iterator.
388 * include/bits/stl_iterator_base_types.h (contiguous_iterator_tag):
389 Define new struct for C++20.
390 (iterator_traits<_Tp*>): Constrain partial specialization in C++20.
391 * include/std/concepts (__is_class_or_enum): Move to __detail
393 * testsuite/20_util/forward/c_neg.cc: Adjust dg-error line number.
394 * testsuite/20_util/forward/f_neg.cc: Likewise.
395 * testsuite/24_iterators/associated_types/incrementable.traits.cc: New
397 * testsuite/24_iterators/associated_types/readable.traits.cc: New test.
398 * testsuite/24_iterators/contiguous/concept.cc: New test.
399 * testsuite/24_iterators/contiguous/tag.cc: New test.
400 * testsuite/24_iterators/customization_points/iter_move.cc: New test.
401 * testsuite/24_iterators/customization_points/iter_swap.cc: New test.
402 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: New test.
403 * testsuite/24_iterators/range_operations/advance.cc: New test.
404 * testsuite/24_iterators/range_operations/distance.cc: New test.
405 * testsuite/24_iterators/range_operations/next.cc: New test.
406 * testsuite/24_iterators/range_operations/prev.cc: New test.
407 * testsuite/26_numerics/adjacent_difference/requirements/
408 explicit_instantiation/2.cc: Rename types that conflict with C++20
410 * testsuite/26_numerics/adjacent_difference/requirements/
411 explicit_instantiation/pod.cc: Likewise.
412 * testsuite/26_numerics/partial_sum/requirements/
413 explicit_instantiation/2.cc: Likewise.
414 * testsuite/26_numerics/partial_sum/requirements/
415 explicit_instantiation/pod.cc: Likewise.
416 * testsuite/experimental/iterator/requirements.cc: Likewise.
417 * testsuite/std/ranges/access/begin.cc: New test.
418 * testsuite/std/ranges/access/cbegin.cc: New test.
419 * testsuite/std/ranges/access/cdata.cc: New test.
420 * testsuite/std/ranges/access/cend.cc: New test.
421 * testsuite/std/ranges/access/crbegin.cc: New test.
422 * testsuite/std/ranges/access/crend.cc: New test.
423 * testsuite/std/ranges/access/data.cc: New test.
424 * testsuite/std/ranges/access/empty.cc: New test.
425 * testsuite/std/ranges/access/end.cc: New test.
426 * testsuite/std/ranges/access/rbegin.cc: New test.
427 * testsuite/std/ranges/access/rend.cc: New test.
428 * testsuite/std/ranges/access/size.cc: New test.
429 * testsuite/util/testsuite_iterators.h (contiguous_iterator_wrapper)
430 (test_range, test_sized_range): New test utilities.
432 * testsuite/util/testsuite_iterators.h (BoundsContainer::size()): Add
434 (WritableObject::operator=): Constrain with enable_if when available.
435 (remove_cv): Use std::remove_if when available.
436 (test_container::it(int)): Use size().
437 (test_container::size()): Use BoundsContainer::size().
440 * include/bits/stl_deque.h (_Deque_iterator(const _Deque_iterator&)):
441 Do not define as defaulted.
442 * testsuite/23_containers/deque/types/92267.cc: New test.
444 2019-10-26 Gerald Pfeifer <gerald@pfeifer.com>
446 * doc/xml/manual/codecvt.xml: Switch pubs.opengroup.org to https.
447 * doc/xml/manual/locale.xml (LC_ALL): Ditto.
448 * doc/xml/manual/messages.xml: Ditto.
450 2019-10-26 John David Anglin <danglin@gcc.gnu.org>
452 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
454 2019-10-25 Jonathan Wakely <jwakely@redhat.com>
456 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper)
457 (input_iterator_wrapper, forward_iterator_wrapper)
458 bidirectional_iterator_wrapper, random_access_iterator_wrapper): Remove
459 user-provided copy constructors and copy assignment operators so they
460 are defined implicitly.
461 (input_iterator_wrapper): Initialize members in default constructor.
462 (forward_iterator_wrapper): Remove assignments to members of base.
464 * include/bits/allocator.h: Check __cpp_constexpr_dynamic_alloc
465 before making the std::allocator destructor constexpr.
466 * testsuite/20_util/allocator/requirements/constexpr.cc: New test.
468 * include/bits/range_cmp.h: Check __cpp_lib_concepts before defining
469 concepts. Fix comment.
470 * include/bits/allocator.h
472 2019-10-25 Gerald Pfeifer <gerald@pfeifer.com>
474 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
475 pubs.opengroup.org to https.
477 2019-10-25 Gerald Pfeifer <gerald@pfeifer.com>
479 * doc/xml/gnu/gpl-3.0.xml: Switch www.gnu.org to https.
481 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
483 * doc/xml/manual/status_cxx2020.xml: Add rows and update status.
485 2019-10-24 Jonathan Wakely <jwakely@redhat.com>
487 * include/bits/allocator.h (allocator<void>): Restore the explicit
488 specialization for C++20, but make its API consistent with the primary
490 (allocator::~allocator()): Restore the destructor for C++20, but make
492 * testsuite/20_util/allocator/rebind_c++20.cc: Check allocator<void>.
493 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: Likewise.
494 * testsuite/20_util/allocator/void.cc: Check that constructors and
495 destructors are trivial. Check for converting constructor in C++20.
496 * testsuite/ext/malloc_allocator/variadic_construct.cc: Simplify
497 dejagnu target selector.
498 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
500 * include/experimental/executor (__use_future_ct, use_future_t):
501 Define partial specializations for std::allocator.
502 (__use_future_ch): Overload constructor for completion tokens using
505 PR libstdc++/88338 Implement P0898R3, C++20 concepts library
506 * doc/xml/manual/status_cxx2020.xml: Update status.
507 * doc/html/*: Regenerate.
508 * testsuite/std/concepts/1.cc: New test.
509 * testsuite/std/concepts/2.cc: New test.
511 * include/bits/random.h (uniform_random_bit_generator): Define for
513 * testsuite/26_numerics/random/concept.cc: New test.
514 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
516 2019-10-23 Jonathan Wakely <jwakely@redhat.com>
518 * include/std/functional (invoke): Add constexpr for C++20.
519 * include/std/version (__cpp_lib_constexpr_invoke): Define.
520 * testsuite/20_util/function_objects/invoke/constexpr.cc: New test.
522 PR c++/91369 Implement P0784R7 changes to allocation and construction
523 * include/bits/alloc_traits.h: Include <bits/stl_construct.h>.
524 (allocator_traits::_S_allocate, allocator_traits::_S_construct)
525 (allocator_traits::_S_destroy, allocator_traits::_S_max_size)
526 (allocator_traits::_S_select, allocator_traits::allocate)
527 (allocator_traits::deallocate, allocator_traits::construct)
528 (allocator_traits::destroy, allocator_traits::max_size)
529 (allocator_traits::select_on_container_copy_construction)
530 (allocator_traits<allocator<T>>): Add constexpr specifier for C++20.
531 (allocator_traits<allocator<T>>::construct): Use construct_at.
532 (allocator_traits<allocator<T>>::destroy): Use destroy_at.
533 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Add constexpr
535 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
536 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move here
537 from <bits/stl_construct.h>.
538 * include/bits/allocator.h (allocator::~allocator): Remove for C++20.
539 (allocator::allocate, allocate::deallocate): Define for C++20 and up.
540 (operator==, operator!=): Add constexpr specifier for C++20.
541 * include/bits/stl_construct.h: Don't include <ext/alloc_traits.h>.
542 (destroy_at): For C++20 add constexpr specifier and support for
544 (construct_at): Define new function for C++20.
545 (_Construct): Return result of placement new-expression. For C++11 and
546 up add constexpr. For C++20 dispatch to std::construct_at during
548 (_Destroy(pointer)): Add constexpr specifier. For C++20 dispatch to
549 std::destroy_at during constant evaluation.
550 (_Destroy_aux::__destroy, _Destroy_n_aux::__destroy_n): Add constexpr
552 (_Destroy(ForwardIterator, ForwardIterator))
553 (_Destroy(ForwardIterator, Size)): Likewise. Do not elide trivial
554 destructors during constant evaluation.
555 (destroy, destroy_n): Add constexpr specifier for C++20.
556 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
557 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move to
558 <bits/alloc_traits.h>, to remove dependency on allocators.
559 * include/bits/stl_uninitialized.h: Include <ext/alloc_traits.h>.
560 Include <bits/stl_pair.h> instead of <utility>.
561 * include/ext/alloc_traits.h: Always include <bits/alloc_traits.h>.
562 (__alloc_traits::construct, __alloc_traits::destroy)
563 (__alloc_traits::_S_select_on_copy, __alloc_traits::_S_on_swap): Add
565 * include/ext/malloc_allocator.h (operator==, operator!=): Add
566 constexpr specifier for C++20.
567 * include/ext/new_allocator.h (operator==, operator!=): Likewise.
568 * testsuite/20_util/headers/memory/synopsis.cc: Add constexpr.
569 * testsuite/20_util/scoped_allocator/69293_neg.cc: Ignore additional
570 errors due to constexpr function called after failed static_assert.
571 * testsuite/20_util/specialized_algorithms/construct_at/1.cc: New test.
572 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
573 Ignore additional errors due to constexpr function called after failed
575 * testsuite/23_containers/vector/cons/destructible_neg.cc: Likewise.
577 * testsuite/20_util/bind/91371.cc: Fix test to compile as C++11.
579 * include/debug/helper_functions.h (__valid_range): Change
580 _GLIBCXX_CONSTEXPR to _GLIBCXX14_CONSTEXPR.
582 * include/ext/throw_allocator.h (throw_allocator_base): Qualify
583 size_t and ptrdiff_t.
585 * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp:
586 Use detail::rebind_traits.
587 * include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp:
589 * include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Likewise.
590 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise.
591 * include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp: Likewise.
592 * include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp: Likewise.
593 * include/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp:
595 * include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp:
597 * include/ext/pb_ds/detail/branch_policy/branch_policy.hpp: Likewise.
598 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Likewise.
599 * include/ext/pb_ds/detail/cond_dealtor.hpp: Likewise.
600 * include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp (has_eq_fn): Likewise.
601 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Likewise.
602 * include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp: Likewise.
603 * include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Likewise.
604 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
605 left_child_next_sibling_heap_.hpp: Likewise.
606 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp:
608 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
609 point_const_iterator.hpp: Likewise.
610 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Likewise.
611 * include/ext/pb_ds/detail/ov_tree_map_/
612 constructors_destructor_fn_imps.hpp: Likewise.
613 * include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Likewise.
614 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Likewise.
615 * include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Likewise.
616 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Likewise.
617 * include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Likewise.
618 * include/ext/pb_ds/detail/rb_tree_map_/node.hpp: Likewise.
619 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Likewise.
620 * include/ext/pb_ds/detail/splay_tree_/node.hpp: Likewise.
621 * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Likewise.
622 * include/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp:
624 * include/ext/pb_ds/detail/type_utils.hpp: Fix typo in comment.
625 * include/ext/pb_ds/detail/types_traits.hpp (stored_value): Add
626 bool parameter to control whether the hash value is stored.
627 (select_base_type): New class template and partial specialization.
628 (maybe_null_type): Likewise.
629 (rebind_traits): New class template.
630 (type_base): Remove four nearly identical specializations.
631 (type_dispatch): Remove.
632 (type_traits): Use select_base_type and maybe_null_type instead of
633 type_base to control differences between specializations.
634 * include/ext/pb_ds/list_update_policy.hpp: Use detail::rebind_traits.
635 * include/ext/pb_ds/priority_queue.hpp: Likewise.
636 * include/ext/pb_ds/tree_policy.hpp: Likewise.
637 * include/ext/pb_ds/trie_policy.hpp: Likewise.
639 * include/backward/hash_set (hash_set): Use __alloc_traits.
640 * include/backward/hashtable.h (_Hashtable): Likewise.
641 * include/ext/alloc_traits.h (__alloc_traits::allocate): Add overload
643 * include/ext/extptr_allocator.h (_ExtPtr_allocator::allocate): Ignore
645 * include/ext/slist (_Slist_base): Use __alloc_traits.
646 * include/tr1/hashtable.h (_Hashtable): Likewise.
647 * include/tr1/regex (match_results): Use vector::const_reference
648 instead of assuming the allocator defines it.
649 * testsuite/backward/hash_map/23528.cc: Use allocator_traits in C++11.
650 * testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc: Use
651 __gnu_test::max_size.
652 * testsuite/tr1/6_containers/unordered_multimap/capacity/
653 29134-multimap.cc: Likewise.
654 * testsuite/tr1/6_containers/unordered_multiset/capacity/
655 29134-multiset.cc: Likewise.
656 * testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc:
659 2019-10-22 Jonathan Wakely <jwakely@redhat.com>
661 * testsuite/util/testsuite_abi.h: Restore use of tr1/unordered_map
662 when compiled as C++98.
664 * include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
665 * testsuite/17_intro/names.cc: Check uses_allocator in C++98.
667 * include/bits/alloc_traits.h
668 (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20.
669 (allocator_traits<allocator<T>>::construct): Perform placement new
670 directly for C++20, instead of calling allocator<T>::construct.
671 (allocator_traits<allocator<T>>::destroy): Call destructor directly
672 for C++20, instead of calling allocator<T>::destroy.
673 (allocator_traits<allocator<T>>::max_size): Return value directly
674 for C++20, instead of calling std::allocator<T>::max_size().
675 (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not
676 define for C++17 and up.
677 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr
678 for C++17 and up, instead of tag dispatching.
679 * include/bits/allocator.h (allocator<void>): Remove for C++20.
680 (allocator::pointer, allocator::const_pointer, allocator::reference)
681 (allocator::const_reference, allocator::rebind): Remove for C++20.
682 * include/bits/basic_string.h (basic_string): Use __alloc_traits to
684 * include/bits/memoryfwd.h (allocator<void>): Remove for C++20.
685 * include/ext/debug_allocator.h: Use __alloc_traits for rebinding.
686 * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator)
687 (malloc_allocator::pointer, malloc_allocator::const_pointer)
688 (malloc_allocator::reference, malloc_allocator::const_reference)
689 (malloc_allocator::rebind, malloc_allocator::max_size)
690 (malloc_allocator::construct, malloc_allocator::destroy): Do not
692 (malloc_allocator::_M_max_size): Define new function.
693 * include/ext/new_allocator.h (new_allocator::~new_allocator)
694 (new_allocator::pointer, new_allocator::const_pointer)
695 (new_allocator::reference, new_allocator::const_reference)
696 (new_allocator::rebind, new_allocator::max_size)
697 (new_allocator::construct, new_allocator::destroy): Do not
699 (new_allocator::_M_max_size): Define new function.
700 * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use
701 __alloc_traits to rebind allocator.
702 * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise.
703 (rope::rope(CharT, const allocator_type&)): Use __alloc_traits
704 to construct character.
705 * include/ext/slist (_Slist_base): Use __alloc_traits to rebind
707 * include/ext/sso_string_base.h (__sso_string_base::_M_max_size):
709 * include/ext/throw_allocator.h (throw_allocator): Do not use optional
710 members of std::allocator, use __alloc_traits members instead.
711 * include/ext/vstring.h (__versa_string): Use __alloc_traits.
712 * include/ext/vstring_util.h (__vstring_utility): Likewise.
713 * include/std/memory: Include <bits/alloc_traits.h>.
714 * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size.
715 * testsuite/20_util/allocator/rebind_c++20.cc: New test.
716 * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check
717 for pointer, const_pointer, reference, const_reference or rebind in
719 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test.
720 * testsuite/23_containers/deque/capacity/29134.cc: Use
721 __gnu_test::max_size.
722 * testsuite/23_containers/forward_list/capacity/1.cc: Likewise.
723 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
724 * testsuite/23_containers/map/capacity/29134.cc: Likewise.
725 * testsuite/23_containers/multimap/capacity/29134.cc: Likewise.
726 * testsuite/23_containers/multiset/capacity/29134.cc: Likewise.
727 * testsuite/23_containers/set/capacity/29134.cc: Likewise.
728 * testsuite/23_containers/vector/capacity/29134.cc: Likewise.
729 * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run
731 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
732 * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size.
733 * testsuite/util/replacement_memory_operators.h: Do not assume
734 Alloc::pointer exists.
735 * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define
736 helper to call max_size for any allocator.
738 2019-10-22 Andreas Schwab <schwab@suse.de>
740 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
742 2019-10-18 Jonathan Wakely <jwakely@redhat.com>
745 * libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment
746 to at least sizeof(void*).
748 * include/bits/range_cmp.h (ranges::less::operator()): Inline the
749 logic from std::less::operator() to remove the dependency on it.
751 2019-10-17 Jonathan Wakely <jwakely@redhat.com>
753 * doc/doxygen/user.cfg.in (INPUT): Add new C++17 and C++20 headers.
755 * include/Makefile.am: Add new header.
756 * include/Makefile.in: Regenerate.
757 * include/bits/range_cmp.h: New header for C++20 function objects.
758 * include/std/functional: Include new header.
759 * testsuite/20_util/function_objects/identity/1.cc: New test.
760 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: New test.
761 * testsuite/20_util/function_objects/range.cmp/greater.cc: New test.
762 * testsuite/20_util/function_objects/range.cmp/greater_equal.cc: New
764 * testsuite/20_util/function_objects/range.cmp/less.cc: New test.
765 * testsuite/20_util/function_objects/range.cmp/less_equal.cc: New test.
766 * testsuite/20_util/function_objects/range.cmp/not_equal_to.cc: New
770 * include/bits/forward_list.h
771 (_M_move_assign(forward_list&&, false_type)): Do not use
772 __make_move_if_noexcept, instead move unconditionally.
773 * include/bits/stl_deque.h (_M_move_assign2(deque&&, false_type)):
775 * include/bits/stl_list.h (_M_move_assign(list&&, false_type)):
777 * include/bits/stl_vector.h (_M_move_assign(vector&&, false_type)):
779 * testsuite/23_containers/vector/92124.cc: New test.
781 2019-10-16 Jonathan Wakely <jwakely@redhat.com>
783 * include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to
784 one of __is_same_as or __is_same when available.
785 * include/std/concepts (__detail::__same_as): Use std::is_same_v.
786 * include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]:
787 Use new macro instead of __is_same_as.
788 (is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial
790 (is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro.
791 (is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same.
793 2019-10-16 François Dumont <fdumont@gcc.gnu.org>
795 * src/c++11/debug.cc (print_field): Replace constness_names <unknown>
796 entry with <unknown constness>. Replace state_names <unknown> entry with
799 2019-10-11 Jonathan Wakely <jwakely@redhat.com>
801 * include/Makefile.am: Add new header.
802 * include/Makefile.in: Regenerate.
803 * include/precompiled/stdc++.h: Include <concepts>.
804 * include/std/concepts: New header for C++20.
805 * include/std/version (__cpp_lib_concepts): Define.
806 * scripts/create_testsuite_files: Look for test files in new std
808 * testsuite/libstdc++-dg/conformance.exp: Likewise.
809 * testsuite/std/concepts/concepts.callable/invocable.cc: New test.
810 * testsuite/std/concepts/concepts.callable/regular_invocable.cc: New
812 * testsuite/std/concepts/concepts.callable/relation.cc: New test.
813 * testsuite/std/concepts/concepts.callable/strictweakorder.cc: New
815 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
816 floating_point.cc: New test.
817 * testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc:
819 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
820 signed_integral.cc: New test.
821 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
822 unsigned_integral.cc: New test.
823 * testsuite/std/concepts/concepts.lang/concept.assignable/1.cc: New
825 * testsuite/std/concepts/concepts.lang/concept.common/1.cc: New test.
826 * testsuite/std/concepts/concepts.lang/concept.commonref/1.cc: New
828 * testsuite/std/concepts/concepts.lang/concept.constructible/1.cc:
830 * testsuite/std/concepts/concepts.lang/concept.convertible/1.cc:
832 * testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc:
834 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/
836 * testsuite/std/concepts/concepts.lang/concept.derived/1.cc:
838 * testsuite/std/concepts/concepts.lang/concept.destructible/1.cc:
840 * testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc:
842 * testsuite/std/concepts/concepts.lang/concept.same/1.cc:
844 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
846 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
848 * testsuite/std/concepts/concepts.lang/concept.swappable/
849 swappable_with.cc: New test.
850 * testsuite/std/concepts/concepts.object/copyable.cc: New test.
851 * testsuite/std/concepts/concepts.object/movable.cc: New test.
852 * testsuite/std/concepts/concepts.object/regular.cc: New test.
853 * testsuite/std/concepts/concepts.object/semiregular.cc: New test.
855 * include/std/type_traits (is_same): Replace partial specialization
856 by using __is_same_as built-in in primary template.
857 (is_same_v): Use __is_same_as built-in instead of instantiating the
861 * include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
862 special member functions as defaulted. Add noexcept to most members.
863 (__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)):
864 Mask off unwanted bits in the __val parameter. Avoid undefined left
866 (__dynamic_bitset_base::_M_assign): Remove.
867 (__dynamic_bitset_base::_M_do_reset): Use std::fill.
868 (__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when
869 block_type has lower rank than int.
870 (dynamic_bitset): Add noexcept to most members. Use injected-class-name
871 in return types and parameter types.
872 (dynamic_bitset::_M_Nb): Add default member initializer.
873 (dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as
875 (dynamic_bitset(dynamic_bitset&&)): Clear source object after move.
876 (dynamic_bitset::operator=(const dynamic_bitset&)): Define as
878 (dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier.
879 Define without using swap, to propagate allocator correctly.
880 (dynamic_bitset(const char*, const _Alloc&)): Use strlen.
881 (dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use
882 casts to avoid unwanted integer promotions.
883 (dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and
884 add default template arguments and default argument to simplify usage.
885 (dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr.
886 (operator==(const dynamic_bitset&, const dynamic_bitset&))
887 (operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb.
888 * include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr):
889 Adjust template parameters to match declaration.
890 * testsuite/tr2/dynamic_bitset/cmp.cc: New test.
891 * testsuite/tr2/dynamic_bitset/cons.cc: New test.
892 * testsuite/tr2/dynamic_bitset/copy.cc: New test.
893 * testsuite/tr2/dynamic_bitset/move.cc: New test.
894 * testsuite/tr2/dynamic_bitset/pr92059.cc: New test.
896 * include/bits/charconv.h (__to_chars_len): Avoid -Wsign-compare
899 2019-10-10 Jonathan Wakely <jwakely@redhat.com>
902 * src/c++98/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]
903 (find_ldbl_sync_facet): Fix parameter type and missing return.
905 2019-10-09 Marek Polacek <polacek@redhat.com>
907 PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound.
908 PR c++/69531 - DR 1307: Differently bounded array parameters.
909 PR c++/88128 - DR 330: Qual convs and pointers to arrays of pointers.
910 * testsuite/23_containers/span/lwg3255.cc: Adjust test to match the
911 post-P0388R4 behavior.
913 2019-10-09 Jonathan Wakely <jwakely@redhat.com>
916 * src/c++98/locale.cc (locale::id::_M_id()) [__GTHREADS]: Use atomic
917 compare-exchange or double-checked lock to ensure only one thread sets
918 the _M_index variable.
919 [_GLIBCXX_LONG_DOUBLE_COMPAT]: Call find_ldbl_sync_facet to detect
920 facets that share another facet's ID.
921 [_GLIBCXX_LONG_DOUBLE_COMPAT] (find_ldbl_sync_facet): New function.
924 * src/c++98/locale_init.cc (locale::classic()): Do not construct a new
925 locale object for every call.
926 (locale::_S_initialize_once()): Construct C locale here.
928 2019-10-08 Jonathan Wakely <jwakely@redhat.com>
930 * doc/Makefile.am (doc-html-docbook-regenerate): New target.
931 (${docbook_outdir}/html): Do not create unused 'html/ext' directory.
932 * doc/Makefile.in: Regenerate.
933 * doc/xml/manual/documentation_hacking.xml: Document new target.
934 * doc/html/*: Regenerate.
936 * doc/xml/manual/allocator.xml: Use archived copy of CUJ article.
937 * doc/html/*: Regenerate.
939 2019-10-06 François Dumont <fdumont@gcc.gnu.org>
941 * include/bits/stl_algo.h
942 (__copy_n_a(_IIte, _Size, _OIte)): New.
943 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
944 (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
946 * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
947 std::__copy_n_a friend.
948 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
949 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
950 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
951 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.
953 * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define
955 (_RequireInputIte): Likewise and use __enable_if_t.
956 * include/std/numeric
957 (__is_random_access_iter): Use __iterator_category_t.
959 * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment
961 * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New.
962 * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New.
964 2019-10-04 François Dumont <fdumont@gcc.gnu.org>
966 * include/debug/forward_list
967 (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign
968 distance when not empty.
969 * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size):
971 * include/debug/helper_functions.h (__dp_sign_max_size): New
972 _Distance_precision enum entry.
973 (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type,
974 __false_type)): Adapt.
975 * include/debug/safe_iterator.tcc
976 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review
977 distance computation.
979 2019-10-04 Jonathan Wakely <jwakely@redhat.com>
983 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
984 * config.h.in: Regenerate:
985 * configure: Regenerate:
986 * include/Makefile.am (${host_builddir}/largefile-config.h): New
987 target to generate config header for filesystem library.
988 (${host_builddir}/c++config.h): Rename macros for large file support.
989 * include/Makefile.in: Regenerate.
990 * src/c++17/fs_dir.cc: Include new config header.
991 * src/c++17/fs_ops.cc: Likewise.
992 (filesystem::file_size): Use uintmax_t for size.
993 * src/filesystem/dir.cc: Include new config header.
994 * src/filesystem/ops.cc: Likewise.
995 (experimental::filesystem::file_size): Use uintmax_t for size.
997 * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
998 std::tr1::unordered_map.
999 * testsuite/util/testsuite_allocator.h: Likewise.
1001 * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.
1003 * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
1004 __gnu_cxx::__alloc_traits for allocator construct function.
1005 (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function.
1007 * include/precompiled/stdc++.h: Include <span> for C++20.
1008 * testsuite/17_intro/names.cc: Do not define 'e' for C++20.
1010 2019-10-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1012 * include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp.
1014 2019-10-02 Jonathan Wakely <jwakely@redhat.com>
1016 * config/abi/pre/gnu.ver: Tighten up greedy wildcards.
1018 * doc/xml/manual/parallel_mode.xml: Add caveat about support for
1020 * doc/html/*: Regenerate.
1022 2019-10-01 Jonathan Wakely <jwakely@redhat.com>
1024 * include/experimental/algorithm (experimental::sample): Qualify call
1025 to __sample correctly.
1026 * include/parallel/algo.h (sample, for_each_n): Add using-declarations
1027 for algorithms that don't have parallel implementations.
1029 * include/parallel/algobase.h (equal, lexicographical_compare): Add
1030 _GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
1032 * include/parallel/algorithmfwd.h (equal, lexicographical_compare):
1033 Add _GLIBCXX20_CONSTEXPR.
1035 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for
1037 * testsuite/20_util/hash/84998.cc: Likewise.
1038 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise.
1039 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise.
1040 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
1041 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
1042 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
1043 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
1044 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
1045 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
1047 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
1049 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
1051 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
1053 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
1055 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise.
1056 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1057 * testsuite/25_algorithms/copy/86658.cc: Likewise.
1058 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1059 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1060 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1061 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1063 * include/parallel/algo.h: Replace non-reserved names.
1064 * include/parallel/multiway_merge.h: Likewise.
1065 * include/parallel/multiway_mergesort.h: Likewise.
1066 * include/parallel/numericfwd.h: Likewise.
1067 * testsuite/17_intro/names.cc: Add RAI to test macros.
1069 2019-09-30 François Dumont <fdumont@gcc.gnu.org>
1071 * include/debug/array: Add C++20 constexpr to comparison operators.
1072 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt
1073 dg-error line numbers.
1074 * testsuite/23_containers/array/tuple_interface/
1075 tuple_element_debug_neg.cc: Likewise.
1077 2019-09-30 Andreas Tobler <andreast@gcc.gnu.org>
1079 * include/experimental/internet: Include netinet/in.h if we have
1080 _GLIBCXX_HAVE_NETINET_IN_H defined.
1082 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
1083 FreeBSD warning about lower advertised precision of tgammal.
1084 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
1085 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
1086 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
1087 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
1088 * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
1089 * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
1090 * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
1091 * testsuite/tr1/5_numerical_facilities/special_functions/
1092 08_cyl_bessel_i/check_nan.cc: Likewise.
1093 * testsuite/tr1/5_numerical_facilities/special_functions/
1094 09_cyl_bessel_j/check_nan.cc: Likewise.
1095 * testuite/tr1/5_numerical_facilities/special_functions/
1096 10_cyl_bessel_k/check_nan.cc: Likewise.
1097 * testsuite/tr1/5_numerical_facilities/special_functions/
1098 11_cyl_neumann/check_nan.cc: Likewise.
1099 * testsuite/tr1/5_numerical_facilities/special_functions/
1100 21_sph_bessel/check_nan.cc: Likewise.
1101 * testsuite/tr1/5_numerical_facilities/special_functions/
1102 23_sph_neumann/check_nan.cc: Likewise.
1104 2019-09-30 Jonathan Wakely <jwakely@redhat.com>
1106 * include/std/span (span(element_type(&)[N]))
1107 (span(array<value_type, N>&), span(const array<value_type, N>&)):
1108 Deduce array element type to allow safe const conversions (LWG 3255).
1109 [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use
1110 remove_cv_t on arguments to __is_std_span and __is_std_array.
1111 * testsuite/23_containers/span/lwg3255.cc: New test.
1114 * include/parallel/checkers.h (__is_sorted): Remove unused variable.
1116 2019-09-28 François Dumont <fdumont@gcc.gnu.org>
1118 * include/bits/stl_algo.h (merge): Fix documentation.
1119 * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr.
1120 (__check_sorted): Likewise and remove nested irreflexive check.
1121 (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr.
1122 (__check_partitioned_lower, __check_partitioned_upper): Likewise.
1123 (_Irreflexive_checker::_S_is_valid): Likewise.
1124 (__is_irreflexive, __is_irreflexive_pred): Likewise.
1125 * include/debug/helper_functions.h (__get_distance): Add constexpr.
1126 (__valid_range_aux): Add C++20 constexpr.
1127 (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)):
1128 Likewise and add std::is_constant_evaluated check.
1129 (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New.
1130 (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New.
1131 (__valid_range_aux(_Integral, _Integral, std::__true_type)): New,
1133 (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and
1134 __builtin_is_contant_evaludated check..
1135 (__can_advance, __base): Add constexpr.
1136 * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED]
1137 (_GLIBCXX_DEBUG_VERIFY_COND_AT): New.
1138 (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive.
1139 (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred.
1140 * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive
1142 * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
1143 * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix
1144 lambda to be irreflexive.
1146 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
1148 * configure: Regenerate.
1150 2019-09-27 Jonathan Wakely <jwakely@redhat.com>
1153 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer
1154 atomically and lock the mutex before accessing the sequence.
1155 (_Safe_local_iterator_base::_M_detach()): Likewise.
1156 (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
1158 2019-09-26 Jonathan Wakely <jwakely@redhat.com>
1160 * include/debug/array (to_array): Define for debug mode.
1162 * include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to
1163 piecewise construction constructor, assignment operators, and swap.
1164 * include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)):
1165 Add _GLIBCXX20_CONSTEXPR.
1166 (pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise.
1167 * testsuite/20_util/pair/constexpr_assign.cc: New test.
1168 * testsuite/20_util/pair/constexpr_swap.cc: New test.
1170 * include/experimental/internet (operator==, operator<): Fix loop
1171 condition to avoid reading past the end of the array.
1173 * include/std/array: Remove references to profile mode.
1174 * include/std/bitset: Likewise.
1175 * include/std/deque: Likewise.
1176 * include/std/forward_list: Likewise.
1177 * include/std/list: Likewise.
1178 * include/std/map: Likewise.
1179 * include/std/set: Likewise.
1180 * include/std/unordered_map: Likewise.
1181 * include/std/unordered_set: Likewise.
1182 * include/std/vector: Likewise.
1183 * testsuite/17_intro/headers/c++1998/profile_mode.cc: New test.
1184 * testsuite/17_intro/headers/c++2011/profile_mode.cc: New test.
1186 2019-09-25 Jonathan Wakely <jwakely@redhat.com>
1188 * include/bits/regex.h
1189 (basic_regex::assign(const C*, size_t, flag_type)): Add default
1190 argument (LWG 3296).
1191 * testsuite/28_regex/basic_regex/assign/char/lwg3296.cc: New test.
1192 * testsuite/28_regex/basic_regex/assign/wchar_t/lwg3296.cc: New test.
1194 2019-09-24 Jonathan Wakely <jwakely@redhat.com>
1196 * include/std/variant (variant::index()): Remove impossible case.
1199 * testsuite/util/testsuite_hooks.h
1200 (conversion::iterator_to_const_iterator()): Do not return an invalid
1201 iterator. Test direct-initialization and direct-list-initialization
1202 as well as implicit conversion.
1204 2019-09-23 Jonathan Wakely <jwakely@redhat.com>
1206 PR libstdc++/91788 (partial)
1207 * include/std/variant (variant::index()): Improve codegen for cases
1208 where conversion to size_t already works correctly.
1210 2019-09-23 Andreas Schwab <schwab@suse.de>
1212 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1214 2019-09-12 Jonathan Wakely <jwakely@redhat.com>
1217 * include/bits/stl_algo.h (for_each_n): Fix random access iterator
1219 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
1222 2019-09-11 Jonathan Wakely <jwakely@redhat.com>
1224 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
1227 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
1228 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
1229 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile
1232 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
1234 * include/std/type_traits (__do_common_type_impl): Implement
1235 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20.
1236 (basic_common_reference, common_reference, common_reference_t): Define
1238 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New
1240 * testsuite/20_util/common_reference/requirements/
1241 explicit_instantiation.cc: New test.
1242 * testsuite/20_util/common_reference/requirements/typedefs.cc: New
1245 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
1246 non-template overloads for each signed and unsigned integer type and
1247 char. Define deleted overload for bool (LWG 3266).
1248 * testsuite/20_util/to_chars/1_neg.cc: Remove.
1249 * testsuite/20_util/to_chars/3.cc: New test.
1250 * testsuite/20_util/to_chars/lwg3266.cc: New test.
1252 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
1254 * acinclude.m4: Handle uclinux*.
1255 * configure: Regenerate.
1256 * configure.host: Handle uclinux*
1258 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
1259 Mickaël Guêné <mickael.guene@st.com>
1261 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
1264 2019-09-10 Jonathan Wakely <jwakely@redhat.com>
1267 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
1268 0ul being a valid null pointer constant.
1270 * include/std/type_traits (__remove_cv_t): New alias template.
1271 (is_void, is_integral, is_floating_point, is_pointer)
1272 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
1273 (is_member_point), __is_signed_integer, __is_unsigned_integer)
1274 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
1275 (__decay_selector): Use __remove_cv_t.
1276 (remove_cv): Add partial specializations for cv-qualified types.
1277 (__decay_t): New alias template.
1278 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
1280 (__enable_if_t): Move earlier in the file.
1281 (_Require): Use __enable_if_t.
1282 (swap(T&, T&)): Use _Require.
1283 (swap(T(&)[N])): Use __enable_if_t.
1285 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1287 Implement C++20 p1424 - 'constexpr' feature macro concerns,
1288 Issue 3256 - Feature testing macro for constexpr algorithms,
1289 and Issue 3257 - Missing feature testing macro update from P0858.
1290 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
1291 * include/bits/algorithmfwd.h: Ditto.
1292 * include/std/utility: Ditto.
1293 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
1294 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
1295 __cpp_lib_constexpr macro in <algorith>.
1296 * testsuite/20_util/exchange/constexpr.cc: Add check for
1297 __cpp_lib_constexpr macro in <utility>.
1298 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
1299 __cpp_lib_constexpr_algorithms.
1300 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
1301 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
1302 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
1303 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
1304 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
1305 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
1306 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
1307 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
1308 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
1309 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
1310 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
1311 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
1312 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
1313 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
1314 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
1315 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
1316 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
1317 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
1318 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
1319 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
1320 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
1321 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
1322 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
1323 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
1324 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
1325 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
1326 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
1327 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
1328 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
1329 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
1330 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
1331 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
1332 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
1333 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
1334 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
1335 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
1336 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
1337 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
1338 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
1339 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
1340 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
1341 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
1342 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
1343 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
1344 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
1345 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
1346 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
1347 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
1348 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
1349 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
1350 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
1351 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
1352 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
1354 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1356 Update docs for recent <span> and constexpr lib changes.
1357 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
1358 p1023r0, p1085r2 status.
1359 * doc/html/manual/status.html: Regenerate.
1361 2019-09-09 Antony Polukhin <antoshkka@gmail.com>
1363 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
1364 final offsets with constants.
1366 2019-09-09 Jonathan Wakely <jwakely@redhat.com>
1368 * include/bits/range_access.h (__adl_to_address): Remove.
1369 * include/std/span (__is_base_derived_safe_convertible_v): Replace
1370 with span::__is_compatible.
1371 (__is_std_array_v): Replace with __is_std_array class template and
1372 partial specializations.
1373 (__is_std_array, __is_std_span): New class templates and partial
1375 (span::__is_compatible): New alias template for SFINAE constraints.
1376 (span::span(element_type (&)[N])): Remove redundant constraints. Do
1377 not use __adl_data to obtain a pointer.
1378 (span::span(array<value_type, N>&)): Likewise.
1379 (span::span(const array<value_type, N>&)): Likewise.
1380 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
1381 (span::iter_value_t, span::derived_from): New alias templates for
1382 SFINAE constraints, until the equivalents are supported in <concepts>
1384 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
1385 for SFINAE constraints.
1386 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
1388 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
1389 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
1390 Use std::to_address instead of __adl_to_address.
1391 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
1392 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
1393 template for SFINAE constraints.
1394 [!_GLIBCXX_P1394] (span::span(Container&))
1395 (span::span(const Container&)): Improve constraints.
1396 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
1397 (span::span(pointer, pointer)): Remove redundant cast of pointer.
1398 (span(const span<OType, OExtent>&)): New constructor.
1400 2019-09-06 Jonathan Wakely <jwakely@redhat.com>
1402 * include/bits/range_access.h (ssize): Define for C++20.
1403 * testsuite/24_iterators/range_access_cpp20.cc: New test.
1404 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
1405 * doc/html/*: Regenerate.
1407 2019-09-06 Florian Weimer <fweimer@redhat.com>
1409 * configure: Regenerate.
1411 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
1413 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
1414 P1024R3. Remove entry for P0920R2.
1415 * include/std/span (__cpp_lib_span): Change value.
1416 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
1418 (span): Replace __extent_storage base class with data member.
1419 (span::_S_subspan_extent): New function.
1420 (span::empty()): Add nodiscard attribute.
1421 (span::front, span::back, span::operator[]): Check preconditions.
1422 (span::first, span::last, span::subspan): Add noexcept. Improve
1423 precondition checks (LWG 3103).
1424 (get): Remove redundant condition from static_assert.
1425 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
1426 (as_writable_bytes): Add inline specifier.
1427 * include/std/version (__cpp_lib_span): Change value.
1428 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
1429 * testsuite/23_containers/span/front_neg.cc: Likewise.
1430 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
1431 * testsuite/23_containers/span/last_neg.cc: Improve test.
1432 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
1433 * testsuite/23_containers/span/1.cc: New test.
1434 * testsuite/23_containers/span/2.cc: New test.
1435 * testsuite/23_containers/span/back_assert_neg.cc: New test.
1436 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
1437 * testsuite/23_containers/span/first_assert_neg.cc: New test.
1438 * testsuite/23_containers/span/first_neg.cc: New test.
1439 * testsuite/23_containers/span/front_assert_neg.cc: New test.
1440 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
1441 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
1442 * testsuite/23_containers/span/last_assert_neg.cc: New test.
1443 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
1444 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
1445 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
1446 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
1447 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
1448 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
1450 2019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
1452 * include/Makefile.am: Add <span> header.
1453 * include/Makefile.in: Regenerate.
1454 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
1455 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
1456 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
1457 New functions for performing argument-dependent lookup of range
1458 customization points.
1459 * include/bits/stl_iterator.h (__normal_iterator): Add
1460 _GLIBCXX20_CONSTEXPR to all functions.
1461 * include/std/span: New header.
1462 * include/std/version (__cpp_lib_span): Define feature test macro.
1463 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
1464 * testsuite/23_containers/span/everything.cc: New test.
1465 * testsuite/23_containers/span/get_neg.cc: New test.
1466 * testsuite/23_containers/span/last_neg.cc: New test.
1467 * testsuite/23_containers/span/subspan_neg.cc: New test.
1468 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
1469 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
1470 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
1472 2019-09-05 Jonathan Wakely <jwakely@redhat.com>
1474 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
1475 * doc/html/*: Regenerate.
1477 2019-09-04 Mike Crowe <mac@mcrowe.com>
1480 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
1481 pthread_cond_clockwait function.
1482 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
1483 * configure: Regenerate.
1484 * config.h.in: Regenerate.
1485 * include/std/condition_variable: (condition_variable): Rename
1486 __steady_clock_t typedef and add system_clock. Change __clock_t to be
1487 a typedef for the preferred clock to convert arbitrary other clocks to.
1488 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
1490 (wait_until): Change __clock_t overload to use system_clock.
1491 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
1492 steady_clock overload that calls pthread_cond_clockwait.
1493 (__wait_until_impl): Change __clock_t overload to use system_clock.
1494 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
1495 steady_clock for __clock_t if pthread_cond_clockwait is available.
1497 2019-09-04 Mike Crowe <mac@mcrowe.com>
1499 * testsuite/30_threads/condition_variable/members/2.cc (test01):
1500 Parameterise so that test can be run against an arbitrary clock.
1501 (main): Test using std::chrono::steady_clock and a user-defined
1502 clock in addition to the previous std::chrono::system_clock.
1503 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
1505 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
1507 * crossconfig.m4: Remove references to spu.
1508 * configure: Regenerate.
1509 * doc/xml/manual/appendix_contributing.xml: Remove references
1510 to __ea as "badword" for spu.
1511 * doc/html/manual/source_code_style.html: Regenerate.
1512 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
1513 to avoid __ea (as "badword" for spu).
1514 (__ellint_rj): Likewise.
1516 2019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
1519 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
1520 scanning to conform to the GNU Coding Standards.
1521 * configure: Regenerate.
1523 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1525 * src/c++17/memory_resource.cc: Use __constinit keyword.
1527 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1529 * doc/xml/manual/abi.xml: Document 9.x library versions.
1530 * doc/html/*: Regenerate.
1532 2019-09-02 Jonathan Wakely <jwakely@redhat.com>
1534 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
1535 (__detail::__to_chars_8_len): Remove.
1536 (__detail::__to_chars_8): Inline length calculation here.
1537 (__detail::__from_chars_binary): Use numeric_limits instead of
1540 2019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1542 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
1543 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
1544 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
1545 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
1548 2019-09-01 François Dumont <fdumont@gcc.gnu.org>
1550 * testsuite_files/util/testsuite_performance.h
1551 (resource_counter::start): Ignore unused malloc(0) result.
1553 2019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1555 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
1556 Model Object Technologies): Adjust name and link.
1558 2019-08-30 Antony Polukhin <antoshkka@gmail.com>
1560 * include/std/charconv (__detail::__to_chars_8)
1561 __detail::__to_chars_16): Replace array of precomputed digits with
1562 arithmetic operations to avoid CPU cache misses. Remove zero
1563 termination from array of digits to allow symbol merge with generic
1564 implementation of __detail::__to_chars. Replace final offsets with
1565 constants. Use __detail::__to_chars_len_2 instead of a generic
1566 __detail::__to_chars_len.
1567 (__detail::__to_chars): Remove zero termination from array of digits.
1568 (__detail::__to_chars_2): Leading digit is always '1'.
1570 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
1572 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
1574 2019-08-30 Uros Bizjak <ubizjak@gmail.com>
1576 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
1578 2019-08-30 Jonathan Wakely <jwakely@redhat.com>
1581 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
1582 to template parameters.
1583 * include/bits/stl_uninitialized.h (uninitialized_copy)
1584 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
1585 diagnose invalid uses.
1586 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
1587 Adjust expected error.
1588 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
1590 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
1592 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
1594 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
1596 * testsuite/23_containers/vector/cons/89164.cc: New test.
1597 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
1599 2019-08-29 Jonathan Wakely <jwakely@redhat.com>
1602 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
1603 * configure: Regenerate.
1604 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
1606 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
1608 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1610 2019-08-29 Jakub Jelinek <jakub@redhat.com>
1612 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1613 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1615 2019-08-28 Jonathan Wakely <jwakely@redhat.com>
1617 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
1618 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1619 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1620 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1621 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1622 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1623 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1625 2019-08-23 Joseph Myers <joseph@codesourcery.com>
1627 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1628 (std::filesystem::__gnu_posix::lstat): Add return type.
1630 2019-08-20 Jonathan Wakely <jwakely@redhat.com>
1632 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
1634 * include/std/numeric (reduce): Fix Doxygen markup.
1637 * include/std/type_traits (is_function): Simplify definition. Remove
1638 partial specializations for function types.
1639 (__is_referenceable): Simplify definition.
1640 * testsuite/20_util/bind/91371.cc: New test.
1641 * testsuite/20_util/is_function/91371.cc: New test.
1642 * testsuite/20_util/is_function/value.cc: Check more pointer types.
1643 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
1644 * testsuite/20_util/is_object/91371.cc: New test.
1646 2019-08-16 Uros Bizjak <ubizjak@gmail.com>
1648 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
1650 2019-08-15 Jonathan Wakely <jwakely@redhat.com>
1653 * include/bits/std_function.h (__check_func_return_type): Remove.
1654 (function::_Callable): Use std::__is_invocable_impl instead of
1655 __check_func_return_type.
1656 * include/std/type_traits (__is_invocable_impl): Add another defaulted
1657 template parameter. Define a separate partial specialization for
1658 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
1659 with a check that models delayed temporary materialization.
1660 * testsuite/20_util/function/91456.cc: New test.
1661 * testsuite/20_util/is_invocable/91456.cc: New test.
1663 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
1665 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
1667 2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
1669 Implement C++20 p0879 - Constexpr for swap and swap related functions.
1670 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
1671 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
1673 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
1674 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
1675 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
1676 * include/bits/move.h (swap): Add constexpr.
1677 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
1678 (__gcd, __rotate, rotate, __partition, __heap_select)
1679 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
1680 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
1681 (__introselect, __chunk_insertion_sort, next_permutation)
1682 (prev_permutation, partition, partial_sort, nth_element, sort)
1683 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
1684 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
1685 (swap_ranges): Add constexpr.
1686 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
1687 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
1689 * include/std/type_traits (swap): Add constexpr.
1690 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
1691 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
1692 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
1693 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
1694 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
1695 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
1696 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
1697 * testsuite/25_algorithms/partition/constexpr.cc: New test.
1698 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
1699 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
1700 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
1701 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
1702 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
1703 * testsuite/25_algorithms/sort/constexpr.cc: New test.
1704 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
1705 * testsuite/25_algorithms/swap/constexpr.cc: New test.
1706 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
1708 2019-08-12 Jonathan Wakely <jwakely@redhat.com>
1711 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
1713 * include/std/tuple (__unpack_std_tuple): New variable template and
1714 partial specializations.
1715 (apply, make_from_tuple): Add noexcept-specifier.
1716 * testsuite/20_util/tuple/apply/2.cc: New test.
1717 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
1719 2019-08-09 Corentin Gay <gay@adacore.com>
1721 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
1722 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
1723 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
1724 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
1725 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
1726 Add call to `VERIFY`.
1728 2019-08-09 Alexandre Oliva <oliva@adacore.com>
1730 * include/ext/random
1731 (normal_mv_distribution::param_type::param_type): New private
1732 ctor taking a decomposed varcov matrix, for use by...
1733 (operator>>): ... this, befriended.
1734 * include/ext/random.tcc (operator>>): Use it.
1735 (normal_mv_distribution::param_type::_M_init_lower): Adjust
1736 member function name in exception message.
1738 2019-08-08 Jonathan Wakely <jwakely@redhat.com>
1740 P0325R4 to_array from LFTS with updates
1741 * include/experimental/array (to_array): Qualify call to __to_array.
1742 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
1743 * include/std/version (__cpp_lib_to_array): Likewise.
1744 * testsuite/23_containers/array/creation/1.cc: New test.
1745 * testsuite/23_containers/array/creation/2.cc: New test.
1746 * testsuite/23_containers/array/creation/3_neg.cc: New test.
1747 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
1748 Use zero for dg-error line number.
1750 2019-08-06 Jonathan Wakely <jwakely@redhat.com>
1752 P1651R0 bind_front should not unwrap reference_wrapper
1753 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
1754 * include/std/version (__cpp_lib_bind_front): Update value.
1755 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
1757 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
1759 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
1760 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
1761 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
1762 specializations for __float128.
1763 * testsuite/26_numerics/numbers/float128.cc: New test.
1765 2019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
1767 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
1770 2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
1772 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
1773 in <algorithm> and <utility> Headers.
1774 Implement C++20 p1023 - constexpr comparison operators for std::array.
1775 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
1776 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
1777 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
1778 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
1779 none_of, partition_copy, partition_point, remove, remove_if,
1780 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
1781 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
1782 count_if, equal, find, find_first_of, find_if, for_each, generate,
1783 generate_n, lexicographical_compare, merge, mismatch, replace,
1784 replace_if, search, search_n, set_difference, set_intersection,
1785 set_symmetric_difference, set_union, transform, unique_copy):
1787 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
1788 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
1789 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
1790 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
1791 Use const ref instead of ref arg;
1792 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
1793 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
1794 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
1795 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
1796 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
1797 __iter_comp_iter): Mark constexpr.
1798 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
1799 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
1800 none_of, any_of, find_if_not, is_partitioned, partition_point,
1801 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
1802 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
1803 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
1804 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
1805 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
1806 __equal_range, equal_range, binary_search, __includes, includes,
1807 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
1808 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
1809 is_sorted_until, __is_permutation, is_permutation, for_each, find,
1810 find_if, find_first_of, adjacent_find, count, count_if, search,
1811 search_n, transform, replace, replace_if, generate, generate_n,
1812 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
1813 set_intersection, __set_difference, set_difference,
1814 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
1815 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
1816 wrappers around __builtin_memmove and __builtin_memcmp
1818 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
1819 copy, move, __copy_move_b, __copy_move_backward_a,
1820 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
1821 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
1822 __lexicographical_compare_impl, __lexicographical_compare,
1823 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
1824 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
1825 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
1826 is_heap): Mark constexpr.
1827 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
1828 is_heap): Mark constexpr.
1829 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
1830 * include/std/array: Make comparison ops constexpr.
1831 * include/std/utility: Make exchange constexpr.
1832 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
1833 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
1834 * testsuite/23_containers/array/tuple_interface/
1835 tuple_element_neg.cc: Adjust.
1836 * testsuite/20_util/exchange/constexpr.cc: New.
1837 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
1838 * testsuite/25_algorithms/constexpr_macro.cc: New.
1839 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
1840 * testsuite/25_algorithms/all_of/constexpr.cc: New.
1841 * testsuite/25_algorithms/any_of/constexpr.cc: New.
1842 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
1843 * testsuite/25_algorithms/copy/constexpr.cc: New.
1844 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
1845 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
1846 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
1847 * testsuite/25_algorithms/count/constexpr.cc: New.
1848 * testsuite/25_algorithms/count_if/constexpr.cc: New.
1849 * testsuite/25_algorithms/equal/constexpr.cc: New.
1850 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
1851 * testsuite/25_algorithms/fill/constexpr.cc: New.
1852 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
1853 * testsuite/25_algorithms/find/constexpr.cc: New.
1854 * testsuite/25_algorithms/find_end/constexpr.cc: New.
1855 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
1856 * testsuite/25_algorithms/find_if/constexpr.cc: New.
1857 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
1858 * testsuite/25_algorithms/for_each/constexpr.cc: New.
1859 * testsuite/25_algorithms/generate/constexpr.cc: New.
1860 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
1861 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
1862 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
1863 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
1864 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
1865 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
1866 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
1867 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
1868 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
1869 * testsuite/25_algorithms/merge/constexpr.cc: New.
1870 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
1871 * testsuite/25_algorithms/none_of/constexpr.cc: New.
1872 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
1873 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
1874 * testsuite/25_algorithms/remove/constexpr.cc: New.
1875 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
1876 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
1877 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
1878 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
1879 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
1880 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
1881 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
1882 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
1883 * testsuite/25_algorithms/search/constexpr.cc: New.
1884 * testsuite/25_algorithms/search_n/constexpr.cc: New.
1885 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
1886 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
1887 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
1888 * testsuite/25_algorithms/set_union/constexpr.cc: New.
1889 * testsuite/25_algorithms/transform/constexpr.cc: New.
1890 * testsuite/25_algorithms/unique/constexpr.cc: New.
1891 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
1892 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
1894 2019-07-31 Jonathan Wakely <jwakely@redhat.com>
1896 * include/std/memory (make_obj_using_allocator): Qualify call to
1897 uses_allocator_construction_args.
1899 P0631R4 Math Constants
1900 * include/Makefile.am: Add new header.
1901 * include/Makefile.in: Regenerate.
1902 * include/precompiled/stdc++.h: Include new header.
1903 * include/std/numbers: New header.
1904 * include/std/version (__cpp_lib_math_constants): Define.
1905 * testsuite/26_numerics/numbers/1.cc: New test.
1906 * testsuite/26_numerics/numbers/2.cc: New test.
1907 * testsuite/26_numerics/numbers/3.cc: New test.
1908 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
1910 * include/std/bit: Add Doxygen comments.
1913 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
1914 constraints on deleter that should only apply to the constructor.
1915 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
1916 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
1917 constraints on deleter here.
1918 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
1920 2019-07-29 Jonathan Wakely <jwakely@redhat.com>
1923 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
1925 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
1927 * testsuite/18_support/51333.cc: New test.
1929 2019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
1931 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
1932 to the Doxygen manual. Avoid a "here" link on the way.
1933 Fix another broken link to Doxygen docblocks.
1935 2019-07-26 Jonathan Wakely <jwakely@redhat.com>
1937 * include/std/bit (__cpp_lib_endian): Define.
1938 * include/std/version (__cpp_lib_endian): Define.
1939 * testsuite/26_numerics/endian/2.cc: New.
1940 * testsuite/26_numerics/endian/3.cc: New.
1941 * testsuite/26_numerics/endian/4.cc: New.
1943 2019-07-26 François Dumont <fdumont@gcc.gnu.org>
1945 * testsuite/util/testsuite_iterators.h
1946 (bidirectional_iterator_wrapper): Fix type comment.
1947 (random_access_iterator_wrapper): Likewise.
1949 2019-07-25 Jonathan Wakely <jwakely@redhat.com>
1951 * include/std/bit (endian): Move definition here as per P1612R1.
1952 * include/std/type_traits (endian): Remove definition from here.
1953 * testsuite/20_util/endian/1.cc: Rename to ...
1954 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
1956 2019-07-25 Martin Liska <mliska@suse.cz>
1957 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1960 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
1961 -fno-allocation-dce.
1962 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
1963 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
1964 * testsuite/ext/new_allocator/check_new.cc: Likewise.
1966 2019-07-22 Jonathan Wakely <jwakely@redhat.com>
1968 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
1969 * testsuite/26_numerics/bit/bit.count/*: Here.
1971 * include/std/bit (__rotl, __rotr): Change second parameter from
1972 unsigned int to int and handle negative values.
1973 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
1974 parameter from unsigned int to int. Add nodiscard attribute.
1975 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
1976 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
1978 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
1979 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
1982 * include/std/bit (__ceil2): Make unrepresentable results undefined,
1983 as per P1355R2. Add debug assertion. Perform one left shift, not two,
1984 so that out of range values cause undefined behaviour. Ensure that
1985 shift will still be undefined if left operand is promoted.
1986 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
1987 unrepresentable values with checks that they are not core constant
1989 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
1991 2019-07-19 François Dumont <fdumont@gcc.gnu.org>
1993 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
1994 sized deallocation size computation.
1996 2019-07-19 Andreas Schwab <schwab@linux-m68k.org>
1998 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
2000 2019-07-18 François Dumont <fdumont@gcc.gnu.org>
2002 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
2003 (~_Temporary_buffer()): Use latter.
2004 (_Temporary_buffer(_FIterator, size_type)): Likewise.
2006 2019-07-17 Andreas Schwab <schwab@suse.de>
2008 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
2010 2019-07-16 Jason Merrill <jason@redhat.com>
2012 * include/std/memory (uses_allocator_construction_args): Add parens
2015 2019-07-12 Jonathan Wakely <jwakely@redhat.com>
2017 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
2019 * include/experimental/string_view (__detail::__idt): Remove.
2020 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
2021 Use __type_identity_t instead of __detail::__idt;
2022 * include/std/string_view (__detail::__idt): Remove.
2023 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
2024 Use __type_identity_t instead of __detail::__idt;
2025 * include/std/type_traits (__type_identity_t): New alias template.
2027 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
2028 and floating point atomics.
2030 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
2032 * doc/xml/manual/configure.xml: Improve documentation of
2033 --enable-libstdcxx-time option.
2035 * include/bits/atomic_base.h (__atomic_impl): New namespace for
2036 wrappers around atomic built-ins.
2037 (__atomic_float, __atomic_ref): New class templates for use as base
2039 * include/std/atomic (atomic<float>, atomic<double>)
2040 (atomic<long double>): New explicit specializations.
2041 (atomic_ref): New class template.
2042 (__cpp_lib_atomic_ref): Define.
2043 * include/std/version (__cpp_lib_atomic_ref): Define.
2044 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
2045 * testsuite/29_atomics/atomic_float/1.cc: New test.
2046 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
2047 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
2048 * testsuite/29_atomics/atomic_ref/float.cc: New test.
2049 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
2050 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
2051 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
2052 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
2054 2019-07-06 Jonathan Wakely <jwakely@redhat.com>
2056 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
2057 throw() with _GLIBCXX_NOTHROW.
2058 (__atomic_add_dispatch): Return after performing atomic increment.
2060 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
2062 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
2063 (__exchange_and_add): Replace static specifier with always_inline
2065 (__exchange_and_add_single, __atomic_add_single): Likewise.
2066 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
2067 combine !__gthread_active_p() and !__GTHREADS branches.
2069 2019-07-03 Jonathan Wakely <jwakely@redhat.com>
2072 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
2073 * configure: Regenerate.
2074 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
2076 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
2077 * testsuite/util/testsuite_abi.cc: Add new symbol version.
2079 2019-07-02 Jonathan Wakely <jwakely@redhat.com>
2081 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
2082 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
2083 instead of __is_identifier to detect Clang support.
2085 2019-07-02 Jim Wilson <jimw@sifive.com>
2087 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
2089 * configure: Regenerate.
2091 2019-06-27 Jonathan Wakely <jwakely@redhat.com>
2094 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
2095 for the what_arg parameters.
2096 (filesystem_error::filesystem_error): Pass system_error::what() to
2097 the _Impl constructor.
2098 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
2099 filesystem_error::what() contains system_error::what().
2101 2019-06-26 Jonathan Wakely <jwakely@redhat.com>
2103 * include/std/charconv (chars_format): Define bitmask type.
2104 * testsuite/20_util/to_chars/chars_format.cc: New test.
2106 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
2107 * include/std/bit (_If_is_unsigned_integer_type): Remove.
2108 (_If_is_unsigned_integer): Use __is_unsigned_integer.
2109 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
2110 (countl_one(byte), countr_zero(byte), countr_one(byte))
2111 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
2112 (log2p1(byte)): Remove.
2113 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
2114 (__detail::__is_int_to_chars_type): Remove.
2115 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
2116 and __is_unsigned_integer.
2117 * include/std/type_traits (__is_one_of): Move here from <charconv>.
2118 (__is_signed_integer, __is_unsigned_integer): New helpers.
2119 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
2121 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
2122 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
2123 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
2124 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
2125 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
2126 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
2127 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
2128 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
2129 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
2130 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
2132 2019-06-25 Jonathan Wakely <jwakely@redhat.com>
2134 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
2137 2019-06-25 Jakub Jelinek <jakub@redhat.com>
2139 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
2140 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
2141 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
2142 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
2144 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
2146 * include/std/numeric (midpoint(T, T)): Change implementation for
2147 floating-point types to avoid incorrect rounding of denormals.
2148 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
2149 rounding with denormals.
2150 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
2151 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2153 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
2155 2019-06-20 Jonathan Wakely <jwakely@redhat.com>
2157 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
2159 * configure: Regenerate.
2161 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
2162 Qualify calls to __never_valueless.
2164 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
2165 C++17 working draft.
2167 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
2168 vector<bool> for test.
2169 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2171 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
2173 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
2175 (istream_iterator::_M_read()): Do not check stream state before
2176 attempting extraction. Set stream pointer to null when extraction
2178 (operator==(const istream_iterator&, const istream_iterator&)): Change
2179 to be a hidden friend of istream_iterator.
2180 (operator!=(const istream_iterator&, const istream_iterator&)):
2182 (ostream_iterator::ostream_iterator()): Add default constructor.
2183 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
2185 * testsuite/24_iterators/istream_iterator/1.cc: New test.
2186 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
2187 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
2188 constructor taking a string.
2189 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
2192 2019-06-19 Michael Weghorn <m.weghorn@posteo.de>
2193 Jonathan Wakely <jwakely@redhat.com>
2196 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
2197 values of type bool for vector<bool> elements.
2198 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
2199 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2201 2019-06-19 Jonathan Wakely <jwakely@redhat.com>
2203 PR libstdc++/90920 partially revert r263433
2204 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
2205 (rotate): Remove checks.
2206 * testsuite/25_algorithms/rotate/90920.cc: New test.
2208 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
2209 category used in invocable check.
2210 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
2211 * testsuite/26_numerics/reduce/2.cc: New test.
2213 2019-06-18 Jonathan Wakely <jwakely@redhat.com>
2215 * include/bits/algorithmfwd.h: Change title of doc group.
2216 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
2218 * include/bits/stl_numeric.h: Define doc group and add algos to it.
2219 * include/std/numeric (__is_random_access_iter): New internal trait.
2220 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
2221 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
2222 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
2223 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
2224 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
2225 * testsuite/26_numerics/reduce/1.cc: New test.
2226 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
2227 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
2228 * testsuite/26_numerics/transform_reduce/1.cc: New test.
2229 * testsuite/util/testsuite_iterators.h (test_container::size()): New
2232 * include/c_global/cstddef (std::byte): Perform arithmetic operations
2233 in unsigned int to avoid promotion (LWG 2950).
2235 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
2237 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
2240 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
2242 PR libstdc++/90281 Fix string conversions for filesystem::path
2243 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2244 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
2245 __str_codecvt_in_all to fail for partial conversions and throw on
2247 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
2248 (path::_Cvt<char8_t>): Add explicit specialization.
2249 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
2251 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
2252 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
2253 instead of codecvt_utf8. Use __str_codecvt_in_all and
2254 __str_codecvt_out_all.
2255 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
2256 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
2257 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2258 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
2259 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
2260 after converting to UTF-8.
2261 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
2262 __str_codecvt_in_all.
2263 (path::string): Fix initialization of string types with different
2265 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2266 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
2267 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
2269 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
2270 return false for partial conversions.
2271 * include/experimental/bits/fs_path.h (u8path):
2272 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
2273 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
2274 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
2275 instead of codecvt_utf8. Use __str_codecvt_in_all and
2276 __str_codecvt_out_all.
2277 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
2278 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
2279 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2280 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
2281 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
2282 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2283 __str_codecvt_in_all.
2284 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2285 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
2286 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
2287 __str_codecvt_in_all.
2288 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
2289 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
2290 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
2291 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
2292 strings and with Unicode characters outside the basic multilingual
2294 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
2295 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
2296 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
2297 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
2298 * testsuite/experimental/filesystem/path/native/string.cc: Test with
2299 empty strings and with Unicode characters outside the basic
2302 2019-06-17 François Dumont <fdumont@gcc.gnu.org>
2303 Jonathan Wakely <jwakely@redhat.com>
2305 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
2306 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
2307 deallocate node if insertion fails.
2308 (_Hashtable::_M_insert_multi_node): Likewise.
2309 (_Hashtable::_M_reinsert_node): Pass additional key argument.
2310 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
2311 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
2312 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
2313 (_Hashtable::extract(const _Key&)): Likewise.
2314 (_Hashtable::_M_merge_unique): Pass additional key argument.
2315 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
2317 (_Hashtable::_M_insert): Likewise.
2318 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
2319 (_Hashtable_alloc): Add comments to functions with misleading names.
2321 2019-06-17 Jonathan Wakely <jwakely@redhat.com>
2323 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
2325 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
2326 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
2327 header for std::allocator.
2328 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
2329 using-declaration for std::size_t.
2330 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
2332 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
2334 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
2335 * testsuite/experimental/map/erasure.cc: Include <string> for
2337 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
2339 2019-06-14 Jonathan Wakely <jwakely@redhat.com>
2341 * include/experimental/type_traits (experimental::nonesuch): Use
2342 pragma to disable -Wctor-dtor-privacy warnings.
2343 * include/std/type_traits (__is_convertible_helper<From, To, false>)
2344 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
2346 * include/std/version (__cpp_lib_bind_front): Add missing macro.
2348 2019-06-12 Jonathan Wakely <jwakely@redhat.com>
2350 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
2351 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
2352 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
2353 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
2355 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
2356 (variant::emplace): Change static_assert messages from "should be"
2358 (hash<monostate>::operator()): Remove name of unused parameter.
2360 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
2363 * include/Makefile.am: Add new <bits/charconv.h> header.
2364 * include/Makefile.in: Regenerate.
2365 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
2366 (to_string(long), to_string(unsigned long), to_string(long long))
2367 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
2368 * include/bits/charconv.h: New header.
2369 (__detail::__to_chars_len): Move here from <charconv>.
2370 (__detail::__to_chars_10_impl): New function extracted from
2371 __detail::__to_chars_10.
2372 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
2373 (__to_chars_unsigned_type): New class template that reuses
2374 __make_unsigned_selector_base::__select to pick a type.
2375 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
2376 (__detail::__to_chars_len): Move to new header.
2377 (__detail::__to_chars_10): Add inline specifier. Move code doing the
2378 output to __detail::__to_chars_10_impl and call that.
2379 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
2380 * testsuite/21_strings/basic_string/numeric_conversions/char/
2381 to_string.cc: Fix reference in comment. Remove unused variable.
2382 * testsuite/21_strings/basic_string/numeric_conversions/char/
2383 to_string_int.cc: New test.
2385 2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
2387 Fix ConstexprIterator requirements tests - No constexpr algorithms!
2388 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
2389 Replace copy with hand-rolled loop.
2390 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
2393 2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
2395 Test for C++20 p0858 - ConstexprIterator requirements.
2396 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
2398 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
2401 2019-06-07 Thomas Rodgers <trodgers@redhat.com>
2403 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
2405 * include/bits/c++config: Rename all macros of the form __PSTL* to
2407 * include/std/algorithm: Likewise.
2408 * include/std/execution: Likewise.
2409 * include/std/numeric: Likewise.
2410 * include/std/memory: Likewise.
2411 * include/pstl/glue_memory_impl.h: Likewise.
2412 * include/pstl/numeric_impl.h: Likewise.
2413 * include/pstl/glue_memory_defs.h: Likewise.
2414 * include/pstl/execution_defs.h: Likewise.
2415 * include/pstl/utils.h: Likewise.
2416 * include/pstl/algorithm_fwd.h: Likewise.
2417 * include/pstl/unseq_backend_simd.h: Likewise.
2418 * include/pstl/glue_execution_defs.h: Likewise.
2419 * include/pstl/algorithm_impl.h: Likewise.
2420 * include/pstl/parallel_impl.h: Likewise.
2421 * include/pstl/memory_impl.h: Likewise.
2422 * include/pstl/glue_numeric_defs.h: Likewise.
2423 * include/pstl/parallel_backend_utils.h: Likewise.
2424 * include/pstl/glue_algorithm_defs.h: Likewise.
2425 * include/pstl/parallel_backend.h: Likewise.
2426 * include/pstl/glue_numeric_impl.h: Likewise.
2427 * include/pstl/parallel_backend_tbb.h: Likewise.
2428 * include/pstl/numeric_fwd.h: Likewise.
2429 * include/pstl/glue_algorithm_impl.h: Likewise.
2430 * include/pstl/execution_impl.h: Likewise.
2431 * include/pstl/pstl_config.h: Likewise.
2432 * testsuite/util/pstl/pstl_test_config.h: Likewise.
2433 * testsuite/util/pstl/test_utils.h: Likewise.
2434 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
2436 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
2438 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
2440 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
2441 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
2442 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
2443 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
2444 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
2446 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
2447 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
2448 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
2449 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
2450 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
2452 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
2453 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
2454 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
2455 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
2456 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
2458 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
2459 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
2460 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
2462 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
2464 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
2465 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
2466 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
2468 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
2470 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
2472 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
2474 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
2476 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
2478 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
2480 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
2482 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
2484 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
2486 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
2488 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
2490 Rename header guards to be consistent with upstream project's
2492 * include/pstl/glue_memory_impl.h: Rename all macros of the form
2493 _PSTL_(.*)_H to _PSTL_\U\1_H.
2494 * include/pstl/numeric_impl.h: Likewise.
2495 * include/pstl/glue_memory_defs.h: Likewise.
2496 * include/pstl/execution_defs.h: Likewise.
2497 * include/pstl/utils.h: Likewise.
2498 * include/pstl/algorithm_fwd.h: Likewise.
2499 * include/pstl/unseq_backend_simd.h: Likewise.
2500 * include/pstl/glue_execution_defs.h: Likewise.
2501 * include/pstl/algorithm_impl.h: Likewise.
2502 * include/pstl/parallel_impl.h: Likewise.
2503 * include/pstl/memory_impl.h: Likewise.
2504 * include/pstl/glue_numeric_defs.h: Likewise.
2505 * include/pstl/parallel_backend_utils.h: Likewise.
2506 * include/pstl/glue_algorithm_defs.h: Likewise.
2507 * include/pstl/parallel_backend.h: Likewise.
2508 * include/pstl/glue_numeric_impl.h: Likewise.
2509 * include/pstl/parallel_backend_tbb.h: Likewise.
2510 * include/pstl/numeric_fwd.h: Likewise.
2511 * include/pstl/glue_algorithm_impl.h: Likewise.
2512 * include/pstl/execution_impl.h: Likewise.
2513 * include/pstl/pstl_config.h: Likewise.
2514 * testsuite/util/pstl/pstl_test_config.h: Likewise.
2516 Synchronize libstdc++ parallel algorithms with upstream
2518 * include/pstl/algorithm_fwd.h: Synchronize with
2519 upstream PSTL project.
2520 * include/pstl/algorithm_impl.h: Likewise.
2521 * include/pstl/execution_defs.h: Likewise.
2522 * include/pstl/execution_impl.h: Likewise.
2523 * include/pstl/glue_algorithm_impl.h: Likewise.
2524 * include/pstl/glue_execution_defs.h: Likewise.
2525 * include/pstl/numeric_fwd.h: Likewise.
2526 * include/pstl/numeric_impl.h: Likewise.
2527 * include/pstl/parallel_backend.h: Likewise.
2528 * include/pstl/pstl_config.h: Likewise.
2529 * include/pstl/unseq_backend_simd.h: Likewise.
2530 * include/pstl/parallel_backend_serial.h: New file.
2531 * include/Makefile.am (pstl_headers): Add
2532 parallel_backend_serial.h.
2533 * include/Makefile.in: Regenerate.
2535 Clean up non-conforming names
2536 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
2537 Uglfiy copy_range1 and copy_range2
2538 (__pattern_walk2_n): Rename local n to __n
2539 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
2540 Rename parameter _T to _Tp.
2542 Integrate non-TBB serial backend support
2543 * include/bits/c++config: Adjust TBB detection logic to select serial
2544 PSTL backend if no TBB present.
2545 * testsuite/utils/pstl/test_utils.h: Remove check for
2546 _PSTL_USE_PAR_POLICIES
2548 2019-06-07 Jonathan Wakely <jwakely@redhat.com>
2550 * testsuite/24_iterators/container_access.cc: Move dg-options before
2551 dg-do directive so the target check uses the -std option.
2554 * configure: Regenerate.
2555 * src/Makefile.am (stamp-debug): Also test for missing makefile.
2556 * src/Makefile.in: Regenerate.
2558 2019-06-06 Jonathan Wakely <jwakely@redhat.com>
2560 * include/std/array: Do not include <stdexcept>.
2561 * include/std/optional: Include <exception> and
2562 <bits/exception_defines.h> instead of <stdexcept>.
2563 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
2565 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
2567 * testsuite/23_containers/map/erasure.cc: Include <string>.
2568 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2570 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
2571 dg-prune-output for different C++98 diagnostic.
2572 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
2574 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
2576 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
2578 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
2580 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
2582 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
2584 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
2586 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
2588 * testsuite/23_containers/vector/requirements/dr438/
2589 constructor_1_neg.cc: Likewise.
2590 * testsuite/23_containers/vector/requirements/dr438/
2591 constructor_2_neg.cc: Likewise.
2592 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
2594 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
2596 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
2597 Do not test allocator rebinding extension for C++2a.
2598 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
2599 dg-do directive for C++17 and C++2a.
2601 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2602 1_c++0x.cc: Remove redundant test.
2603 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2604 2.cc: Use target selector instead of preprocessor condition.
2605 * testsuite/23_containers/deque/requirements/explicit_instantiation/
2606 3.cc: Do not run test for C++2a.
2607 * testsuite/23_containers/forward_list/requirements/
2608 explicit_instantiation/3.cc: Likewise.
2609 * testsuite/23_containers/forward_list/requirements/
2610 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2612 * testsuite/23_containers/list/requirements/explicit_instantiation/
2613 1_c++0x.cc: Remove redundant test.
2614 * testsuite/23_containers/list/requirements/explicit_instantiation/
2615 2.cc: Use target selector instead of preprocessor condition.
2616 * testsuite/23_containers/list/requirements/explicit_instantiation/
2617 3.cc: Do not run test for C++2a.
2618 * testsuite/23_containers/list/requirements/explicit_instantiation/
2619 5.cc: Do not test allocator rebinding extension for C++2a.
2620 * testsuite/23_containers/map/requirements/explicit_instantiation/
2621 1_c++0x.cc: Remove redundant test.
2622 * testsuite/23_containers/map/requirements/explicit_instantiation/
2623 2.cc: Adjust comment.
2624 * testsuite/23_containers/map/requirements/explicit_instantiation/
2625 3.cc: Do not run test for C++2a.
2626 * testsuite/23_containers/map/requirements/explicit_instantiation/
2627 5.cc: Do not test allocator rebinding extension for C++2a.
2628 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2629 1_c++0x.cc: Remove redundant test.
2630 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2631 3.cc: Do not run test for C++2a.
2632 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
2633 5.cc: Do not test allocator rebinding extension for C++2a.
2634 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
2635 3.cc: Do not run test for C++2a.
2636 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
2637 5.cc: Do not test allocator rebinding extension for C++2a.
2638 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
2639 Do not run test for C++2a.
2640 * testsuite/23_containers/set/requirements/explicit_instantiation/
2641 1_c++0x.cc: Remove redundant test.
2642 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
2643 Do not test allocator rebinding extension for C++2a.
2644 * testsuite/23_containers/unordered_map/requirements/
2645 explicit_instantiation/3.cc: Likewise.
2646 * testsuite/23_containers/unordered_map/requirements/
2647 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2649 * testsuite/23_containers/unordered_multimap/requirements/
2650 explicit_instantiation/3.cc: Do not run test for C++2a.
2651 * testsuite/23_containers/unordered_multimap/requirements/
2652 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2654 * testsuite/23_containers/unordered_multiset/requirements/
2655 explicit_instantiation/3.cc: Do not run test for C++2a.
2656 * testsuite/23_containers/unordered_multiset/requirements/
2657 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2659 * testsuite/23_containers/unordered_set/requirements/
2660 explicit_instantiation/3.cc: Do not run test for C++2a.
2661 * testsuite/23_containers/unordered_set/requirements/
2662 explicit_instantiation/5.cc: Do not test allocator rebinding extension
2664 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2665 2.cc: Remove redundant test.
2666 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
2667 3.cc: Do not run test for C++2a.
2668 * testsuite/23_containers/vector/requirements/explicit_instantiation/
2671 * include/std/type_traits (is_empty, is_polymorphic, is_final)
2672 (is_abstract, is_aggregate): Remove static_assert.
2673 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
2675 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
2676 missing -std=gnu++17 option.
2677 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
2678 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
2679 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
2682 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
2683 * testsuite/18_support/set_unexpected.cc: Likewise.
2684 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
2686 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
2687 function to be valid in C++11.
2688 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
2689 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
2690 include Library Fundamentals or Networking headers in C++11 mode.
2691 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
2693 * include/std/tuple (_TC): Replace with _TupleConstraints.
2694 (_TupleConstraints): New helper for SFINAE constraints, with more
2695 expressive member functions to reduce duplication when used.
2696 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
2697 (tuple::_TCC): Replace dummy type parameter with bool non-type
2698 parameter that can be used to check the pack size.
2699 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
2700 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
2701 checking constraints in constructors.
2702 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
2704 (tuple::tuple): Use new helpers to reduce repitition in constraints.
2705 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
2706 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
2707 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
2708 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
2709 constraints in constructors.
2710 (tuple::__is_alloc_arg()): New SFINAE helpers.
2711 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
2713 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
2714 * testsuite/20_util/tuple/cons/90700.cc: New test.
2715 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
2716 to meet new constraint on allocator-extended default constructor.
2718 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2720 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
2721 * include/bits/stl_multimap.h (multimap): Likewise.
2723 2019-06-03 François Dumont <fdumont@gcc.gnu.org>
2725 Rename variables and cleanup comments.
2726 * include/bits/hashtable_policy.h
2727 * include/bits/hashtable.h
2729 2019-06-03 Jonathan Wakely <jwakely@redhat.com>
2731 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
2732 Fix bgcolor for P0340R3.
2733 * doc/html/*: Regenerate.
2736 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
2737 <experimental/memory_resource>.
2738 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
2739 P0339R6, P0340R3, P1164R1 and P1357R1.
2740 * doc/html/*: Regenerate.
2742 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
2743 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
2744 allocator::value_type assertion for C++2a.
2745 * include/bits/hashtable.h: Likewise.
2746 * include/bits/stl_deque.h: Likewise.
2747 * include/bits/stl_list.h: Likewise.
2748 * include/bits/stl_map.h: Likewise.
2749 * include/bits/stl_multimap.h: Likewise.
2750 * include/bits/stl_multiset.h: Likewise.
2751 * include/bits/stl_set.h: Likewise.
2752 * include/bits/stl_vector.h: Likewise.
2753 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
2754 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
2755 * testsuite/23_containers/list/48101-3_neg.cc: New test.
2756 * testsuite/23_containers/map/48101-3_neg.cc: New test.
2757 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
2758 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
2759 * testsuite/23_containers/set/48101-3_neg.cc: New test.
2760 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
2761 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
2762 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
2763 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
2764 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
2766 2019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
2768 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
2770 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2772 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
2774 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
2776 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
2778 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2780 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
2783 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
2784 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
2785 * libsupc++/eh_term_handler.h: New header defining
2786 _GLIBCXX_DEFAULT_TERM_HANDLER.
2787 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
2788 (set_terminate): Restore default handler when argument is null.
2789 (set_unexpected): Likewise.
2790 * testsuite/18_support/set_terminate.cc: New test.
2791 * testsuite/18_support/set_unexpected.cc: New test.
2793 * include/backward/hashtable.h (size_t, ptrdiff_t)
2794 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
2795 (distance, vector, pair, __iterator_category): Remove
2796 using-declarations that add these names to namespace __gnu_cxx.
2797 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
2798 * include/ext/debug_allocator.h (size_t): Likewise.
2799 * include/ext/functional (size_t, unary_function, binary_function)
2800 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
2802 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
2803 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
2804 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
2805 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
2806 * include/ext/numeric (iota): Fix outdated comment.
2807 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
2808 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
2809 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
2810 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
2811 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
2813 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
2814 (allocator, __true_type, __false_type): Likewise.
2816 2019-05-31 Antony Polukhin <antoshkka@gmail.com>
2819 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
2820 New helpers for checking preconditions in traits.
2821 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
2822 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
2823 (is_destructible, is_nothrow_destructible, is_constructible)
2824 (is_default_constructible, is_copy_constructible)
2825 (is_move_constructible, is_nothrow_default_constructible)
2826 (is_nothrow_constructible, is_nothrow_copy_constructible)
2827 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
2828 (is_nothrow_assignable, is_nothrow_copy_assignable)
2829 (is_nothrow_move_assignable, is_trivially_constructible)
2830 (is_trivially_copy_constructible, is_trivially_move_constructible)
2831 is_trivially_assignable, is_trivially_copy_assignable)
2832 (is_trivially_move_assignable, is_trivially_destructible)
2833 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
2834 (is_invocable_r, is_nothrow_invocable)
2835 (has_unique_object_representations, is_aggregate): Add static_asserts
2836 to make sure that type traits are not misused with incomplete types.
2837 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
2838 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
2839 base characteristics without assertions that can be reused in other
2841 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
2842 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
2844 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
2845 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
2846 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
2847 * testsuite/20_util/is_class/value.cc: Check incomplete type.
2848 * testsuite/20_util/is_function/value.cc: Likewise.
2849 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
2850 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
2852 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
2853 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
2854 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
2855 * testsuite/20_util/is_union/value.cc: Likewise.
2856 * testsuite/20_util/is_void/value.cc: Likewise.
2857 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
2859 2019-05-31 Jonathan Wakely <jwakely@redhat.com>
2861 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
2862 Add new private member function.
2863 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
2864 (random_device::_M_init_pretr1(const string&)): Call new private
2865 member with string data.
2866 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
2868 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
2869 test using COW strings.
2870 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
2871 a value from the device.
2872 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
2873 Fix typo in token string.
2875 2019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
2877 LWG2788 basic_string spurious use of a default constructible allocator
2878 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
2879 (basic_string::_M_replace_dispatch): Construct temporary string with
2880 the current allocator.
2881 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
2882 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
2884 2019-05-30 Jonathan Wakely <jwakely@redhat.com>
2886 * doc/xml/manual/diagnostics.xml: Update list of headers that define
2888 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
2889 section about new/delete overloads. Improve section on verbose
2891 * doc/html/*: Regenerate.
2893 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
2894 P0811R3. Change status of P1353R0.
2895 * doc/html/*: Regenerate.
2897 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
2898 documentation of implementation-defined types for [thread.req.native].
2899 * doc/xml/manual/status_cxx2017.xml: Update documentation of
2900 implementation-defined strings for [variant.bad.access]. Fix typo in
2901 documentation of implementation-defined support for [fs.conform.9945].
2902 * doc/html/*: Regenerate.
2904 2019-05-29 Jonathan Wakely <jwakely@redhat.com>
2907 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
2908 that fails on mingw-w64.
2911 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2912 (status(const path&, error_code&)): Use parent_path() to remove
2914 (symlink_status(const path&, error_code&)): Duplicate workaround for
2915 bug in _wstat for paths with trailing slash.
2916 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
2917 with trailing slash.
2918 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2919 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2921 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
2922 once instead of building it iteratively.
2924 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
2926 PR libstdc++/85494 use rdseed and rand_s in std::random_device
2927 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
2928 the assembler supports rdseed.
2929 * config.h.in: Regenerate.
2930 * configure: Regenerate.
2931 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
2932 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
2933 * doc/html/*: Regenerate.
2934 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
2935 * include/bits/random.h (random_device::random_device()): Always call
2936 _M_init rather than _M_init_pretr1.
2937 (random_device::random_device(const string&)): Likewise.
2938 (random_device::operator()()): Always call _M_getval().
2939 (random_device::_M_file): Replace first member of union with an
2940 anonymous struct, with _M_file as its first member.
2941 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
2942 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
2943 (USE_MT19937): Define if none of the above are defined.
2944 (USE_POSIX_FILE_IO): Define.
2945 (_M_strtoul): Remove.
2946 [USE_RDSEED] (__x86_rdseed): Define new function.
2947 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
2948 (random_device::_M_init(const string&)): Initialize new union members.
2949 Add support for "rdseed" and "rand_s" tokens. Decide what the
2950 "default" token does according to which USE_* macros are defined.
2951 [USE_POSIX_FILE_IO]: Store a file descriptor.
2952 [USE_MT19937]: Forward to _M_init_pretr1 instead.
2953 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
2954 code from _M_strtoul.
2955 [!USE_MT19937]: Call _M_init, transforming the old default token or
2956 numeric tokens to "default".
2957 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
2958 (random_device::_M_getval()): Use new union members to obtain a
2959 random number from the stored function pointer or file descriptor.
2960 [USE_MT19937]: Obtain a value from the mt19937 engine.
2961 (random_device::_M_getval_pretr1()): Call _M_getval().
2962 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
2964 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
2965 * testsuite/26_numerics/random/random_device/85494.cc: New test.
2967 2019-05-28 Jonathan Wakely <jwakely@redhat.com>
2970 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
2971 _M_split_cmpts() for a path with multiple components.
2972 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
2973 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
2974 components and reserve space in vector. Return early when there is
2976 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
2977 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
2979 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
2980 form of std::equals for C++11 compatibility.
2982 2019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
2984 * doc/xml/manual/appendix_contributing.xml: Update pointer to
2985 C++ standard at ansi.org.
2987 2019-05-24 Jonathan Wakely <jwakely@redhat.com>
2989 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
2990 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
2993 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
2994 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
2996 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
2998 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
3000 * testsuite/20_util/function_objects/invoke/3.cc: New test.
3001 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
3002 "compile" test to "run".
3004 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
3005 * doc/html/*: Regenerate.
3006 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
3007 rvalue aliasing constructor.
3008 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
3009 (reinterpret_pointer_cast): Add overloads taking rvalues.
3010 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
3011 Add rvalue aliasing constructor.
3012 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
3013 "run" and check return values as well as types.
3014 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
3015 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
3016 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
3017 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
3020 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
3021 * doc/xml/manual/intro.xml: Likewise.
3022 * include/std/future (__create_task_state): Add default arguments
3023 to make providing an allocator optional.
3024 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
3025 instead of delegating to another constructor.
3026 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
3027 define allocator-extended constructors for C++17 and later.
3028 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
3030 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
3031 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
3032 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
3034 2019-05-23 Hans-Peter Nilsson <hp@axis.com>
3036 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
3037 Don't run the libstdc++/83237 part on simulator targets.
3039 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
3041 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
3043 * doc/html/*: Regenerate.
3045 * include/experimental/any (__any_caster): Use RTTI if comparing
3046 addresses fails, to support non-unique addresses in shared libraries.
3047 * include/std/any (__any_caster): Likewise.
3050 * include/experimental/any (__any_caster): Constrain to only be
3051 callable for object types. Use remove_cv_t instead of decay_t.
3052 If the type decays or isn't copy constructible, compare the manager
3053 function to a dummy specialization.
3054 (__any_caster): Add overload constrained for non-object types.
3055 (any::_Manager_internal<_Op>): Add dummy specialization.
3056 * testsuite/experimental/any/misc/any_cast.cc: Test function types
3059 2019-05-22 Jonathan Wakely <jwakely@redhat.com>
3062 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
3063 reversed arguments to uninitialized_copy_n.
3064 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
3065 is unchanged by copy assignment.
3066 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
3067 compare path components.
3070 * include/experimental/memory_resource: Add system header pragma and
3071 do not define anything unless compiled as C++14 or later.
3072 (__resource_adaptor_common::__guaranteed_alignment): Remove.
3073 (__resource_adaptor_imp::do_allocate): If the requested alignment
3074 is a fundamental alignment then either allocate directly from _M_alloc
3075 or call the new _M_allocate function.
3076 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
3077 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
3078 of the allocator rebound to a POD type with the specified alignment.
3079 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
3080 * testsuite/experimental/memory_resource/new_delete_resource.cc:
3081 Adjust expected allocation sizes.
3082 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
3083 xfail for Solaris x86.
3085 2019-05-21 Thomas Rodgers <trodgers@redhat.com>
3087 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
3088 * include/pstl/execution_defs.h (__enable_if_execution_policy):
3089 Use std::__remove_cvref_t when building with GCC.
3091 2019-05-21 Jonathan Wakely <jwakely@redhat.com>
3094 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
3095 Use "additional_flags" to pass -ltbb to v3_target_compile command.
3096 Use check_v3_target_prop_cached to cache the result of the test.
3098 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
3100 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
3103 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
3104 Changed v3_target_compile check from preprocess to executable.
3105 Added "-ltbb" to v3_target_compile flags.
3107 2019-05-20 Thomas Rodgers <trodgers@redhat.com>
3109 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
3110 Add check for Thread Building Blocks 2018 or later.
3112 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
3114 * testsuite/experimental/names.cc: Only include Networking TS headers
3115 on targets with the necessary Gthreads support.
3117 2019-05-20 Marek Polacek <polacek@redhat.com>
3119 CWG 2094 - volatile scalars are trivially copyable.
3121 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
3122 result for volatile int.
3124 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
3126 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
3127 * testsuite/experimental/names.cc: Include <experimental/filesystem>
3130 PR c++/90532 Ensure __is_constructible(T[]) is false
3131 * include/std/type_traits (__do_is_default_constructible_impl)
3132 (__is_default_constructible_atom, __is_default_constructible_safe):
3134 (is_default_constructible): Use is_constructible.
3135 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
3136 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
3137 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
3138 * testsuite/20_util/is_trivially_default_constructible/value.cc:
3141 2019-05-20 Pádraig Brady <pbrady@fb.com>
3143 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
3144 to the deallocator with -fsized-deallocation.
3146 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
3148 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
3149 test by passing correct alignment to deallocate function.
3151 2019-05-18 Jonathan Wakely <jwakely@redhat.com>
3154 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
3155 Raise exception if unique_ptr tuple member has unknown structure.
3156 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
3157 Adjust worker to support new __uniq_ptr_data base class. Do not
3158 assume field called _M_head_impl is the first tuple element.
3160 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
3162 * include/bits/stl_deque.h
3163 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
3164 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
3165 (_Deque_base::_Deque_impl_data): New.
3166 (_Deque_base::_Deque_impl): Inherit latter.
3167 (_Deque_base::_Deque_impl::_M_swap_data): Move...
3168 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
3169 (_Deque_base::_Deque_impl()): Add noexcept qualification.
3170 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
3171 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
3172 (deque<>::deque()): Default.
3173 (deque<>::deque(deque&&)): Default.
3174 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
3175 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
3176 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
3177 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
3178 _M_range_initialize.
3179 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
3180 (deque<>::resize(size_type, const value_type&)): Share a single
3182 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
3183 _M_range_insert_aux.
3184 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
3185 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
3186 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
3187 * testsuite/23_containers/deque/allocator/default_init.cc: New.
3189 2019-05-17 Jonathan Wakely <jwakely@redhat.com>
3192 * include/std/variant (holds_alternative, get, get_if): Improve
3193 static assertion messages.
3194 (bad_variant_access::bad_variant_access()): Change default message.
3195 (__throw_bad_variant_access(bool)): New overload.
3196 (get): Use new overload.
3197 (visit, visit<R>): Improve exception message.
3199 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
3200 targets. Add more cases from P0608R3.
3201 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
3203 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
3204 * include/experimental/type_traits (is_detected_exact)
3205 (is_detected_exact_v): Likewise.
3206 * include/pstl/execution_defs.h (is_execution_policy)
3207 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
3208 * include/pstl/execution_impl.h (__policy_traits): Likewise.
3209 * testsuite/17_intro/names.cc: Check for more non-reserved names.
3210 * testsuite/experimental/names.cc: New test.
3213 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
3214 assertions from the destructor.
3215 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
3216 Move static_assert for hash function to here.
3217 (_Hash_table_base::_M_equals): Move static_assert for equality
3219 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
3221 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
3222 the value directly instead of calling _S_value.
3223 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
3224 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
3225 _S_key(_Const_Link_type).
3226 * testsuite/23_containers/set/85965.cc: Check construction,
3227 destruction, assignment and size() do not trigger the assertions.
3228 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
3229 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
3231 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3232 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
3233 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3234 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3235 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3236 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3237 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3239 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
3240 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
3243 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
3245 * doc/html/*: Regenerate.
3246 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
3247 of decay_t (P0777R1).
3249 2019-05-17 François Dumont <fdumont@gcc.gnu.org>
3251 Move from state of allocators (LWG2593)
3252 * include/bits/stl_deque.h
3253 (_Deque_base(_Deque_base&&, false_type)): Remove.
3254 (_Deque_base(_Deque_base&&, true_type)): Remove.
3255 (_Deque_base(_Deque_base&&)): Adapt.
3256 (_Deque_base::_M_move_impl()): Remove.
3257 * testsuite/util/testsuite_allocator.h
3258 (propagating_allocator(propagating_allocator&&)): Preserve move from
3260 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
3262 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
3264 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
3265 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
3266 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
3268 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
3270 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
3271 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
3273 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
3275 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
3277 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
3279 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
3281 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
3283 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
3285 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
3288 2019-05-16 Jonathan Wakely <jwakely@redhat.com>
3290 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
3291 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
3293 * include/std/variant (__overload_set): Remove.
3295 (_Build_FUN): New class template to define a single FUN overload,
3296 with specializations to prevent unwanted conversions, as per P0608R3.
3297 (_Build_FUNs): New class template to build an overload set of FUN.
3298 (_FUN_type): New alias template to perform overload resolution.
3299 (__accepted_type): Use integer_constant base for failure case. Use
3300 _FUN_type for successful case.
3301 (variant::__accepted_index): Use _Tp instead of _Tp&&.
3302 (variant::variant(_Tp&&)): Likewise.
3303 (variant::operator=(_Tp&&)): Likewise.
3305 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
3306 Replace raw visitation with a runtime check for the valueless state
3307 and a non-raw visitor.
3308 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
3309 (variant::index()): Remove branch.
3310 (variant::swap(variant&)): Use valueless_by_exception() instead of
3311 comparing the index to variant_npos, and add likelihood attribute.
3313 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
3314 (_Hashtable_base::_Equal_hash_code): Define new class template.
3315 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
3318 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
3319 Replace with _M_get non-static member function.
3320 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
3322 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
3323 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
3325 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
3326 _S_get accessors for members in EBO helpers.
3327 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
3328 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
3330 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
3332 (_Hashtable_base::_M_eq()): Remove non-const overload.
3334 2019-05-15 Jonathan Wakely <jwakely@redhat.com>
3336 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
3338 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3340 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
3343 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3345 * config/os/solaris/solaris2.10: Move to ...
3346 * config/os/solaris: ... this.
3347 * configure.host (os_include_dir): Adapt.
3348 (abi_baseline_pair): Remove Solaris 10 handling.
3349 * config/abi/post/i386-solaris2.10: Remove.
3350 * config/abi/post/sparc-solaris2.10: Remove.
3351 * config/abi/post/i386-solaris2.11: Rename to ...
3352 * config/abi/post/i386-solaris: ... this.
3353 * config/abi/post/sparc-solaris2.11: Rename to ...
3354 * config/abi/post/sparc-solaris: ... this.
3356 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
3359 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
3362 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3364 * include/std/variant (__visit_with_index): Remove typedef.
3365 (__deduce_visit_result): New tag type.
3366 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
3367 visitation of possibly-valueless variants, forwarding to __do_visit
3368 with the relevant tag type.
3369 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
3370 and make lambda return void.
3371 (__variant_construct): Likewise.
3372 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
3373 __raw_idx_visit and make lambda return void.
3374 (_Multi_array::__untag_result): Add metafunction to check the function
3375 pointer type for a tag type that dictates the kind of visitation.
3376 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
3377 Use decltype(auto) instead of tagged function pointer type.
3378 (__gen_vtable_impl): Remove bool non-type parameter and unused
3379 _Variant_tuple parameter.
3380 (__gen_vtable_impl::__visit_invoke_impl): Remove.
3381 (__gen_vtable_impl::__do_visit_invoke): Remove.
3382 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
3383 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
3384 for the visit<R> case, rather than dispatching to separate functions.
3385 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
3387 (variant::swap): Likewise.
3388 (__do_visit): Replace two non-type template parameters with a single
3389 type parameter, so that the caller must specify the visitor's return
3390 type (or one of the tag types).
3391 (visit): Deduce a return type from the visitor and use the
3392 __deduce_visit_result tag to enforce that all overloads return the
3394 (visit<R>): Call __do_visit<R> with explicit result type.
3395 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
3398 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
3400 nonesuch is insufficiently useless (lwg2996)
3401 * include/std/type_traits (struct __nonesuch): Added private base
3402 class to make __nonesuch not an aggregate and removed deleted default
3404 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
3405 (operator=(const pair&)): Use __nonesuch instead of
3406 __nonesuch_no_braces.
3407 (operator=(pair&&)): Likewise
3408 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
3409 of __nonesuch_no_braces.
3410 (operator=(tuple&&)): Likewise
3411 * include/experimental/type_traits (struct nonesuch): Added private
3412 base class to make nonesuch not an aggregate and removed deleted
3413 default constructor.
3414 * testsuite/20_util/nonesuch/nonesuch.cc: New.
3415 * testsuite/experimental/type_traits/nonesuch.cc: New.
3417 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3419 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
3420 (_Function_handler): Remove partial specializations for void return
3421 types and pointers to member.
3422 (_Function_handler::_M_manager): Adapt to removal of
3423 _Simple_type_wrapper.
3424 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
3425 * include/std/functional (_Bind_result::__enable_if_void)
3426 (_Bind_result::__disable_if_void): Remove sfinae helpers.
3427 (_Bind_result::__call): Use __invoke_r and remove overloads for void
3429 * include/std/future (__future_base::_Task_state::_M_run)
3430 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
3431 change return type of lambda expressions.
3433 * include/bits/invoke.h (__invoke_r): Define new function implementing
3434 the INVOKE<R> pseudo-function.
3435 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
3436 * testsuite/20_util/function_objects/invoke/2.cc: New test.
3438 * include/std/type_traits (__is_nt_convertible_helper): Define it
3439 unconditionally, not only for C++20.
3440 (__is_nothrow_convertible): Define internal trait for use in C++11.
3441 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
3442 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
3443 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
3444 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
3445 that has nothrow explicit conversion but potentially-throwing implicit
3447 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
3448 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
3449 function to only consider implicit conversions.
3450 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
3452 * include/std/iterator: Include <iosfwd> instead of <istream> and
3455 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
3456 Remove unused, non-standard function.
3458 * include/bits/regex.h (match_results::max_size()): Adjust return
3459 value to account for prefix/suffix/unmatched subs.
3460 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
3461 reset the contained sub matches.
3462 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
3463 function to set result state following a failed match.
3464 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
3465 sub_match states after _M_resize. Use _M_establish_failed_match.
3468 * include/std/thread (thread::_State_impl, thread::_S_make_state):
3469 Replace single _Callable parameter with variadic _Args pack, to
3470 forward them directly to the tuple of decayed copies.
3471 * testsuite/30_threads/thread/cons/69724.cc: New test.
3473 2019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
3475 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
3476 * include/bits/basic_string.h: (operator=(const basic_string&):
3477 Move allocator decision to assign.
3478 (assign(const basic_string&)): Move allocator decision here.
3479 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
3481 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
3484 2019-05-14 Jonathan Wakely <jwakely@redhat.com>
3486 * testsuite/util/testsuite_allocator.h (memory_resource)
3487 (default_resource_mgr): Fix indentation.
3489 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
3490 Use operator-> to access raw pointer member.
3491 * testsuite/23_containers/vector/59829.cc: Likewise.
3492 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
3493 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
3494 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
3496 (PointerBase, PointerBase_void): Derive from NullablePointer and use
3497 its constructors and equality operators. Change converting
3498 constructors to use operator-> to access private member of the other
3500 (PointerBase_void::operator->()): Add, for access to private member.
3501 (operator-(PointerBase, PointerBase)): Change to hidden friend.
3502 (operator==(PointerBase, PointerBase)): Remove.
3503 (operator!=(PointerBase, PointerBase)): Remove.
3505 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
3506 not assume field called _M_head_impl is the first tuple element.
3507 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
3508 implementation more accurate.
3509 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
3510 empty pointer type and non-empty deleter.
3512 LWG 2899 - Make is_move_constructible correct for unique_ptr
3513 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
3514 move assignment operator.
3515 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
3516 (__uniq_ptr_data): New class template with conditionally deleted
3518 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
3519 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
3520 constructor and move assignment operator as defaulted.
3521 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
3522 __uniq_ptr_impl::release().
3523 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
3524 to __uniq_ptr_impl::reset(pointer).
3525 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
3526 Check for new __uniq_ptr_data type.
3527 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
3529 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
3531 PR libstdc++/90454.cc path construction from void*
3532 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
3533 pointers to void are rejected as well as void.
3534 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
3535 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
3537 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
3539 * doc/xml/manual/policy_data_structures.xml: Comment out stray
3540 <remark> elements. Fix formatting of bibliography references.
3542 2019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
3544 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
3546 2019-05-13 Jonathan Wakely <jwakely@redhat.com>
3548 Remove Profile Mode, deprecated since 7.1.0
3549 * doc/Makefile.am: Remove XML file for profile mode docs.
3550 * doc/Makefile.in: Regenerate.
3551 * doc/xml/authors.xml: Remove authors of profile mode docs.
3552 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
3554 * doc/xml/manual/debug.xml: Likewise.
3555 * doc/xml/manual/evolution.xml: Document removal of profile mode.
3556 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
3557 * doc/xml/manual/spine.xml: Remove profile mode author credit.
3558 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
3560 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
3562 * doc/html/*: Regenerate.
3563 * include/Makefile.am: Remove profile mode headers.
3564 * include/Makefile.in: Regenerate.
3565 * include/bits/c++config (std::__profile): Remove namespace.
3566 [_GLIBCXX_PROFILE]: Remove checks for macro.
3567 * include/profile/array: Remove.
3568 * include/profile/base.h: Remove.
3569 * include/profile/bitset: Remove.
3570 * include/profile/deque: Remove.
3571 * include/profile/forward_list: Remove.
3572 * include/profile/impl/profiler.h: Remove.
3573 * include/profile/impl/profiler_algos.h: Remove.
3574 * include/profile/impl/profiler_container_size.h: Remove.
3575 * include/profile/impl/profiler_hash_func.h: Remove.
3576 * include/profile/impl/profiler_hashtable_size.h: Remove.
3577 * include/profile/impl/profiler_list_to_slist.h: Remove.
3578 * include/profile/impl/profiler_list_to_vector.h: Remove.
3579 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
3580 * include/profile/impl/profiler_node.h: Remove.
3581 * include/profile/impl/profiler_state.h: Remove.
3582 * include/profile/impl/profiler_trace.h: Remove.
3583 * include/profile/impl/profiler_vector_size.h: Remove.
3584 * include/profile/impl/profiler_vector_to_list.h: Remove.
3585 * include/profile/iterator_tracker.h: Remove.
3586 * include/profile/list: Remove.
3587 * include/profile/map: Remove.
3588 * include/profile/map.h: Remove.
3589 * include/profile/multimap.h: Remove.
3590 * include/profile/multiset.h: Remove.
3591 * include/profile/ordered_base.h: Remove.
3592 * include/profile/set: Remove.
3593 * include/profile/set.h: Remove.
3594 * include/profile/unordered_base.h: Remove.
3595 * include/profile/unordered_map: Remove.
3596 * include/profile/unordered_set: Remove.
3597 * include/profile/vector: Remove.
3598 * scripts/run_doxygen: Do not process profile mode headers.
3599 * testsuite/23_containers/array/element_access/60497.cc: Don't use
3601 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
3602 Remove dg-skip-if for profile mode.
3603 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
3604 preprocessor check for profile mode.
3605 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
3606 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
3608 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
3610 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
3611 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
3612 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
3613 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
3614 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
3616 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
3618 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
3620 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
3622 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
3623 preprocessor check for profile mode.
3624 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
3626 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
3627 Remove dg-skip-if for profile mode.
3628 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
3629 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
3630 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
3631 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
3632 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
3633 * testsuite/Makefile.am: Remove profile_flags variable and
3634 * testsuite/Makefile.am: Remove profile_flags variable and
3635 check-profile target.
3636 * testsuite/Makefile.in: Regenerate.
3637 * testsuite/ext/profile/all.cc: Remove.
3638 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
3639 * testsuite/ext/profile/profiler_algos.cc: Remove.
3640 * testsuite/ext/profile/replace_new.cc: Remove.
3641 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
3642 preprocessor check for profile mode.
3643 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
3644 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
3645 (check_v3_target_normal_mode): Do not check for profile mode macro.
3646 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
3648 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
3649 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3650 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
3651 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
3652 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
3653 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3654 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3655 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3656 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3657 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3659 Remove array_allocator extension, deprecated since 4.9.0
3660 * doc/xml/manual/allocator.xml: Remove documentation for
3662 * doc/xml/manual/evolution.xml: Document array_allocator removal.
3663 * doc/xml/manual/using.xml: Remove header from documentation.
3664 * include/Makefile.am: Remove <ext/array_allocator.h> header.
3665 * include/Makefile.in: Regenerate.
3666 * include/ext/array_allocator.h: Remove.
3667 * include/precompiled/extc++.h: Do not include removed header.
3668 * testsuite/ext/array_allocator/1.cc: Remove.
3669 * testsuite/ext/array_allocator/2.cc: Remove.
3670 * testsuite/ext/array_allocator/26875.cc: Remove.
3671 * testsuite/ext/array_allocator/3.cc: Remove.
3672 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
3673 * testsuite/ext/array_allocator/check_delete.cc: Remove.
3674 * testsuite/ext/array_allocator/check_new.cc: Remove.
3675 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
3676 * testsuite/ext/headers.cc: Do not include removed header.
3678 2019-05-11 François Dumont <fdumont@gcc.gnu.org>
3680 * include/bits/stl_bvector.h
3681 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3683 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3685 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3687 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3689 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3691 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3693 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
3695 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
3697 (_Bit_iterator::operator-(difference_type)): Likewise.
3698 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
3699 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
3701 (_Bit_const_iterator::operator-(difference_type)): Likewise.
3702 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
3704 2019-05-10 Jonathan Wakely <jwakely@redhat.com>
3707 * testsuite/util/thread/all.h: Do not use remove_pointer for
3708 std::thread::native_handle_type.
3711 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
3712 (_Variant_storage<true, Types...>::_M_reset()))
3713 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
3714 (__get_storage): Likewise.
3715 (variant): Add noexcept to friend declarations for __get and
3719 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
3720 Use _Require for constraints.
3721 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
3723 (__uniq_ptr_hash): New base class with conditionally-disabled call
3725 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
3726 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
3727 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
3729 * include/bits/shared_ptr.h: Improve docs.
3730 * include/bits/shared_ptr_base.h: Likewise.
3731 * include/bits/stl_uninitialized.h: Likewise.
3732 * include/bits/unique_ptr.h: Likewise.
3733 * libsupc++/new: Likewise.
3735 2019-05-09 François Dumont <fdumont@gcc.gnu.org>
3737 * include/bits/stl_deque.h
3738 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3740 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3742 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3744 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3746 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3748 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
3750 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
3752 (_Deque_iterator<>::operator-(difference_type)): Likewise.
3754 2019-05-08 François Dumont <fdumont@gcc.gnu.org>
3757 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
3758 (test01): Reserve for number of insertions to avoid rehash during test.
3759 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3761 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
3766 2019-05-08 Jonathan Wakely <jwakely@redhat.com>
3768 * include/experimental/bits/fs_path.h: Improve docs.
3769 * include/experimental/bits/net.h: Fix wrong header name in comment.
3770 Do not document implementation details.
3771 * include/experimental/netfwd: Fix doxygen grouping.
3773 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3775 * include/bits/stl_pair.h: Improve docs.
3776 * include/std/tuple: Likewise.
3778 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
3780 * include/std/chrono: Improve docs.
3781 * include/std/ratio: Do not document implementation details.
3782 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
3784 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
3787 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
3788 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
3789 (__duration_common_type): New helper.
3790 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
3791 __duration_common_type.
3792 (__timepoint_common_type_wrapper): Replace with ...
3793 (__timepoint_common_type): New helper.
3794 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
3795 Use __time_point_common_type.
3796 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
3797 (__common_type_impl): If either argument is transformed by decay,
3798 use the common_type of the decayed types.
3799 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
3800 decayed, use __do_common_type_impl to get the common_type.
3801 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
3802 (__do_member_type_wrapper, __member_type_wrapper)
3803 (__expanded_common_type_wrapper): Remove.
3804 (__common_type_pack, __common_type_fold): New helpers.
3805 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
3806 __member_type_wrapper and __expanded_common_type_wrapper.
3807 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
3808 Test zero-length template argument list.
3809 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
3810 Test single argument cases and argument types that should decay.
3811 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
3812 Adjust expected error.
3813 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
3815 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
3816 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
3817 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
3819 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
3821 2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
3823 Make allocator propagation more consistent for
3824 operator+(basic_string) (P1165R1)
3825 * include/bits/basic_string.h
3826 (operator+(basic_string&&, basic_string&&): Changed resulting
3827 allocator to always be the one from the first parameter.
3828 * include/bits/basic_string.tcc
3829 (operator+(const _CharT*, const basic_string&)): Changed
3830 resulting allocator to be SOCCC on the second parameter's allocator.
3831 (operator+(_CharT, const basic_string&)): Likewise.
3832 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
3834 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
3837 2019-05-07 Jonathan Wakely <jwakely@redhat.com>
3839 * include/bits/regex.h: Improve docs.
3840 * include/bits/regex.tcc: Do not document implementation details.
3842 * testsuite/19_diagnostics/error_code/hash.cc: New test.
3844 2019-05-06 François Dumont <fdumont@gcc.gnu.org>
3846 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
3847 Add type printer for container types in std::__debug namespace.
3848 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
3849 (gdb-tests): Use distinct parameters for the type of test and use of
3851 (gdb-test): Check for regex test even if 'whatis' test.
3852 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
3854 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3855 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
3856 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
3857 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
3858 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3859 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
3860 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
3862 2019-05-04 Jonathan Wakely <jwakely@redhat.com>
3864 * include/std/system_error (error_category): Fix comment.
3867 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
3868 argument is an empty path.
3869 (absolute(const path&, error_code&)): Use invalid_argument as error
3870 code instead of no_such_file_or_directory.
3871 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
3872 of non-existent paths and empty paths with both overloads of absolute.
3874 * include/std/system_error (error_category, error_code)
3875 (error_condition): Improve docs.
3876 * libsupc++/exception: Add missing @addtogroup Doxygen command.
3877 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
3878 to class documentation. Suppress documentation for implementation
3880 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
3881 Suppress documentation for implementation details.
3883 * include/std/system_error (error_code): Remove friend declaration
3884 for hash<error_code>.
3885 (hash<error_code>::operator()): Use public member functions to access
3887 (hash<error_condition>::operator()): Use address of category, not
3888 its object representation.
3889 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
3890 Use public member functions to access value and category.
3891 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
3893 2019-05-04 François Dumont <fdumont@gcc.gnu.org>
3895 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
3896 * include/bits/hashtable_policy.h
3897 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
3898 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
3899 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
3900 smaller than input value rather than always greater. Preserve
3901 _M_next_resize if called with 0 input. Use __builtin_floorl.
3902 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
3903 elements + number of insertions is greater than _M_next_resize. Start
3904 with 11 buckets if not told otherwise. Use __builtin_floorl.
3905 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
3906 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
3907 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
3908 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
3909 told otherwise. Use __builtin_floorl.
3910 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
3911 to also validate _Power2_rehash_policy.
3912 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
3915 2019-05-03 Jonathan Wakely <jwakely@redhat.com>
3918 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
3922 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
3923 overflow warning with -Wpedantic -Wsystem-headers.
3925 2019-05-02 Jonathan Wakely <jwakely@redhat.com>
3928 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
3929 * include/bits/move.h (swap): Remove extra parentheses.
3931 * include/experimental/bits/lfts_config.h: Improve doc markup.
3932 * include/experimental/optional: Improve docs.
3933 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
3934 (__constexpr_addressof): Remove.
3935 (optional::operator->()): Use std::__addressof().
3936 * include/std/optional (optional::operator->()): Adjust whitespace.
3937 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
3938 that operator-> is still constexpr with overloaded operator&. Change
3939 to compile-only test.
3940 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
3943 * include/bits/shared_ptr.h: Improve docs.
3944 * include/bits/shared_ptr_atomic.h: Likewise.
3945 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
3947 * include/bits/basic_string.h: Fix iterator/index confusion in
3949 * include/bits/range_access.h: Fix Doxygen warnings.
3950 * include/bits/refwrap.h: Do not document implementation details.
3951 (ref, cref): Group docs with reference_wrapper.
3952 * include/std/fstream: Fix Doxygen markup.
3953 * libsupc++/initializer_list (begin, end): Group docs with
3956 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
3958 * include/bits/unique_lock.h: Fix/improve doxygen markup.
3959 * include/std/mutex: Likewise.
3960 * include/std/shared_mutex: Likewise.
3962 * include/bits/fs_dir.h: Fix/improve doxygen markup.
3963 * include/bits/fs_fwd.h: Likewise.
3964 * include/bits/fs_ops.h: Likewise.
3965 * include/bits/fs_path.h: Likewise.
3966 * include/std/filesystem: Likewise.
3968 * include/experimental/bits/net.h: Fix/improve doxygen markup.
3969 * include/experimental/buffer: Likewise.
3970 * include/experimental/executor: Likewise.
3971 * include/experimental/internet: Likewise.
3972 * include/experimental/io_context: Likewise.
3973 * include/experimental/net: Likewise.
3974 * include/experimental/netfwd: Likewise.
3975 * include/experimental/socket: Likewise.
3976 * include/experimental/timer: Likewise.
3978 * doc/doxygen/doxygroups.cc: Move description of experimental group
3980 * include/experimental/algorithm: Add to libfund-ts doc group.
3981 * include/experimental/any: Likewise. Do not document implementation
3983 * include/experimental/array: Add to libfund-ts doc group.
3984 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
3985 for Library Fundamentals.
3986 * include/experimental/chrono: Add to libfund-ts doc group.
3987 * include/experimental/deque: Likewise.
3988 * include/experimental/forward_list: Likewise.
3989 * include/experimental/functional: Likewise.
3990 * include/experimental/iterator: Likewise.
3991 * include/experimental/list: Likewise.
3992 * include/experimental/map: Likewise.
3993 * include/experimental/memory: Likewise.
3994 * include/experimental/memory_resource: Likewise. Improve docs.
3996 * include/experimental/numeric: Add to libfund-ts doc group.
3997 * include/experimental/optional: Likewise.
3998 * include/experimental/propagate_const: Likewise.
3999 * include/experimental/random: Likewise.
4000 * include/experimental/ratio: Likewise.
4001 * include/experimental/regex: Likewise.
4002 * include/experimental/set: Likewise.
4003 * include/experimental/source_location: Likewise.
4004 * include/experimental/string: Likewise.
4005 * include/experimental/string_view: Likewise.
4006 * include/experimental/system_error: Likewise.
4007 * include/experimental/tuple: Likewise.
4008 * include/experimental/type_traits: Likewise.
4009 * include/experimental/unordered_map: Likewise.
4010 * include/experimental/unordered_set: Likewise.
4011 * include/experimental/utility: Likewise.
4012 * include/experimental/vector: Likewise.
4013 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
4014 * testsuite/experimental/array/neg.cc: Adjust dg-error.
4015 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
4017 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
4018 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
4019 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
4020 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
4021 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
4023 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
4024 * include/experimental/bits/fs_fwd.h: Improve docs.
4025 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
4026 * include/experimental/bits/fs_path.h: Likewise.
4027 (path, filesystem_error, u8path): Improve docs.
4028 * include/experimental/filesystem: Link to docs for TS.
4030 * config/allocator/new_allocator_base.h (__allocator_base): Add
4031 workaround for Doxygen bug #6945.
4032 * include/std/memory: Improve docs. Define group for pointer safety.
4033 * include/std/scoped_allocator: Improve docs. Use "undocumented"
4034 conditional to suppress documentation for implementation details.
4036 * include/bits/specfun.h: Improve docs.
4037 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
4040 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
4041 (std::experimental): Add docs.
4042 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
4043 namespace to nothing when generating docs.
4044 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
4045 * include/std/chrono (std::chrono): Likewise.
4046 * include/std/functional (std::placeholders): Likewise.
4047 * include/std/thread (std::this_thread): Likewise.
4049 * include/parallel/settings.h: Fix Doxygen markup.
4051 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
4052 anything unless PB_DS_CLASS_C_DEC is defined.
4053 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
4054 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
4055 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
4056 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
4057 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
4058 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
4059 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
4061 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
4062 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
4063 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
4064 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
4065 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
4066 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
4067 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
4068 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
4069 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
4070 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
4071 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
4073 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
4074 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
4076 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
4079 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
4080 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
4081 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
4084 2019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4086 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
4087 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
4088 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
4089 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
4090 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
4091 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
4093 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
4094 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
4097 2019-05-01 Jonathan Wakely <jwakely@redhat.com>
4100 * include/std/complex (__complex_proj): Return parameter unchanged.
4101 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
4102 floating-point types to take std::complex arguments.
4103 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
4104 floating-point types.
4105 * testsuite/26_numerics/complex/proj.cc: New test.
4107 2019-04-30 Jakub Jelinek <jakub@redhat.com>
4109 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
4110 to _Lock_policyE[012].
4111 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
4113 2019-04-30 Jonathan Wakely <jwakely@redhat.com>
4115 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
4116 macros accidentally left in.
4117 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
4118 unnecessary -lstdc++fs option. Fix test for mingw.
4119 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
4122 2019-04-30 Jakub Jelinek <jakub@redhat.com>
4124 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
4126 2019-04-29 Jonathan Wakely <jwakely@redhat.com>
4128 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
4130 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
4131 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
4134 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
4136 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
4139 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
4140 class template and partial specialization.
4143 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
4145 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
4146 functions to convert a value to an integral type.
4147 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
4148 (fill_n): Convert _Size parameter to an integral type.
4149 * testsuite/25_algorithms/fill_n/87982.cc: New test.
4150 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
4151 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
4152 * testsuite/25_algorithms/generate_n/87982.cc: New test.
4153 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
4154 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
4156 2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
4158 Adding noexcept-specification on tuple constructors (LWG 2899)
4159 * libstdc++-v3/include/std/tuple:
4160 (tuple()): Add noexcept-specification.
4161 (tuple(const _Elements&...)): Likewise
4162 (tuple(_UElements&&...)): Likewise
4163 (tuple(const tuple<_UElements...>&)): Likewise
4164 (tuple(tuple<_UElements...>&&)): Likewise
4165 (tuple(const _T1&, const _T2&)): Likewise
4166 (tuple(_U1&&, _U2&&)): Likewise
4167 (tuple(const tuple<_U1, _U2>&): Likewise
4168 (tuple(tuple<_U1, _U2>&&): Likewise
4169 (tuple(const pair<_U1, _U2>&): Likewise
4170 (tuple(pair<_U1, _U2>&&): Likewise
4171 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
4173 2019-04-27 Marc Glisse <marc.glisse@inria.fr>
4176 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
4177 arguments with __restrict.
4179 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
4181 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
4183 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
4185 * include/experimental/bits/fs_path.h
4186 (path::_S_convert_loc<_InputIterator>): Create const std::string to
4187 avoid redundant call to _S_convert_loc with non-const pointers.
4189 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
4190 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
4191 * testsuite/21_strings/basic_string/hash/hash.cc
4192 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
4193 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
4194 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
4196 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
4197 wstring::_M_replace_dispatch with more specific patterns.
4198 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
4199 Create const std::string to avoid redundant call to _S_convert_loc
4200 with non-const pointers.
4201 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
4202 avoid unnecessary basic_string::assign instantiations.
4204 * include/std/memory (__uses_alloc_args): Add string-literal to
4205 static_assert, to match the one in __uses_alloc.
4206 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
4207 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
4208 for recursive uses-allocator construction of nested pairs.
4209 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
4212 2019-04-26 Jakub Jelinek <jakub@redhat.com>
4214 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
4215 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
4216 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
4217 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
4219 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
4220 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
4221 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
4222 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
4223 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
4224 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
4225 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
4227 2019-04-25 Jonathan Wakely <jwakely@redhat.com>
4230 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
4231 * include/std/scoped_allocator [__cplusplus > 201703L]
4232 (scoped_allocator_adaptor::construct): Define in terms of
4233 uses_allocator_construction_args, as per P0591R4.
4234 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
4235 * testsuite/util/testsuite_allocator.h: Remove name of unused
4238 2019-04-24 Jonathan Wakely <jwakely@redhat.com>
4240 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
4241 * doc/html/*: Regenerate.
4243 * include/bits/fs_path.h (operator<, operator<=, operator>)
4244 (operator>=, operator==, operator!=): Make hidden friends, as per
4246 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
4247 string type in test.
4248 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4250 * include/std/any (any::any(ValueType&&)): Use __and_v.
4251 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
4254 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
4256 * include/std/type_traits (__result_of_memfun): Use remove_reference
4257 instead of __remove_cvref_t and remove redundant is_same check.
4258 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
4260 * include/experimental/string_view (basic_string_view::pointer)
4261 (basic_string_view::reference): Fix to refer to non-const value_type.
4262 * include/bits/basic_string.h (basic_string): Use __sv_check and
4263 __sv_limit instead of basic_string_view::_M_check and
4264 basic_string_view::_M_limit.
4265 * include/std/string_view (__sv_check, __sv_limit): New
4266 helper functions to replace basic_string_view::_M_check and
4267 basic_string_view::_M_limit.
4268 (basic_string_view): Add static assertions to enforce ill-formed
4269 requirement for traits_type::char_type from P1148R0, and to enforce
4270 required properties of char-like types.
4271 (basic_string_view::pointer, basic_string_view::reference): Fix to
4272 refer to non-const value_type.
4273 (basic_string_view::operator[], basic_string_view::at)
4274 (basic_string_view::front, basic_string_view::back)
4275 (basic_string_view::data): Use const_reference and const_pointer
4276 typedefs for return types.
4277 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
4278 (hash<wstring_view>): Fix argument_type typedef.
4279 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
4280 char/1.cc: Fix expected return type of basic_string_view::data().
4281 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
4282 wchar_t/1.cc: Likewise.
4283 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
4284 char/1.cc: Likewise.
4285 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
4286 wchar_t/1.cc: Likewise.
4287 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
4289 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
4290 Check reference and pointer typedefs.
4291 * testsuite/experimental/string_view/requirements/typedefs.cc:
4293 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
4294 Fix expected return type of basic_string_view::data().
4295 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
4297 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
4299 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
4303 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
4304 Avoid a runtime check for types that can never be stored in std::any.
4305 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
4308 PR libstdc++/90220 (partial)
4309 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
4310 not attempt ill-formed static_cast to pointers to non-object types.
4311 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
4314 * testsuite/20_util/variant/run.cc: Catch exception by reference to
4315 prevent -Wcatch-value warning.
4317 * include/std/variant (__variant_construct): Use template parameter
4318 type instead of equivalent decltype-specifier.
4319 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
4320 Replace forward with move.
4321 (_Move_ctor_base<false, Types...>::_M_destructive_move)
4322 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
4323 (_Move_ctor_base<true, Types...>::_M_destructive_move)
4324 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
4325 index after construction succeeds.
4326 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
4327 if-constexpr checks that are always true. Use __remove_cvref_t instead
4328 of remove_reference so that is_nothrow_move_constructible check
4329 doesn't use a const rvalue parameter. In the potentially-throwing case
4330 construct a temporary and move assign it, as per LWG 2904.
4331 (_Move_assign_base<false, Types...>::operator=): Remove redundant
4332 if-constexpr checks that are always true. Use emplace as per LWG 2904.
4333 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
4334 construct a temporary and move assign from it, as per LWG 2904.
4335 * testsuite/20_util/variant/exception_safety.cc: Check that
4336 assignment operators have strong exception safety guarantee.
4338 2019-04-23 Thomas Rodgers <trodgers@redhat.com>
4340 Document PSTL linker flags
4342 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
4344 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
4346 * include/std/variant (__detail::__variant::_Traits): Make
4347 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
4348 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
4350 (__detail::__variant::_Copy_assign_alias): Only depend on
4351 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
4352 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
4353 move assignment operators.
4356 * include/std/variant (variant::__not_self): New helper for the
4357 is_same_v<remove_cvref_t<T>, variant>==false constraints.
4358 (variant::__to_type_impl): Remove.
4359 (variant::__to_type): Add default argument to check pack size, instead
4360 of using __to_type_impl.
4361 (variant::__accepted_type): Add default argument using __not_self.
4362 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
4363 for variant(T&&) constructor constraint.
4364 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
4365 Extract __accepted_type into a named template parameter for reuse in
4366 other constraints and in the exception specification.
4367 (variant::variant(in_place_type_t<T>, Args&&...))
4368 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
4369 (variant::variant(in_place_index_t<T>, Args&&...))
4370 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
4371 (variant::operator=T&&)): Remove redundant && from trait arguments.
4372 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
4373 isn't used for in_place_type or in_place_index arguments.
4375 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
4376 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
4377 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
4379 2019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4380 Bernd Edlinger <bernd.edlinger@hotmail.de>
4381 Jakub Jelinek <jakub@redhat.com>
4384 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
4385 general-regs-only target attribute for ARM.
4387 2019-04-23 Jonathan Wakely <jwakely@redhat.com>
4390 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
4391 specialization also depend on is_nothrow_move_constructible.
4392 * include/std/variant (__detail::__variant::__never_valueless()):
4393 Only true if the variant would have a move assignment operator.
4394 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
4395 Check __never_valueless<T...>().
4396 (variant::emplace): Only perform non-throwing move assignments
4397 for never-valueless alternatives if the variant has a move assignment
4399 * testsuite/20_util/variant/compile.cc: Check that never-valueless
4400 types can be emplaced into non-assignable variants.
4401 * testsuite/20_util/variant/run.cc: Check that never-valueless types
4402 don't get copied when emplaced into non-assignable variants.
4404 * include/std/variant (__detail::__variant::__ref_cast): Remove
4406 (__detail::__variant::_Uninitialized::_M_get)
4407 (__detail::__variant::__get)
4408 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
4410 2019-04-21 Iain Sandoe <iain@sandoe.co.uk>
4412 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
4414 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
4415 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
4416 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
4417 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
4419 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
4421 Delegate PSTL configuration to pstl/pstl_config.h
4423 * include/bits/c++config: Remove explicit PSTL configuration
4424 macros and use definitions from <pstl/pstl_config.h>.
4426 2019-04-20 Thomas Rodgers <trodgers@redhat.com>
4428 Cleanup algorithm implementations
4429 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
4431 (mismatch): Forward execution policy.
4432 (equal): Qualify call to std::equal().
4433 (partial_sort): Forward execution policy.
4434 (inplace_merge): Forward execution policy.
4436 2019-04-19 Thomas Rodgers <trodgers@redhat.com>
4438 Improve implementation of parallel equal()
4439 * include/pstl/algorithm_impl.h
4440 (__internal::__brick_equal): use "4 iterator" version of
4442 (__internal::__brick_equal): use simd for random access
4443 iterators on unsequenced execution policies.
4444 (__internal::__pattern_equal): add "4 iterator" version
4445 (__internal::__pattern_equal): dispatch to simd __brick_equal
4446 for vector-only execution policies.
4447 (__internal::__pattern_equal): dispatch to __parallel_or for
4448 parallel execution policies.
4449 * include/pstl/glue_algorithm_impl.h
4450 (std::equal): dispatch to "4 iterator" version of
4451 __internal::__pattern_equal().
4453 2019-04-17 Jonathan Wakely <jwakely@redhat.com>
4456 * include/bits/forward_list.h (operator==): Do not use operator!= to
4458 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
4459 earlier in the list, so that sort is stable.
4460 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
4461 * testsuite/23_containers/forward_list/comparable.cc: Test with
4462 types that meet the minimum EqualityComparable and LessThanComparable
4463 requirements. Remove irrelevant comment.
4465 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
4466 Do not depend on whether all alternative types are move constructible.
4467 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
4468 from the operand when deciding whether to perform the assignment.
4469 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
4470 with deleted move constructor and deleted move assignment operator.
4471 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
4472 behaviour of variants with DeletedMoves as an alternative.
4473 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
4474 (move_ctor, move_assign): Check that moving a variant with a
4475 DeletedMoves alternative falls back to copying instead of moving.
4477 * testsuite/20_util/variant/compile.cc: Remove empty string literals
4478 from static_assert declarations.
4480 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
4481 actually match its name.
4482 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
4483 (test_swap()): Fix result for MoveCtorOnly and check
4484 MoveCtorAndSwapOnly.
4486 * include/std/optional (optional::value_or(U&&) &&): Add missing
4487 constexpr specifier.
4488 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
4489 for disengaged optionals and rvalue optionals.
4490 * testsuite/20_util/optional/observers/4.cc: Likewise.
4492 2019-04-12 Thomas Rodgers <trodgers@redhat.com>
4494 * include/pstl/algorithm_impl.h: Uglify identfiers.
4495 * include/pstl/numeric_impl.h: Uglify identfiers.
4496 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
4498 2019-04-11 Thomas Rodgers <trodgers@redhat.com>
4500 * include/bits/c++config:
4501 Add definition for __PSTL_ASSERT.
4502 Add definition for __PSTL_ASSERT_MSG.
4503 * include/pstl/algorithm_impl.h: Replace use of assert().
4504 * include/pstl/numeric_impl.h: Replace use of assert().
4505 * include/pstl/parallel_backend_tbb.h:
4506 Replace use of assert().
4507 Replace use of __TBB_ASSERT().
4508 * include/pstl/parallel_backend_utils.h: Replace use of assert().
4510 2019-04-11 Jonathan Wakely <jwakely@redhat.com>
4513 * src/c++17/memory_resource.cc
4514 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
4515 needed to allow placing a _Chunk at the end of the buffer.
4516 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
4518 2019-04-10 Jonathan Wakely <jwakely@redhat.com>
4520 * doc/xml/faq.xml: Add information about emergency EH pool.
4521 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
4522 Move outdated information on mt_allocator to a separate section.
4523 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
4524 doesn't affect the default allocator.
4526 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
4530 * testsuite/20_util/variant/89851.cc: New test.
4532 2019-04-09 Jonathan Wakely <jwakely@redhat.com>
4534 * include/std/variant: Adjust whitespace. Add comments.
4535 (_Multi_array): Leave primary template undefined.
4536 (_Multi_array<_Tp>): Define partial specialization for base case of
4538 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
4539 which is always a reference.
4540 (__gen_vtable::_S_apply()): Remove function, inline body into
4541 default member initializer.
4542 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
4544 * include/std/variant (__variant_idx_cookie): Add member type.
4545 (__visitor_result_type): Remove.
4546 (__do_visit): Use invoke_result instead of __visitor_result_type.
4547 * testsuite/20_util/variant/visit.cc: New test.
4550 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
4552 * testsuite/20_util/variant/90008.cc: New test.
4554 2019-04-09 Thomas Rodgers <trodgers@redhat.com>
4556 * include/pstl/algorithm_impl.h: Add namespace qualification.
4557 * include/pstl/execution_defs.h: Add namespace qualification.
4558 * include/pstl/execution_impl.h: Add namespace qualification.
4559 * include/pstl/numeric_impl.h: Add namespace qualification.
4560 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
4561 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
4562 * include/pstl/parallel_backend_utils.h: Include <cassert>.
4564 2019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
4566 Fix visit<R> for variant.
4567 * include/std/variant (__do_visit): Add a template parameter
4568 for enforcing same return types for visit.
4569 (__gen_vtable_impl): Likewise.
4570 (_S_apply_single_alt): Adjust.
4571 (__visit_invoke_impl): New. Handle casting to void.
4572 (__do_visit_invoke): New. Enforces same return types.
4573 (__do_visit_invoke_r): New. Converts return types.
4574 (__visit_invoke): Adjust.
4575 (__gen_vtable): Add a template parameter for enforcing
4576 same return types for visit.
4577 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
4578 different return types.
4579 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
4580 visitors with different return types don't accidentally
4581 compile with regular visitation.
4583 2019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
4585 * testsuite/27_io/filesystem/iterators/caching.cc: Add
4586 dg-require-filesystem-ts.
4588 2019-04-05 Jonathan Wakely <jwakely@redhat.com>
4590 * doc/xml/manual/status_cxx2020.xml: Update status.
4591 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
4592 * testsuite/20_util/variant/visit_r.cc: New test.
4594 * include/bits/fs_dir.h (directory_iterator::operator*)
4595 (directory_iterator::operator->): Add noexcept.
4596 (operator==, operator!=): Replace namespace-scope equality operators
4597 for directory iterators with hidden friends.
4600 * config/abi/pre/gnu.ver: Add missing exports.
4601 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
4604 * config/abi/pre/gnu.ver: Export new symbols.
4605 * include/bits/fs_dir.h (recursive_directory_iterator::options())
4606 (recursive_directory_iterator::recursion_pending())
4607 (recursive_directory_iterator::disable_recursion_pending()): Remove
4608 inline definitions. Make noexcept.
4609 (recursive_directory_iterator::depth())
4610 (recursive_directory_iterator::operator*())
4611 (recursive_directory_iterator::operator->()): Make noexcept.
4612 (recursive_directory_iterator::_M_options)
4613 (recursive_directory_iterator::_M_pending): Remove data members.
4614 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
4615 (recursive_directory_iterator::recursive_directory_iterator): Remove
4616 ctor-initializer. Use new constructor for _Dir_stack.
4617 (recursive_directory_iterator::options())
4618 (recursive_directory_iterator::recursion_pending())
4619 (recursive_directory_iterator::disable_recursion_pending()): Add
4620 non-inline definitions.
4621 (recursive_directory_iterator::depth()): Make noexcept.
4622 (recursive_directory_iterator::increment(error_code&))
4623 (recursive_directory_iterator::pop(error_code&)): Adjust to new
4624 location of options and recursion_pending members.
4625 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
4626 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
4627 user-declared move constructor and assignment operator, to make the
4630 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
4631 d_type == DT_UNKNOWN immediately.
4632 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
4634 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
4636 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
4638 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
4639 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
4642 PR libstdc++/87431 (again)
4643 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
4644 Define partial specialization for basic_string.
4645 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
4646 shared_ptr and weak_ptr.
4647 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
4649 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
4651 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
4653 * include/debug/vector (_Never_valueless_alt): Likewise for debug
4655 * include/std/any (_Never_valueless_alt): Define explicit
4656 specialization for any.
4657 * include/std/variant (_Never_valueless_alt): Define primary template.
4658 (__never_valueless): Use _Never_valueless_alt instead of
4659 is_trivially_copyable.
4660 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
4661 initializations to avoid try-catch overhead. Add special case for
4662 scalars produced by potentially-throwing conversions. Use
4663 _Never_valueless_alt instead of is_trivially_copyable for the
4664 remaining strong exception-safety cases.
4665 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
4666 * testsuite/20_util/variant/87431.cc: Run both test functions.
4667 * testsuite/20_util/variant/exception_safety.cc: New test.
4668 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
4669 so the variant becomes valueless.
4671 2019-04-03 Jonathan Wakely <jwakely@redhat.com>
4674 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
4676 (variant::emplace<_Tp>): Return result of emplace<N> directly.
4678 * include/std/string (__hash_string_base): New class template defining
4679 operator() for hashing strings.
4680 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
4681 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
4682 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
4683 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
4685 2019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
4687 Use single-visitation in variant assignment and swap and relops.
4688 Also use indices instead of types when checking whether
4689 variants hold the same thing.
4690 * include/std/variant (__do_visit): Add a template parameter
4691 for index visitation, invoke with indices if index visitation
4693 (__variant_idx_cookie): New.
4694 (__visit_with_index): Likewise.
4695 (_Copy_assign_base::operator=): Do single-visitation with
4697 (_Move_assign_base::operator=): Likewise.
4698 (_Extra_visit_slot_needed): Adjust.
4699 (__visit_invoke): Call with indices if it's an index visitor.
4700 (relops): Do single-visitation with an index visitor.
4702 (__visitor_result_type): New.
4704 2019-03-30 Eric Botcazou <ebotcazou@adacore.com>
4706 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
4708 2019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4710 Don't revisit a variant we are already visiting.
4711 * include/std/variant (__variant_construct_single): New.
4712 (__variant_construct): Use it.
4713 (_M_destructive_move): Likewise.
4714 (_M_destructive_copy): Likewise.
4715 (_Copy_assign_base::operator=): Adjust.
4716 (_Move_assign_base::operator=): Likewise.
4719 2019-03-26 Jonathan Wakely <jwakely@redhat.com>
4722 * include/bits/hashtable.h (_Hashtable): Move static assertions to
4723 destructor so they are not evaluated until the _Key type is complete.
4724 * include/bits/stl_tree.h (_Rb_tree): Likewise.
4725 * testsuite/23_containers/set/85965.cc: New test.
4726 * testsuite/23_containers/unordered_set/85965.cc: New test.
4727 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
4728 with regexp matching the corresponding _Rb_tree specialization.
4729 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
4730 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
4731 * testsuite/23_containers/set/48101_neg.cc: Likewise.
4732 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
4733 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
4734 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
4735 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
4737 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4740 Fix based on a suggestion by Antony Polukhin.
4741 * include/std/variant (__never_valueless): New.
4743 (_Extra_visit_slot_needed): New.
4744 (_Multi_array): Use it.
4745 (_S_apply_all_alts): Likewise.
4747 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4750 Fix based on a suggestion by Antony Polukhin.
4751 * include/std/variant (__gen_vtable): Don't reserve an
4752 additional table slot, _Multi_array already does that.
4754 2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
4757 Fix based on a suggestion by Antony Polukhin.
4758 * include/std/variant (__variant_construct): Capture a pointer
4759 to the storage and visit just one variant.
4761 2019-03-22 Jonathan Wakely <jwakely@redhat.com>
4763 * doc/xml/manual/backwards_compatibility.xml: Remove link to
4764 Doxygen-generated pages with unstable URL.
4765 * doc/xml/manual/concurrency_extensions.xml: Likewise.
4766 * doc/xml/manual/extensions.xml: Likewise.
4767 * doc/xml/manual/parallel_mode.xml: Likewise.
4768 * doc/xml/manual/support.xml: Likewise.
4770 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
4771 avoid -Wconversion warnings.
4773 2019-03-21 Thomas Rodgers <trodgers@redhat.com>
4775 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
4776 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
4777 (allstamped): Add stamp-pstl.
4778 (install-headers): Add ptsl_builddir.
4779 * include/Makefile.in: Regenerate.
4780 * include/bits/c++config: Add pstl configuration.
4781 * include/pstl/LICENSE.txt: New file.
4782 * include/pstl/algorithm_fwd.h: New file.
4783 * include/pstl/algorithm_impl.h: New file.
4784 * include/pstl/execution_defs.h: New file.
4785 * include/pstl/execution_impl.h: New file.
4786 * include/pstl/glue_algorithm_defs.h: New file.
4787 * include/pstl/glue_algorithm_impl.h: New file.
4788 * include/pstl/glue_execution_defs.h: New file.
4789 * include/pstl/glue_memory_defs.h: New file.
4790 * include/pstl/glue_memory_impl.h: New file.
4791 * include/pstl/glue_numeric_defs.h: New file.
4792 * include/pstl/glue_numeric_impl.h: New file.
4793 * include/pstl/memory_impl.h: New file.
4794 * include/pstl/numeric_fwd.h: New file.
4795 * include/pstl/numeric_impl.h: New file.
4796 * include/pstl/parallel_backend.h: New file.
4797 * include/pstl/parallel_backend_tbb.h: New file.
4798 * include/pstl/parallel_backend_utils.h: New file.
4799 * include/pstl/parallel_impl.h: New file.
4800 * include/pstl/pstl_config.h: New file.
4801 * include/pstl/unseq_backend_simd.h: New file.
4802 * include/pstl/utils.h: New file.
4803 * include/std/algorithm: Include parallel algorithm implementations.
4804 * include/std/execution: New file.
4805 * include/std/memory: Include parallel algorithm implementations.
4806 * include/std/numeric: Include parallel algorithm implementations.
4807 * include/std/version: Add parallel algorithms feature test macro.
4808 * testsuite/util/pstl/pstl_test_config.h: New file.
4809 * testsuite/util/pstl/test_utils.h: New file.
4810 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4811 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4812 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4813 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4814 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4815 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4816 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4817 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4818 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4819 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4820 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4821 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4822 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4823 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4824 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4825 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4826 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4827 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4828 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4829 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4830 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4831 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4832 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4833 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4834 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4835 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4836 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4837 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4838 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4839 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4840 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4841 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4842 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4843 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4844 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4845 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4846 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4847 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4848 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4849 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4850 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4851 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4852 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4853 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4854 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4855 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4856 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4857 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4858 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4859 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4860 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4861 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4862 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4863 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
4864 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
4865 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
4866 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
4867 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
4868 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
4869 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
4870 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
4871 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
4872 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
4873 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
4874 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
4875 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
4876 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
4877 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
4878 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
4879 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
4880 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
4881 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
4882 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
4883 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
4884 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
4885 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
4886 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
4887 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
4888 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
4889 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
4890 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
4891 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
4892 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
4893 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
4894 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
4895 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
4896 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
4897 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
4898 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
4899 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
4900 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
4901 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
4902 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
4903 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
4904 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
4905 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
4906 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
4907 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
4908 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
4909 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
4910 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
4911 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
4912 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
4913 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
4914 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
4915 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
4917 2019-03-21 Jonathan Wakely <jwakely@redhat.com>
4919 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
4920 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
4921 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
4922 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
4923 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
4924 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
4925 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
4926 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
4927 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
4928 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
4929 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
4930 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
4931 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
4932 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
4933 when the special functions IS is enabled, not for C++17.
4934 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
4936 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
4937 without checks for special functions in C++17.
4938 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4942 * include/backward/hash_map: Use <> for includes not "".
4943 * include/backward/hash_set: Likewise.
4944 * include/backward/strstream: Likewise.
4945 * include/tr1/bessel_function.tcc: Likewise.
4946 * include/tr1/exp_integral.tcc: Likewise.
4947 * include/tr1/legendre_function.tcc: Likewise.
4948 * include/tr1/modified_bessel_func.tcc: Likewise.
4949 * include/tr1/riemann_zeta.tcc: Likewise.
4951 2019-03-19 Jonathan Wakely <jwakely@redhat.com>
4953 * doc/xml/manual/allocator.xml: Link to table documenting evolution
4954 of extension allocators.
4955 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
4956 Document new headers in 7.2, 8.1 and 9.1 releases.
4957 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
4958 * doc/html/*: Regenerate.
4960 2019-03-12 John David Anglin <dave.anglin@bell.net>
4963 * testsuite/lib/libstdc++.exp: Locate libatomic.
4964 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
4965 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
4967 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
4968 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
4969 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
4970 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
4972 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
4975 * configure.ac: Check for sockatmark.
4976 * crossconfig.m4: Check for sockatmark.
4977 * config.h.in: Regenerate.
4978 * configure: Regenerate.
4979 * include/experimental/internet (address_v4::_S_hton): Rename
4980 overloaded functions to _S_hton_16 and _S_ntoh_16.
4981 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
4982 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
4983 * include/experimental/socket (basic_socket::at_mark): Check
4984 _GLIBCXX_HAVE_SOCKATMARK.
4986 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
4987 const variables instead of macros.
4990 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
4991 Use correct type for len_aligned.
4992 * testsuite/20_util/hash/89629.cc: New test.
4994 2019-03-11 Jakub Jelinek <jakub@redhat.com>
4997 * include/std/atomic (atomic<T>::store, atomic<T>::load,
4998 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
4999 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
5000 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
5001 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
5002 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
5003 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
5004 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
5005 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
5006 memory_order_seq_cst to int.
5008 2019-03-08 Jonathan Wakely <jwakely@redhat.com>
5010 * doc/xml/manual/using.xml: Use link element instead of xref.
5011 * doc/html/*: Regenerate.
5013 * include/bits/fs_path.h (path::format): Add fixed underlying type.
5015 2019-03-08 François Dumont <fdumont@gcc.gnu.org>
5018 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
5019 parameters in deduction guides.
5020 * include/debug/multimap.h (multimap): Likewise.
5021 * include/debug/set.h (multimap): Likewise.
5022 * include/debug/multiset.h (multimap): Likewise.
5023 * include/debug/unordered_map (unordered_map): Likewise.
5024 (unordered_multimap): Likewise.
5025 * include/debug/unordered_set (unordered_set): Likewise.
5026 (unordered_multiset): Likewise.
5029 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
5030 Invalidate all iterators in case of rehash.
5031 (unordered_multimap<>::_M_check_rehashed): Likewise.
5032 * include/debug/unordered_set
5033 (unordered_set<>::_M_check_rehashed): Likewise.
5034 (unordered_multiset<>::_M_check_rehashed): Likewise.
5035 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
5037 2019-03-07 Andreas Schwab <schwab@suse.de>
5039 * config/abi/post/riscv64-linux-gnu: New directory.
5040 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
5042 2019-03-07 Jonathan Wakely <jwakely@redhat.com>
5044 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
5045 compile test to run. Fix typo.
5047 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
5048 * doc/html/*: Regenerate.
5050 P0356R5 Simplified partial function application
5051 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
5052 helpers for bind_front.
5053 (bind_front, __cpp_lib_bind_front): Define.
5054 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
5056 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
5058 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
5059 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
5060 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
5061 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
5063 2019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5065 PR libstdc++/86655 - std::assoc_legendre should not constrain
5066 the value of m (or x).
5067 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
5068 __sph_legendre): If degree > order Don't throw, return 0.
5069 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
5070 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
5071 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
5072 * testsuite/tr1/5_numerical_facilities/special_functions/
5073 02_assoc_legendre/pr86655.cc: New test.
5074 * testsuite/tr1/5_numerical_facilities/special_functions/
5075 22_sph_legendre/pr86655.cc: New test.
5077 2019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
5080 Also PR libstdc++/85517
5081 * include/std/variant (__do_visit): New.
5082 (__variant_cast): Likewise.
5083 (__variant_cookie): Likewise.
5084 (__erased_*): Remove.
5085 (_Variant_storage::_S_vtable): Likewise.
5086 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
5087 (_Variant_storage::__M_reset): Adjust.
5088 (__variant_construct): New.
5089 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
5090 __variant_construct.
5091 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
5092 (_Move_ctor_base::__M_destructive_copy): New.
5093 (_Move_ctor_base::__M_destructive_move): Adjust to use
5094 __variant_construct.
5095 (_Copy_assign_base::operator=): Adjust to use __do_visit.
5096 (_Copy_assign_alias): Adjust to check both copy assignment
5097 and copy construction for triviality.
5098 (_Move_assign_base::operator=): Adjust to use __do_visit.
5099 (_Multi_array): Add support for visitors that accept and return
5101 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
5102 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
5103 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
5104 a __variant_cookie temporary for a variant that is valueless and..
5105 (__gen_vtable_impl::__visit_invoke): ..adjust here.
5106 (__gen_vtable::_Array_type): Conditionally make space for
5107 the __variant_cookie visitor case.
5108 (__variant_construct_by_index): New.
5109 (get_if): Adjust to use std::addressof.
5110 (relops): Adjust to use __do_visit.
5111 (variant): Add __variant_cast and __variant_construct_by_index
5113 (variant::emplace): Use _M_reset() and __variant_construct_by_index
5114 instead of self-destruction.
5115 (variant::swap): Adjust to use __do_visit.
5116 (visit): Reimplement in terms of __do_visit.
5117 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
5118 * testsuite/20_util/variant/compile.cc: Adjust.
5119 * testsuite/20_util/variant/run.cc: Likewise.
5121 2019-03-06 Jonathan Wakely <jwakely@redhat.com>
5123 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
5125 * testsuite/experimental/feat-char8_t.cc: Likewise.
5127 * include/std/type_traits [C++20] (is_bounded_array)
5128 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
5130 * testsuite/20_util/is_bounded_array/requirements/
5131 explicit_instantiation.cc: New test.
5132 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
5134 * testsuite/20_util/is_bounded_array/value.cc: New test.
5135 * testsuite/20_util/is_unbounded_array/requirements/
5136 explicit_instantiation.cc: New test.
5137 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
5139 * testsuite/20_util/is_unbounded_array/value.cc: New test.
5141 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
5143 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
5145 2019-03-05 Jonathan Wakely <jwakely@redhat.com>
5147 * include/c_compatibility/math.h [C++20] (lerp): Add using
5149 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
5150 (__lerp): Define function template to implement lerp.
5151 (lerp(float, float, float), lerp(double, double, double))
5152 (lerp(long double, long double, long double)): Define for C++20.
5153 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
5154 (midpoint(T, T), midpoint(T*, T*)): Define.
5155 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
5156 * testsuite/26_numerics/lerp.cc: New test.
5157 * testsuite/26_numerics/midpoint/floating.cc: New test.
5158 * testsuite/26_numerics/midpoint/integral.cc: New test.
5159 * testsuite/26_numerics/midpoint/pointer.cc: New test.
5161 2019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
5163 PR libstdc++/88996 Implement P0439R0
5164 Make std::memory_order a scoped enumeration.
5165 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
5166 add variables for the old enumerators. Adjust calls.
5167 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
5168 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
5170 2019-03-04 Jonathan Wakely <jwakely@redhat.com>
5172 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
5175 * include/std/memory_resource (polymorphic_allocator): Add default
5176 template argument for C++20.
5177 (polymorphic_allocator::allocate_bytes)
5178 (polymorphic_allocator::deallocate_bytes)
5179 (polymorphic_allocator::allocate_object)
5180 (polymorphic_allocator::deallocate_object)
5181 (polymorphic_allocator::new_object)
5182 (polymorphic_allocator::delete_object): New member functions for
5184 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
5187 2019-03-03 Jonathan Wakely <jwakely@redhat.com>
5190 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
5193 2019-03-01 Jonathan Wakely <jwakely@redhat.com>
5195 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
5196 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
5198 * include/std/memory (uses_allocator_construction_args): New set of
5199 overloaded functions.
5200 (make_obj_using_allocator, uninitialized_construct_using_allocator):
5202 * include/std/memory_resource (polymorphic_allocator::construct)
5203 [__cplusplus > 201703l]: Replace all overloads with a single function
5204 using uses_allocator_construction_args.
5205 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
5207 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
5209 2019-02-27 Jonathan Wakely <jwakely@redhat.com>
5212 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
5213 stylesheet directories before check for xsltproc. Try to use
5214 xmlcatalog to find local stylesheet directory before trying hardcoded
5215 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
5216 check to look for the same stylesheet as doc/Makefile.am uses. Don't
5217 use xsltproc if xmlcatalog fails to find a local stylesheet.
5218 * configure.ac: Check for xmlcatalog.
5219 * Makefile.in: Regenerate.
5220 * configure: Likewise.
5221 * doc/Makefile.in: Likewise.
5222 * include/Makefile.in: Likewise.
5223 * libsupc++/Makefile.in: Likewise.
5224 * po/Makefile.in: Likewise.
5225 * python/Makefile.in: Likewise.
5226 * src/Makefile.in: Likewise.
5227 * src/c++11/Makefile.in: Likewise.
5228 * src/c++17/Makefile.in: Likewise.
5229 * src/c++98/Makefile.in: Likewise.
5230 * src/filesystem/Makefile.in: Likewise.
5231 * testsuite/Makefile.in: Likewise.
5233 2019-02-26 Jonathan Wakely <jwakely@redhat.com>
5236 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
5237 container deduction guides.
5238 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
5239 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
5240 parameters in deduction guides.
5241 * include/bits/stl_multimap.h (multimap): Likewise.
5242 * include/bits/stl_multiset.h (multiset): Likewise.
5243 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
5244 * include/bits/stl_set.h (set): Likewise.
5245 * include/bits/stl_stack.h (stack): Likewise.
5246 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
5247 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
5248 constrain parameters in deduction guides.
5249 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
5251 * testsuite/23_containers/map/cons/deduction.cc: Test additional
5253 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
5254 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
5255 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
5256 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
5258 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
5260 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
5263 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
5264 to class template and partial specialization using void_t.
5265 (__is_copy_insertable, __is_move_insertable): Adjust base class.
5267 2019-02-24 Jonathan Wakely <jwakely@redhat.com>
5270 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
5271 copy and move members public.
5273 2019-02-23 Jonathan Wakely <jwakely@redhat.com>
5275 * include/std/type_traits (__underlying_type_impl): New helper to
5276 make underlying_type SFINAE-friendly.
5277 (underlying_type): Derive from __underlying_type_impl.
5278 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
5282 * include/bits/char_traits.h (__constant_char_array): Check index is
5283 in range before dereferencing.
5284 (char_traits<char>::compare, char_traits<char>::find)
5285 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
5286 immediately if n is zero.
5287 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
5288 Remove workarounds for PR 67026.
5289 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
5291 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
5294 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
5296 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
5297 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
5299 2019-02-22 Jakub Jelinek <jakub@redhat.com>
5302 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
5303 type to std::size_t and argument to type to long double.
5305 2019-02-22 Eric Botcazou <ebotcazou@adacore.com>
5307 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
5308 * config/abi/post/sparc64-linux-gnu: New directory.
5309 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
5310 * config/abi/post/sparc64-linux-gnu/32: New directory.
5311 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
5313 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
5315 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
5316 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
5319 2019-02-22 Tom Honermann <tom@honermann.net>
5321 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
5322 printers for u8string and u8string_view.
5324 2019-02-22 Tom Honermann <tom@honermann.net>
5326 * testsuite/18_support/byte/ops.cc: Validate
5327 std::to_integer<char8_t>, std::to_integer<char16_t>, and
5328 std::to_integer<char32_t>.
5329 * testsuite/18_support/numeric_limits/dr559.cc: Validate
5330 std::numeric_limits<char8_t>.
5331 * testsuite/18_support/numeric_limits/lowest.cc: Validate
5332 std::numeric_limits<char8_t>::lowest().
5333 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
5334 std::numeric_limits<char8_t>::max_digits10.
5335 * testsuite/18_support/type_info/fundamental.cc: Validate
5336 typeinfo for char8_t.
5337 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
5338 std::from_chars with char8_t.
5339 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
5340 Validate explicit instantiation of std::hash<char8_t>.
5341 * testsuite/20_util/is_integral/value.cc: Validate
5342 std::is_integral<char8_t>.
5343 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
5344 Validate std::make_signed<char8_t>.
5345 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
5346 Validate u8string construction from char8_t sources.
5347 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
5349 * testsuite/21_strings/basic_string_view/operations/compare/
5350 char/70483.cc: Validate substr operations on u8string_view.
5351 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
5352 the u8string_view typedef is defined.
5353 * testsuite/21_strings/char_traits/requirements/
5354 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
5356 * testsuite/21_strings/char_traits/requirements/
5357 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
5358 constexpr member functions.
5359 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
5360 that the u8string typedef is defined.
5361 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
5362 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
5363 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
5364 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
5366 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
5367 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
5369 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
5370 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
5371 Validate std::atomic<char8_t>::is_always_lock_free
5372 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
5373 Update line numbers.
5374 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
5376 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
5378 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
5379 Validate std::experimental::pmr::u8string.
5380 * testsuite/experimental/string_view/typedefs.cc: Validate that the
5381 u8string_view typedef is defined.
5382 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
5383 char32_t to the typelists.
5385 2019-02-22 Tom Honermann <tom@honermann.net>
5387 * include/ext/typelist.h: Constrain a partial specialization of
5388 typelist::detail::append_ to only match chain<T1,T2>.
5390 2019-02-21 Jonathan Wakely <jwakely@redhat.com>
5393 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
5394 class template with class. Replace move and copy member types with
5395 member alias templates, so they are only instantiated when needed.
5396 (__is_copy_insertable, __is_move_insertable): Adjust base class.
5397 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
5398 test for C++11/14/17 as well.
5399 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
5402 2019-02-20 Jakub Jelinek <jakub@redhat.com>
5405 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
5406 _GLIBCXX_PURE to the alias declaration.
5408 2019-02-19 Jonathan Wakely <jwakely@redhat.com>
5410 * testsuite/21_strings/basic_string/literals/types.cc
5411 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
5412 * testsuite/21_strings/basic_string/literals/values.cc
5413 [_GLIBCXX_USE_CHAR8_T]: Likewise.
5414 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
5415 potentially having different type.
5416 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
5417 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
5419 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
5420 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
5421 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
5422 string literals only using basic character set.
5423 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
5424 u8 literals to char.
5425 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
5426 Test ATOMIC_CHAR8_T_LOCK_FREE.
5427 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
5428 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
5429 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
5430 * testsuite/experimental/string_view/literals/types.cc
5431 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
5433 * testsuite/experimental/string_view/literals/values.cc
5434 [_GLIBCXX_USE_CHAR8_T]: Likewise.
5436 2019-02-19 Tom Honermann <tom@honermann.net>
5438 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
5439 from char16_32_t.cc; validates numeric_limits<char8_t>.
5440 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
5441 test cloned from types.cc; validates operator""s for char8_t
5443 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
5444 test cloned from values.cc; validates construction and comparison
5446 * testsuite/21_strings/basic_string/requirements/
5447 /explicit_instantiation/char8_t/1.cc: New test cloned from
5448 char16_t/1.cc; validates explicit instantiation of
5449 basic_string<char8_t>.
5450 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
5451 New test cloned from types.cc; validates operator""sv for char8_t
5452 returns u8string_view.
5453 * testsuite/21_strings/basic_string_view/literals/
5454 values-char8_t.cc: New test cloned from values.cc; validates
5455 construction and comparison of u8string_view values.
5456 * testsuite/21_strings/basic_string_view/requirements/
5457 explicit_instantiation/char8_t/1.cc: New test cloned from
5458 char16_t/1.cc; validates explicit instantiation of
5459 basic_string_view<char8_t>.
5460 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
5461 New test cloned from char16_t/65049.cc; validates that
5462 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
5463 * testsuite/21_strings/char_traits/requirements/char8_t/
5464 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
5465 that char_traits<char8_t> member typedefs are present and correct.
5466 * testsuite/21_strings/char_traits/requirements/
5467 explicit_instantiation/char8_t/1.cc: New test cloned from
5468 char16_t/1.cc; validates explicit instantiation of
5469 char_traits<char8_t>.
5470 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
5471 from char16_t.cc: validates
5472 codecvt<char16_t, char8_t, mbstate_t>.
5473 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
5474 from char32_t.cc: validates
5475 codecvt<char32_t, char8_t, mbstate_t>.
5476 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
5477 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
5478 codecvt<char32_t, char8_t, std::mbstate_t>.
5479 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
5480 test cloned from string.cc; validates filesystem::path construction
5482 * testsuite/experimental/feat-char8_t.cc: New test; validates that
5483 the __cpp_lib_char8_t feature test macro is defined with the
5485 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
5486 New test cloned from string.cc; validates filesystem::path
5487 construction from char8_t input.
5488 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
5489 test cloned from types.cc; validates operator""sv for char8_t
5490 returns u8string_view.
5491 * testsuite/experimental/string_view/literals/values-char8_t.cc:
5492 New test cloned from values.cc; validates construction and
5493 comparison of u8string_view values.
5494 * testsuite/experimental/string_view/requirements/
5495 explicit_instantiation/char8_t/1.cc: New test cloned from
5496 char16_t/1.cc; validates explicit instantiation of
5497 basic_string_view<char8_t>.
5498 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
5499 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
5502 2019-02-19 Tom Honermann <tom@honermann.net>
5504 P0482R5 char8_t: Standard library support
5505 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
5506 typeinfo symbols for char8_t.
5507 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
5508 (GLIBCXX_3.4.26): Add symbols for specializations of
5509 numeric_limits and codecvt that involve char8_t.
5510 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
5511 * include/bits/atomic_base.h: Add atomic_char8_t.
5512 * include/bits/basic_string.h: Add std::hash<u8string> and
5513 operator""s(const char8_t*, size_t).
5514 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
5516 * include/bits/char_traits.h: Add char_traits<char8_t>.
5517 * include/bits/codecvt.h: Add
5518 codecvt<char16_t, char8_t, mbstate_t>,
5519 codecvt<char32_t, char8_t, mbstate_t>,
5520 codecvt_byname<char16_t, char8_t, mbstate_t>, and
5521 codecvt_byname<char32_t, char8_t, mbstate_t>.
5522 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
5523 recognize char8_t as an integral type.
5524 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
5526 (path::u8string): Return std::u8string when char8_t support is
5528 (path::generic_u8string): Likewise.
5529 (path::_S_convert): Handle conversion from char8_t input.
5530 (path::_S_str_convert): Likewise.
5531 * include/bits/functional_hash.h: Add hash<char8_t>.
5532 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
5534 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
5535 for new char8_t specializations.
5536 * include/bits/localefwd.h: Add missing declarations of
5537 codecvt<char16_t, char, mbstate_t> and
5538 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
5539 codecvt<char16_t, char8_t, mbstate_t> and
5540 codecvt<char32_t, char8_t, mbstate_t>.
5541 * include/bits/postypes.h: Add u8streampos
5542 * include/bits/stringfwd.h: Add declarations of
5543 char_traits<char8_t> and u8string.
5544 * include/c_global/cstddef: Add __byte_operand<char8_t>.
5545 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
5547 (path::u8string): Return std::u8string when char8_t support is
5549 (path::generic_u8string): Likewise.
5550 (path::_S_convert): Handle conversion from char8_t input.
5551 (path::_S_str_convert): Likewise.
5552 * include/experimental/string: Add u8string.
5553 * include/experimental/string_view: Add u8string_view,
5554 hash<experimental::u8string_view>, and
5555 operator""sv(const char8_t*, size_t).
5556 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
5557 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
5558 as a character type.
5559 * include/std/limits: Add numeric_limits<char8_t>.
5560 * include/std/string_view: Add u8string_view,
5561 hash<experimental::u8string_view>, and
5562 operator""sv(const char8_t*, size_t).
5563 * include/std/type_traits: Add __is_integral_helper<char8_t>,
5564 __make_unsigned<char8_t>, and __make_signed<char8_t>.
5565 * libsupc++/atomic_lockfree_defines.h: Define
5566 ATOMIC_CHAR8_T_LOCK_FREE.
5567 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
5568 codecvt.cc and limits.cc so that char8_t specializations of
5569 numeric_limits and codecvt and emitted.
5570 * src/c++11/Makefile.in: Likewise.
5571 * src/c++11/codecvt.cc: Define members of
5572 codecvt<char16_t, char8_t, mbstate_t>,
5573 codecvt<char32_t, char8_t, mbstate_t>,
5574 codecvt_byname<char16_t, char8_t, mbstate_t>, and
5575 codecvt_byname<char32_t, char8_t, mbstate_t>.
5576 * src/c++11/limits.cc: Define members of
5577 numeric_limits<char8_t>.
5578 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
5579 locale_init.cc and localename.cc.
5580 * src/c++98/Makefile.in: Likewise.
5581 * src/c++98/locale_init.cc: Add initialization for the
5582 codecvt<char16_t, char8_t, mbstate_t> and
5583 codecvt<char32_t, char8_t, mbstate_t> facets.
5584 * src/c++98/localename.cc: Likewise.
5585 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
5587 2019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
5589 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
5590 * 27_io/filesystem/operations/resize_file.cc: Likewise.
5591 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
5593 2019-02-14 Jonathan Wakely <jwakely@redhat.com>
5595 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
5596 * doc/html/*: Regenerate.
5598 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
5599 * doc/html/*: Regenerate.
5601 * doc/xml/manual/intro.xml: Document LWG 2586 status.
5602 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
5603 allocator type in is_constructible checks.
5604 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
5605 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
5606 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
5607 problematic type from LWG 2586 discussion.
5608 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
5609 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
5611 * configure.ac: Check for C11 timespec_get function.
5612 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
5614 * config.h.in: Regenerate.
5615 * configure: Regenerate.
5616 * include/c_global/ctime (timespec, timespec_get): Add to namespace
5617 std for C++17 and up.
5619 * doc/xml/manual/intro.xml: Document LWG 2537 status.
5620 * include/bits/stl_queue.h
5621 (priority_queue(const Compare&, const Container&, const Alloc&))
5622 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
5624 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
5626 * doc/xml/manual/intro.xml: Document LWG 2566 status.
5627 * include/bits/stl_queue.h (queue, priority_queue): Add static
5628 assertions to enforce LWG 2566 requirement on value_type.
5629 * include/bits/stl_stack.h (stack): Likewise.
5632 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
5634 * doc/xml/manual/intro.xml: Document LWG 2735 status.
5635 * include/bits/std_abs.h: Add comment about LWG 2735.
5636 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
5638 2019-02-13 Jonathan Wakely <jwakely@redhat.com>
5641 * include/std/version [__cpp_impl_destroying_delete]
5642 (__cpp_lib_destroying_delete): Only define for C++2a and later.
5643 * libsupc++/new [__cpp_impl_destroying_delete]
5644 (__cpp_lib_destroying_delete): Likewise.
5645 (destroying_delete_t, destroying_delete): Likewise, but define even
5646 when __cpp_impl_destroying_delete is not defined.
5647 * testsuite/18_support/destroying_delete.cc: New test.
5649 2019-02-11 Jonathan Wakely <jwakely@redhat.com>
5652 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
5653 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
5654 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
5655 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
5657 2019-02-09 Jonathan Wakely <jwakely@redhat.com>
5660 * include/bits/fs_path.h (path::has_root_name)
5661 (path::has_root_directory, path::has_root_path)
5662 (path::has_relative_path, path::has_parent_path)
5663 (path::has_filename, path::has_stem, path::has_extension)
5664 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
5666 * src/c++17/fs_path.cc (path::has_root_name)
5667 (path::has_root_directory, path::has_root_path)
5668 (path::has_relative_path, path::has_parent_path)
5669 (path::has_filename, path::_M_find_extension): Add noexcept.
5671 2019-02-06 Jonathan Wakely <jwakely@redhat.com>
5673 PR libstdc++/89102 (partial)
5674 * include/std/type_traits (common_type<>): Define.
5675 (common_type<T>): Derive from common_type<T, T>.
5676 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
5677 Test zero-length template argument list.
5678 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
5679 Test additional single argument cases.
5680 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
5681 Adjust expected error.
5683 2019-02-05 Jonathan Wakely <jwakely@redhat.com>
5686 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
5688 * include/bits/stl_stack.h (stack): Likewise.
5689 * testsuite/23_containers/priority_queue/deduction.cc: New test.
5690 * testsuite/23_containers/queue/deduction.cc: New test.
5691 * testsuite/23_containers/stack/deduction.cc: New test.
5694 * include/std/type_traits (__is_convertible_helper)
5695 (__is_convertible_helper<_From, _To, false>): Revert changes to
5696 support is_nothrow_convertible.
5697 (__is_nt_convertible_helper): New helper.
5698 (is_nothrow_convertible): Use __is_nt_convertible_helper.
5700 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
5701 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
5704 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
5705 __is_alloc_insertable_impl. Replace single type member with two
5706 members, one for each of copy and move insertable.
5707 (__is_move_insertable): New trait for internal use.
5708 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
5709 (vector::_S_nothrow_relocate(true_type)): New functions to
5710 conditionally check if __relocate_a can throw.
5711 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
5712 on __is_move_insertable.
5713 (vector::_S_do_relocate): New overloaded functions to conditionally
5715 (vector::_S_relocate): New function that dispatches to _S_do_relocate
5716 based on _S_use_relocate.
5717 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5718 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
5719 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
5722 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
5723 parameter unnamed. Add message to static assertion.
5724 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5725 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
5728 2019-02-05 Marc Glisse <marc.glisse@inria.fr>
5731 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
5733 (__is_bitwise_relocatable): ... to this.
5734 (__relocate_a_1): Adapt.
5735 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
5736 (__is_bitwise_relocatable): ... to this.
5738 2019-01-30 Jonathan Wakely <jwakely@redhat.com>
5741 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
5742 final component as well as from _M_pathname. Append the dot using
5743 operator+= instead of only to _M_pathname.
5744 (path::_M_find_extension): Reformat slightly.
5745 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5746 Add more test cases.
5748 2019-01-30 Ulrich Drepper <drepper@redhat.com>
5750 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
5752 2019-01-29 Jonathan Wakely <jwakely@redhat.com>
5754 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
5755 constexpr specifiers from arg and proj.
5757 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
5758 __shared_ptr instantiations used by gcc4-compatible ABI.
5760 * include/experimental/forward_list (experimental::erase): Qualify
5762 * include/experimental/list (experimental::erase): Likewise.
5763 * include/std/forward_list (std::erase): Likewise.
5764 * include/std/list (std::erase): Likewise.
5766 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
5768 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
5769 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
5770 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
5771 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
5772 * testsuite/ext/array_allocator/26875.cc: Likewise.
5773 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
5774 * testsuite/util/replacement_memory_operators.h: Likewise.
5775 * testsuite/util/testsuite_allocator.h: Likewise.
5777 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
5778 normal mode vector, even for debug mode.
5779 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
5780 Define alias template for normal mode vector.
5782 2019-01-28 Jonathan Wakely <jwakely@redhat.com>
5785 * config/locale/generic/c_locale.h (__convert_from_v)
5786 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5787 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5788 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
5789 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
5791 2019-01-24 Jonathan Wakely <jwakely@redhat.com>
5794 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
5795 data member with static member function _S_use_relocate().
5796 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
5797 (vector::_M_default_append): Use _S_use_relocate() instead of
5800 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
5803 2019-01-22 Jonathan Wakely <jwakely@redhat.com>
5806 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
5807 write to stderr instead of using printf.
5809 2019-01-21 Jakub Jelinek <jakub@redhat.com>
5812 * include/bits/char_traits.h (__constant_string_p,
5813 __constant_char_array_p): Use __builtin_is_constant_evaluated if
5816 2019-01-20 Ulrich Drepper <drepper@redhat.com>
5818 Implement C++20 P0600r1.
5819 * include/backward/hash_map: Add nodiscard attribute to empty.
5820 * include/backward/hash_set: Likewise.
5821 * backward/hashtable.h: Likewise.
5822 * include/bits/basic_string.h: Likewise.
5823 * include/bits/forward_list.h: Likewise.
5824 * include/bits/hashtable.h: Likewise.
5825 * include/bits/regex.h: Likewise.
5826 * include/bits/stl_deque.h: Likewise.
5827 * include/bits/stl_list.h: Likewise.
5828 * include/bits/stl_map.h: Likewise.
5829 * include/bits/stl_multimap.h: Likewise.
5830 * include/bits/stl_multiset.h: Likewise.
5831 * include/bits/stl_queue.h: Likewise.
5832 * include/bits/stl_set.h: Likewise.
5833 * include/bits/stl_stack.h: Likewise.
5834 * include/bits/stl_tree.h: Likewise.
5835 * include/bits/stl_vector.h: Likewise.
5836 * include/bits/unordered_map.h: Likewise.
5837 * include/bits/unordered_set.h: Likewise.
5838 * include/debug/array: Likewise.
5839 * include/experimental/any: Likewise.
5840 * include/experimental/bits/fs_path.h: Likewise.
5841 * include/experimental/internet: Likewise.
5842 * include/experimental/string_view: Likewise.
5843 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
5845 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
5847 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
5849 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
5851 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
5853 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
5855 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
5857 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
5859 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5860 info_fn_imps.hpp: Likewise.
5861 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
5862 left_child_next_sibling_heap_.hpp: Likewise.
5863 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
5865 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
5867 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
5869 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
5871 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
5873 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
5875 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
5877 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
5878 * include/ext/pb_ds/trie_policy.hpp: Likewise.
5879 * include/ext/rope: Likewise.
5880 * include/ext/slist: Likewise.
5881 * include/ext/vstring.h: Likewise.
5882 * include/profile/array: Likewise.
5883 * include/std/array: Likewise.
5884 * include/tr1/array: Likewise.
5885 * include/tr1/hashtable.h: Likewise.
5886 * include/tr1/regex: Likewise.
5887 * include/tr2/dynamic_bitset: Likewise.
5888 * include/bits/alloc_traits.h: Add nodiscard attribute to
5890 * include/experimental/memory_resource: Likewise.
5891 * include/ext/alloc_traits.h: Likewise.
5892 * include/ext/array_allocator.h: Likewise.
5893 * include/ext/bitmap_allocator.h: Likewise.
5894 * include/ext/debug_allocator.h: Likewise.
5895 * include/ext/extptr_allocator.h: Likewise.
5896 * include/ext/mt_allocator.h: Likewise.
5897 * include/ext/new_allocator.h: Likewise.
5898 * include/ext/pool_allocator.h: Likewise.
5899 * include/ext/throw_allocator.h: Likewise.
5900 * include/std/scoped_allocator: Likewise.
5901 * libsupc++/eh_alloc.cc: Likewise.
5902 * include/std/future: Add nodiscard attribute to async.
5903 * libsupc++/new: Add nodiscard attribute to new.
5905 2019-01-18 Jonathan Wakely <jwakely@redhat.com>
5910 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
5911 * include/bits/shared_ptr.h
5912 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
5913 (allocate_shared): Change to use new tag type.
5914 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
5915 Declare new member function.
5916 (_Sp_alloc_shared_tag): Define new type.
5917 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
5918 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
5919 _Sp_make_shared_tag::_S_eq to check type_info.
5920 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
5921 Constrain to prevent being called with _Sp_alloc_shared_tag.
5922 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
5923 Replace constructor with ...
5924 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
5925 reference parameter so address of the new object can be returned to
5926 the caller. Obtain the allocator from the tag type.
5927 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
5928 constructor with ...
5929 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
5930 to the __shared_count constructor.
5931 (__allocate_shared): Change to use new tag type.
5932 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
5934 2019-01-17 Jonathan Wakely <jwakely@redhat.com>
5936 * src/c++17/fs_ops.cc
5937 (equivalent(const path&, const path&, error_code&))
5938 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
5939 compare files instead of relying on incomplete info returned by stat.
5942 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
5943 if the path is already absolute.
5944 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
5945 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
5948 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
5949 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
5950 of filesystem::exists.
5951 (create_directories(const path&, error_code&)): Add assertions.
5952 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
5953 Add workaround for bug in _wstat for paths with trailing slash.
5954 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
5955 for expected behaviour on mingw.
5956 * testsuite/experimental/filesystem/operations/create_directories.cc:
5958 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
5959 "TMP" instead of "TMPDIR" and clean environment before each test. Do
5960 not test permissions on mingw targets.
5962 2019-01-16 Jonathan Wakely <jwakely@redhat.com>
5964 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
5965 constructors and open members taking wide strings. Fix patterns for
5966 filesystem::path members to match wstring_view parameters. Add
5967 exports for shared_ptr members used by directory iterators.
5968 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
5969 error code parameter if the file doesn't exist.
5970 * src/filesystem/ops.cc (remove(const path&, error_code&)):
5972 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
5973 values for mingw targets, where "/" is not an absolute path. Do not
5974 test symlinks on mingw targets.
5975 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
5976 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
5978 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5979 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
5980 that each component of the path is created.
5981 * testsuite/experimental/filesystem/operations/create_directories.cc:
5983 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
5984 permissions on mingw targets.
5985 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
5986 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5987 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
5988 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
5990 * testsuite/experimental/filesystem/operations/permissions.cc:
5992 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
5993 symlinks or permissions on mingw targets.
5994 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
5995 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
5996 symlinks on mingw targets.
5997 * testsuite/experimental/filesystem/operations/remove_all.cc:
5999 * testsuite/27_io/filesystem/operations/status.cc: Do not test
6000 permissions on mingw targets.
6001 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
6002 test symlinks on mingw targets.
6003 * testsuite/experimental/filesystem/operations/space.cc: Fix test
6006 2019-02-14 Ulrich Drepper <drepper@redhat.com>
6009 Warn about unused comparisons of shared_ptr/unique_ptr
6010 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
6011 * include/bits/shared_ptr.h: Use it for operator ==, !=,
6012 <, <=, >, >= for shared_ptr.
6013 * include/bits/unique_ptr.h: Likewise for unique_ptr.
6015 2019-01-15 Jonathan Wakely <jwakely@redhat.com>
6017 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
6018 as 201611L, because P0497R0 changes are supported.
6019 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
6021 * include/bits/erase_if.h [__cplusplus > 201703L]
6022 (__cpp_lib_erase_if): Only define for C++2a.
6023 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
6024 (__cpp_lib_null_iterators): Define.
6025 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
6026 (__cpp_lib_null_iterators): Define.
6027 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
6029 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
6031 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
6033 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
6034 changes are supported.
6035 * include/std/optional (__cpp_lib_optional): Likewise.
6036 * include/std/variant (__cpp_lib_variant): Likewise.
6037 * include/std/version [!__STRICT_ANSI__]
6038 (__cpp_lib_uncaught_exceptions): Define as long integer.
6039 [__cplusplus >= 201703L] (__cpp_lib_any)
6040 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
6041 (__cpp_lib_variant): Define for C++17.
6042 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
6044 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
6047 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
6049 2019-01-12 Jonathan Wakely <jwakely@redhat.com>
6053 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
6055 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
6058 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
6060 * doc/xml/manual/intro.xml: Include new section.
6061 * doc/xml/manual/status_cxx2017.xml: Document more
6062 implementation-defined properties of the library.
6063 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
6064 * doc/html/*: Regenerate.
6066 * include/bits/refwrap.h [__cplusplus > 201703L]
6067 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
6068 (_Reference_wrapper_base_memfun): Do not define for C++2a.
6069 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
6071 (reference_wrapper::operator()): Add static assertion.
6072 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
6074 * include/std/chrono (duration_values::zero(), duration_values::min())
6075 (duration_values::max()): Add noexcept.
6076 (duration::zero(), duration::min(), duration::max()): Likewise.
6077 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
6078 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
6079 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
6081 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
6083 2019-01-11 Jakub Jelinek <jakub@redhat.com>
6085 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
6086 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
6088 2019-01-11 Jonathan Wakely <jwakely@redhat.com>
6091 * include/bits/functional_hash.h (hash<nullptr_t>): Define
6092 specialization for C++17 (P0513R0, LWG 2817).
6093 * testsuite/20_util/hash/nullptr.cc: New test.
6096 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
6097 pattern for std::basic_stringbuf::str().
6099 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
6100 basic_ostream::operator<< patterns.
6102 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
6104 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
6105 test failures on targets with 32-bit time_t.
6107 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
6108 * include/std/deque: Likewise.
6109 * include/std/forward_list: Likewise.
6110 * include/std/list: Likewise.
6111 * include/std/string: Likewise.
6112 * include/std/vector: Likewise.
6113 * include/std/version: Likewise.
6114 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
6115 * testsuite/23_containers/deque/erasure.cc: Likewise.
6116 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
6117 * testsuite/23_containers/list/erasure.cc: Likewise.
6118 * testsuite/23_containers/map/erasure.cc: Likewise.
6119 * testsuite/23_containers/set/erasure.cc: Likewise.
6120 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
6121 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
6122 * testsuite/23_containers/vector/erasure.cc: Likewise.
6124 * include/experimental/internet [AI_NUMERICSERV]
6125 (resolver_base::numeric_service): Define conditionally.
6126 * testsuite/experimental/net/internet/resolver/base.cc: Test it
6128 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
6131 2019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
6132 Jonathan Wakely <jwakely@redhat.com>
6135 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
6136 (GLIBCXX_3.4.26): Add new exports.
6137 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
6138 correct list of sources.
6139 * include/Makefile.in: Regenerate.
6140 * include/std/ostream (operator<<(nullptr_t)): New member function.
6141 * src/c++17/ostream-inst.cc: New file.
6142 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
6145 2019-01-10 Jonathan Wakely <jwakely@redhat.com>
6147 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
6148 of the source file containing the caller.
6149 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
6150 directories created by test.
6151 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
6153 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
6155 * testsuite/experimental/filesystem/iterators/
6156 recursive_directory_iterator.cc: Likewise.
6158 2019-01-10 Jakub Jelinek <jakub@redhat.com>
6160 PR tree-optimization/88775
6161 * include/bits/stl_function.h (greater<_Tp*>::operator(),
6162 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
6163 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
6164 instead of __builtin_constant_p if available. Don't bother with
6165 the pointer comparison in C++11 and earlier.
6167 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
6171 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
6174 2019-01-09 Jonathan Wakely <jwakely@redhat.com>
6176 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
6177 for filesystem::path. Give variables more distinctive names.
6179 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
6180 member function to perform non-trivial assignment.
6181 (_Optional_payload_base::_M_move_assign): Likewise.
6182 (_Optional_payload<T, true, false, true>::operator=)
6183 (_Optional_payload<T, true, true, false>::operator=)
6184 (_Optional_payload<T, true, false, false>::operator=): Call
6185 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
6188 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
6189 test std::complex<long double> if long double format is IBM128.
6190 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
6193 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
6195 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
6196 for old std::unique_ptr layout.
6197 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
6198 to become valueless. Add filesystem::path tests.
6201 * include/std/optional (_Optional_payload_base): New class template
6202 for common code hoisted from _Optional_payload specializations. Use
6203 a template for the union, to allow a partial specialization for
6204 types with non-trivial destructors. Add constructors for in-place
6205 initialization to the union.
6206 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
6207 to perform non-trivial copy construction, instead of relying on
6208 non-standard copy elision in a delegating constructor.
6209 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
6210 non-trivial move construction.
6211 (_Optional_payload): Derive from _Optional_payload_base and use it
6212 for everything except the non-trivial assignment operators, which are
6214 (_Optional_payload<false, C, M>): Derive from the specialization
6215 _Optional_payload<true, false, false> and add a destructor.
6216 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
6217 Forward to corresponding members of _Optional_payload.
6218 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
6219 Hoist common members from _Optional_base.
6220 (_Optional_base): Make all members and base class public.
6221 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
6222 _Optional_base_impl.
6223 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
6224 support for new std::optional layout.
6225 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
6228 * include/bits/locale_conv.h: Use <> for includes not "".
6229 * include/ext/random: Likewise.
6230 * include/ext/vstring.h: Likewise.
6232 2019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6234 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
6235 (GLIBCXX_3.4.21): Likewise.
6237 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
6240 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
6241 to match the one that controls whether utimbuf and utime are declared.
6243 2019-01-07 Jonathan Wakely <jwakely@redhat.com>
6246 * include/bits/char_traits.h (char_traits::move): Do not pass null
6247 pointers to memmove.
6248 * include/bits/locale_facets.h
6249 (ctype<char>::widen(const char*, const char*, char*)): Do not
6250 pass null pointers to memcpy.
6251 (ctype<char>::narrow(const char*, const char*, char, char*)):
6253 (ctype<char>::do_widen(const char*, const char*, char*)):
6255 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
6258 * doc/xml/manual/spine.xml: Update copyright years.
6259 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
6260 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
6261 for C++17 filesystem library.
6262 * doc/html/*: Regenerate.
6264 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
6265 * config.h.in: Regenerate.
6266 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
6267 alphabetically and add missing entries for copy_symlink,
6268 hard_link_count, rename, and resize_file.
6269 * configure: Regenerate.
6270 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
6271 used unconditionally.
6272 * src/filesystem/ops-common.h (__gnu_posix::truncate)
6273 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
6274 supports truncating to zero length.
6275 * testsuite/27_io/filesystem/operations/all.cc: New test.
6276 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
6278 2019-01-06 Jonathan Wakely <jwakely@redhat.com>
6281 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
6282 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
6283 * config.h.in: Regenerate.
6284 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
6285 remaining std::filesystem types and functions.
6286 * configure: Regenerate.
6287 * src/c++17/Makefile.am: Add C++17 filesystem sources.
6288 * src/c++17/Makefile.in: Regenerate.
6289 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
6290 here, and change name of included file.
6291 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
6292 here, and change name of included file.
6293 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
6294 path to dir-common.h.
6295 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
6296 path to ops-common.h. Disable -Wunused-parameter warnings.
6297 (internal_file_clock): Define unconditionally.
6298 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
6300 (do_copy_file, do_space): Move definitions to ops.common.h.
6301 (copy, file_size, hard_link_count, last_write_time, space): Only
6302 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
6304 (last_write_time, read_symlink): Remove unused attributes from
6306 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
6307 * src/filesystem/Makefile.in: Regenerate.
6308 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
6309 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
6310 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
6311 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
6312 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
6313 dummy types and functions instead of using #error.
6314 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
6315 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
6317 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
6318 (do_copy_file, do_space): Move definitions here from std-ops.cc.
6319 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
6320 to account for new namespace.
6321 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
6322 -lstdc++fs from dg-options.
6323 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
6324 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
6325 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
6326 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
6327 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
6329 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
6330 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
6332 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
6333 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
6334 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
6335 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
6336 * testsuite/27_io/filesystem/operations/create_directories.cc:
6338 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
6339 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
6340 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
6341 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
6342 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
6343 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
6344 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
6345 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
6346 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
6347 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
6348 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
6349 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
6350 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
6351 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
6352 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
6353 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
6354 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
6355 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
6357 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
6361 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
6362 typeinfo and vtables less greedy.
6363 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
6364 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
6365 * src/c++17/Makefile.in: Regenerate.
6366 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
6367 here, and change name of included file.
6368 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
6369 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
6371 * src/filesystem/Makefile.in: Regenerate.
6372 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
6373 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
6374 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
6375 from dg-options and remove dg-require-filesystem-ts.
6376 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
6377 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
6378 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
6379 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
6380 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
6381 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
6382 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
6383 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
6384 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
6385 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
6386 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
6387 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
6388 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
6389 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
6390 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
6391 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
6392 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
6393 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
6394 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
6395 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
6396 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
6398 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
6399 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
6400 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
6401 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
6402 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
6403 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
6404 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
6405 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
6406 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
6407 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
6408 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
6409 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
6411 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
6413 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
6415 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
6417 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
6418 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
6419 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
6420 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
6421 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
6422 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
6423 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
6424 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
6425 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
6426 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
6428 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
6429 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
6430 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
6431 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
6432 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
6435 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
6436 Check is_trivially_copyable instead of is_scalar.
6437 (variant::emplace<N, Args>(Args&&...)): If construction of the new
6438 contained value can throw and its type is trivially copyable then
6439 construct into a temporary variant and move from it, to provide the
6440 strong exception safety guarantee.
6441 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
6443 * testsuite/20_util/variant/87431.cc: New test.
6444 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
6445 conversion causes valueless state.
6448 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
6449 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
6450 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
6451 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
6452 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
6454 2019-01-05 Jonathan Wakely <jwakely@redhat.com>
6456 * include/bits/fs_fwd.h (__file_clock): Define new clock.
6457 (file_time_type): Redefine in terms of __file_clock.
6458 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
6460 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
6462 (internal_file_lock): New helper type for accessing __file_clock.
6463 (do_copy_file): Use internal_file_lock to convert system time to
6465 (last_write_time(const path&, error_code&)): Likewise.
6466 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
6468 2019-01-04 Jonathan Wakely <jwakely@redhat.com>
6470 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
6471 for const member functions of std::basic_string.
6472 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
6474 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
6475 Make non-standard constructor private.
6476 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
6478 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
6479 explicit instantiations for C++17 as well as earlier dialects.
6480 * src/c++17/Makefile.am: Add new source files.
6481 * src/c++17/Makefile.in: Regenerate.
6482 * src/c++17/cow-string-inst.cc: New file defining explicit
6483 instantiations for basic_string member functions added in C++17.
6484 * src/c++17/string-inst.cc: Likewise.
6486 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
6487 copy/move constructors for old std::basic_string.
6488 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
6489 (basic_string::reference, basic_string::const_reference): Define
6490 as plain references for C++11 and later.
6491 (basic_string::basic_string()): Put constructor body outside
6492 preprocessor conditional groups.
6493 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
6494 instead of copying it.
6495 (basic_string::basic_string(const basic_string&, const _Alloc&)):
6497 (basic_string::basic_string(basic_string&&, const _Alloc&)):
6499 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
6500 cases for old basic_string.
6501 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
6502 allocator-extended constructors unconditionally. Add extra members to
6503 allocator type when using old string ABI.
6504 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
6506 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
6508 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
6509 -fno-inline added to test flags.
6511 * testsuite/21_strings/basic_string/requirements/
6512 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
6514 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
6515 assertion failures with old std::string ABI.
6517 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
6519 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
6520 functions that will only erase elements at the end.
6521 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
6522 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
6523 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
6525 (path::_List::pop_back()): Define.
6526 (path::_List::_M_erase_from(const_iterator)): Define.
6527 (path::operator/=(const path&)): Use pop_back to remove last component
6528 and _M_erase_from to remove multiple components.
6529 (path::_M_append(basic_string_view<value_type>)): Likewise.
6530 (path::operator+=(const path&)): Likewise.
6531 (path::_M_concat(basic_string_view<value_type>)): Likewise.
6532 (path::remove_filename()): Likewise.
6533 (path::lexically_normal()): Use _List::_Impl iterators instead of
6534 path::iterator. Use pop_back to remove components from the end. Clear
6535 trailing filename, instead of using erase(const_iterator) to remove
6536 a non-final component.
6537 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
6539 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
6541 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
6542 incorrect treatment of empty filename after trailing slash.
6543 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
6545 * testsuite/21_strings/basic_string/modifiers/assign/char/
6546 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
6548 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
6549 move_assign_optim.cc: Likewise.
6551 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
6552 Jakub Jelinek <jakub@redhat.com>
6555 * include/experimental/memory: Replace UTF-8 quote characters.
6556 * include/std/future: Replace UTF-8 "em dash" characters.
6558 2019-01-03 Jonathan Wakely <jwakely@redhat.com>
6561 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
6562 * include/debug/forward_list: Likewise.
6563 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
6565 * include/experimental/chrono: Likewise.
6566 * include/experimental/functional: Likewise.
6567 * include/experimental/ratio: Likewise.
6568 * include/experimental/system_error: Likewise.
6569 * include/experimental/tuple: Likewise.
6570 * include/experimental/type_traits: Likewise.
6571 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
6572 * include/parallel/multiseq_selection.h: Likewise.
6575 * config/abi/pre/gnu.ver: Add missing exports.
6576 * testsuite/22_locale/collate_byname/88681.cc: New test.
6577 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
6578 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
6580 2019-01-02 Jonathan Wakely <jwakely@redhat.com>
6582 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
6583 initializer_list<value_type> and from input iterator ranges.
6584 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
6586 * testsuite/experimental/string_view/element_access/char/empty.cc:
6587 Fix year range in copyright header.
6589 2019-01-02 Joel Brobecker <brobecker@adacore.com>
6591 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
6592 Fix year range in copyright header.
6594 2019-01-01 Jakub Jelinek <jakub@redhat.com>
6596 Update copyright years.
6598 Copyright (C) 2019 Free Software Foundation, Inc.
6600 Copying and distribution of this file, with or without modification,
6601 are permitted in any medium without royalty provided the copyright
6602 notice and this notice are preserved.