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