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