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