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