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