Daily bump.
[gcc.git] / libstdc++-v3 / ChangeLog
1 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
2
3 PR libstdc++/90102
4 * include/debug/deque (deque(const _Base&)): Replace parameter
5 with a struct that wraps a const _Base&.
6 * include/debug/forward_list (forward_list(_Base_ref)): New
7 constructor.
8 * include/debug/list (list(const _Base&)): Replace parameter
9 with a struct that wraps a const _Base&.
10 * include/debug/map.h (map(const _Base&)): Likewise.
11 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
12 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
13 * include/debug/set.h (set(const _Base&)): Likewise.
14 * include/debug/unordered_map (unordered_map(const _Base&))
15 (unordered_multimap(const _Base&)): Likewise.
16 * include/debug/unordered_set (unordered_set(const _Base&))
17 (unordered_multiset(const _Base&)): Likewise.
18 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
19 Adjust dg-error line number.
20 * include/debug/vector (vector(const _Base&)): Likewise.
21 * testsuite/23_containers/deque/debug/90102.cc: New test.
22 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
23 * testsuite/23_containers/list/debug/90102.cc: New test.
24 * testsuite/23_containers/map/debug/90102.cc: New test.
25 * testsuite/23_containers/multimap/debug/90102.cc: New test.
26 * testsuite/23_containers/multiset/debug/90102.cc: New test.
27 * testsuite/23_containers/set/debug/90102.cc: New test.
28 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
29 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
30 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
31 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
32 * testsuite/23_containers/vector/debug/90102.cc: New test.
33
34 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
35
36 PR libstdc++/95392
37 * include/bits/fs_path.h (path::_S_to_string): Move to
38 namespace-scope and rename to ...
39 (__detail::__string_from_range): ... this.
40 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
41 convert a char sequence containing UTF-8 to wstring.
42 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
43 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
44 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
45 __string_from_range to obtain a contiguous range and
46 __wstr_from_utf8 to obtain a wide string.
47 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
48 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
49 string.
50 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
51 Use __wstr_from_utf8.
52
53 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
54
55 * testsuite/util/testsuite_iterators.h:
56 (input_iterator_wrapper::operator++(int)): Return proxy object.
57
58 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
59
60 * doc/xml/manual/evolution.xml: Document deprecation of
61 __is_nullptr_t and removal of std::allocator members.
62 * doc/html/manual/api.html: Regenerate.
63
64 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
65
66 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
67 * doc/xml/manual/evolution.xml: Likewise.
68 * doc/html/manual/api.html: Regenerate.
69 * doc/html/manual/containers.html: Regenerate.
70
71 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
72
73 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
74 * doc/html/faq.html: Regenerate.
75
76 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
77
78 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
79 stray change.
80
81 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
82
83 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
84 www.cs.princeton.edu to https.
85 * doc/html/manual/policy_data_structures.html: Regenerate.
86
87 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
88
89 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
90 * configure: Rebuild.
91
92 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
93
94 PR bootstrap/95413
95 * configure: Regenerated.
96
97 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
98
99 PR libstdc++/95079
100 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
101 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
102 (unordered_map<>::insert_or_assign): Adapt.
103
104 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
105
106 PR libstdc++/95282
107 * include/bits/atomic_base.h (__atomic_impl::load): Add
108 cv-qualifiers to parameter so that _Tp is deduced as the
109 unqualified type.
110 * testsuite/29_atomics/atomic_float/95282.cc: New test.
111
112 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
113
114 PR libstdc++/95322
115 * include/std/ranges (transform_view::_Sentinel): Allow hidden
116 friends to work with _Iterator<true> and _Iterator<false>.
117 (join_view::_Sentinel): Likewise.
118 * testsuite/std/ranges/adaptors/95322.cc: New test.
119
120 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
121
122 PR libstdc++/94354
123 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
124 operators to use the correct operations on the underlying
125 iterators.
126 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
127
128 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
129
130 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
131
132 2020-05-26 Patrick Palka <ppalka@redhat.com>
133
134 PR libstdc++/95322
135 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
136 Remove and instead define it ...
137 (common_iterator::_Proxy): ... here.
138 (common_iterator::operator->): Use it.
139 * testsuite/24_iterators/common_iterator/2.cc: New test.
140 * testsuite/std/ranges/adaptors/95322.cc: New test.
141
142 2020-05-23 Patrick Palka <ppalka@redhat.com>
143
144 PR libstdc++/93978
145 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
146 dg-additional-options. Avoid unused-but-set-variable warning.
147
148 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
149
150 PR libstdc++/95289
151 * include/debug/helper_functions.h (__get_distance): Only declare
152 as a constexpr function for C++14 and up.
153 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
154
155 * include/bits/fs_path.h (__detail::_S_range_begin)
156 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
157 overloaded function template __detail::__effective_range.
158 (__detail::__effective_range): New overloaded function template to
159 create a basic_string or basic_string_view for an effective range.
160 (__detail::__value_type_is_char): Use __detail::__effective_range.
161 Do not use remove_const on value type.
162 (__detail::__value_type_is_char_or_char8_t): Likewise.
163 (path::path(const Source&, format))
164 (path::path(const Source&, const locale&))
165 (path::operator/=(const Source&), path::append(const Source&))
166 (path::concat(const Source&)): Use __detail::__effective_range.
167 (path::_S_to_string(InputIterator, InputIterator)): New function
168 template to create a string view if possible, or string otherwise.
169 (path::_S_convert): Add overloads that convert a string returned
170 by __detail::__effective_range. Use if-constexpr to inline conversion
171 logic from all overloads of _Cvt::_S_convert.
172 (path::_S_convert_loc): Add overload that converts a string. Use
173 _S_to_string to avoid allocation when possible.
174 (path::_Cvt): Remove.
175 (path::operator+=(CharT)): Remove indirection through path::concat.
176 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
177 overload for non-const pointers, to avoid constructing a std::string.
178 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
179 compilation with call to _S_convert.
180
181 * include/bits/fs_path.h (__detail::_S_range_begin)
182 (__detail::_S_range_end): Remove unintentional static specifiers.
183 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
184 (__detail::_S_range_end): Likewise.
185
186 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
187 Replace alias template with variable template. Don't remove const.
188 (filesystem::__detail::__is_path_src): Replace overloaded function
189 template with variable template and specializations.
190 (filesystem::__detail::__is_path_iter_src): Replace alias template
191 with class template.
192 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
193 iterator pairs.
194 (filesystem::__detail::_Path2): New alias template for checking
195 InputIterator requirements.
196 (filesystem::__detail::__constructible_from): Remove.
197 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
198 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
199 constructor arguments of void and void* types.
200
201 2020-05-21 Matthias Kretz <kretz@kde.org>
202
203 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
204 allowing runtest to work without arguments.
205 * testsuite/Makefile.in: Regenerate.
206
207 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
208
209 PR libstdc++/93983
210 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
211 Reorder constraints to avoid recursion when constructors use
212 iterator_traits (LWG 3420).
213 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
214
215 * include/experimental/socket (basic_socket::is_open()
216 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
217
218 * include/experimental/bits/net.h (__endpoint, __protocol)
219 (__acceptable_protocol, __inet_protocol): New concepts.
220 (__detail::__is_endpoint): Move trait from <experimental/socket>.
221 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
222 traits.
223 (__endpoint, __protocol, __acceptable_protocol): New variable
224 templates.
225 * include/experimental/socket (__is_endpoint): Move to net.h header.
226 (basic_socket, basic_socket_acceptor): Check requirements.
227
228 * include/experimental/executor (use_future_t::use_future_t()): Fix
229 incorrect noexcept-specifier.
230 * include/experimental/internet (basic_resolver_results): Adjust
231 whitespace.
232 * include/experimental/socket (__basic_socket_impl::release): Add
233 member function.
234 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
235 target constructor.
236 (basic_socket::release(), basic_socket::release(error_code&)): Add
237 missing member functions.
238 (basic_socket::is_open()): Add nodiscard attribute.
239 (basic_socket::close(error_code&)): Pass argument to base function.
240 (basic_socket_acceptor::release())
241 (basic_socket_acceptor::release(error_code&)): Add missing member
242 functions.
243 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
244 (basic_socket_streambuf::error()): Add noexcept.
245 (basic_socket_iostream::error()): Likewise.
246 * testsuite/experimental/net/socket/basic_socket.cc: New test.
247
248 * include/experimental/buffer: Replace typedefs with
249 alias-declarations.
250 * include/experimental/executor: Likewise.
251 * include/experimental/internet: Likewise.
252 * include/experimental/socket: Likewise.
253 * include/experimental/timer: Likewise.
254
255 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
256
257 PR libstdc++/94087
258 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
259 passed in.
260 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
261 fallback.
262 (random_device::_M_init): Use __x86_rdseed_rdrand when both
263 instructions are available.
264 * testsuite/26_numerics/random/random_device/94087.cc: New test.
265
266 2020-05-19 Patrick Palka <ppalka@redhat.com>
267
268 PR c++/66439
269 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
270 mismatch" messages.
271 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
272
273 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
274
275 PR bootstrap/95147
276 * configure: Regenerated.
277
278 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
279
280 * configure: Regenerated.
281
282 2020-05-13 Alexandre Oliva <oliva@adacore.com>
283
284 PR libstdc++/77691
285 * include/experimental/memory_resource
286 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
287 x86-vxworks as on x86-solaris.
288 (__resource_adaptor_imp::do_deallocate): Likewise.
289 * testsuite/experimental/memory_resource/new_delete_resource.cc:
290 Drop xfail.
291 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
292 (test03): Drop max-align test for char-aligned alloc.
293
294 2020-05-08 Ulrich Drepper <drepper@redhat.com>
295
296 * include/bits/atomic_base.h (atomic_flag): Implement test member
297 function.
298 * include/std/version: Define __cpp_lib_atomic_flag_test.
299 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
300 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
301
302 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
303
304 PR libstdc++/94971 (partial)
305 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
306 std::sample using macro to work in parallel mode.
307 (__sort_fn): Likewise for std::sort.
308 (ranges::__nth_element_fn): Likewise for std::nth_element.
309 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
310 Likewise for std::__min_cmp.
311 * include/parallel/algobase.h (lexicographical_compare_three_way):
312 Add to namespace std::__parallel.
313
314 PR c/92472
315 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
316 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
317 (_UnguardedIterator::operator _RAIter): Add const qualifier.
318 (operator<(_GuardedIterator&, _GuardedIterator&)
319 (operator<=(_GuardedIterator&, _GuardedIterator&)
320 (operator<(_UnguardedIterator&, _UnguardedIterator&)
321 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
322 parameters to const references.
323
324 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
325
326 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
327 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
328
329 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
330
331 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
332 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
333 * include/bits/stl_bvector.h (__fill_bvector): Move outside
334 _GLIBCXX_STD_C namespace.
335 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
336 into...
337 (__fill_a1): ...this.
338 * testsuite/25_algorithms/fill/bvector/1.cc: New.
339
340 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
341
342 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
343
344 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
345
346 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
347 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
348 Likewise.
349 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
350 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
351 Likewise.
352
353 2020-05-06 Martin Liska <mliska@suse.cz>
354
355 Revert:
356 2020-05-05 Martin Liska <mliska@suse.cz>
357 PR c/92472
358 * include/parallel/multiway_merge.h:
359 Use const for _Compare template argument.
360
361 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
362
363 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
364 versions for GCC 9.[123] and 10.1 releases.
365 * doc/html/*: Regenerate.
366
367 2020-05-06 Jakub Jelinek <jakub@redhat.com>
368
369 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
370 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
371 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
372 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
373 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
374 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
375 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
376
377 2020-05-05 Martin Liska <mliska@suse.cz>
378
379 PR c/92472
380 * include/parallel/multiway_merge.h:
381 Use const for _Compare template argument.
382
383 2020-05-04 Fangrui Song <maskray@google.com>
384
385 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
386
387 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
388
389 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
390 * doc/html/*: Regenerate.
391
392 PR libstdc++/94906
393 * src/c++17/memory_resource.cc
394 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
395 operands.
396
397 2020-05-04 Nathan Sidwell <nathan@acm.org>
398
399 PR libstdc++/94747
400 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
401 ptrdiff_t before negation, to show intent more clearly.
402
403 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
404
405 PR libstdc++/94936
406 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
407 Add comment about single-threaded behaviour.
408 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
409 class member access out of loop.
410 (synchronized_pool_resource::synchronized_pool_resource())
411 (synchronized_pool_resource::~synchronized_pool_resource())
412 (synchronized_pool_resource::release()): Check __gthread_active_p
413 before creating and/or deleting the thread-specific data key.
414 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
415 assertions.
416 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
417 path for single-threaded case.
418 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
419 Likewise. Return if unable to find a pool that owns the allocation.
420 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
421 New test.
422 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
423 test.
424 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
425 test.
426
427 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
428
429 PR libstdc++/94933
430 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
431 usable in constant expressions.
432 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
433 non-scalars.
434
435 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
436
437 PR libstdc++/94901
438 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
439
440 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
441 Patrick Palka <ppalka@redhat.com>
442
443 PR libstdc++/92894
444 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
445 Add trait to determine return type and an alias for it.
446 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
447 deduced return type.
448 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
449 the result of ranges::iter_move.
450 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
451 instead of checking the result of ranges::iter_move.
452 * testsuite/24_iterators/customization_points/92894.cc: New test.
453 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
454
455 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
456
457 PR libstdc++/94901
458 * include/std/type_traits (__is_complete_or_unbounded): Replace
459 BADNAME _T with _Tp.
460 * testsuite/17_intro/badnames.cc: New test.
461
462 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
463
464 PR libstdc++/89510
465 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
466 (allocator_traits::_S_destroy)
467 (allocator_traits<allocator<T>>::construct): Use traits in
468 noexcept-specifiers.
469 * include/bits/allocator.h (allocator<void>::construct)
470 (allocator<void>::destroy): Likewise.
471 * include/ext/malloc_allocator.h (malloc_allocator::construct)
472 (malloc_allocator::destroy): Likewise.
473 * include/ext/new_allocator.h (new_allocator::construct)
474 (new_allocator::destroy): Likewise.
475 * testsuite/20_util/allocator/89510.cc: New test.
476 * testsuite/ext/malloc_allocator/89510.cc: New test.
477 * testsuite/ext/new_allocator/89510.cc: New test.
478
479 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
480
481 PR libstdc++/94854
482 * include/bits/basic_string.tcc: Update comment about explicit
483 instantiations.
484
485 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
486
487 PR libstdc++/91480
488 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
489 Remove non-standard macro.
490 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
491 to indicate P1032R1 support.
492 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
493 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
494 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
495 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
496 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
497 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
498 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
499 feature test macro.
500 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
501 * testsuite/21_strings/basic_string_view/operations/copy/char/
502 constexpr.cc: Likewise.
503 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
504
505 PR libstdc++/94831
506 * include/bits/alloc_traits.h (_S_construct): Restore placement
507 new-expression for C++11/14/17 and call std::construct_at directly
508 for C++20.
509 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
510 function returning void.
511 * testsuite/20_util/specialized_algorithms/
512 uninitialized_value_construct/94831.cc: New test.
513 * testsuite/23_containers/vector/cons/94831.cc: New test.
514
515 2020-04-28 Patrick Palka <ppalka@redhat.com>
516
517 LWG 3433 subrange::advance(n) has UB when n < 0
518 * include/std/ranges (subrange::prev): Fix typo.
519 (subrange::advance): Handle a negative argument as per the proposed
520 resolution of LWG 3433.
521 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
522
523 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
524 Iain Sandoe <iain@sandoe.co.uk>
525
526 PR c++/94759
527 * include/std/coroutine: Implement handing for non-
528 class coroutine return types.
529
530 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
531
532 * include/experimental/executor (service_already_exists): Make default
533 constructor public (LWG 3414).
534 * testsuite/experimental/net/execution_context/make_service.cc: Check
535 the service_already_exists can be default constructed.
536
537 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
538 Jonathan Wakely <jwakely@redhat.com>
539
540 PR libstdc++/90415
541 PR libstdc++/92156
542 * include/std/any (any): Rename template parameters for consistency
543 with the standard.
544 (any::_Decay): Rename to _Decay_if_not_any.
545 (any::any(T&&):: Remove is_constructible from constraints. Remove
546 non-standard overload.
547 (any::any(in_place_type_t<T>, Args&&...))
548 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
549 (any::emplace(Args&&...))
550 (any::emplace(initializer_list<U>, Args&&...)):
551 Use decay_t instead of _Decay.
552 * testsuite/20_util/any/cons/90415.cc: New test.
553 * testsuite/20_util/any/cons/92156.cc: New Test.
554 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
555 more robust.
556 * testsuite/20_util/any/modifiers/92156.cc: New test.
557
558 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
559
560 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
561 * doc/html/*: Regenerate.
562
563 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
564 value for C++17 to 201803L because P0858R0 is supported for C++17.
565 * include/std/version (__cpp_lib_array_constexpr): Likewise.
566 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
567 Check for value corresponding to P0031R0 features being tested.
568 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
569 Check for value corresponding to P0858R0 features being tested.
570
571 * include/std/version (__cpp_lib_three_way_comparison): Define for
572 freestanding builds.
573
574 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
575
576 * include/experimental/net/executor (system_context): Mark
577 system_context::system_context() = delete.
578 * testsuite/experimental/net/executor/1.cc: Add new
579 test to check system_context is not default constructible.
580
581 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
582
583 * include/std/coroutine: Update the inline namespace to __n4861.
584 Add the __cpp_lib_coroutine define, set to 201902L.
585 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
586
587 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
588
589 * include/std/execution (__cpp_lib_execution): Define to indicate
590 support for P0024R2 and P1001R2.
591 * include/std/version (__cpp_lib_execution): Define.
592 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
593 defined by <algorithm>, move other tests to new tests ...
594 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
595 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
596 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
597 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
598
599 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
600 different values for C++17 and C++20, to indicate different feature
601 sets. Update value for C++20 to indicate P1032R1 support.
602 * include/std/version (__cpp_lib_array_constexpr): Likewise.
603 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
604 Check feature test macro.
605 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
606 New test.
607 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
608 feature test macro.
609 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
610 in C++17 mode and check feature test macro.
611
612 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
613 here.
614 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
615 defined by <utility>.
616
617 * include/std/functional (__cpp_lib_concepts): Update macro value to
618 indicate P1964R2 support.
619 * include/std/version (__cpp_lib_concepts): Likewise.
620 * testsuite/std/concepts/1.cc: Adjust expected value.
621 * testsuite/std/concepts/2.cc: Likewise.
622
623 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
624 __cpp_lib_constexpr_functional.
625 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
626 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
627
628 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
629 indicate P1006R1 support.
630 (__cpp_lib_to_address): Define to indicate P0653R2 support.
631 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
632 P1227R2 support.
633 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
634 P0769R2 support.
635 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
636 P0020R6 support.
637 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
638 P1007R3 support.
639 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
640 Define to indicate P0339R6 support.
641 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
642 indicate P0457R2 support.
643 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
644 to indicate P0758R1 support.
645 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
646 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
647 * include/std/version (__cpp_lib_atomic_float)
648 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
649 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
650 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
651 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
652 (__cpp_lib_to_address): Define.
653 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
654
655 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
656 macro.
657 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
658 Likewise.
659 * include/std/version (__cpp_lib_map_insertion)
660 (__cpp_lib_unordered_map_insertion): Remove.
661
662 * include/std/condition_variable (__cpp_lib_jthread): Remove
663 redundant definition.
664 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
665 indicate P1869R1 support.
666 * include/std/version (__cpp_lib_jthread): Update value.
667 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
668 for updated macro value.
669 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
670 Likewise.
671 * testsuite/30_threads/jthread/1.cc: Likewise.
672 * testsuite/30_threads/jthread/2.cc: Likewise.
673 * testsuite/30_threads/stop_token/1.cc: Likewise.
674 * testsuite/30_threads/stop_token/2.cc: Likewise.
675
676 * testsuite/21_strings/basic_string/erasure.cc: Check for
677 __cpp_lib_erase_if macro.
678 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
679 messages.
680 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
681 * testsuite/23_containers/list/erasure.cc: Likewise.
682 * testsuite/23_containers/map/erasure.cc: Likewise.
683 * testsuite/23_containers/set/erasure.cc: Likewise.
684 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
685 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
686 * testsuite/23_containers/vector/erasure.cc: Likewise.
687
688 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
689
690 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
691 to define operator<=>.
692 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
693
694 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
695 * doc/Makefile.in: Regenerate.
696 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
697 of "this page".
698 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
699 to the C++11 status table.
700 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
701 proposals with table matching contents of the C++14 standard.
702 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
703 the C++17 standard.
704 * doc/html/*: Regenerate.
705
706 PR c++/94149
707 * include/std/type_traits (__is_nt_constructible_impl): Add partial
708 specializations for bounded arrays with non-empty initializers.
709 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
710
711 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
712
713 * testsuite/lib/libstdc++.exp: Add additional_flags=
714 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
715 compiling with a newer Thread Building Blocks.
716
717 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
718
719 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
720
721 * testsuite/20_util/is_constructible/51185.cc: Make test class a
722 non-aggregate so that the test verifies the same thing in all -std
723 modes.
724 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
725 results for some types when paren-init for aggregates is supported.
726
727 * include/std/version (__cpp_lib_three_way_comparison): Update value.
728 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
729 (__detail::__synth3way): Add noexcept-specifier.
730
731 * include/bits/stl_map.h (map): Define operator<=> and remove
732 operator< for C++20.
733 * include/bits/stl_multimap.h (multimap): Likewise.
734 * include/bits/stl_multiset.h (multiset): Likewise.
735 * include/bits/stl_set.h (set): Likewise.
736 * include/bits/stl_tree.h (_Rb_tree): Likewise.
737 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
738 operator!= for C++20.
739 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
740 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
741 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
742 * include/debug/set.h (__gnu_debug::set): Likewise.
743 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
744 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
745 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
746 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
747
748 2020-04-20 Matthias Kretz <kretz@kde.org>
749
750 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
751
752 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
753
754 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
755 * include/bits/stl_stack.h (stack): Likewise.
756 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
757 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
758
759 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
760 Remove redundant operator!= for C++20.
761 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
762 Likewise.
763 * include/debug/unordered_map (unordered_map, unordered_multimap):
764 Likewise.
765 * include/debug/unordered_set (unordered_set, unordered_multiset):
766 Likewise.
767
768 PR other/94629
769 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
770 redundant assignment in constructor.
771
772 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
773
774 * include/std/chrono (duration, time_point): Define operator<=> and
775 remove redundant operator!= for C++20.
776 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
777 test.
778 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
779 test.
780
781 * testsuite/util/native_type/native_priority_queue.hpp: Use
782 allocator_traits to rebind allocator.
783
784 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
785
786 * include/bits/forward_list.h (forward_list): Define operator<=> and
787 remove redundant comparison operators for C++20.
788 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
789 * include/bits/stl_deque.h (deque): Likewise.
790 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
791 * include/bits/stl_list.h (list): Likewise.
792 * include/bits/stl_vector.h (vector): Likewise.
793 * include/debug/deque (__gnu_debug::deque): Likewise.
794 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
795 * include/debug/list (__gnu_debug::list): Likewise.
796 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
797 Likewise.
798 * include/debug/vector (__gnu_debug::vector): Likewise.
799 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
800 operator<=> for C++20.
801 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
802 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
803 * testsuite/23_containers/list/cmp_c++20.cc: New test.
804 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
805 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
806
807 * include/bits/basic_string.h (basic_string): Define operator<=> and
808 remove redundant comparison operators for C++20.
809 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
810 Add comparison_category members.
811 (__detail::__char_traits_cmp_cat): New helper to get comparison
812 category from char traits class.
813 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
814 define for C++20.
815 (sub_match): Define operator<=> and remove redundant comparison
816 operators for C++20.
817 (match_results): Remove redundant operator!= for C++20.
818 * include/std/string_view (basic_string_view): Define operator<=> and
819 remove redundant comparison operators for C++20.
820 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
821 test.
822 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
823 New test.
824 * testsuite/21_strings/basic_string_view/operations/copy/char/
825 constexpr.cc: Initialize variable.
826 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
827 constexpr.cc: Likewise.
828 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
829 dg-do directive and remove comments showing incorrect signatures.
830 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
831 Likewise.
832 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
833 New test.
834 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
835 New test.
836 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
837
838 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
839
840 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
841 name of unused parameter.
842
843 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
844
845 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
846 (directory_entry): Define operator<=> and remove redundant comparison
847 operators for C++20.
848 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
849 * include/bits/fs_path.h (path): Define operator<=> and remove
850 redundant comparison operators for C++20.
851 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
852 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
853 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
854 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
855
856 * include/bits/allocator.h (operator!=): Do not define for C++20.
857 * include/bits/locale_classes.h (operator!=): Likewise.
858 * include/bits/std_function.h (operator==(nullptr_t, const function&))
859 (operator!=(const function&, nullptr_t))
860 (operator!=(nullptr_t, const function&)): Likewise.
861 * include/ext/bitmap_allocator.h (operator!=): Likewise.
862 * include/ext/debug_allocator.h (operator!=): Likewise.
863 * include/ext/extptr_allocator.h (operator!=): Likewise.
864 * include/ext/malloc_allocator.h (operator!=): Likewise.
865 * include/ext/mt_allocator.h (operator!=): Likewise.
866 * include/ext/new_allocator.h (operator!=): Likewise.
867 * include/ext/pool_allocator.h (operator!=): Likewise.
868 * include/ext/throw_allocator.h (operator!=): Likewise.
869 * include/std/bitset (bitset::operator!=): Likewise.
870 * include/std/memory_resource (operator!=): Likewise.
871 * include/std/scoped_allocator (operator!=): Likewise.
872
873 * include/std/typeindex (operator<=>): Define for C++20.
874 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
875
876 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
877
878 * libsupc++/compare (compare_three_way): Fix constraint so that
879 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
880 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
881 New test.
882
883 PR libstdc++/94562
884 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
885 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
886 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
887 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
888 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
889 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
890 C++20.
891
892 PR libstdc++/94565
893 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
894 * testsuite/18_support/comparisons/categories/94565.cc: New test.
895
896 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
897
898 * include/std/coroutine: Update coroutines builtin define,
899 per n4861.
900
901 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
902
903 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
904 (strong_order, weak_order, partial_order): Replace uses of <=> with
905 compare_three_way function object (LWG 3324).
906 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
907 equality operator so that X satisfies three_way_comparable.
908 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
909 Likewise.
910 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
911
912 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
913 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
914 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
915 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
916 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
917
918 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
919
920 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
921 Define for C++20.
922 * include/std/complex (operator==(const T&, const complex<T>&))
923 (operator!=(const complex<T>&, const complex<T>&))
924 (operator!=(const complex<T>&, const T&))
925 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
926 * testsuite/26_numerics/slice/compare.cc: New test.
927
928 * include/std/charconv (to_chars_result, from_chars_result): Add
929 defaulted equality comparisons for C++20.
930 * testsuite/20_util/from_chars/compare.cc: New test.
931 * testsuite/20_util/to_chars/compare.cc: New test.
932
933 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
934
935 PR libstdc++/94520
936 * include/std/charconv (__integer_to_chars_result_type)
937 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
938 allow use in C++14.
939 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
940 use of std::string_view with std::string.
941 * testsuite/20_util/from_chars/2.cc: Likewise.
942 * testsuite/20_util/to_chars/1.cc: Likewise.
943 * testsuite/20_util/to_chars/2.cc: Likewise.
944
945 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
946
947 PR libstdc++/94498
948 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
949 usable in constant expressions for C++20.
950 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
951 _GLIBCXX20_CONSTEXPR.
952 (std::char_traits<char>, std::char_traits<wchar_t>)
953 (std::char_traits<char8_t>): Make move, copy and assign usable in
954 constant expressions for C++20.
955 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
956 and copy usable in constant expressions for C++20.
957 * include/std/string_view (basic_string_view::copy): Add
958 _GLIBCXX20_CONSTEXPR.
959 * testsuite/21_strings/basic_string_view/operations/copy/char/
960 constexpr.cc: New test.
961 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
962 constexpr.cc: New test.
963
964 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
965
966 * doc/xml/manual/appendix_contributing.xml: Refer to Git
967 documentation instead of Subversion. Switch to https.
968 * doc/html/manual/appendix_contributing.html: Regenerate.
969
970 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
971
972 PR libstdc++/93960
973 * include/bits/ptr_traits.h (__to_address): Add special case for debug
974 iterators, to avoid dereferenceable check.
975 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
976 * testsuite/20_util/to_address/debug.cc: New test.
977
978 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
979
980 * testsuite/experimental/net/execution_context/use_service.cc:
981 Require pthread and gthreads.
982
983 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
984
985 * doc/xml/manual/appendix_free.xml: Move "free books" list from
986 fsf.org to gnu.org.
987 * doc/html/manual/appendix_free.html: Regenerate.
988
989 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
990
991 Library-side tests for parenthesized aggregate init
992
993 PR c++/92878
994 PR c++/92947
995
996 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
997 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
998 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
999 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
1000 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
1001 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
1002 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
1003 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
1004 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
1005 Likewise.
1006 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
1007 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
1008 * testsuite/20_util/variant/92878_92947.cc: Likewise.
1009 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
1010 Likewise.
1011 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
1012 Likewise.
1013 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
1014 Likewise.
1015 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
1016 Likewise.
1017 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
1018 Likewise.
1019 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
1020 Likewise.
1021 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
1022 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
1023 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
1024 Likewise.
1025 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
1026 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
1027 Likewise.
1028 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
1029 Likewise.
1030 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
1031 Likewise.
1032 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
1033 Likewise.
1034 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
1035 Likewise.
1036
1037 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
1038
1039 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
1040 for changes due to parenthesized aggregate-initialization in C++20.
1041 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
1042 with std::chrono::sys_time in C++20.
1043
1044 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
1045 to constrain C++20 versions of comparison operators. Fix backwards
1046 logic of relational operators.
1047 (move_iterator): Use requires-clause to constrain comparison operators
1048 in C++20. Do not declare non-standard same-type overloads for C++20.
1049 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
1050 of comparisons and check using greedy_ops type.
1051 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
1052 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
1053 main function from compile-only test.
1054 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
1055
1056 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
1057
1058 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
1059 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
1060 C++20 concepts are required.
1061 * include/bits/stl_iterator_base_types.h: Likewise.
1062 * include/std/concepts: Likewise.
1063 * include/std/version: Likewise.
1064 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
1065 macro.
1066
1067 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
1068 (reverse_iterator::iterator_category): Define for C++20.
1069 (reverse_iterator): Define comparison operators correctly for C++20.
1070 (__normal_iterator): Add constraints to comparison operators for C++20.
1071 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
1072 overload for input iterators.
1073 (move_iterator): Add constraints to comparison operators for C++20.
1074 Define operator<=> for C++20.
1075 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
1076 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
1077 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
1078 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
1079
1080 * include/bits/iterator_concepts.h (__detail::__decay_copy)
1081 (__detail::__member_begin, __detail::__adl_begin): Move here from
1082 <bits/range_access.h>.
1083 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
1084 * bits/range_access.h (__cust_access::__decay_copy)
1085 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
1086 <bits/iterator_concepts.h>.
1087 (ranges::iterator_t): Use __detail::__range_iter_t.
1088 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
1089 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
1090 (front_insert_iterator): Likewise.
1091 (insert_iterator): Implement changes from P0896R4 for C++20.
1092 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
1093 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
1094 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
1095 for inclusion in synopsis_c++20.cc which expects different signatures
1096 for some function templates.
1097 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
1098
1099 * include/std/type_traits (__is_array_convertible): Move definition
1100 to immediately after is_convertible.
1101
1102 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
1103
1104 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
1105 (chrono::months, chrono::sys_days, chrono::local_t)
1106 (chrono::local_time, chrono::local_seconds, chrono::local_days):
1107 Define for C++20.
1108 (chrono::time_point): Add missing static assert.
1109 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
1110 * testsuite/std/time/clock/file/overview.cc: New test.
1111 * testsuite/std/time/clock/file/members.cc: New test.
1112 * testsuite/std/time/syn_c++20.cc: New test.
1113
1114 2020-03-25 Mike Crowe <mac@mcrowe.com>
1115
1116 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
1117 test.
1118 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
1119 test.
1120
1121 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
1122
1123 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
1124 * include/std/chrono (filesystem::__file_clock): Here.
1125 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
1126 Define public member functions for C++20.
1127 (is_clock, is_clock_v): Define traits for C++20.
1128 * include/std/condition_variable (condition_variable::wait_until): Add
1129 check for valid clock.
1130 * include/std/future (_State_baseV2::wait_until): Likewise.
1131 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
1132 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
1133 Likewise.
1134 * include/std/thread (this_thread::sleep_until): Likewise.
1135 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
1136 slow_clock with new namespace.
1137 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
1138 test.
1139 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
1140 New test.
1141 * testsuite/30_threads/future/members/clock_neg.cc: New test.
1142 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
1143 Qualify slow_clock with new namespace.
1144 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
1145 clock_neg.cc: New test.
1146 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
1147 test.
1148 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
1149 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
1150 New test.
1151 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
1152 slow_clock with new namespace.
1153 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
1154 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
1155 test.
1156 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
1157 * testsuite/std/time/traits/is_clock.cc: New test.
1158 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
1159 namespace.
1160
1161 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
1162
1163 PR libstdc++/93245
1164 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
1165 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1166 Improve test coverage.
1167
1168 PR libstdc++/94242
1169 * include/bits/fs_path.h (path::_S_str_convert): Replace first
1170 parameter with basic_string_view so that strings with different
1171 allocators can be accepted.
1172 (path::generic_string<C,T,A>()): Use basic_string object that uses the
1173 right allocator type.
1174 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
1175 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
1176 test coverage.
1177
1178 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
1179
1180 PR libstdc++/94033
1181 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
1182 (__is_nt_default_constructible_impl): Remove.
1183 (__is_nothrow_default_constructible_impl): Remove.
1184 (__is_nt_constructible_impl): Add bool template parameter. Adjust
1185 partial specializations.
1186 (__is_nothrow_constructible_impl): Replace class template with alias
1187 template.
1188 (is_nothrow_default_constructible): Derive from alias template
1189 __is_nothrow_constructible_impl instead of
1190 __is_nothrow_default_constructible_impl.
1191 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
1192
1193 * include/std/stop_token (stop_token::_Stop_state_ref): Define
1194 comparison operators explicitly if the compiler won't synthesize them.
1195
1196 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
1197 __cpp_lib_concepts before using iter_reference_t.
1198 * include/bits/stream_iterator.h (istream_iterator): Check
1199 __cpp_lib_concepts before using default_sentinel_t.
1200 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
1201
1202 PR libstdc++/94203
1203 * include/experimental/executor (executor::executor(Executor)): Call
1204 make_shared directly instead of _M_create. Create _Tgt1 object.
1205 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
1206 Call allocate_shared directly instead of _M_create. Create _Tgt2
1207 object.
1208 (executor::target_type): Add cast needed for new _Tgt interface.
1209 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
1210 (executor::_Tgt): Define the same interface whether RTTI is enabled or
1211 not.
1212 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
1213 std::type_info in the interface.
1214 (executor::_Tgt::_M_func): Add data member.
1215 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
1216 (executor::_Tgt1::_S_func): Define function to access target without
1217 depending on RTTI.
1218 (executor::_M_create): Remove.
1219 (operator==, operator!=): Simplify comparisons for executor.
1220 * include/experimental/socket (is_error_code_enum<socket_errc>):
1221 Define specialization before use.
1222 * testsuite/experimental/net/executor/1.cc: New test.
1223
1224 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
1225
1226 PR libstdc++/94199
1227 * include/experimental/executor (service_already_exists): Add default
1228 constructor. Declare make_service to be a friend.
1229 * testsuite/experimental/net/execution_context/make_service.cc: New
1230 test.
1231
1232 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
1233
1234 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
1235 a null pointer to functions with nonnull(1) attribute.
1236
1237 2020-03-11 Patrick Palka <ppalka@redhat.com>
1238
1239 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
1240 'address' -> 'std::__addressof'.
1241 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
1242 a non-forward input_range.
1243 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
1244 default constructor protected instead of deleted, like with
1245 input_iterator_wrapper.
1246 (test_range::iterator): Add comment explaining that this type is used
1247 only when the underlying wrapper is input_iterator_wrapper or
1248 output_iterator_wrapper. Remove delegating defaulted constructor so
1249 that the inherited default constructor is used instead.
1250
1251 LWG 3286 ranges::size is not required to be valid after a call to
1252 ranges::begin on an input range
1253 * include/std/ranges (subrange::subrange): Split single-argument
1254 constructor into two, one constrained by _S_store_size and another by
1255 !_S_store_size.
1256 (take_view::begin): Call size() before calling ranges::begin(_M_base).
1257 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
1258 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
1259
1260 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
1261
1262 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
1263 instead of _M_current.
1264 (split_view::_OuterIter::operator++): Likewise.
1265
1266 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
1267 (transform_view::_Iterator::operator*): Add noexcept-specifier.
1268 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
1269 (split_view::_OuterIter::__current): Add noexcept.
1270 (split_view::_InnerIter::__iter_swap): Remove.
1271 (split_view::_InnerIter::__iter_move): Remove.
1272 (split_view::_InnerIter::_M_i_current): New accessors.
1273 (split_view::_InnerIter::__at_end): Use _M_i_current().
1274 (split_view::_InnerIter::operator*): Likewise.
1275 (split_view::_InnerIter::operator++): Likewise.
1276 (iter_move(const _InnerIter&)): Likewise.
1277 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
1278 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
1279 for iter_move and iter_swap on split_view's inner iterator.
1280
1281 PR c++/94117
1282 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
1283 Change expression in noexcept-specifier to match function body.
1284
1285 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
1286 comment explaining multiple dg-do directives.
1287 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
1288 so test is run as well as compiled.
1289
1290 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
1291
1292 PR libstdc++/94063
1293 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
1294 handle concatenations that change the type of the first component.
1295 (path::operator+=(basic_string_view<value_type>)): Likewise.
1296 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
1297
1298 2020-03-06 Patrick Palka <ppalka@redhat.com>
1299
1300 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
1301 join_view::_Sentinel<!_Const>.
1302 * testsuite/std/ranges/adaptors/join.cc: Augment test.
1303
1304 PR libstdc++/93978
1305 * include/bits/range_access.h (__cust_access::_Empty::operator()):
1306 Declare return type to be bool instead of auto.
1307 * testsuite/std/ranges/adaptors/93978.cc: New test.
1308
1309 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
1310
1311 PR libstdc++/94069
1312 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
1313 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
1314 second argument to __glibcxx_rwlock_init.
1315 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
1316
1317 PR libstdc++/93244
1318 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
1319 test to not fail due to PR 94063.
1320 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
1321 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
1322
1323 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
1324
1325 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
1326 would match ENOSYS.
1327
1328 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
1329
1330 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
1331 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
1332 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1333 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
1334 for return value, and in comparison.
1335 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1336
1337 PR libstdc++/94051
1338 * include/std/string_view: Include <bits/ostream_insert.h>.
1339 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
1340
1341 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
1342
1343 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
1344
1345 2020-03-04 Patrick Palka <ppalka@redhat.com>
1346
1347 PR libstdc++/94017
1348 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
1349 condition for when to use memset, making sure to additionally check that
1350 the output pointer's value type is a non-volatile byte type. Instead of
1351 requiring that the fill type is a byte type, just require that it's an
1352 integral type.
1353 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
1354 New test.
1355 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
1356 New test.
1357 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
1358 blocked by PR 94017.
1359 * testsuite/25_algorithms/fill/94017.cc: New test.
1360 * testsuite/25_algorithms/fill_n/94017.cc: New test.
1361
1362 LWG 3355 The memory algorithms should support move-only input iterators
1363 introduced by P1207
1364 * include/bits/ranges_uninitialized.h
1365 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
1366 to copy __ifirst, which could be a move-only input iterator. Use
1367 operator- instead of ranges::distance to compute distance from a sized
1368 sentinel.
1369 (__uninitialized_copy_n_fn::operator()): Likewise.
1370 (__uninitialized_move_fn::operator()): Likewise.
1371 (__uninitialized_move_n_fn::operator()): Likewise.
1372 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
1373 attempting to copy __first.
1374 (__uninitialized_destroy_n_fn::operator()): Likewise.
1375 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
1376 Augment test.
1377 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
1378 Likewise.
1379 * .../specialized_algorithms/uninitialized_move/constrained.cc:
1380 Likewise.
1381
1382 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
1383 protected instead of private.
1384 (test_sized_range_sized_sent): New.
1385
1386 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
1387 New testsuite iterator.
1388 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
1389 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
1390
1391 * include/bits/ranges_uninitialized.h
1392 (uninitialized_copy_fn::operator()): Pass a reference type as the first
1393 argument to is_nothrow_assignable_v.
1394 (uninitialized_copy_fn::operator()): Likewise.
1395 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
1396 with the input iterator stripped of its move_iterator.
1397 (uninitialized_move_n_fn::operator()): Likewise.
1398 (uninitialized_fill_fn::operator()): Pass a reference type as the first
1399 argument to is_nothrow_assignable_v.
1400 (uninitialized_fill_n_fn::operator()): Likewise.
1401
1402 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
1403
1404 PR libstdc++/94013
1405 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
1406 traits to control when to use memmove and memcmp optimizations.
1407 (__is_nonvolatile_trivially_copyable): New helper trait.
1408 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
1409 use memcmp optimization with volatile data.
1410 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
1411 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
1412 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
1413 (__copy_move_backward_a2): Likewise.
1414 (__equal_aux1): Use __memcmpable.
1415 (__lexicographical_compare_aux): Do not use memcmp optimization with
1416 volatile data.
1417 * testsuite/25_algorithms/copy/94013.cc: New test.
1418 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
1419 * testsuite/25_algorithms/equal/94013.cc: New test.
1420 * testsuite/25_algorithms/fill/94013.cc: New test.
1421 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
1422 * testsuite/25_algorithms/move/94013.cc: New test.
1423 * testsuite/25_algorithms/move_backward/94013.cc: New test.
1424
1425 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
1426 Avoid redundant iterator comparisons (LWG 3410).
1427
1428 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
1429
1430 PR libstdc++/93972
1431 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
1432 differ.
1433 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
1434
1435 * include/std/ranges (__detail::__maybe_empty_t): Rename to
1436 __maybe_present_t.
1437 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
1438
1439 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
1440 dependent type.
1441
1442 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
1443
1444 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1445
1446 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
1447
1448 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
1449 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1450 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1451 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1452 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1453
1454 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
1455 Add libatomic option.
1456 * testsuite/30_threads/jthread/jthread.cc: Likewise.
1457
1458 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
1459
1460 * include/bits/stl_algo.h
1461 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
1462 * include/bits/stl_algobase.h: ...here.
1463 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
1464
1465 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
1466
1467 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
1468 option.
1469 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
1470 Likewise.
1471 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
1472 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
1473 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
1474 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
1475 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
1476 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
1477 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
1478 Likewise.
1479
1480 PR libstdc++/92906
1481 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
1482
1483 2020-02-28 Patrick Palka <ppalka@redhat.com>
1484
1485 PR libstdc++/93972
1486 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
1487 Fix condition for when to use memcmp, making it consistent with the
1488 corresponding condition used in std::lexicographical_compare.
1489 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
1490
1491 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
1492 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
1493 existing signatures for C++2a.
1494
1495 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
1496
1497 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
1498 test instead of just compiling it.
1499
1500 2020-02-28 Patrick Palka <ppalka@redhat.com>
1501
1502 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
1503 whenever the underlying range models common_range.
1504
1505 * include/std/ranges (__detail::_CachedPosition): New struct.
1506 (views::filter_view::_S_needs_cached_begin): New member variable.
1507 (views::filter_view::_M_cached_begin): New member variable.
1508 (views::filter_view::begin): Use _M_cached_begin to cache its
1509 result.
1510 (views::drop_view::_S_needs_cached_begin): New static member variable.
1511 (views::drop_view::_M_cached_begin): New member variable.
1512 (views::drop_view::begin): Use _M_cached_begin to cache its result
1513 when _S_needs_cached_begin.
1514 (views::drop_while_view::_M_cached_begin): New member variable.
1515 (views::drop_while_view::begin): Use _M_cached_begin to cache its
1516 result.
1517 (views::reverse_view::_S_needs_cached_begin): New static member
1518 variable.
1519 (views::reverse_view::_M_cached_begin): New member variable.
1520 (views::reverse_view::begin): Use _M_cached_begin to cache its result
1521 when _S_needs_cached_begin.
1522 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
1523 drop_view::begin caches its result.
1524 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
1525 that drop_while_view::begin caches its result.
1526 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
1527 filter_view::begin caches its result.
1528 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
1529 reverse_view::begin caches its result.
1530
1531 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
1532
1533 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
1534 filesystems that silently truncate timestamps.
1535 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1536 Likewise.
1537
1538 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
1539 -Wstringop-overflow warnings.
1540
1541 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
1542
1543 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
1544 -fdiagnostics-urls=never to options.
1545
1546 2020-02-27 Patrick Palka <ppalka@redhat.com>
1547
1548 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
1549 _Iterator<!_Const>.
1550 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
1551 (take_view::_Sentinel<_Const>): Likewise.
1552 (take_while_view::_Sentinel<_Const>): Likewise.
1553 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
1554 * testsuite/std/ranges/adaptors/split.cc: Augment test.
1555 * testsuite/std/ranges/adaptors/take.cc: Augment test.
1556 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
1557 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
1558
1559 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
1560 base() of a vector<>::iterator is a pointer.
1561 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
1562 * testsuite/25_algorithms/move/constrained.cc: Likewise.
1563 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
1564 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
1565 instead of &foo[0].
1566 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
1567 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
1568 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
1569 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
1570 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
1571
1572 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
1573
1574 * include/debug/array (operator<=>): Define for C++20.
1575 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
1576 Adjust dg-error line numbers.
1577 * testsuite/23_containers/array/tuple_interface/
1578 tuple_element_debug_neg.cc: Likewise.
1579
1580 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
1581 defining _GLIBCXX_ASSERTIONS.
1582 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
1583 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
1584 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
1585 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
1586 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
1587 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
1588 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
1589 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
1590 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
1591 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
1592 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
1593 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
1594
1595 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
1596 C++98 where the member function of the base class returns void.
1597
1598 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
1599 equality comparisons that support value-initialized iterators.
1600
1601 * include/bits/boost_concept_check.h (__function_requires): Add
1602 _GLIBCXX14_CONSTEXPR.
1603 * testsuite/25_algorithms/min/concept_checks.cc: New test.
1604
1605 2020-02-26 Patrick Palka <ppalka@redhat.com>
1606
1607 PR libstdc++/93936
1608 * include/std/ranges (split_view::_InnerIter::operator==): Compare
1609 the operands' _M_i rather than their _M_i.current().
1610 * testsuite/std/ranges/adaptors/split.cc: Augment test.
1611
1612 P1645R1 constexpr for <numeric> algorithms
1613 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
1614 partial_sum, adjacent_difference): Make conditionally constexpr for
1615 C++20.
1616 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
1617 test macro.
1618 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
1619 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
1620 constexpr for C++20.
1621 * include/std/version (__cpp_lib_constexpr_numeric): Define.
1622 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
1623 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
1624 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
1625 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
1626 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
1627 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
1628 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
1629 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
1630 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
1631 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
1632 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
1633
1634 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
1635
1636 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
1637 variables in smaller scope and avoid calling ranges::distance when we
1638 know they are pointers. Remove statically-unreachable use of
1639 __builtin_unreachable().
1640 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
1641 Define inline.
1642
1643 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
1644 alias.
1645 (__detail::__maybe_const_t): Likewise.
1646 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
1647 (transform_view, take_view, take_while_view, elements_view): Use
1648 __maybe_const_t.
1649 (join_view, split_view): Use both.
1650
1651 2020-02-25 Patrick Palka <ppalka@redhat.com>
1652
1653 LWG 3397 basic_istream_view::iterator should not provide
1654 iterator_category
1655 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
1656 Rename to ...
1657 (basic_istream_view:_Iterator::iterator_concept): ... this.
1658 * testsuite/std/ranges/istream_view.cc: Augment test.
1659
1660 LWG 3325 Constrain return type of transformation function for
1661 transform_view
1662 * include/std/ranges (transform_view): Constrain the return type of the
1663 transformation function as per LWG 3325.
1664 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
1665
1666 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
1667 * include/std/ranges (join_view::_Iterator::operator--): Require that
1668 range_reference_t<_Base> models common_range.
1669 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
1670
1671 LWG 3301 transform_view::_Iterator has incorrect iterator_category
1672 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
1673 determination of iterator_category as per LWG 3301.
1674 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
1675
1676 LWG 3292 iota_view is under-constrained
1677 * include/std/ranges (iota_view): Require that _Winc models semiregular
1678 as per LWG 3292.
1679 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
1680
1681 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
1682
1683 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
1684 during constant evaluation. Call __builtin_memmove directly instead of
1685 __memmove.
1686 (__copy_or_move_backward): Likewise.
1687 * include/bits/stl_algobase.h (__memmove): Remove.
1688 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
1689 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
1690 Use __builtin_memmove directly instead of __memmove.
1691 (__copy_move_a2): Do not use memmove during constant evaluation.
1692 (__copy_move_backward_a2): Use _IsMove constant to select correct
1693 __copy_move_backward specialization.
1694 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
1695 begin turned into moves during constant evaluation.
1696
1697 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
1698 previous commit.
1699
1700 PR libstdc++/93872
1701 * include/bits/stl_algobase.h (__memmove): Cast away const before
1702 doing move assignment.
1703 * testsuite/25_algorithms/move/93872.cc: New test.
1704 * testsuite/25_algorithms/move_backward/93872.cc: New test.
1705
1706 2020-02-24 Patrick Palka <ppalka@redhat.com>
1707
1708 PR libstdc++/93884
1709 * include/bits/ranges_algobase.h (__copy_or_move,
1710 __copy_or_move_backward): Don't inspect the iter_value_t of the output
1711 iterator, instead inspect its iterator_traits directly.
1712 * include/bits/stl_iterator.h (back_insert_iterator::container):
1713 Conditionally initialize.
1714 (back_insert_iterator::difference_type): Conditionally define.
1715 (back_insert_iterator::back_insert_iterator): Conditionally define this
1716 default constructor.
1717 (front_insert_iterator::container): Conditionally initialize.
1718 (front_insert_iterator::difference_type): Conditionally define.
1719 (front_insert_iterator::front_insert_iterator): Conditionally define
1720 this default constructor.
1721 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
1722 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
1723
1724 P0769R2 Add shift to <algorithm>
1725 * include/bits/ranges_algo.h (shift_left, shift_right): New.
1726 * testsuite/25_algorithms/shift_left/1.cc: New test.
1727 * testsuite/25_algorithms/shift_right/1.cc: New test.
1728
1729 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
1730
1731 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
1732 Make noexcept-specifier conditional.
1733 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
1734 noexcept-specifier.
1735
1736 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
1737 Add constructor.
1738 (operator==(istream_iterator, default_sentinel_t)): Add operator.
1739 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
1740 * include/bits/streambuf_iterator.h
1741 (istreambuf_iterator(default_sentinel_t)): Add constructor.
1742 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
1743 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
1744 New test.
1745 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
1746 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
1747 New test.
1748 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
1749
1750 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
1751 (ranges::enable_view): Simplify (LWG 3326).
1752 * include/bits/range_access.h (ranges::enable_view): Declare.
1753 * include/bits/regex.h (__enable_view_impl): Remove partial
1754 specialization.
1755 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
1756 * include/bits/stl_set.h (__enable_view_impl): Likewise.
1757 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
1758 * include/debug/multiset.h (__enable_view_impl): Likewise.
1759 * include/debug/set.h (__enable_view_impl): Likewise.
1760 * include/debug/unordered_set (__enable_view_impl): Likewise.
1761 * include/experimental/string_view (ranges::enable_view): Define
1762 partial specialization.
1763 * include/std/span (ranges::enable_view): Likewise.
1764 * include/std/string_view (ranges::enable_view): Likewise.
1765 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
1766
1767 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
1768
1769 * include/std/optional (operator<=>(optional<T>, optional<U>))
1770 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
1771 Define for C++20.
1772 * include/std/tuple (__tuple_cmp): New helper function for <=>.
1773 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
1774 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
1775 (operator<=>(monostate, monostate)): Define for C++20.
1776 * testsuite/20_util/optional/relops/three_way.cc: New test.
1777 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
1778 * testsuite/20_util/variant/89851.cc: Move to ...
1779 * testsuite/20_util/variant/relops/89851.cc: ... here.
1780 * testsuite/20_util/variant/90008.cc: Move to ...
1781 * testsuite/20_util/variant/relops/90008.cc: ... here.
1782 * testsuite/20_util/variant/relops/three_way.cc: New test.
1783
1784 2020-02-20 Patrick Palka <ppalka@redhat.com>
1785
1786 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
1787 function.
1788 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
1789 __maybe_refwrap to capture lvalue references by reference, and then use
1790 unwrap_reference_t to forward the by-reference captures as references.
1791 * testsuite/std/ranges/adaptors/split.cc: Augment test.
1792 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
1793
1794 * include/std/ranges (iota_view): Forward declare _Sentinel.
1795 (iota_view::_Iterator): Befriend _Sentinel.
1796 (iota_view::_Sentinel::_M_equal): New member function.
1797 (iota_view::_Sentinel::operator==): Use it.
1798 (views::_Iota::operator()): Forward __f using the correct type.
1799 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
1800 with integers of different signedness, to appease iota_view's deduction
1801 guide.
1802 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
1803
1804 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
1805
1806 * include/bits/range_access.h (ranges::begin): Reject array of
1807 incomplete type.
1808 (ranges::end, ranges::size): Require arrays to be bounded.
1809 (ranges::data): Require lvalue or borrowed_range.
1810 (ranges::iterator_t): Remove constraint.
1811 * testsuite/std/ranges/access/begin.cc: Do not check array of
1812 incomplete type.
1813 * testsuite/std/ranges/access/begin_neg.cc: New test.
1814 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
1815 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
1816 * testsuite/std/ranges/access/ssize.cc: Do not check array of
1817 incomplete type.
1818
1819 * include/std/system_error (error_category::operator<=>)
1820 (operator<=>(const error_code&, const error_code&))
1821 (operator<=>(const error_condition&, const error_condition&)): Define
1822 for C++20.
1823 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
1824 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
1825 test.
1826 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
1827 incorrect comment.
1828 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
1829 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
1830 incorrect comment.
1831 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
1832 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
1833 incorrect comment.
1834 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
1835 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
1836 Remove incorrect comment.
1837 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
1838 test.
1839
1840 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
1841
1842 * include/std/thread (thread::id::operator<=>): Define for C++20.
1843 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
1844 functions in namespace std.
1845 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
1846
1847 2020-02-19 Patrick Palka <ppalka@redhat.com>
1848
1849 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
1850 null terminator of the underlying string as part of the test_range.
1851 (main): Call test03.
1852
1853 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
1854
1855 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
1856 requirement (LWG 3385).
1857 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
1858 expected declaration.
1859
1860 * include/std/ranges (take_while_view, drop_view, drop_while_view)
1861 (elements_view:_Iterator): Initialize data members (LWG 3364).
1862
1863 * libsupc++/compare (three_way_comparable): Remove always-false check
1864 that should have been removed with weak_equality (P1959R0).
1865 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
1866
1867 * include/std/concepts (__detail::__partially_ordered_with): Move here
1868 from <compare>.
1869 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
1870 to simplify definition (LWG 3331).
1871 * libsupc++/compare (__detail::__partially_ordered_with): Move to
1872 <concepts>.
1873
1874 * include/std/concepts (totally_ordered_with): Remove redundant
1875 requirement (LWG 3329).
1876
1877 * include/std/ranges (__detail::__convertible_to_non_slicing): New
1878 helper concept.
1879 (__detail::__pair_like_convertible_to): Remove.
1880 (__detail::__pair_like_convertible_from): Add requirements for
1881 non-slicing conversions.
1882 (subrange): Constrain constructors with __convertible_to_non_slicing.
1883 Remove constructors from pair-like types. Add new deduction guide.
1884 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
1885
1886 * include/bits/iterator_concepts.h (iter_move): Add declaration to
1887 prevent unqualified lookup finding a suitable declaration (LWG 3247).
1888
1889 * include/std/memory_resource (polymorphic_allocator::allocate)
1890 (polymorphic_allocator::allocate_object): Change type of exception to
1891 bad_array_new_length (LWG 3237).
1892 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
1893
1894 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
1895 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
1896 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
1897 * testsuite/20_util/unwrap_reference/3.cc: New test.
1898
1899 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
1900 type during overload resolution, use static assert instead (LWG 3200).
1901 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
1902 incomplete type.
1903 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
1904
1905 * include/std/span (span(T (&)[N])): Use non-deduced context to
1906 prevent first parameter from interfering with class template argument
1907 deduction (LWG 3369).
1908 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
1909 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
1910 rvalues.
1911
1912 * include/std/span (span::const_iterator, span::const_reverse_iterator)
1913 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
1914 Remove (LWG 3320).
1915 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
1916 and cend.
1917 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
1918 Likewise.
1919 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
1920 constrained.cc: Likewise.
1921 * testsuite/20_util/specialized_algorithms/
1922 uninitialized_default_construct/constrained.cc: Likewise.
1923 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
1924 constrained.cc: Likewise.
1925 * testsuite/20_util/specialized_algorithms/uninitialized_move/
1926 constrained.cc: Likewise.
1927 * testsuite/20_util/specialized_algorithms/
1928 uninitialized_value_construct/constrained.cc: Likewise.
1929
1930 * include/bits/range_access.h (range_size_t): Define alias template.
1931 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
1932 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
1933
1934 * include/std/ranges (filter_view, transform_view, take_view)
1935 (join_view, split_view, reverse_view): Remove commented-out converting
1936 constructors (LWG 3280).
1937
1938 * include/std/memory (uninitialized_construct_using_allocator): Use
1939 std::construct_at (LWG 3321).
1940
1941 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
1942 (polymorphic_allocator::allocate_object)
1943 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
1944
1945 LWG 3379. "safe" in several library names is misleading
1946 * include/bits/range_access.h (enable_safe_range): Rename to
1947 enable_borrowed_range.
1948 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
1949 (safe_range): Rename to borrowed_range.
1950 * include/bits/ranges_algo.h: Adjust to use new names.
1951 * include/bits/ranges_algobase.h: Likewise.
1952 * include/bits/ranges_uninitialized.h: Likewise.
1953 * include/std/ranges: Likewise.
1954 (safe_iterator_t): Rename to borrowed_iterator_t.
1955 (safe_subrange_t): Rename to borrowed_subrange_t.
1956 * include/std/span: Adjust to use new names.
1957 * include/std/string_view: Likewise.
1958 * include/experimental/string_view: Likewise.
1959 * testsuite/std/ranges/access/begin.cc: Likewise.
1960 * testsuite/std/ranges/access/cbegin.cc: Likewise.
1961 * testsuite/std/ranges/access/cdata.cc: Likewise.
1962 * testsuite/std/ranges/access/cend.cc: Likewise.
1963 * testsuite/std/ranges/access/crbegin.cc: Likewise.
1964 * testsuite/std/ranges/access/crend.cc: Likewise.
1965 * testsuite/std/ranges/access/data.cc: Likewise.
1966 * testsuite/std/ranges/access/end.cc: Likewise.
1967 * testsuite/std/ranges/access/rbegin.cc: Likewise.
1968 * testsuite/std/ranges/access/rend.cc: Likewise.
1969 * testsuite/std/ranges/safe_range.cc: Likewise.
1970 * testsuite/std/ranges/safe_range_types.cc: Likewise.
1971 * testsuite/util/testsuite_iterators.h: Likewise.
1972
1973 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
1974 (tuple_element<1, const subrange<I, S, K>>): Add partial
1975 specializations (LWG 3398).
1976 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
1977
1978 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
1979 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
1980 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
1981
1982 2020-02-18 Patrick Palka <ppalka@redhat.com>
1983
1984 P1983R0 Wording for GB301, US296, US292, US291, and US283
1985 * include/std/ranges (filter_view::pred): New member function.
1986 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
1987 P1983R0 fixes the highlighted issue in the same way.
1988 (join_view::_Iterator<_Const>): Add friend
1989 join_view::_Iterator<!_Const>.
1990 (join_view::_M_inner): Remove mutable specifier, effectively reverting
1991 the proposed wording changes of P3278.
1992 (join_view::begin): Refine the condition for when to return a const
1993 iterator.
1994 (split_view::_OuterIter::_OuterIter): Adjust constraints.
1995 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
1996 exists and works.
1997
1998 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
1999
2000 PR libstdc++/93818
2001 * include/std/ranges (_RangeAdaptor): Add deduction guide.
2002 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
2003 iterator_t<_Vp>.
2004 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
2005 (transform_view::_Iterator): Add alias _Base_iter and use in place of
2006 iterator_t<_Base>.
2007 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
2008 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
2009 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
2010 (split_view::_InnerIter::_S_iter_cat()): Likewise.
2011
2012 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
2013 assumption that long is wider than int.
2014 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
2015 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
2016 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
2017 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
2018
2019 P1976R2 Fixed-size span construction from dynamic range
2020 * include/std/span (__cpp_lib_span): Update value.
2021 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
2022 assertion.
2023 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
2024 constraints.
2025 (span::first<Count>(), span::last<Count>()): Use explicit type in
2026 return statement.
2027 (as_bytes, as_writable_bytes): Likewise.
2028 * include/std/version (__cpp_lib_span): Update value.
2029 * testsuite/23_containers/span/1.cc: Check new value.
2030 * testsuite/23_containers/span/2.cc: Check new value.
2031 * testsuite/23_containers/span/explicit.cc: New test.
2032
2033 * include/std/span (span::__is_compatible_array): Simplify alias
2034 template by using requires-clause.
2035 (span::__is_compatible_ref): New alias template for constraining
2036 constructors.
2037 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
2038 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
2039 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
2040 redundant parentheses.
2041 (span(R&&)): Add missing constraints.
2042
2043 * include/std/span (span): Reorder members and rename template
2044 parameters to match declarations in the C++2a working paper.
2045
2046 P2116R0 Remove tuple-like protocol support from fixed-extent span
2047 * include/std/span (get, tuple_size, tuple_element): Remove.
2048 * testsuite/23_containers/span/everything.cc: Remove checks for
2049 tuple-like API.
2050 * testsuite/23_containers/span/get_neg.cc: Remove.
2051 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
2052 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
2053 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
2054
2055 2020-02-17 Patrick Palka <ppalka@redhat.com>
2056
2057 P2106R0 Alternative wording for GB315 and GB316
2058 * include/bits/ranges_algo.h (in_fun_result): New.
2059 (for_each_result, for_each_n_result): Change into an alias of
2060 in_fun_result.
2061 (in_in_result): New.
2062 (mismatch_result): Change into an alias of in_in_result.
2063 (copy_if_result): Change into an alias of in_out_result.
2064 (swap_ranges_result): Change into an alias of in_in_result.
2065 (unary_transform_result): Change into an alias of in_out_result.
2066 (in_in_out_result): New.
2067 (binary_transform_result): Change into an alias of in_in_out_result.
2068 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
2069 remove_copy_result, unique_copy_result, reverse_copy_result,
2070 rotate_copy_result, partial_sort_copy_result): Change into an alias of
2071 in_out_result.
2072 (in_out_out_result): New.
2073 (partition_copy_result, merge_result): Change into an alias of
2074 in_out_out_result.
2075 (set_union_result, set_intersection_result): Change into an alias of
2076 in_in_out_result.
2077 (set_difference_result): Change into an alias of in_out_result.
2078 (set_symmetric_difference): Change into an alias of in_in_out_result.
2079 (min_max_result): New.
2080 (minmax_result, minmax_element_result): Change into an alias of
2081 min_max_result.
2082 (in_found_result): New.
2083 (next_permutation_result, prev_permutation_result): Change into an alias
2084 of in_found_result.
2085 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
2086 Adjust following changes to next_permutation_result and
2087 prev_permutation_result.
2088 * include/bits/ranges_algobase.h (in_out_result): New.
2089 (copy_result, move_result, move_backward_result, copy_backward_result,
2090 copy_n_result): Change into an alias of in_out_result.
2091 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
2092 uninitialized_copy_n_result, uninitialized_move_result,
2093 uninitialized_move_n_result): Likewise.
2094 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
2095 structured bindings.
2096 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
2097
2098 P1243R4 Rangify new algorithms
2099 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
2100 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
2101 * testsuite/25_algorithms/clamp/constrained.cc: New test.
2102 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
2103 * testsuite/25_algorithms/sample/constrained.cc: New test.
2104
2105 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
2106
2107 P1964R2 Wording for boolean-testable
2108 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
2109 (__adjacent_find_fn): Cast result of predicate to bool.
2110 * include/std/concepts (__boolean): Remove.
2111 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
2112 new helper concepts.
2113 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
2114 (predicate): Use __boolean_testable instead of boolean.
2115 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
2116 Likewise.
2117
2118 P1970R2 Consistency for size() functions: Add ranges::ssize
2119 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
2120 * testsuite/std/ranges/access/ssize.cc: New test.
2121
2122 P1956R1 On the names of low-level bit manipulation functions
2123 * include/bits/hashtable_policy.h: Update comment.
2124 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
2125 (ispow2, ceil2, floor2, log2p1): Likewise.
2126 (__cpp_lib_int_pow2): Add feature test macro.
2127 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
2128 * include/std/memory (assume_aligned): Adjust use of ispow2.
2129 * include/std/version (__cpp_lib_int_pow2): Add.
2130 * libsupc++/new_opa.cc: Adjust use of __ispow2.
2131 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
2132 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
2133 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
2134 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
2135 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
2136 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
2137 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
2138 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
2139 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
2140 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
2141 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
2142 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
2143
2144 * include/std/charconv: Add comment.
2145
2146 PR libstdc++/92546 (partial)
2147 * include/bits/random.h (uniform_random_bit_generator): Move definition
2148 to <bits/uniform_int_dist.h>.
2149 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
2150 of <bits/random.h>.
2151 * include/bits/ranges_algobase.h: Do not include <cmath>.
2152 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
2153 Move here.
2154 * include/std/ranges: Do not include <limits>.
2155 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
2156
2157 PR libstdc++/92546 (partial)
2158 * include/Makefile.am: Add new header.
2159 * include/Makefile.in: Regenerate.
2160 * include/bits/int_limits.h: New header.
2161 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
2162 numeric_limits with __detail::__int_limits.
2163 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
2164 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
2165 Likewise.
2166 * include/std/charconv (__to_chars_8, __from_chars_binary)
2167 (__from_chars_alpha_to_num, from_chars): Likewise.
2168 * include/std/memory_resource (polymorphic_allocator::allocate)
2169 (polymorphic_allocator::allocate_object): Likewise.
2170 * include/std/string_view (basic_string_view::_S_compare): Likewise.
2171 * include/std/utility (in_range): Likewise.
2172 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
2173 extra error about incomplete type __int_limits<bool>.
2174 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
2175 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
2176 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
2177 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
2178 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
2179 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
2180 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
2181 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
2182 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
2183 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
2184 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
2185 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
2186
2187 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
2188 value for partial_ordering::unordered.
2189
2190 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
2191 const-qualified expression variations.
2192 * include/std/concepts (copyable): Likewise.
2193
2194 * include/std/type_traits (__is_standard_integer): New helper trait.
2195 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
2196 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
2197 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
2198 * testsuite/20_util/integer_comparisons/1.cc: New test.
2199 * testsuite/20_util/integer_comparisons/2.cc: New test.
2200 * testsuite/20_util/integer_comparisons/equal.cc: New test.
2201 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
2202 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
2203 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
2204 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
2205 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
2206 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
2207 * testsuite/20_util/integer_comparisons/less.cc: New test.
2208 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
2209 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
2210 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
2211 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
2212 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
2213
2214 2020-02-16 Patrick Palka <ppalka@redhat.com>
2215
2216 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
2217 Move code after an early exit constexpr if to under an else branch.
2218 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
2219
2220 2020-02-15 Patrick Palka <ppalka@redhat.com>
2221
2222 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
2223 * include/bits/ranges_algobase.h: Likewise.
2224 * include/bits/ranges_uninitialized.h: Likewise.
2225
2226 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
2227 binary_search, copy_if, count, count_if, equal_range, find, find_end,
2228 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
2229 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
2230 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
2231 lower_bound, make_heap, max, max_element, merge, min, min_element,
2232 minmax, minmax_element, mismatch, next_permutation, none_of,
2233 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
2234 partition_point, pop_heap, prev_permutation, push_heap, remove,
2235 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
2236 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
2237 search, search_n, set_difference, set_intersection,
2238 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
2239 stable_partition, stable_sort, swap_ranges, transform, unique,
2240 unique_copy, upper_bound): Convert into function objects.
2241 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
2242 fill, move_backward, copy_backward): Likewise.
2243 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
2244 uninitialized_default_construct_n, uninitialized_value_construct,
2245 uninitialized_value_construct_n, uninitialized_copy,
2246 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
2247 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
2248 destroy, destroy_n): Likewise.
2249
2250 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
2251 (ranges::find_end): ... here.
2252 (ranges::__lexicographical_compare): Fold into ...
2253 (ranges::lexicographical_compare): ... here.
2254 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
2255 (ranges::equal): ... here.
2256
2257 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
2258
2259 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
2260 * include/std/deque: Likewise.
2261 * include/std/forward_list: Likewise.
2262 * include/std/list: Likewise.
2263 * include/std/string: Likewise.
2264 * include/std/vector: Likewise.
2265 * include/std/version: Likewise.
2266 * testsuite/23_containers/deque/erasure.cc: Test for new value.
2267 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2268 * testsuite/23_containers/list/erasure.cc: Likewise.
2269 * testsuite/23_containers/map/erasure.cc: Likewise.
2270 * testsuite/23_containers/set/erasure.cc: Likewise.
2271 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2272 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2273 * testsuite/23_containers/vector/erasure.cc: Likewise.
2274
2275 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
2276
2277 * include/bits/random.h (uniform_random_bit_generator): Require min()
2278 and max() to be constant expressions and min() to be less than max().
2279 * testsuite/26_numerics/random/concept.cc: Check additional cases.
2280 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
2281
2282 2020-02-13 Patrick Palka <ppalka@redhat.com>
2283
2284 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
2285 * include/Makefile.in: Regenerate.
2286 * include/bits/ranges_uninitialized.h: New header.
2287 * include/std/memory: Include it.
2288 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
2289 test.
2290 * .../uninitialized_copy/constrained.cc: New test.
2291 * .../uninitialized_default_construct/constrained.cc: New test.
2292 * .../uninitialized_fill/constrained.cc: New test.
2293 * .../uninitialized_move/constrained.cc: New test.
2294 * .../uninitialized_value_construct/constrained.cc: New test.
2295
2296 * include/Makefile.am: Add bits/ranges_algobase.h
2297 * include/Makefile.in: Regenerate.
2298 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
2299 existing #includes.
2300 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
2301 __detail::__is_move_iterator, copy_result, move_result,
2302 __equal, equal, copy_result, move_result, move_backward_result,
2303 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
2304 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
2305 fill): Split out into ...
2306 * bits/range_algobase.h: ... this new header.
2307
2308 2020-02-12 Patrick Palka <ppalka@redhat.com>
2309
2310 LWG 3389 and LWG 3390
2311 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
2312 constructing the move_iterator with __i.
2313 (counted_iterator::counted_iterator): Use std::move when initializing
2314 M_current with __i.
2315 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
2316 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
2317
2318 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
2319
2320 PR libstdc++/79193
2321 PR libstdc++/88999
2322
2323 * configure: Regenerated.
2324
2325 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
2326
2327 * include/bits/hashtable.h
2328 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
2329 missing std namespace qualification to forward call.
2330
2331 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
2332
2333 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
2334 comment.
2335 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
2336
2337 * include/std/ranges: Fix non-ASCII characters in comment.
2338
2339 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
2340 equality comparison to be valid and return bool.
2341 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
2342 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
2343 type with ambiguous conversion to fundamental types.
2344 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
2345
2346 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
2347
2348 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
2349 Use remove_cvref_t.
2350 (readable_traits): Rename to indirectly_readable_traits.
2351 (readable): Rename to indirectly_readable.
2352 (writable): Rename to indirectly_writable.
2353 (__detail::__iter_exchange_move): Do not use remove_reference_t.
2354 (indirectly_swappable): Adjust requires expression parameter types.
2355 expression.
2356 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
2357 (ranges::replace_if, ranges::generate_n, ranges::generate)
2358 (ranges::remove): Use new name for writable.
2359 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
2360 Use new name for readable.
2361 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
2362 new name for readable_traits.
2363 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
2364 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
2365 new definition of indirectly_readable.
2366
2367 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
2368 to take parameters of common_iterator, instead of the common_iterator
2369 type itself. Fix argument for __common_iter_has_arrow constraint.
2370 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
2371
2372 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
2373
2374 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
2375 warning.
2376 (basic_istream_view::_Iterator::operator++()): Add missing return.
2377
2378 2020-02-07 Patrick Palka <ppalka@redhat.com>
2379
2380 * include/bits/ranges_algo.h: Remove extraneous &&.
2381
2382 * include/std/ranges (ranges::__detail::__stream_extractable,
2383 ranges::basic_istream_view, ranges::istream_view): Define.
2384 * testsuite/std/ranges/istream_view: New test.
2385
2386 Implement C++20 range adaptors
2387 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
2388 (subrange::_S_store_size): Mark as const instead of constexpr to
2389 avoid what seems to be a bug in GCC.
2390 (__detail::__box): Give it defaulted copy and move constructors.
2391 (ranges::views::_Single::operator()): Mark constexpr.
2392 (ranges::views::_Iota::operator()): Mark constexpr.
2393 (__detail::Empty): Define.
2394 (ranges::views::__closure::_RangeAdaptor,
2395 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
2396 ranges::views::all, ranges::__detail::find_if,
2397 ranges::__detail::find_if_not, ranges::__detail::mismatch,
2398 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
2399 ranges::views::transform, take_view, ranges::views::take,
2400 take_while_view, ranges::views::take_while, drop_view,
2401 ranges::views::drop, join_view, ranges::views::join,
2402 __detail::require_constant, __detail::tiny_range, split_view,
2403 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
2404 common_view, ranges::views::common, reverse_view,
2405 ranges::views::reverse,
2406 ranges::views::__detail::__is_reversible_subrange,
2407 ranges::views::__detail::__is_reverse_view, reverse_view,
2408 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
2409 ranges::views::elements, ranges::views::keys, ranges::views::values):
2410 Define.
2411 (views): Alias for ranges::views.
2412 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
2413 tuple_element<1, ranges::subrange>): New partial specializations.
2414 * testsuite/std/ranges/adaptors/all.cc: New test.
2415 * testsuite/std/ranges/adaptors/common.cc: Likewise.
2416 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
2417 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
2418 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
2419 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
2420 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
2421 * testsuite/std/ranges/adaptors/join.cc: Likewise.
2422 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
2423 * testsuite/std/ranges/adaptors/split.cc: Likewise.
2424 * testsuite/std/ranges/adaptors/take.cc: Likewise.
2425 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
2426 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
2427
2428 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
2429
2430 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
2431 type of enumerations and comparison category types.
2432 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
2433 (__cmp_cat::_Ncmp::unordered): Change value to 2.
2434 (partial_ordering::_M_value, weak_ordering::_M_value)
2435 (strong_ordering::_M_value): Change type to __cmp_cat::type.
2436 (partial_ordering::_M_is_ordered): Remove data member.
2437 (partial_ordering): Use second bit of _M_value for unordered. Adjust
2438 comparison operators.
2439 (weak_ordering::operator partial_ordering): Simplify to remove
2440 branches.
2441 (operator<=>(unspecified, weak_ordering)): Likewise.
2442 (strong_ordering::operator partial_ordering): Likewise.
2443 (strong_ordering::operator weak_ordering): Likewise.
2444 (operator<=>(unspecified, strong_ordering)): Likewise.
2445 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
2446 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
2447 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
2448
2449 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
2450 __cpp_lib_three_way_comparison macro and use deduced return type for
2451 operator<=>.
2452 * testsuite/std/ranges/iota/iterator.cc: New test.
2453
2454 2020-02-07 Patrick Palka <ppalka@redhat.com>
2455 Jonathan Wakely <jwakely@redhat.com>
2456
2457 Implement C++20 constrained algorithms
2458 * include/Makefile.am: Add new header.
2459 * include/Makefile.in: Regenerate.
2460 * include/std/algorithm: Include <bits/ranges_algo.h>.
2461 * include/bits/ranges_algo.h: New file.
2462 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
2463 * testsuite/25_algorithms/all_of/constrained.cc: New test.
2464 * testsuite/25_algorithms/any_of/constrained.cc: New test.
2465 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
2466 * testsuite/25_algorithms/copy/constrained.cc: New test.
2467 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
2468 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
2469 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
2470 * testsuite/25_algorithms/count/constrained.cc: New test.
2471 * testsuite/25_algorithms/count_if/constrained.cc: New test.
2472 * testsuite/25_algorithms/equal/constrained.cc: New test.
2473 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
2474 * testsuite/25_algorithms/fill/constrained.cc: New test.
2475 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
2476 * testsuite/25_algorithms/find/constrained.cc: New test.
2477 * testsuite/25_algorithms/find_end/constrained.cc: New test.
2478 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
2479 * testsuite/25_algorithms/find_if/constrained.cc: New test.
2480 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
2481 * testsuite/25_algorithms/for_each/constrained.cc: New test.
2482 * testsuite/25_algorithms/generate/constrained.cc: New test.
2483 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
2484 * testsuite/25_algorithms/heap/constrained.cc: New test.
2485 * testsuite/25_algorithms/includes/constrained.cc: New test.
2486 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
2487 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
2488 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
2489 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
2490 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
2491 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
2492 test.
2493 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
2494 * testsuite/25_algorithms/max/constrained.cc: New test.
2495 * testsuite/25_algorithms/max_element/constrained.cc: New test.
2496 * testsuite/25_algorithms/merge/constrained.cc: New test.
2497 * testsuite/25_algorithms/min/constrained.cc: New test.
2498 * testsuite/25_algorithms/min_element/constrained.cc: New test.
2499 * testsuite/25_algorithms/minmax/constrained.cc: New test.
2500 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
2501 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
2502 * testsuite/25_algorithms/move/constrained.cc: New test.
2503 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
2504 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
2505 * testsuite/25_algorithms/none_of/constrained.cc: New test.
2506 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
2507 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
2508 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
2509 * testsuite/25_algorithms/partition/constrained.cc: New test.
2510 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
2511 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
2512 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
2513 * testsuite/25_algorithms/remove/constrained.cc: New test.
2514 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
2515 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
2516 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
2517 * testsuite/25_algorithms/replace/constrained.cc: New test.
2518 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
2519 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
2520 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
2521 * testsuite/25_algorithms/reverse/constrained.cc: New test.
2522 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
2523 * testsuite/25_algorithms/rotate/constrained.cc: New test.
2524 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
2525 * testsuite/25_algorithms/search/constrained.cc: New test.
2526 * testsuite/25_algorithms/search_n/constrained.cc: New test.
2527 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
2528 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
2529 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
2530 test.
2531 * testsuite/25_algorithms/set_union/constrained.cc: New test.
2532 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
2533 * testsuite/25_algorithms/sort/constrained.cc: New test.
2534 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
2535 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
2536 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
2537 * testsuite/25_algorithms/transform/constrained.cc: New test.
2538 * testsuite/25_algorithms/unique/constrained.cc: New test.
2539 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
2540 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
2541
2542 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
2543
2544 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
2545 number in comment. Fix indentation.
2546
2547 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
2548 redundant _GLIBCXX20_CONSTEXPR.
2549
2550 * include/std/ranges (viewable_range): Replace decay_t with
2551 remove_cvref_t (LWG 3375).
2552
2553 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
2554
2555 * include/bits/iterator_concepts.h (iter_reference_t)
2556 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
2557 Remove workarounds for PR c++/67704.
2558 * testsuite/24_iterators/aliases.cc: New test.
2559
2560 2020-02-05 Patrick Palka <ppalka@redhat.com>
2561
2562 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
2563 when initializing _M_current.
2564 (move_iterator::base): Split into two overloads differing in
2565 ref-qualifiers as in P1207R4 for C++20.
2566
2567 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
2568
2569 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
2570 use.
2571
2572 PR libstdc++/93562
2573 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
2574 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
2575 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
2576
2577 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
2578
2579 * configure: Regenerate.
2580
2581 2020-01-31 Patrick Palka <ppalka@redhat.com>
2582
2583 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
2584 test_range::end() returns the same type as test_range::begin().
2585 * testsuite/24_iterators/range_operations/next.cc: Likewise.
2586 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
2587 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
2588 Always return a sentinel<I>.
2589
2590 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
2591
2592 PR libstdc++/92895
2593 * include/std/stop_token (stop_token::stop_possible()): Call new
2594 _M_stop_possible() function.
2595 (stop_token::stop_requested()): Do not use stop_possible().
2596 (stop_token::binary_semaphore): New class, as temporary stand-in for
2597 std::binary_semaphore.
2598 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
2599 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
2600 New data members for symchronization with stop_callback destruction.
2601 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
2602 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
2603 Remove.
2604 (stop_token::_Stop_cb::_M_run): New member function.
2605 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
2606 Remove.
2607 (stop_token::_Stop_state::_M_owners): New data member to track
2608 reference count for ownership.
2609 (stop_token::_Stop_state::_M_value): New data member combining a
2610 spinlock, the stop requested flag, and the reference count for
2611 associated stop_source objects.
2612 (stop_token::_Stop_state::_M_requester): New data member for
2613 synchronization with stop_callback destruction.
2614 (stop_token::_Stop_state::_M_stop_possible()): New member function.
2615 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
2616 of _M_value.
2617 (stop_token::_Stop_state::_M_add_owner)
2618 (stop_token::_Stop_state::_M_release_ownership)
2619 (stop_token::_Stop_state::_M_add_ssrc)
2620 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
2621 updating reference counts.
2622 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
2623 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
2624 (stop_token::_Stop_state::_M_try_lock)
2625 (stop_token::_Stop_state::_M_try_lock_and_stop)
2626 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
2627 managing spinlock.
2628 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
2629 read and update state. Release lock while running callbacks. Use new
2630 data members to synchronize with callback destruction.
2631 (stop_token::_Stop_state::_M_remove_callback): Likewise.
2632 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
2633 to read and update state.
2634 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
2635 replacing shared_ptr.
2636 (stop_source::stop_source(const stop_source&)): Update reference count.
2637 (stop_source::operator=(const stop_source&)): Likewise.
2638 (stop_source::~stop_source()): Likewise.
2639 (stop_source::stop_source(stop_source&&)): Define as defaulted.
2640 (stop_source::operator=(stop_source&&)): Establish postcondition on
2641 parameter.
2642 (stop_callback): Enforce preconditions on template parameter. Replace
2643 base class with data member of new _Cb_impl type.
2644 (stop_callback::stop_callback(const stop_token&, Cb&&))
2645 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
2646 (stop_callback::_Cb_impl): New type wrapping _Callback member and
2647 defining the _S_execute member function.
2648 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
2649 test.
2650 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
2651 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
2652 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
2653 New test.
2654 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
2655 test.
2656 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
2657 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
2658 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
2659 test.
2660
2661 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
2662 three_way_comparable_with.
2663 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
2664 (compare_three_way::operator()): Remove redundant constraint from
2665 requires-clause.
2666 (__detail::_Synth3way::operator()): Use three_way_comparable_with
2667 instead of workaround.
2668 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
2669 output due to simplified constraints on compare_three_way::operator().
2670
2671 PR libstdc++/93479
2672 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
2673 * testsuite/18_support/comparisons/object/93479.cc: New test.
2674
2675 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
2676 returns the same type as test_range::begin(). Add comments.
2677 * testsuite/std/ranges/access/rbegin.cc: Likewise.
2678 * testsuite/std/ranges/access/rend.cc: Likewise.
2679 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
2680 test_range is the same as its iterator type.
2681 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
2682 operator- overloads to satisfy sized_sentinel_for when the iterator
2683 satisfies random_access_iterator.
2684
2685 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
2686
2687 PR libstdc++/93470
2688 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
2689 static assertion to object types.
2690
2691 PR libstdc++/93325
2692 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
2693 clock_gettime instead of explicit glibc version check.
2694 * configure: Regenerate.
2695
2696 2020-01-28 Martin Liska <mliska@suse.cz>
2697
2698 PR libstdc++/93478
2699 * include/std/atomic: Fix typo.
2700 * include/std/optional: Likewise.
2701
2702 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
2703
2704 * configure: Regenerate.
2705
2706 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
2707
2708 PR libstdc++/93426
2709 * include/std/span (span): Fix deduction guide.
2710 * testsuite/23_containers/span/deduction.cc: New test.
2711
2712 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
2713
2714 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
2715 (__cmp_cat::_Ord::equivalent): Add enumerator.
2716 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
2717 and greater.
2718 (partial_ordering, weak_ordering, strong_ordering): Remove
2719 constructors taking __cmp_cat::_Eq parameters. Use renamed
2720 enumerators.
2721
2722 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
2723
2724 * acinclude.m4: Handle `--with-toolexeclibdir='.
2725 * Makefile.in: Regenerate.
2726 * aclocal.m4: Regenerate.
2727 * configure: Regenerate.
2728 * doc/Makefile.in: Regenerate.
2729 * include/Makefile.in: Regenerate.
2730 * libsupc++/Makefile.in: Regenerate.
2731 * po/Makefile.in: Regenerate.
2732 * python/Makefile.in: Regenerate.
2733 * src/Makefile.in: Regenerate.
2734 * src/c++11/Makefile.in: Regenerate.
2735 * src/c++17/Makefile.in: Regenerate.
2736 * src/c++98/Makefile.in: Regenerate.
2737 * src/filesystem/Makefile.in: Regenerate.
2738 * testsuite/Makefile.in: Regenerate.
2739
2740 2020-01-23 Alexandre Oliva <oliva@adacore.com>
2741
2742 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
2743 * configure: Rebuild.
2744
2745 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
2746
2747 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
2748
2749 PR libstdc++/91947
2750 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
2751 rule.
2752 * include/Makefile.in: Regenerate.
2753
2754 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
2755
2756 * doc/xml/faq.xml: Fix grammar.
2757 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
2758 * doc/xml/manual/spine.xml: Update copyright years.
2759 * doc/html/*: Regenerate.
2760
2761 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
2762
2763 * doc/xml/faq.xml: Update for SVN -> Git transition.
2764 * doc/xml/manual/appendix_contributing.xml: Likewise.
2765 * doc/xml/manual/status_cxx1998.xml: Likewise.
2766 * doc/xml/manual/status_cxx2011.xml: Likewise.
2767 * doc/xml/manual/status_cxx2014.xml: Likewise.
2768 * doc/xml/manual/status_cxx2017.xml: Likewise.
2769 * doc/xml/manual/status_cxx2020.xml: Likewise.
2770 * doc/xml/manual/status_cxxtr1.xml: Likewise.
2771 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
2772
2773 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2774
2775 * include/Makefile.am: Add coroutine to the std set.
2776 * include/Makefile.in: Regenerated.
2777 * include/std/coroutine: New file.
2778
2779 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
2780
2781 PR libstdc++/92376
2782 * include/bits/c++config: Only do PSTL config when the header is
2783 present, to fix freestanding.
2784 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
2785 functions if they were detected by configure.
2786
2787 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
2788 Matthew Bauer <mjbauer95@gmail.com>
2789 Jonathan Wakely <jwakely@redhat.com>
2790
2791 PR bootstrap/64271 (partial)
2792 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
2793 to unsigned short.
2794 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
2795 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
2796 definitions with NetBSD upstream.
2797 (ctype_base::blank): Use _CTYPE_BL.
2798 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
2799 Declaration.
2800 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
2801 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
2802 parameters to unsigned char.
2803 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
2804
2805 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
2806
2807 PR libstdc++/91263
2808 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
2809 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
2810 (_Equality_base): Remove.
2811 (_Equality<>::_M_equal): Review implementation. Use
2812 std::is_permutation.
2813 * testsuite/23_containers/unordered_multiset/operators/1.cc
2814 (Hash, Equal, test02, test03): New.
2815 * testsuite/23_containers/unordered_set/operators/1.cc
2816 (Hash, Equal, test02, test03): New.
2817
2818 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
2819
2820 PR libstdc++/93267
2821 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
2822 Move here from <bits/range_access.h> and define using __int128 when
2823 available.
2824 (__is_integer_like, __is_signed_integer_like): Move here from
2825 <bits/range_access.h>.
2826 (weakly_incrementable): Use __is_signed_integer_like.
2827 * include/bits/range_access.h (__max_diff_type, __max_size_type)
2828 (__is_integer_like, __is_signed_integer_like): Move to
2829 <bits/iterator_concepts.h>.
2830 (__make_unsigned_like_t): Move here from <ranges>.
2831 * include/std/ranges (__make_unsigned_like_t): Move to
2832 <bits/range_access.h>.
2833 (iota_view): Replace using-directive with using-declarations.
2834 * testsuite/std/ranges/iota/93267.cc: New test.
2835 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
2836
2837 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
2838
2839 PR libstdc++/93244
2840 * include/bits/fs_path.h (path::generic_string<C,A>)
2841 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
2842 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
2843 root-dir is converted to forward slash in generic pathname.
2844 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
2845 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
2846
2847 PR libstdc++/58605
2848 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
2849 Define.
2850 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
2851 (__atomic_float): Add default member initializer for C++20.
2852 * include/std/atomic (atomic): Likewise.
2853 (atomic::atomic()): Remove noexcept-specifier on default constructor.
2854 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
2855 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
2856 number.
2857 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2858 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
2859 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
2860 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
2861 expected result for is_trivially_default_constructible.
2862 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
2863 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
2864 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
2865 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
2866 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
2867 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
2868 expected results for is_trivially_default_constructible.
2869 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
2870 new test generator.
2871
2872 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
2873
2874 * testsuite/util/testsuite_iterators.h: Improve comment.
2875
2876 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
2877 initialization syntax.
2878
2879 PR libstdc++/92285
2880 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
2881 of base class independent of __cplusplus value.
2882 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
2883 type defined in the base class
2884 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
2885 * testsuite/24_iterators/istreambuf_iterator/requirements/
2886 base_classes.cc: Adjust expected base class for C++98.
2887
2888 2020-01-09 Olivier Hainque <hainque@adacore.com>
2889
2890 * doc/xml/manual/appendix_contributing.xml: Document _C2
2891 as a reserved identifier, by VxWorks.
2892 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
2893 * include/bits/stl_multimap.h: Likewise.
2894
2895 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
2896
2897 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
2898 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
2899 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
2900 partial specialization to disambiguate the two constrained
2901 specializations.
2902
2903 * include/experimental/type_traits (experimental::is_pod_v): Disable
2904 -Wdeprecated-declarations warnings around reference to std::is_pod.
2905 * include/std/type_traits (is_pod_v): Likewise.
2906 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
2907 is_standard_layout and is_trivial. Do not check is_pod for C++20.
2908 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
2909 Add -Wno-deprecated for C++20.
2910 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
2911 * testsuite/20_util/is_pod/value.cc: Likewise.
2912 * testsuite/experimental/type_traits/value.cc: Likewise.
2913
2914 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
2915
2916 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
2917 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
2918 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
2919
2920 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
2921
2922 PR libstdc++/93205
2923 * include/bits/random.h (operator>>): Check stream operation succeeds.
2924 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
2925 typedefs.
2926 (operator>>): Remove redundant __istream_type typedefs. Check stream
2927 operations succeed.
2928 (__extract_params): New function to fill a vector from a stream.
2929 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
2930
2931 PR libstdc++/93208
2932 * config/abi/pre/gnu.ver: Add new exports.
2933 * include/std/memory_resource (memory_resource::~memory_resource()):
2934 Do not define inline.
2935 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
2936 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
2937 Define.
2938 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
2939 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
2940
2941 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
2942
2943 PR libstdc++/92124
2944 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
2945 template alias.
2946 (_Hashtable<>::__fwd_value_for): New.
2947 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
2948 parameter.
2949 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
2950 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
2951 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
2952 with std::move.
2953 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
2954 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
2955 Adapt.
2956 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
2957 Adapt.
2958 * testsuite/23_containers/unordered_set/92124.cc: New.
2959
2960 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
2961
2962 PR libstdc++/93201
2963 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
2964 detailed error reporting for remove_all. Check result of recursive
2965 call before incrementing iterator.
2966 (remove_all(const path&), remove_all(const path&, error_code&)): Use
2967 do_remove_all.
2968 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
2969 result of recursive call before incrementing iterator.
2970 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
2971 are reported correctly.
2972 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
2973
2974 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
2975
2976 * include/std/condition_variable
2977 (condition_variable_any::wait_on): Rename to match current draft
2978 standard.
2979 (condition_variable_any::wait_on_until): Likewise.
2980 (condition_variable_any::wait_on_for): Likewise.
2981 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
2982 Adjust tests to account for renamed methods.
2983
2984 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
2985
2986 PR libstdc++/92124
2987 * include/bits/stl_tree.h
2988 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
2989 std::move_if_noexcept by std::move.
2990 * testsuite/23_containers/map/92124.cc: New.
2991 * testsuite/23_containers/set/92124.cc: New.
2992
2993 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
2994
2995 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
2996 (stop_source): Likewise (LWG 3362).
2997 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
2998 comparisons.
2999
3000 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
3001 (lexicographical_compare_three_way): Do not depend on
3002 __cpp_lib_concepts.
3003 * include/std/version (__cpp_lib_three_way_comparison): Only define
3004 when __cpp_lib_concepts is defined.
3005 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
3006
3007 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
3008
3009 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
3010 Only define four-argument overload when __cpp_lib_concepts is defined.
3011
3012 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
3013
3014 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
3015
3016 2020-01-01 Jakub Jelinek <jakub@redhat.com>
3017
3018 Update copyright years.
3019 \f
3020 Copyright (C) 2020 Free Software Foundation, Inc.
3021
3022 Copying and distribution of this file, with or without modification,
3023 are permitted in any medium without royalty provided the copyright
3024 notice and this notice are preserved.