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