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