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