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