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