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