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