Daily bump.
[gcc.git] / libstdc++-v3 / ChangeLog
1 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
2
3 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns
4 for old <sstream> symbols some more.
5
6 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
7
8 * include/bits/ranges_util.h (subrange::subrange(R&&)): Use
9 direct-initialization instead of list-initialization, so a
10 potential narrowing conversion from ranges::size(r) to the
11 stored size isn't ill-formed.
12
13 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
14
15 * include/bits/parse_numbers.h (_Select_int_base): Avoid
16 narrowing conversion in constant expression.
17 * include/experimental/buffer (buffer_copy): Avoid narrowing
18 conversion.
19 * include/experimental/internet (hash<>::operator()): Do not
20 use deprecated 'argument_type' member.
21 * include/std/variant (variant::emplace): Use cast instead
22 of implicit conversion from size_t to narrower unsigned type.
23
24 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
25
26 * include/tr1/shared_ptr.h (__shared_count, __shared_ptr)
27 (shared_ptr): Add diagnostic pragmas around uses of auto_ptr.
28 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
29 Adust dg-error line numbers.
30
31 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
32
33 * testsuite/18_support/96817.cc: Avoid -Wunused warnings.
34 * testsuite/20_util/any/assign/2.cc: Likewise.
35 * testsuite/20_util/any/cons/2.cc: Likewise.
36 * testsuite/20_util/align/1.cc: Avoid -Wsign-compare warning.
37 * testsuite/20_util/function/65760.cc: Avoid -Wunused warning.
38 * testsuite/20_util/function/1.cc: Avoid -Wcatch-value warning.
39 * testsuite/20_util/function/cons/move_target.cc: Avoid -Wunused
40 warning.
41 * testsuite/20_util/headers/memory/synopsis.cc: Add exception
42 specification.
43 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Avoid
44 -Wsign-compare warning.
45 * testsuite/20_util/tuple/cons/deduction.cc: Avoid -Wunused
46 warning.
47 * testsuite/20_util/specialized_algorithms/uninitialized_copy/808590-cxx11.cc:
48 Avoid -Wdeprecated-copy warning.
49 * testsuite/21_strings/basic_string/56166.cc: Avoid
50 -Wcatch-value warning.
51 * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
52 Avoid -Wcatch-value warnings.
53 * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
54 Likewise.
55 * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
56 Likewise.
57 * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
58 Likewise.
59 * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
60 Likewise.
61 * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
62 Likewise.
63 * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
64 Likewise.
65 * testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc:
66 Likewise.
67 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
68 Likewise.
69 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc:
70 Likewise.
71 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc:
72 Likewise.
73 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc:
74 Likewise.
75 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
76 Likewise.
77 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc:
78 Likewise.
79 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc:
80 Likewise.
81 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc:
82 Likewise.
83 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
84 Prune additional diagnostics.
85 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
86 Likewise.
87 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
88 Likewise.
89 * testsuite/21_strings/headers/string/synopsis.cc: Add exception
90 specifications.
91 * testsuite/22_locale/locale/cons/12352.cc: Define sized
92 delete operators to avoid warnings.
93 * testsuite/23_containers/deque/modifiers/swap/1.cc: Add
94 exception specification.
95 * testsuite/23_containers/forward_list/cons/11.cc: Avoid
96 -Wdeprecated-copy warning.
97 * testsuite/23_containers/headers/bitset/synopsis.cc: Add
98 exception specification.
99 * testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
100 * testsuite/23_containers/headers/forward_list/synopsis.cc:
101 Likewise.
102 * testsuite/23_containers/headers/list/synopsis.cc: Likewise.
103 * testsuite/23_containers/headers/map/synopsis.cc: Likewise.
104 * testsuite/23_containers/headers/queue/synopsis.cc: Likewise.
105 * testsuite/23_containers/headers/set/synopsis.cc: Likewise.
106 * testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
107 * testsuite/23_containers/list/modifiers/swap/1.cc: Likewise.
108 * testsuite/23_containers/map/modifiers/swap/1.cc: Likewise.
109 * testsuite/23_containers/multimap/modifiers/swap/1.cc:
110 Likewise.
111 * testsuite/23_containers/multiset/modifiers/swap/1.cc:
112 Likewise.
113 * testsuite/23_containers/set/modifiers/swap/1.cc: Likewise.
114 * testsuite/23_containers/unordered_set/56267-2.cc: Avoid
115 -Wdeprecated-copy warning.
116 * testsuite/23_containers/vector/bool/23632.cc: Avoid
117 -Wempty-body warning.
118 * testsuite/23_containers/vector/modifiers/swap/1.cc: Add
119 exception specification.
120 * testsuite/25_algorithms/heap/moveable2.cc: Fix misplaced
121 parentheses around arguments.
122 * testsuite/25_algorithms/sample/1.cc: Use return value.
123 * testsuite/25_algorithms/search/searcher.cc: Avoid -Wunused
124 warnings.
125 * testsuite/27_io/basic_ostream/exceptions/char/9561.cc:
126 Likewise.
127 * testsuite/27_io/basic_ostream/exceptions/wchar_t/9561.cc:
128 Likewise.
129 * testsuite/27_io/filesystem/operations/remove_all.cc: Avoid
130 -Wsign-compare warning.
131 * testsuite/experimental/any/assign/2.cc: Avoid -Wunused warnings.
132 * testsuite/experimental/any/cons/2.cc: Likewise.
133 * testsuite/experimental/filesystem/operations/remove_all.cc:
134 Avoid -Wign-compare warning.
135 * testsuite/experimental/memory/observer_ptr/cons/cons.cc:
136 Likewise.
137 * testsuite/experimental/memory_resource/null_memory_resource.cc:
138 Likewise.
139 * testsuite/experimental/source_location/1.cc: Avoid -Waddress
140 warning.
141 * testsuite/ext/pod_char_traits.cc: Avoid -Wunused warning.
142 * testsuite/ext/vstring/modifiers/clear/56166.cc: Avoid
143 -Wcatch-value.
144 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
145 Avoid -Wunused warning.
146 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
147 Likewise.
148 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
149 Prune additional warnings.
150 * testsuite/tr1/3_function_objects/function/1.cc: Avoid
151 -Wcatch-value warning.
152 * testsuite/util/replacement_memory_operators.h: Define sized
153 delete to avoid warnings.
154 * testsuite/util/testsuite_api.h (_NonDefaultConstructible): Add
155 user-declared assignment operator to stop -Wdeprecated-copy
156 warnings.
157 * testsuite/util/testsuite_containers.h: Avoid -Wunused warning.
158 * testsuite/util/testsuite_iterators.h: Avoid -Wsign-compare
159 warnings.
160 * testsuite/util/testsuite_new_operators.h: Define sized deleted.
161
162 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
163
164 * testsuite/25_algorithms/all_of/constexpr.cc: Check result of
165 the algorithm.
166 * testsuite/25_algorithms/any_of/constexpr.cc: Likewise.
167 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
168 * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise.
169 * testsuite/25_algorithms/count/constexpr.cc: Likewise.
170 * testsuite/25_algorithms/equal/constexpr.cc: Likewise.
171 * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise.
172 * testsuite/25_algorithms/fill/constexpr.cc: Likewise.
173 * testsuite/25_algorithms/find_end/constexpr.cc: Likewise.
174 * testsuite/25_algorithms/find_if/constexpr.cc: Likewise.
175 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise.
176 * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise.
177 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
178 Likewise.
179 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
180 Likewise.
181 * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise.
182 * testsuite/25_algorithms/merge/constexpr.cc: Likewise.
183 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
184 * testsuite/25_algorithms/none_of/constexpr.cc: Likewise.
185 * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise.
186 * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise.
187 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise.
188 * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise.
189 * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise.
190 * testsuite/25_algorithms/reverse/constexpr.cc: Likewise.
191 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise.
192 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise.
193 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
194 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
195 * testsuite/25_algorithms/set_intersection/constexpr.cc:
196 Likewise.
197 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
198 Likewise.
199 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
200 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
201 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
202
203 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
204
205 * include/bits/uniform_int_dist.h (_Power_of_two): Add
206 constexpr.
207 (uniform_int_distribution::_S_nd): Add static_assert to ensure
208 the wider type is twice as wide as the result type.
209 (uniform_int_distribution::__generate_impl): Add static_assert
210 and declare variables as constexpr where appropriate.
211 (uniform_int_distribution:operator()): Likewise. Only consider
212 the uniform random bit generator's range of possible results
213 when deciding whether _S_nd can be used, not the __uctype type.
214
215 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
216
217 * include/ext/rope (_Refcount_Base::_M_ref_count): Remove
218 volatile qualifier.
219 (_Refcount_Base::_M_decr()): Likewise.
220
221 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
222
223 * include/bits/std_function.h (_Function_handler<void, void>):
224 Define explicit specialization used for invalid target types.
225 (_Base_manager::_M_manager) [!__cpp_rtti]: Return null.
226 (function::target_type()): Check for null pointer.
227 (function::target()): Define unconditionall. Fix bug with
228 const_cast of function pointer type.
229 (function::target() const): Define unconditionally, but
230 only use RTTI if enabled.
231 * testsuite/20_util/function/target_no_rtti.cc: New test.
232
233 2020-10-29 Patrick Palka <ppalka@redhat.com>
234
235 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
236 (test03): Fix initializing the vector vy with the array y of size 4.
237
238 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
239
240 * include/bits/hashtable_policy.h (_Local_iterator_base): Cast
241 value to avoid -Wsign-compare warnings.
242 * include/bits/regex.h (sub_match::_M_str): Avoid narrowing
243 conversion.
244 * include/bits/regex_compiler.tcc (_Compiler::_M_quantifier):
245 Initialize variable to avoid -Wmaybe-uninitialized warning.
246 * include/bits/shared_ptr_base.h (_Sp_counted_deleter::_Impl):
247 Reorder mem-initializer-list to avoid -Wreorder warning.
248 * include/bits/stl_tree.h (_Rb_tree_impl): Explicitly
249 initialize base class in copy constructor.
250 * include/debug/safe_iterator.h (_Safe_iterator): Likewise.
251 * include/ext/debug_allocator.h: Reorder mem-initializer-list
252 to avoid -Wreorder warning.
253 * include/ext/throw_allocator.h (throw_allocator_limit)
254 (throw_allocator_random): Add user-declared assignment operators
255 to avoid -Wdeprecated-copy warnings.
256
257 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
258
259 * include/bits/uniform_int_dist.h (uniform_int_distribution):
260 Rename _UniformRandomNumberGenerator template parameters to
261 _UniformRandomBitGenerator, as per P0346R1.
262
263 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
264
265 * include/std/sstream (basic_stringbuf(__string_type&&, openmode)):
266 Call _M_init_syncbuf to set up get/put areas. Also qualify
267 std::move.
268
269 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
270
271 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Remove duplicate
272 patterns.
273 (CXXABI_1.3.13): Restore missing piece.
274
275 2020-10-28 Thomas Rodgers <trodgers@redhat.com>
276
277 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++20.
278 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): New symbols.
279 * configure: Regenerate.
280 * include/std/sstream:
281 (basic_stringbuf::basic_stringbuf(allocator const&)): New constructor.
282 (basic_stringbuf::basic_stringbuf(openmode, allocator const&)): Likewise.
283 (basic_stringbuf::basic_stringbuf(basic_string&&, openmode)): Likewise.
284 (basic_stringbuf::basic_stringbuf(basic_stringbuf&&, allocator const&)):
285 Likewise.
286 (basic_stringbuf::get_allocator()): New method.
287 (basic_stringbuf::view()): Likewise.
288 (basic_istringstream::basic_istringstream(basic_string&&, openmode)):
289 New constructor.
290 (basic_istringstream::basic_istringstream(openmode, allocator const&)):
291 Likewise
292 (basic_istringstream::view()): New method.
293 (basic_ostringstream::basic_ostringstream(basic_string&&, openmode)):
294 New constructor.
295 (basic_ostringstream::basic_ostringstream(openmode, allocator const&)):
296 Likewise
297 (basic_ostringstream::view()): New method.
298 (basic_stringstream::basic_stringstream(basic_string&&, openmode)):
299 New constructor.
300 (basic_stringstream::basic_stringstream(openmode, allocator const&)):
301 Likewise
302 (basic_stringstream::view()): New method.
303 * src/Makefile.in: Add c++20 directory.
304 * src/Makefile.am: Regenerate.
305 * src/c++20/Makefile.am: Add makefile for new sub-directory.
306 * src/c++20/Makefile.in: Generate.
307 * src/c++20/sstream-inst.cc: New file defining explicit
308 instantiations for basic_stringbuf, basic_istringstream,
309 basic_ostringstream, and basic_stringstream member functions
310 added in C++20.
311 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: New test.
312 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
313 * testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
314 * testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
315 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
316 * testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc: Likewise.
317 * testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
318 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc: Likewise.
319 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
320 * testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc: Likewise.
321 * testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
322 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc: Likewise.
323 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
324 * testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc: Likewise.
325 * testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
326 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc: Likewise.
327
328 2020-10-28 Patrick Palka <ppalka@redhat.com>
329
330 PR libstdc++/97613
331 * include/std/chrono (year_month_weekday::operator sys_days):
332 Cast the result of index() to int so that the initializer for
333 days{} is sign-extended when it's converted to the underlying
334 type.
335 * testsuite/std/time/year_month_weekday/3.cc: New test.
336
337 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
338
339 * libsupc++/new_opnt.cc (new): Add comment about forced unwind
340 exceptions.
341
342 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
343
344 PR libstdc++/94268
345 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_BUFSIZ):
346 Define.
347 * config/os/mingw32/os_defines.h (_GLIBCXX_BUFSIZ):
348 Define.
349 * include/bits/fstream.tcc: Use _GLIBCXX_BUFSIZ instead
350 of BUFSIZ.
351 * include/ext/stdio_filebuf.h: Likewise.
352 * include/std/fstream (_GLIBCXX_BUFSIZ): Define.
353
354 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
355
356 PR libstdc++/95592
357 * include/bits/valarray_after.h (_DEFINE_EXPR_UNARY_OPERATOR)
358 (_DEFINE_EXPR_BINARY_OPERATOR, _DEFINE_EXPR_BINARY_FUNCTION):
359 Use elaborated-type-specifier and qualified-id to avoid
360 ambiguities with QNX system headers.
361 * testsuite/26_numerics/valarray/95592.cc: New test.
362
363 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
364
365 PR libstdc++/95609
366 * include/std/span (span): Reorder data members to match common
367 implementations of struct iovec.
368 * testsuite/23_containers/span/layout_compat.cc: New test.
369
370 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
371
372 * include/std/functional (std::_Placeholder): Define for C++98
373 as well as later standards.
374 * include/tr1/functional (std::placeholders::_1 etc): Declare
375 for C++98.
376 (tr1::_Placeholder): Replace with using-declaration for
377 std::_Placeholder.
378 (tr1::placeholders::_1 etc.): Replace with using-directive for
379 std::placeholders.
380
381 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
382
383 * include/tr1/ell_integral.tcc (__ellint_rf, __ellint_rd)
384 (__ellint_rc, __ellint_rj): Remove unused variables.
385 * include/tr1/modified_bessel_func.tcc (__airy): Likewise.
386
387 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
388
389 * include/bits/locale_conv.h (__str_codecvt_out_all):
390 Add cast to compare operands of the same signedness.
391 * include/bits/locale_facets_nonio.tcc
392 (time_get::_M_extract_wday_or_month): Likewise.
393 * include/bits/sstream.tcc (basic_stringbuf::overflow):
394 Likewise.
395 * include/tr1/legendre_function.tcc (__sph_legendre): Use
396 unsigned for loop variable.
397
398 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
399
400 * include/std/charconv (from_chars): Add noexcept to match
401 definitions in src/c++17/floating_from_chars.cc
402
403 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
404
405 * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
406 Add noexcept. Do not throw on precondition violation.
407
408 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
409
410 * include/bits/fs_path.h (path::_List::begin, path::_List::end):
411 Add noexcept to match definitions in src/c++17/fs_path.cc.
412
413 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
414
415 * testsuite/experimental/memory_resource/new_delete_resource.cc:
416 Add missing <cstdint> header.
417 * testsuite/experimental/memory_resource/resource_adaptor.cc:
418 Likewise.
419
420 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
421
422 * include/experimental/executor (strand::_State): Fix thinko.
423
424 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
425
426 * include/std/type_traits (__is_nt_constructible_impl): Remove.
427 (__is_nothrow_constructible_impl): Adjust.
428 (is_nothrow_default_constructible): Likewise.
429 (__is_nt_assignable_impl): Remove.
430 (__is_nothrow_assignable_impl): Adjust.
431
432 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
433
434 PR libstdc++/97570
435 * libsupc++/new_opa.cc: Declare size_t in global namespace.
436 Remove unused header.
437
438 2020-10-26 Stephan Bergmann <sbergman@redhat.com>
439
440 * include/bits/shared_ptr_base.h
441 (_Sp_counted_base::_M_add_ref_lock_nothrow(): Add noexcept to
442 definitions to match declaration.
443 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept
444 to declaration to match definition.
445
446 2020-10-23 Patrick Palka <ppalka@redhat.com>
447
448 * include/std/ranges (single_view::single_view): Mark the
449 in place constructor explicit as per LWG 3428.
450 (take_view): Remove the constraint on the deduction guide's
451 template parameter as per LWG 3447.
452
453 2020-10-23 Jonathan Wakely <jwakely@redhat.com>
454
455 * include/experimental/memory_resource: Include <tuple>.
456 (polymorphic_allocator::construct): Qualify forward_as_tuple.
457 * include/std/memory_resource: Likewise.
458
459 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
460
461 * testsuite/30_threads/condition_variable/members/68519.cc:
462 Define recent_epoch_float_clock::duration to meet the Cpp17Clock
463 requirements.
464
465 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
466
467 * include/std/shared_mutex: Only include <condition_variable>
468 when pthread_rwlock_t and POSIX timers are not available.
469 (__cpp_lib_shared_mutex, __cpp_lib_shared_timed_mutex): Change
470 value to be type 'long'.
471 * include/std/version (__cpp_lib_shared_mutex)
472 (__cpp_lib_shared_timed_mutex): Likewise.
473
474 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
475
476 * include/Makefile.am: Add new header.
477 * include/Makefile.in: Regenerate.
478 * include/bits/shared_ptr.h: Include <iosfwd>.
479 * include/bits/shared_ptr_base.h: Include required headers here
480 directly, instead of in <memory>.
481 * include/bits/uses_allocator_args.h: New file. Move utility
482 functions for uses-allocator construction from <memory> to here.
483 Only define the utility functions when concepts are available.
484 (__cpp_lib_make_obj_using_allocator): Define non-standard
485 feature test macro.
486 * include/std/condition_variable: Remove unused headers.
487 * include/std/future: Likewise.
488 * include/std/memory: Remove headers that are not needed
489 directly, and are now inclkuded where they're needed. Include
490 new <bits/uses_allocator_args.h> header.
491 * include/std/memory_resource: Include only the necessary
492 headers. Use new feature test macro to detect support for the
493 utility functions.
494 * include/std/scoped_allocator: Likewise.
495 * include/std/version (__cpp_lib_make_obj_using_allocator):
496 Define.
497
498 2020-10-22 Olivier Hainque <hainque@adacore.com>
499
500 * crossconfig.m4: Turn vxworks matcher into vxworks*.
501 * configure.host: Likewise.
502 * configure: Regenerate.
503
504 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
505
506 * include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
507 Add noexcept.
508 * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock):
509 Remove specializations and just call _M_add_ref_lock_nothrow.
510 (__shared_count, __shared_ptr): Use nullptr for null pointer
511 constants.
512 (__shared_count(const __weak_count&)): Use _M_add_ref_lock_nothrow
513 instead of _M_add_ref_lock.
514 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept.
515 (__shared_ptr::operator bool()): Add noexcept.
516 (__shared_ptr(const __weak_ptr&, nothrow_t)): Add noexcept.
517
518 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
519
520 PR libstdc++/97512
521 * include/bits/ranges_util.h (tuple_size<subrange>)
522 (tuple_element<I, cv subrange>): Move here from ...
523 * include/std/ranges: ... here.
524 * testsuite/std/ranges/subrange/97512.cc: New test.
525
526 2020-10-21 Thomas Rodgers <trodgers@redhat.com>
527
528 * include/pstl/algorithm_impl.h: Update file.
529 * include/pstl/execution_impl.h: Likewise.
530 * include/pstl/glue_algorithm_impl.h: Likewise.
531 * include/pstl/glue_memory_impl.h: Likewise.
532 * include/pstl/glue_numeric_impl.h: Likewise.
533 * include/pstl/memory_impl.h: Likewise.
534 * include/pstl/numeric_impl.h: Likewise.
535 * include/pstl/parallel_backend.h: Likewise.
536 * include/pstl/parallel_backend_serial.h: Likewise.
537 * include/pstl/parallel_backend_tbb.h: Likewise.
538 * include/pstl/parallel_backend_utils.h: Likewise.
539 * include/pstl/pstl_config.h: Likewise.
540 * include/pstl/unseq_backend_simd.h: Likewise.
541
542 2020-10-20 François Dumont <fdumont@gcc.gnu.org>
543
544 * include/bits/hashtable_policy.h
545 (_Hash_node_value_base<>): Remove _Hash_node_base inheritance.
546 (_Hash_node_code_cache<bool _Cache_hash_code>): New.
547 (_Hash_node_value<typename _Value, bool _Cache_hash_code>): New.
548 (_Hash_node<>): Inherits _Hash_node_base<> and _Hash_node_value<>.
549 (_Map_base<>::__node_type): Remove.
550 (_Map_base<>::iterator): Remove.
551 (_Insert_base<>::__hash_cached): New.
552 (_Insert_base<>::__constant_iterators): New.
553 (_Insert_base<>::__hashtable_alloc): New.
554 (_Insert_base<>::__node_type): Remove.
555 (_Insert_base<>::__node_ptr): New.
556 (_Hash_code_base<>): Remove specializations.
557 (_Hash_code_base<>::__node_type): Remove.
558 (_Hash_code_base<>::_M_bucket_index(const __node_type*, size_t)):
559 Replace by...
560 (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)):
561 ...this.
562 (_Hash_code_base<>::_M_store_code(__node_type*, __hash_code)):
563 Replace by...
564 (_Hash_code_base<>::_M_store_code(_Hash_node_code_cache<>&, __hash_code)):
565 ...this.
566 (_Hash_code_base<>::_M_copy_code(__node_type*, const __node_type*)):
567 Replace by...
568 (_Hash_code_base<>::_M_copy_code(_Hash_node_code_cache<>&,
569 const _Hash_node_code_base<>&)): ...this.
570 (_Hashtable_base<>::__constant_iterators): Remove.
571 (_Hashtable_base<>::__unique_keys): Remove.
572 (_Hashtable_base<>::__node_type): Remove.
573 (_Hashtable_base<>::iterator): Remove.
574 (_Hashtable_base<>::const_iterator): Remove.
575 (_Hashtable_base<>::local_iterator): Remove.
576 (_Hashtable_base<>::const_local_iterator): Remove.
577 (_Hashtable_base<>::__ireturn_type): Remove.
578 (_Hashtable_base<>::_Equal_hash_code<>::_S_equals): Replace by...
579 (_Hashtable_base<>::_S_equals(__hash_code, const _Hash_node_code_hash<>&)):
580 ...this.
581 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals): Replace by...
582 (_Hashtable_base<>::_S_node_equals(__hash_code,
583 const _Hash_node_code_hash<>&)): ...this.
584 (_Hashtable_base<>::_Equal_hash_code<>): Remove.
585 (_Hashtable_base<>::_M_equals): Adapt.
586 (_Hashtable_baxe<>::_M_node_equals): Adapt.
587 (_Equality<>::_M_equal): Adapt.
588 (_Hashtable_alloc<>::__node_ptr): New.
589 (_Hashtable_alloc<>::__bucket_type): Rename into...
590 (_Hashtable_alloc<>::__node_base_ptr): ...this.
591 (_Hashtable_alloc<>::__bucket_alloc_type): Rename into...
592 (_Hashtable_alloc<>::__buckets_alloc_type): ...this.
593 (_Hashtable_alloc<>::__bucket_alloc_traits): Rename into...
594 (_Hashtable_alloc<>::__buckets_alloc_traits): ...this.
595 (_Hashtable_alloc<>::__buckets_ptr): New.
596 (_Hashtable_alloc<>::_M_allocate_node): Adapt.
597 (_Hashtable_alloc<>::_M_deallocate_node): Adapt.
598 (_Hashtable_alloc<>::_M_deallocate_node_ptr): Adapt.
599 (_Hashtable_alloc<>::_M_deallocate_nodes): Adapt.
600 (_Hashtable_alloc<>::_M_allocate_buckets): Adapt.
601 (_Hashtable_alloc<>::_M_deallocate_buckets): Adapt.
602 * include/bits/hashtable.h (_Hashtable<>): Adapt.
603
604 2020-10-20 Aldy Hernandez <aldyh@redhat.com>
605
606 * testsuite/21_strings/basic_string/capacity/1.cc: Pass
607 -Wno-stringop-overflow to test.
608
609 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
610
611 PR libstdc++/95917
612 * include/std/coroutine (__noop_coro_frame): Replace with
613 noop_coroutine_handle::__frame.
614 (__dummy_resume_destroy): Define inline in __frame.
615 (__noop_coro_fr): Replace with noop_coroutine_handle::_S_fr
616 and define as inline.
617 * testsuite/18_support/coroutines/95917.cc: New test.
618
619 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
620
621 * include/std/coroutine (coroutine_handle<_Promise>): Remove
622 base class. Add constructors, conversions, accessors etc. as
623 proposed for LWG 3460.
624 (coroutine_handle<noop_coroutine_promise>): Likewise.
625 * testsuite/18_support/coroutines/lwg3460.cc: New test.
626
627 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
628
629 * include/bits/unique_ptr.h (make_unique_for_overwrite): Define
630 for C++20.
631 * testsuite/20_util/unique_ptr/creation/array_neg.cc: Remove
632 unused header. Adjust standard reference.
633 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: New test.
634 * testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc: New test.
635
636 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
637
638 * include/std/tuple (_Head_base<Idx, Head, true>): Use reserved
639 form of __no_unique_address__ attribute because
640 no_unique_address is not reserved prior to C++20.
641
642 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
643
644 * include/bits/node_handle.h (_Node_handle_common): Replace
645 std::optional with custom type.
646 * testsuite/20_util/variant/exception_safety.cc: Add missing
647 header include.
648
649 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
650
651 * include/precompiled/expc++.h: Removed.
652
653 2020-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
654
655 PR libstdc++/97449
656 * include/std/variant
657 (__gen_vtable_impl<>::_S_apply_single_alt):
658 Diagnose visitor return type mismatches here..
659 (__gen_vtable_impl</*base case*/>::_S_apply):
660 ..not here.
661
662 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
663
664 * include/std/concepts: Fix typos in copyright notice.
665 * include/std/ranges: Likewise.
666
667 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
668
669 PR libstdc++/97415
670 * include/std/sstream (basic_stringbuf::str()): Check for
671 null egptr() before comparing to non-null pptr().
672
673 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
674
675 * testsuite/21_strings/basic_string/modifiers/assign/char/move_assign_optim.cc:
676 Do not generate debug info.
677 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign_optim.cc:
678 Likewise.
679
680 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
681
682 * include/bits/basic_string.h (basic_string(const Alloc&))
683 (basic_string(const basic_string&)
684 (basic_string(const CharT*, size_type, const Alloc&))
685 (basic_string(const CharT*, const Alloc&))
686 (basic_string(size_type, CharT, const Alloc&))
687 (basic_string(initializer_list<CharT>, const Alloc&))
688 (basic_string(InputIterator, InputIterator, const Alloc&)):
689 Define inline in class body.
690 * include/bits/basic_string.tcc (basic_string(const Alloc&))
691 (basic_string(const basic_string&)
692 (basic_string(const CharT*, size_type, const Alloc&))
693 (basic_string(const CharT*, const Alloc&))
694 (basic_string(size_type, CharT, const Alloc&))
695 (basic_string(initializer_list<CharT>, const Alloc&))
696 (basic_string(InputIterator, InputIterator, const Alloc&)):
697 Move definitions into class body.
698
699 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
700
701 * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi):
702 Add comments about which test flags get used by the check.
703
704 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
705
706 * testsuite/21_strings/basic_string/allocator/char/copy.cc: Make
707 comment more precise about what isn't supported by COW strings.
708 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
709 Likewise.
710 * testsuite/21_strings/basic_string/allocator/char/move.cc:
711 Likewise.
712 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
713 Likewise.
714 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
715 Likewise.
716 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
717 Likewise.
718 * testsuite/21_strings/basic_string/allocator/char/swap.cc:
719 Likewise.
720 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
721 Likewise.
722 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
723 Likewise.
724 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
725 Likewise.
726 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
727 Likewise.
728 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
729 Likewise.
730 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
731 Likewise.
732 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
733 Likewise.
734
735 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
736
737 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
738 Do not require cxx11-abi effective target.
739 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
740 Likewise.
741 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
742
743 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
744
745 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
746 (basic_string(const _CharT*, const _Alloc&)): Constrain to
747 require an allocator-like type to fix CTAD ambiguity (LWG 3706).
748 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
749 Remove dg-skip-if.
750 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
751 Likewise.
752
753 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
754
755 * include/bits/stl_algo.h (any_of): Fix incorrect description
756 in comment.
757
758 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
759
760 * doc/xml/manual/evolution.xml: Document some API changes
761 and deprecations.
762 * doc/xml/manual/intro.xml: Document LWG 2499.
763 * doc/xml/manual/status_cxx2020.xml: Update status.
764 * doc/html/*: Regenerate.
765
766 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
767
768 * doc/xml/book.txml: Remove trailing whitespace.
769 * doc/xml/chapter.txml: Likewise.
770 * doc/xml/class.txml: Likewise.
771 * doc/xml/gnu/fdl-1.3.xml: Likewise.
772 * doc/xml/gnu/gpl-3.0.xml: Likewise.
773 * doc/xml/manual/abi.xml: Likewise.
774 * doc/xml/manual/algorithms.xml: Likewise.
775 * doc/xml/manual/allocator.xml: Likewise.
776 * doc/xml/manual/appendix_contributing.xml: Likewise.
777 * doc/xml/manual/appendix_free.xml: Likewise.
778 * doc/xml/manual/appendix_porting.xml: Likewise.
779 * doc/xml/manual/atomics.xml: Likewise.
780 * doc/xml/manual/auto_ptr.xml: Likewise.
781 * doc/xml/manual/backwards_compatibility.xml: Likewise.
782 * doc/xml/manual/bitmap_allocator.xml: Likewise.
783 * doc/xml/manual/build_hacking.xml: Likewise.
784 * doc/xml/manual/codecvt.xml: Likewise.
785 * doc/xml/manual/concurrency.xml: Likewise.
786 * doc/xml/manual/concurrency_extensions.xml: Likewise.
787 * doc/xml/manual/configure.xml: Likewise.
788 * doc/xml/manual/containers.xml: Likewise.
789 * doc/xml/manual/ctype.xml: Likewise.
790 * doc/xml/manual/debug.xml: Likewise.
791 * doc/xml/manual/debug_mode.xml: Likewise.
792 * doc/xml/manual/diagnostics.xml: Likewise.
793 * doc/xml/manual/documentation_hacking.xml: Likewise.
794 * doc/xml/manual/evolution.xml: Likewise.
795 * doc/xml/manual/internals.xml: Likewise.
796 * doc/xml/manual/intro.xml: Likewise.
797 * doc/xml/manual/io.xml: Likewise.
798 * doc/xml/manual/iterators.xml: Likewise.
799 * doc/xml/manual/locale.xml: Likewise.
800 * doc/xml/manual/localization.xml: Likewise.
801 * doc/xml/manual/messages.xml: Likewise.
802 * doc/xml/manual/mt_allocator.xml: Likewise.
803 * doc/xml/manual/numerics.xml: Likewise.
804 * doc/xml/manual/parallel_mode.xml: Likewise.
805 * doc/xml/manual/policy_data_structures.xml: Likewise.
806 * doc/xml/manual/prerequisites.xml: Likewise.
807 * doc/xml/manual/shared_ptr.xml: Likewise.
808 * doc/xml/manual/spine.xml: Likewise.
809 * doc/xml/manual/status_cxxtr1.xml: Likewise.
810 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
811 * doc/xml/manual/strings.xml: Likewise.
812 * doc/xml/manual/support.xml: Likewise.
813 * doc/xml/manual/test.xml: Likewise.
814 * doc/xml/manual/test_policy_data_structures.xml: Likewise.
815 * doc/xml/manual/using.xml: Likewise.
816 * doc/xml/manual/using_exceptions.xml: Likewise.
817 * doc/xml/manual/utilities.xml: Likewise.
818 * doc/html/*: Regenerate.
819
820 2020-10-12 Patrick Palka <ppalka@redhat.com>
821
822 * include/std/ranges (take_while_view::begin): Constrain the
823 const overload further as per LWG 3450.
824 (take_while_view::end): Likewise.
825 * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
826 3450.
827
828 2020-10-12 Patrick Palka <ppalka@redhat.com>
829
830 PR libstdc++/95322
831 * include/std/ranges (take_view::_CI): Define this alias
832 template as per LWG 3449 and remove ...
833 (take_view::_Sentinel::_CI): ... this type alias.
834 (take_view::_Sentinel::operator==): Adjust use of _CI
835 accordingly. Define a second overload that accepts an iterator
836 of the opposite constness as per LWG 3449.
837 (take_while_view::_Sentinel::operator==): Likewise.
838 * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
839
840 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
841
842 * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
843
844 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
845
846 * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
847 so that C++17 features are documented.
848
849 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
850
851 * include/bits/stl_algobase.h (copy, move, copy_backward)
852 (move_backward): Fix documentation for returned iterator.
853
854 2020-10-12 Martin Sebor <msebor@redhat.com>
855
856 PR c++/97201
857 * libsupc++/new (operator new): Add attribute alloc_size and malloc.
858
859 2020-10-11 Clement Chigot <clement.chigot@atos.net>
860
861 * config/os/aix/t-aix: Add complementary mode object file to
862 libstdc++fs.a
863
864 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
865
866 PR libstdc++/97362
867 * doc/html/manual/source_code_style.html: Regenerate.
868 * doc/xml/manual/appendix_contributing.xml: Add __deref to
869 BADNAMES.
870 * include/debug/functions.h (_Irreflexive_checker::__deref):
871 Rename to __ref.
872 * testsuite/17_intro/badnames.cc: Check __deref.
873
874 2020-10-10 Ville Voutilainen <ville.voutilainen@gmail.com>
875
876 * include/std/variant (__check_visitor_result):
877 Use size_t for indexes.
878 (__check_visitor_results): Likewise.
879
880 2020-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
881
882 PR libstdc++/95904
883 * include/std/variant (__deduce_visit_result): Add a nested ::type.
884 (__gen_vtable_impl</*base case*/>::_S_apply):
885 Check the visitor return type.
886 (__same_types): New.
887 (__check_visitor_result): Likewise.
888 (__check_visitor_results): Likewise.
889 (visit(_Visitor&&, _Variants&&...)): Use __check_visitor_results
890 in case we're visiting just one variant.
891 * testsuite/20_util/variant/visit_neg.cc: Adjust.
892
893 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
894
895 PR libstdc++/97311
896 * include/bits/random.tcc (seed_seq::generate): Use uint32_t for
897 calculations. Also split the first loop into three loops to
898 avoid branching on k on every iteration, resolving PR 94823.
899 * testsuite/26_numerics/random/seed_seq/97311.cc: New test.
900 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-erro
901 line number.
902
903 2020-10-09 Daniel Lemire <lemire@gmail.com>
904
905 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
906 New member function implementing Lemire's "nearly divisionless"
907 algorithm.
908 (uniform_int_distribution::operator()): Use _S_nd when the range
909 of the URBG is the full width of the result type.
910
911 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
912
913 * testsuite/Makefile.am: Set and export variable separately.
914 * testsuite/Makefile.in: Regenerate.
915
916 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
917
918 * scripts/check_performance: Use gnu++11 instead of gnu++0x.
919 * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
920 child process.
921 * testsuite/Makefile.in: Regenerate.
922
923 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
924
925 * testsuite/performance/26_numerics/random_dist.cc: New test.
926
927 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
928
929 * testsuite/util/testsuite_performance.h (report_header): Remove
930 unused variable.
931
932 2020-10-08 Patrick Palka <ppalka@redhat.com>
933
934 PR libstdc++/95788
935 * include/bits/ranges_uninitialized.h:
936 (__construct_at_fn::operator()): Rewrite in terms of
937 std::construct_at. Declare it conditionally noexcept. Qualify
938 calls to declval in its requires-clause.
939 * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
940 New test.
941
942 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
943
944 PR libstdc++/82584
945 * include/bits/random.tcc
946 (discrete_distribution::param_type::_M_initialize)
947 (piecewise_constant_distribution::param_type::_M_initialize)
948 (piecewise_linear_distribution::param_type::_M_initialize):
949 Add assertions for positive sums..
950 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
951 line.
952
953 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
954
955 * include/bits/ios_base.h (ios_base::failure): Add constructors
956 takeing error_code argument. Add code() member function.
957 * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
958 run for the old ABI but do not check for derivation from
959 std::system_error.
960 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
961
962 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
963
964 * include/bits/random.h (__detail::_Mod): Revert last change.
965 (__detail::__mod): Do not use _Mod for a==0 case.
966 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
967 Check other cases with a==0. Also check runtime results.
968 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
969 line.
970
971 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
972
973 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
974 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
975 New test.
976
977 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
978
979 * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
980 parameter to use reserved name.
981 * include/bits/ranges_algo.h (shift_left, shift_right): Rename
982 template parameters to use reserved name.
983 * libsupc++/exception_ptr.h (exception_ptr): Likewise for
984 parameters and local variables.
985 * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
986 "y" in C++20 mode.
987
988 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
989
990 PR libstdc++/90295
991 * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
992 (exception_ptr::_M_addref(), exception_ptr::_M_release()):
993 Export symbols.
994 * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
995 Remove out-of-line definition.
996 (exception_ptr::exception_ptr(const exception_ptr&)):
997 Likewise.
998 (exception_ptr::~exception_ptr()): Likewise.
999 (exception_ptr::operator=(const exception_ptr&)):
1000 Likewise.
1001 (exception_ptr::swap(exception_ptr&)): Likewise.
1002 (exception_ptr::_M_addref()): Add branch prediction.
1003 * libsupc++/exception_ptr.h (exception_ptr::operator bool):
1004 Add noexcept.
1005 [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
1006 inline as hidden friends. Remove declarations at namespace
1007 scope.
1008 (exception_ptr::exception_ptr()): Define inline.
1009 (exception_ptr::exception_ptr(const exception_ptr&)):
1010 Likewise.
1011 (exception_ptr::~exception_ptr()): Likewise.
1012 (exception_ptr::operator=(const exception_ptr&)):
1013 Likewise.
1014 (exception_ptr::swap(exception_ptr&)): Likewise.
1015 * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.13.
1016 * testsuite/18_support/exception_ptr/90295.cc: New test.
1017
1018 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
1019
1020 * include/std/ranges (join_view): Remove deduction guide.
1021 (views::join): Add explicit template argument list to prevent
1022 deducing the wrong type.
1023 * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
1024 here, from ...
1025 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
1026
1027 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1028
1029 * include/bits/regex.h: Use __int_traits<int> instead of
1030 std::numeric_limits<int>.
1031 * include/bits/uniform_int_dist.h: Use __int_traits<T>::__max
1032 instead of std::numeric_limits<T>::max().
1033 * include/bits/hashtable_policy.h: Use size_t(-1) instead of
1034 std::numeric_limits<size_t>::max().
1035 * include/std/regex: Include <ext/numeric_traits.h>.
1036 * include/std/string_view: Use typedef for __int_traits<int>.
1037 * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of
1038 std::numeric_limits<size_t>::max().
1039 * testsuite/std/ranges/iota/96042.cc: Include <limits>.
1040 * testsuite/std/ranges/iota/difference_type.cc: Likewise.
1041 * testsuite/std/ranges/subrange/96042.cc: Likewise.
1042
1043 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1044
1045 * include/std/numeric: Move all #include directives to the top
1046 of the header.
1047 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
1048 numbers.
1049 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1050
1051 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1052
1053 * config/abi/pre/gnu.ver: Add new symbol.
1054 * include/bits/functexcept.h (__throw_bad_array_new_length):
1055 Declare new function.
1056 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
1057 Throw bad_array_new_length for impossible sizes (LWG 3190).
1058 * include/ext/new_allocator.h (new_allocator::allocate):
1059 Likewise.
1060 * include/std/memory_resource (polymorphic_allocator::allocate)
1061 (polymorphic_allocator::allocate_object): Use new function,
1062 __throw_bad_array_new_length.
1063 * src/c++11/functexcept.cc (__throw_bad_array_new_length):
1064 Define.
1065 * testsuite/20_util/allocator/lwg3190.cc: New test.
1066
1067 2020-10-05 Mike Crowe <mac@mcrowe.com>
1068
1069 PR libstdc++/91486
1070 * include/bits/atomic_futex.h:
1071 (__atomic_futex_unsigned::_M_load_when_equal_until): Use target
1072 clock duration type when rounding.
1073 * testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
1074 Rename from test_pr91486.
1075 (float_steady_clock): New class for test.
1076 (test_pr91486_wait_until): New test.
1077
1078 2020-10-05 Mike Crowe <mac@mcrowe.com>
1079
1080 * testsuite/20_util/duration_cast/rounding_c++11.cc: Copy
1081 rounding.cc and alter to support compilation for C++11 and to
1082 test std::chrono::__detail::ceil.
1083
1084 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
1085
1086 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
1087 instead of double so that __atomic_load_8 isn't needed.
1088
1089 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
1090
1091 * testsuite/18_support/96817.cc: Use terminate handler that
1092 calls _Exit(0).
1093
1094 2020-10-02 Patrick Palka <ppalka@redhat.com>
1095
1096 * include/bits/stl_iterator.h (reverse_iterator::iter_move):
1097 Define for C++20 as per P0896.
1098 (reverse_iterator::iter_swap): Likewise.
1099 (move_iterator::operator*): Apply P0896 changes for C++20.
1100 (move_iterator::operator[]): Likewise.
1101 * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
1102
1103 2020-10-01 Jonathan Wakely <jwakely@redhat.com>
1104
1105 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
1106 Do not try to dereference return value of __atomic_load_n.
1107
1108 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
1109
1110 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
1111 (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
1112
1113 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
1114
1115 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_SAME):
1116 Define for GCC 11 or when !__is_identifier(__is_same).
1117 (_GLIBCXX_BUILTIN_IS_SAME_AS): Remove.
1118 * include/std/type_traits (is_same, is_same_v): Replace uses
1119 of _GLIBCXX_BUILTIN_IS_SAME_AS.
1120
1121 2020-09-28 Patrick Palka <ppalka@redhat.com>
1122
1123 * include/std/ranges (filter_view): Declare the data member
1124 _M_base last instead of first, and adjust constructors' member
1125 initializer lists accordingly.
1126 (transform_view): Likewise.
1127 (take_view): Likewise.
1128 (take_while_view): Likewise.
1129 (drop_view): Likewise.
1130 (drop_while_view): Likewise.
1131 (join_view): Likewise.
1132 (split_view): Likewise (and tweak nearby formatting).
1133 (reverse_view): Likewise.
1134 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected
1135 sizes.
1136
1137 2020-09-28 Patrick Palka <ppalka@redhat.com>
1138
1139 * testsuite/std/ranges/adaptors/sizeof.cc: New test.
1140
1141 2020-09-28 Patrick Palka <ppalka@redhat.com>
1142
1143 * include/bits/ranges_util.h (subrange::_M_end): Give it
1144 [[no_unique_address]].
1145 * testsuite/std/ranges/subrange/sizeof.cc: New test.
1146
1147 2020-09-28 Patrick Palka <ppalka@redhat.com>
1148
1149 * include/std/ranges (iota_view::_M_bound): Give it
1150 [[no_unique_address]].
1151 * testsuite/std/ranges/iota/iota_view.cc: Check that an
1152 unbounded iota_view has minimal size.
1153
1154 2020-09-27 Clement Chigot <clement.chigot@atos.net>
1155
1156 * config/os/aix/t-aix: Use $(AR) without -X32_64.
1157
1158 2020-09-26 Jonathan Wakely <jwakely@redhat.com>
1159
1160 PR libstdc++/96817
1161 * include/ext/atomicity.h (__gnu_cxx::__is_single_threaded()):
1162 New function wrapping __libc_single_threaded if available.
1163 (__exchange_and_add_dispatch, __atomic_add_dispatch): Use it.
1164 * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_abort)
1165 (__cxa_guard_release): Likewise.
1166 * testsuite/18_support/96817.cc: New test.
1167
1168 2020-09-25 Jonathan Wakely <jwakely@redhat.com>
1169
1170 * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
1171 * libsupc++/Makefile.in: Regenerate.
1172
1173 2020-09-24 Antony Polukhin <antoshkka@gmail.com>
1174
1175 PR libstdc++/71579
1176 * include/std/type_traits (invoke_result, is_invocable)
1177 (is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r):
1178 Add static_asserts to make sure that the arguments of the type
1179 traits are not misused with incomplete types.
1180 * testsuite/20_util/invoke_result/incomplete_args_neg.cc: New test.
1181 * testsuite/20_util/is_invocable/incomplete_args_neg.cc: New test.
1182 * testsuite/20_util/is_invocable/incomplete_neg.cc: New test.
1183 * testsuite/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
1184 New test.
1185 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
1186 for error on incomplete type usage in trait.
1187
1188 2020-09-24 Patrick Palka <ppalka@redhat.com>
1189
1190 * include/std/ranges (__detail::__boxable): Split out the
1191 associated constraints of __box into here.
1192 (__detail::__box): Use the __boxable concept. Define a leaner
1193 partial specialization for semiregular types.
1194 (single_view::_M_value): Give it [[no_unique_address]].
1195 (filter_view::_M_pred): Likewise.
1196 (transform_view::_M_fun): Likewise.
1197 (take_while_view::_M_pred): Likewise.
1198 (drop_while_view::_M_pred):: Likewise.
1199 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc: New
1200 test.
1201
1202 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
1203
1204 * doc/xml/manual/configure.xml: Correct name of option.
1205 * doc/html/*: Regenerate.
1206
1207 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
1208
1209 PR libstdc++/97167
1210 * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
1211 for empty string before inspecting the first character.
1212 * testsuite/27_io/filesystem/path/append/source.cc: Append
1213 empty string_view to path.
1214
1215 2020-09-22 Glen Joseph Fernandes <glenjofe@gmail.com>
1216
1217 * include/bits/align.h (align): Fix overflow handling.
1218 * testsuite/20_util/align/3.cc: New test.
1219
1220 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
1221
1222 * include/Makefile.am: Add new headers and adjust for renamed
1223 header.
1224 * include/Makefile.in: Regenerate.
1225 * include/bits/iterator_concepts.h: Adjust for renamed header.
1226 * include/bits/range_access.h (ranges::*): Move to new
1227 <bits/ranges_base.h> header.
1228 * include/bits/ranges_algobase.h: Include new <bits/ranges_base.h>
1229 header instead of <ranges>.
1230 * include/bits/ranges_algo.h: Include new <bits/ranges_util.h>
1231 header.
1232 * include/bits/range_cmp.h: Moved to...
1233 * include/bits/ranges_cmp.h: ...here.
1234 * include/bits/ranges_base.h: New header.
1235 * include/bits/ranges_util.h: New header.
1236 * include/experimental/string_view: Include new
1237 <bits/ranges_base.h> header.
1238 * include/std/functional: Adjust for renamed header.
1239 * include/std/ranges (ranges::view_base, ranges::enable_view)
1240 (ranges::dangling, ranges::borrowed_iterator_t): Move to new
1241 <bits/ranges_base.h> header.
1242 (ranges::view_interface, ranges::subrange)
1243 (ranges::borrowed_subrange_t): Move to new <bits/ranges_util.h>
1244 header.
1245 * include/std/span: Include new <bits/ranges_base.h> header.
1246 * include/std/string_view: Likewise.
1247 * testsuite/24_iterators/back_insert_iterator/pr93884.cc: Add
1248 missing <ranges> header.
1249 * testsuite/24_iterators/front_insert_iterator/pr93884.cc:
1250 Likewise.
1251
1252 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
1253
1254 PR libstdc++/96803
1255 * include/std/tuple
1256 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
1257 Use correct value category in __use_alloc call.
1258 * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
1259 that require correct value category to be used.
1260
1261 2020-09-22 Patrick Palka <ppalka@redhat.com>
1262
1263 * include/std/span (span::front): Remove static_assert.
1264 (span::back): Likewise.
1265 (span::operator[]): Likewise.
1266 * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
1267 that we check the preconditions of back() only when it's called.
1268 * testsuite/23_containers/span/front_neg.cc: Likewise for
1269 front().
1270 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
1271 operator[].
1272
1273 2020-09-22 Patrick Palka <ppalka@redhat.com>
1274
1275 * include/bits/stl_algo.h (__sample): Exit early when the
1276 input range is empty.
1277 * testsuite/25_algorithms/sample/3.cc: New test.
1278
1279 2020-09-22 Patrick Palka <ppalka@redhat.com>
1280
1281 * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
1282 (search): Likewise for the overload that takes a searcher.
1283 * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
1284 std::for_each_n.
1285 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
1286 std::search overload that takes a searcher.
1287
1288 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1289
1290 * include/bits/c++config (__replacement_assert): Add noreturn
1291 attribute.
1292 (__glibcxx_assert_impl): Use __builtin_expect to hint that the
1293 assertion is expected to pass.
1294
1295 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1296
1297 * include/std/ranges (drop_view::begin()): Adjust constraints
1298 to match the correct condition for O(1) ranges::next (LWG 3482).
1299 * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
1300 cached for non-sized_range.
1301
1302 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1303
1304 * include/std/ranges (transform_view, elements_view): Relax
1305 constraints on operator- for iterators, as per LWG 3483.
1306 * testsuite/std/ranges/adaptors/elements.cc: Check that we
1307 can take the difference of two iterators from a non-random
1308 access range.
1309 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
1310
1311 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1312
1313 PR libstdc++/97132
1314 * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
1315 Remove unused code.
1316 (assume_aligned): Do not use __builtin_assume_aligned during
1317 constant evaluation.
1318 * testsuite/20_util/assume_aligned/1.cc: Improve test.
1319 * testsuite/20_util/assume_aligned/97132.cc: New test.
1320
1321 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
1322
1323 PR libstdc++/97101
1324 * include/std/functional (bind_front): Fix order of parameters
1325 in is_nothrow_constructible_v specialization.
1326 * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
1327
1328 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
1329
1330 * include/std/memory: Move #include <bits/align.h> inside C++11
1331 conditional includes.
1332
1333 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
1334
1335 * include/Makefile.am (bits_headers): Add new header.
1336 * include/Makefile.in: Regenerate.
1337 * include/bits/align.h: New file.
1338 * include/std/memory (align): Move definition to bits/align.h.
1339 (assume_aligned): Likewise.
1340
1341 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
1342
1343 * include/std/chrono [C++17] (chrono::__detail::ceil): Add
1344 using declaration to make chrono::ceil available for internal
1345 use with a consistent name.
1346 (chrono::__detail::__ceil_impl): New function template.
1347 (chrono::__detail::ceil): Use __ceil_impl to compare and
1348 increment the value. Remove SFINAE constraint.
1349
1350 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
1351
1352 * include/bits/regex_error.h (__throw_regex_error): Fix
1353 parameter declaration and use reserved attribute names.
1354
1355 2020-09-11 Mike Crowe <mac@mcrowe.com>
1356
1357 * include/std/condition_variable (condition_variable::wait_until):
1358 Convert delta to steady_clock duration before adding to current
1359 steady_clock time to avoid rounding errors described in PR68519.
1360 (condition_variable::wait_for): Simplify calculation of absolute
1361 time by using chrono::__detail::ceil in both overloads.
1362 * testsuite/30_threads/condition_variable/members/68519.cc:
1363 (test_wait_for): Renamed from test01. Replace unassigned val
1364 variable with constant false. Reduce scope of mx and cv
1365 variables to just test_wait_for function.
1366 (test_wait_until): Add new test case.
1367
1368 2020-09-11 Mike Crowe <mac@mcrowe.com>
1369
1370 PR libstdc++/91486
1371 * include/bits/atomic_futex.h
1372 (__atomic_futex_unsigned::_M_load_when_equal_for)
1373 (__atomic_futex_unsigned::_M_load_when_equal_until): Use
1374 __detail::ceil to convert delta to the reference clock
1375 duration type to avoid resolution problems.
1376 * include/std/chrono (__detail::ceil): Move implementation
1377 of std::chrono::ceil into private namespace so that it's
1378 available to pre-C++17 code.
1379 * testsuite/30_threads/async/async.cc (test_pr91486):
1380 Test __atomic_futex_unsigned::_M_load_when_equal_for.
1381
1382 2020-09-11 Mike Crowe <mac@mcrowe.com>
1383
1384 * include/bits/atomic_futex.h
1385 (__atomic_futex_unsigned::_M_load_when_equal_until): Add
1386 loop on generic _Clock to check the timeout against _Clock
1387 again after _M_load_when_equal_until returns indicating a
1388 timeout.
1389 * testsuite/30_threads/async/async.cc: Invent slow_clock
1390 that runs at an eleventh of steady_clock's speed. Use it
1391 to test the user-supplied-clock variant of
1392 __atomic_futex_unsigned::_M_load_when_equal_until works
1393 generally with test03 and loops correctly when the timeout
1394 time hasn't been reached in test04.
1395
1396 2020-09-11 Mike Crowe <mac@mcrowe.com>
1397
1398 PR libstdc++/93542
1399 * include/bits/atomic_futex.h (__atomic_futex_unsigned): Change
1400 __clock_t typedef to use steady_clock so that unknown clocks are
1401 synced to it rather than system_clock. Change existing __clock_t
1402 overloads of _M_load_and_text_until_impl and
1403 _M_load_when_equal_until to use system_clock explicitly. Remove
1404 comment about DR 887 since these changes address that problem as
1405 best as we currently able.
1406
1407 2020-09-11 Mike Crowe <mac@mcrowe.com>
1408
1409 PR libstdc++/93542
1410 * config/abi/pre/gnu.ver: Update for addition of
1411 __atomic_futex_unsigned_base::_M_futex_wait_until_steady.
1412 * include/bits/atomic_futex.h (__atomic_futex_unsigned_base):
1413 Add comments to clarify that _M_futex_wait_until and
1414 _M_load_and_test_until use CLOCK_REALTIME.
1415 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady)
1416 (__atomic_futex_unsigned_base::_M_load_and_text_until_steady):
1417 New member functions that use CLOCK_MONOTONIC.
1418 (__atomic_futex_unsigned_base::_M_load_and_test_until_impl)
1419 (__atomic_futex_unsigned_base::_M_load_when_equal_until): Add
1420 overloads that accept a steady_clock time_point and use the
1421 new member functions.
1422 * src/c++11/futex.cc: Include headers required for
1423 clock_gettime.
1424 (futex_clock_monotonic_flag): New constant to tell futex to
1425 use CLOCK_MONOTONIC to match existing futex_clock_realtime_flag.
1426 (futex_clock_monotonic_unavailable): New global to store the
1427 result of trying to use CLOCK_MONOTONIC.
1428 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Add
1429 new variant of _M_futex_wait_until that uses CLOCK_MONOTONIC to
1430 support waiting using steady_clock.
1431
1432 2020-09-11 Mike Crowe <mac@mcrowe.com>
1433
1434 * src/c++11/futex.cc: Add new constants for required futex
1435 flags. Add futex_clock_realtime_unavailable flag to store
1436 result of trying to use FUTEX_CLOCK_REALTIME.
1437 (__atomic_futex_unsigned_base::_M_futex_wait_until): Try to
1438 use FUTEX_WAIT_BITSET with FUTEX_CLOCK_REALTIME and only
1439 fall back to using gettimeofday and FUTEX_WAIT if that's not
1440 supported.
1441
1442 2020-09-11 Mike Crowe <mac@mcrowe.com>
1443
1444 * testsuite/30_threads/async/async.cc (test02): Test steady_clock
1445 with std::future::wait_until.
1446 (test03): Add new test templated on clock type waiting for future
1447 associated with async to resolve.
1448 (main): Call test03 to test both system_clock and steady_clock.
1449
1450 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
1451 Christophe Lyon <christophe.lyon@linaro.org>
1452
1453 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
1454
1455 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
1456 Christophe Lyon <christophe.lyon@linaro.org>
1457
1458 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
1459
1460 2020-09-11 Christophe Lyon <christophe.lyon@linaro.org>
1461
1462 * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
1463
1464 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1465
1466 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
1467 Add casts to compare types of the same signedness.
1468
1469 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1470
1471 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
1472 typedef.
1473
1474 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1475
1476 * include/std/version (__cpp_lib_array_constexpr):
1477 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
1478 compiling C++17.
1479
1480 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1481
1482 * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
1483 (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
1484 warnings for uses of std::auto_ptr.
1485 * include/experimental/type_traits (is_literal_type_v):
1486 Likewise, for use of std::is_literal_type.
1487 * include/std/condition_variable (condition_variable_any::_Unlock):
1488 Likewise, for use of std::uncaught_exception.
1489
1490 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1491
1492 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
1493 conversion.
1494 * include/std/chrono (operator+(const year&, const years&)):
1495 Likewise.
1496
1497 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1498
1499 * include/bits/codecvt.h (codecvt_byname): Remove names of
1500 unused parameters.
1501
1502 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1503
1504 * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
1505
1506 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
1507
1508 * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
1509
1510 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
1511
1512 * include/bits/atomic_base.h: Fix -Wunused-variable
1513 warnings.
1514 * include/ext/new_allocator.h: Fix -Wunused-parameter
1515 warnings.
1516
1517 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1518
1519 * include/bits/stl_iterator.h (counted_iterator): Add assertions
1520 to check preconditions added by LWG 3472.
1521
1522 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1523
1524 PR libstdc++/94160
1525 * src/c++17/memory_resource.cc (munge_options): Round
1526 max_blocks_per_chunk to a multiple of four.
1527 (__pool_resource::_M_alloc_pools()): Simplify slightly.
1528 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1529 Check that valid pointers are returned when small values are
1530 used for max_blocks_per_chunk.
1531
1532 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1533
1534 PR libstdc++/96942
1535 * include/std/memory_resource (monotonic_buffer_resource::do_allocate):
1536 Use __builtin_expect when checking if a new buffer needs to be
1537 allocated from the upstream resource, and for checks for edge
1538 cases like zero sized buffers and allocations.
1539 * src/c++17/memory_resource.cc (aligned_size): New class template.
1540 (aligned_ceil): New helper function to round up to a given
1541 alignment.
1542 (monotonic_buffer_resource::chunk): Replace _M_size and _M_align
1543 with an aligned_size member. Remove _M_canary member. Change _M_next
1544 to pointer instead of unaligned buffer.
1545 (monotonic_buffer_resource::chunk::allocate): Round up to multiple
1546 of 64 instead of to power of two. Check for size overflow. Remove
1547 redundant check for minimum required alignment.
1548 (monotonic_buffer_resource::chunk::release): Adjust for changes
1549 to data members.
1550 (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
1551 (big_block): Replace _M_size and _M_align with aligned_size
1552 member.
1553 (big_block::big_block): Check for size overflow.
1554 (big_block::size, big_block::align): Adjust to use aligned_size.
1555 (big_block::alloc_size): Use aligned_ceil.
1556 (munge_options): Use aligned_ceil.
1557 (__pool_resource::allocate): Use big_block::align for alignment.
1558 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Check
1559 upstream resource gets expected values for impossible sizes.
1560 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1561 Likewise. Adjust checks for expected alignment in existing test.
1562
1563 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
1564
1565 * include/std/chrono (duration::_S_gcd): Use invariant that
1566 neither value is zero initially.
1567
1568 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
1569
1570 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
1571
1572 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
1573
1574 PR libstdc++/96592
1575 * include/std/tuple (_TupleConstraints<true, T...>): Use
1576 alternative is_constructible instead of std::is_constructible.
1577 * testsuite/20_util/tuple/cons/96592.cc: New test.
1578
1579 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
1580
1581 * include/std/chrono (duration::_S_gcd): Use iterative algorithm
1582 for C++14 and later.
1583 * include/std/numeric (__detail::__gcd): Replace recursive
1584 Euclidean algorithm with iterative version of binary GCD algorithm.
1585 * testsuite/26_numerics/gcd/1.cc: Test additional inputs.
1586 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
1587 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1588 * testsuite/experimental/numeric/gcd.cc: Test additional inputs.
1589 * testsuite/26_numerics/gcd/2.cc: New test.
1590
1591 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1592
1593 PR libstdc++/92978
1594 * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
1595 not std::lcm.
1596
1597 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1598
1599 PR libstdc++/96851
1600 * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
1601 New trait that says if memcmp can be used for ordering.
1602 (__is_memcmp_ordered_with): Likewise, for two types.
1603 * include/bits/deque.tcc (__lex_cmp_dit): Use new traits
1604 instead of __is_byte and __numeric_traits.
1605 (__lexicographical_compare_aux1): Likewise.
1606 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
1607 Likewise.
1608 * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
1609 (__is_byte_iter): Likewise.
1610 * include/std/array (operator<=>): Likewise. Only use memcmp
1611 when std::is_constant_evaluated() is false.
1612 * testsuite/23_containers/array/comparison_operators/96851.cc:
1613 New test.
1614 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
1615 Adjust dg-error line numbers.
1616
1617 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1618
1619 * include/bits/stl_iterator.h: Include <bits/exception_defines.h>
1620 for definitions of __try, __catch and __throw_exception_again.
1621 (counted_iterator::operator++(int)): Use __throw_exception_again
1622 instead of throw.
1623 * libsupc++/new: Include <bits/exception.h> not <exception>.
1624 * libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
1625 * testsuite/18_support/destroying_delete.cc: Include
1626 <type_traits> for std::is_same_v definition.
1627 * testsuite/20_util/variant/index_type.cc: Qualify size_t.
1628
1629 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
1630
1631 PR libstdc++/71960
1632 * include/bits/c++config (__glibcxx_assert_impl): Remove
1633 do-while so that uses of the macro need to add it.
1634 (__glibcxx_assert): Rename macro for runtime assertions
1635 to __glibcxx_assert_2.
1636 (__glibcxx_assert_1): Define macro for constexpr assertions.
1637 (__glibcxx_assert): Define macro for constexpr and runtime
1638 assertions.
1639 * include/bits/range_access.h (ranges::advance): Remove
1640 redundant precondition checks during constant evaluation.
1641 * include/parallel/base.h (_GLIBCXX_PARALLEL_ASSERT): Always
1642 use do-while in macro expansion.
1643 * include/std/ranges (iota_view::iota_view(W, B)): Remove
1644 redundant braces.
1645
1646 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
1647
1648 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
1649 New helper function for finding GCD of two positive intmax_t
1650 values.
1651 (duration::__divide): New helper alias for dividing one period
1652 by another.
1653 (duration::__is_harmonic): Use __divide not ratio_divide.
1654 (duration(const duration<R2, P2>&)): Require the duration rep
1655 types to be convertible.
1656 * testsuite/20_util/duration/cons/dr2094.cc: New test.
1657 * testsuite/20_util/duration/requirements/reduced_period.cc:
1658 Fix definition of unused member functions in test type.
1659 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
1660 Adjust expected errors.
1661
1662 2020-08-29 Jonathan Wakely <jwakely@redhat.com>
1663
1664 * include/std/numeric (__detail::__absu(bool)): Make deleted
1665 function a function template, so it will be chosen for calls
1666 with an explicit template argument list.
1667 * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output.
1668 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1669
1670 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
1671
1672 * include/std/chrono (common_type): Fix partial specializations
1673 for a single duration type to use the common_type of the rep.
1674 (duration::operator+, duration::operator-): Fix return types
1675 to also use the common_type of the rep.
1676 * testsuite/20_util/duration/requirements/reduced_period.cc:
1677 Check duration using a rep that has common_type specialized.
1678
1679 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
1680
1681 PR libstdc++/92978
1682 * include/std/numeric (__abs_integral): Replace with ...
1683 (__detail::__absu): New function template that returns an
1684 unsigned type, guaranteeing it can represent the most
1685 negative signed value.
1686 (__detail::__gcd, __detail::__lcm): Require arguments to
1687 be unsigned and therefore already non-negative.
1688 (gcd, lcm): Convert arguments to absolute value as unsigned
1689 type before calling __detail::__gcd or __detail::__lcm.
1690 * include/experimental/numeric (gcd, lcm): Likewise.
1691 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
1692 errors.
1693 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1694 * testsuite/26_numerics/gcd/92978.cc: New test.
1695 * testsuite/26_numerics/lcm/92978.cc: New test.
1696 * testsuite/experimental/numeric/92978.cc: New test.
1697
1698 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
1699
1700 * include/std/chrono (__duration_common_type): Ensure the
1701 reduced ratio is used. Remove unused partial specialization
1702 using __failure_type.
1703 (common_type): Pass reduced ratios to __duration_common_type.
1704 Add partial specializations for simple cases involving a single
1705 duration or time_point type.
1706 (duration::period): Use reduced ratio.
1707 (duration::operator+(), duration::operator-()): Return duration
1708 type using the reduced ratio.
1709 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
1710 Adjust expected errors.
1711 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
1712
1713 2020-08-27 Patrick Palka <ppalka@redhat.com>
1714
1715 * include/std/chrono (year_month::operator+): Properly handle a
1716 month value of 0 by casting the month value to int before
1717 subtracting 1 from it so that the difference is sign-extended in
1718 the subsequent addition.
1719 * testsuite/std/time/year_month/1.cc: Test adding months to a
1720 year_month whose month component is below or above the
1721 normalized range of [1,12].
1722
1723 2020-08-27 Patrick Palka <ppalka@redhat.com>
1724
1725 * include/std/chrono
1726 (__detail::__months_years_conversion_disambiguator): Define.
1727 (year_month::operator+=): Templatize the 'months'-based overload
1728 so that the 'years'-based overload is selected in case of
1729 equally-ranked implicit conversion sequences to both 'months'
1730 and 'years' from the supplied argument.
1731 (year_month::operator-=): Likewise.
1732 (year_month::operator+): Likewise.
1733 (year_month::operator-): Likewise.
1734 (year_month_day::operator+=): Likewise.
1735 (year_month_day::operator-=): Likewise.
1736 (year_month_day::operator+): Likewise.
1737 (year_month_day::operator-): Likewise.
1738 (year_month_day_last::operator+=): Likewise.
1739 (year_month_day_last::operator-=): Likewise.
1740 (year_month_day_last::operator+): Likewise
1741 (year_month_day_last::operator-): Likewise.
1742 (year_month_day_weekday::operator+=): Likewise
1743 (year_month_day_weekday::operator-=): Likewise.
1744 (year_month_day_weekday::operator+): Likewise.
1745 (year_month_day_weekday::operator-): Likewise.
1746 (year_month_day_weekday_last::operator+=): Likewise
1747 (year_month_day_weekday_last::operator-=): Likewise.
1748 (year_month_day_weekday_last::operator+): Likewise.
1749 (year_month_day_weekday_last::operator-): Likewise.
1750 (testsuite/std/time/year_month/2.cc): New test.
1751 (testsuite/std/time/year_month_day/2.cc): New test.
1752 (testsuite/std/time/year_month_day_last/2.cc): New test.
1753 (testsuite/std/time/year_month_weekday/2.cc): New test.
1754 (testsuite/std/time/year_month_weekday_last/2.cc): New test.
1755 * testsuite/std/time/year_month/2.cc: New file.
1756 * testsuite/std/time/year_month_day/2.cc: New file.
1757 * testsuite/std/time/year_month_day_last/2.cc: New file.
1758 * testsuite/std/time/year_month_weekday/2.cc: New file.
1759 * testsuite/std/time/year_month_weekday_last/2.cc: New file.
1760
1761 2020-08-27 Patrick Palka <ppalka@redhat.com>
1762
1763 PR libstdc++/95322
1764 * include/std/ranges (transform_view::sentinel::__distance_from):
1765 Give this a deduced return type.
1766 (transform_view::sentinel::operator-): Adjust the return type so
1767 that it's based on the constness of the iterator rather than
1768 that of the sentinel.
1769 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
1770
1771 2020-08-27 Patrick Palka <ppalka@redhat.com>
1772
1773 * include/std/ranges (elements_view::begin): Adjust constraints.
1774 (elements_view::end): Likewise.
1775 (elements_view::_Sentinel::operator==): Templatize to take both
1776 _Iterator<true> and _Iterator<false>.
1777 (elements_view::_Sentinel::operator-): Likewise.
1778 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
1779 the example from P1994R1.
1780 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
1781
1782 2020-08-27 Patrick Palka <ppalka@redhat.com>
1783
1784 * include/std/ranges (elements_view::end): Replace these two
1785 overloads with four new overloads.
1786 (elements_view::_Iterator::operator==): Remove.
1787 (elements_view::_Iterator::operator-): Likewise.
1788 (elements_view::_Sentinel): Define.
1789
1790 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1791
1792 * include/std/tuple (_Tuple_impl): Whitespaces changes for
1793 consistent indentation. Also use __enable_if_t alias template.
1794
1795 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1796
1797 PR libstdc++/96803
1798 * include/std/tuple
1799 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
1800 Replace parameter pack with a type parameter and a pack and pass
1801 the first type to __use_alloc.
1802 * testsuite/20_util/tuple/cons/96803.cc: New test.
1803
1804 2020-08-26 Patrick Palka <ppalka@redhat.com>
1805
1806 * include/std/chrono (year_month_weekday::operator==): Compare
1807 weekday_indexed instead of weekday.
1808 * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
1809
1810 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1811
1812 * include/bits/hashtable_policy.h (_Hash_code_base): Change
1813 index of _Hashtable_ebo_helper base class.
1814 * testsuite/23_containers/unordered_map/dup_types.cc: New test.
1815
1816 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1817
1818 PR libstdc++/71960
1819 * include/experimental/string_view (basic_string_view):
1820 Enable debug assertions.
1821 * include/std/string_view (basic_string_view):
1822 Likewise.
1823
1824 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
1825
1826 * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
1827 _H2 into _RangeHash and _Hash into _Unused.
1828 (_Hastable_base<>): Likewise.
1829 (_Map_base<>): Likewise.
1830 (_Insert_base<>): Likewise.
1831 (_Insert<>): Likewise.
1832 (_Rehash_base<>): Likewise.
1833 (_Local_iterator_base<>): Likewise.
1834 (_Hash_code_base<>): Likewise.
1835 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
1836 Remove.
1837 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
1838 Remove.
1839 (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
1840 bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
1841 (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
1842 Replace by...
1843 (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
1844 (_Local_iterator<>): Remove _H1 and _H2 template parameters.
1845 (_Local_const_iterator<>): Likewise.
1846 (_Equality<>): Likewise.
1847 (_Map_base<>::operator[](const key_type&): Adapt.
1848 (_Map_base<>::operator[](key_type&&): Adapt.
1849 (_Identity::operator()): Add noexcept.
1850 (_Select1st::operator()): Likewise.
1851 (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
1852 type.
1853 (_Hash_code_base::_M_extract): Remove.
1854 * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
1855 parameters. Remove _ExtractKey from constructors.
1856 (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
1857 __hash_code, __node_type*, size_t)): Replace by...
1858 (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
1859 __node_type*, size_t)): ...this.
1860 (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
1861 __hash_code, __node_type*)): Replace by...
1862 (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
1863 __node_type*)): ...this.
1864 (_Hashtable<>::__key_extract): Remove.
1865 * include/bits/node_handle.h: Adapt.
1866
1867 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
1868
1869 * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
1870 * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
1871 * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
1872 * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
1873 * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
1874 * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
1875 * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
1876 * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
1877 * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
1878 * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
1879 * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
1880 * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
1881 * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
1882 * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
1883 * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
1884 * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
1885 * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
1886 * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
1887 * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
1888 Removed.
1889 * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
1890 * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
1891 Removed.
1892 * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
1893 * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
1894 * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
1895 * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
1896 * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
1897
1898 2020-08-25 Patrick Palka <ppalka@redhat.com>
1899
1900 * include/std/chrono (year_month_weekday::ok): Fix assert.
1901
1902 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
1903
1904 * include/std/future (future, shared_future. promise): Add
1905 is_destructible assertion (LWG 3466). Adjust string-literal for
1906 !is_array and !is_function assertions.
1907 * testsuite/30_threads/future/requirements/lwg3458.cc: Check
1908 types with no accessible destructor. Adjust expected errors.
1909 * testsuite/30_threads/promise/requirements/lwg3466.cc:
1910 Likewise.
1911 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
1912 Likewise.
1913
1914 2020-08-25 Patrick Palka <ppalka@redhat.com>
1915 Ed Smith-Rowland <3dw4rd@verizon.net>
1916 Jonathan Wakely <jwakely@redhat.com>
1917
1918 * include/std/chrono (time_point::operator++)
1919 (time_point::operator--): Define.
1920 (utc_clock, tai_clock, gps_clock): Forward declare.
1921 (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
1922 (gps_seconds): Define.
1923 (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
1924 (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
1925 (is_clock_v<gps_clock>): Define these specializations.
1926 (leap_second_info): Define.
1927 (day, month, year, weekday, weekday_indexed)
1928 (weekday_last, month_day, month_day_last, month_weekday)
1929 (month_weekday_last, year_month, year_month_day)
1930 (year_month_day_last, year_month_weekday, year_month_weekday_last):
1931 Declare and later define.
1932 (last_spec, last, __detail::__days_per_month)
1933 (__detail::__days_per_month, __detail::__last_day): Define.
1934 (January, February, March, April, May, June, July, August)
1935 (September, October, November, December, Sunday, Monday, Tuesday)
1936 (Wednesday, Thursday, Friday, Saturday): Define.
1937 (weekday::operator[]): Define out-of-line.
1938 (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
1939 Likewise.
1940 (year_month_day::year_month_day, year_month_day::ok): Likewise.
1941 (__detail::__pow10, hh_mm_ss): Define.
1942 (literals::chrono_literals::operator""d)
1943 (literals::chrono_literals::operator""y): Define.
1944 (is_am, is_pm, make12, make24): Define.
1945 * testsuite/20_util/time_point/4.cc: New test.
1946 * testsuite/std/time/day/1.cc: New test.
1947 * testsuite/std/time/hh_mm_ss/1.cc: New test.
1948 * testsuite/std/time/is_am/1.cc: New test.
1949 * testsuite/std/time/is_pm/1.cc: New test.
1950 * testsuite/std/time/make12/1.cc: New test.
1951 * testsuite/std/time/make24/1.cc: New test.
1952 * testsuite/std/time/month/1.cc: New test.
1953 * testsuite/std/time/month_day/1.cc: New test.
1954 * testsuite/std/time/month_day_last/1.cc: New test.
1955 * testsuite/std/time/month_weekday/1.cc: New test.
1956 * testsuite/std/time/month_weekday_last/1.cc: New test.
1957 * testsuite/std/time/weekday/1.cc: New test.
1958 * testsuite/std/time/weekday_indexed/1.cc: New test.
1959 * testsuite/std/time/weekday_last/1.cc: New test.
1960 * testsuite/std/time/year/1.cc: New test.
1961 * testsuite/std/time/year_month/1.cc: New test.
1962 * testsuite/std/time/year_month_day/1.cc: New test.
1963 * testsuite/std/time/year_month_day_last/1.cc: New test.
1964 * testsuite/std/time/year_month_weekday/1.cc: New test.
1965 * testsuite/std/time/year_month_weekday_last/1.cc: New test.
1966
1967 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1968
1969 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
1970 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
1971
1972 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1973
1974 * include/bits/iterator_concepts.h (indirectly_readable): Add
1975 partial specializations to resolve ambiguities (LWG 3446).
1976 * testsuite/24_iterators/associated_types/readable.traits.cc:
1977 Check types with both value_type and element_type.
1978
1979 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1980
1981 * include/std/ranges (ranges::iota_view::size()): Perform all
1982 calculations in the right unsigned types.
1983 * testsuite/std/ranges/iota/size.cc: New test.
1984
1985 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1986
1987 PR libstdc++/96766
1988 * include/std/variant (_Variant_storage): Replace implicit
1989 conversions from size_t to __index_type with explicit casts.
1990
1991 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1992
1993 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
1994 C++11 and skip for C++17 or later.
1995
1996 2020-08-24 Corentin Gay <gay@adacore.com>
1997
1998 * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
1999 threads and add -pthread only on targets supporting them.
2000 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
2001 Likewise.
2002 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
2003 Likewise.
2004 * testsuite/30_threads/async/42819.cc: Likewise.
2005 * testsuite/30_threads/async/49668.cc: Likewise.
2006 * testsuite/30_threads/async/54297.cc: Likewise.
2007 * testsuite/30_threads/async/any.cc: Likewise.
2008 * testsuite/30_threads/async/async.cc: Likewise.
2009 * testsuite/30_threads/async/except.cc: Likewise.
2010 * testsuite/30_threads/async/launch.cc: Likewise.
2011 * testsuite/30_threads/async/lwg2021.cc: Likewise.
2012 * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
2013 * testsuite/30_threads/call_once/39909.cc: Likewise.
2014 * testsuite/30_threads/call_once/49668.cc: Likewise.
2015 * testsuite/30_threads/call_once/60497.cc: Likewise.
2016 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
2017 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
2018 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
2019 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
2020 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
2021 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
2022 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
2023 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
2024 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
2025 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
2026 Likewise.
2027 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
2028 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
2029 * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
2030 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
2031 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
2032 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
2033 * testsuite/30_threads/future/cons/move.cc: Likewise.
2034 * testsuite/30_threads/future/members/45133.cc: Likewise.
2035 * testsuite/30_threads/future/members/get.cc: Likewise.
2036 * testsuite/30_threads/future/members/get2.cc: Likewise.
2037 * testsuite/30_threads/future/members/share.cc: Likewise.
2038 * testsuite/30_threads/future/members/valid.cc: Likewise.
2039 * testsuite/30_threads/future/members/wait.cc: Likewise.
2040 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
2041 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
2042 * testsuite/30_threads/lock/1.cc: Likewise.
2043 * testsuite/30_threads/lock/2.cc: Likewise.
2044 * testsuite/30_threads/lock/3.cc: Likewise.
2045 * testsuite/30_threads/lock/4.cc: Likewise.
2046 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
2047 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
2048 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
2049 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
2050 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
2051 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
2052 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
2053 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
2054 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
2055 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
2056 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
2057 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
2058 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
2059 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
2060 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
2061 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
2062 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
2063 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
2064 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
2065 Likewise.
2066 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
2067 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
2068 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
2069 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
2070 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
2071 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
2072 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
2073 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
2074 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
2075 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
2076 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
2077 * testsuite/30_threads/promise/60966.cc: Likewise.
2078 * testsuite/30_threads/promise/cons/1.cc: Likewise.
2079 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
2080 * testsuite/30_threads/promise/cons/move.cc: Likewise.
2081 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
2082 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
2083 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
2084 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
2085 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
2086 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
2087 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
2088 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
2089 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
2090 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
2091 * testsuite/30_threads/promise/members/swap.cc: Likewise.
2092 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
2093 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
2094 Likewise.
2095 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
2096 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
2097 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
2098 Likewise.
2099 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
2100 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
2101 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
2102 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
2103 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
2104 * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
2105 Likewise.
2106 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
2107 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
2108 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
2109 Likewise.
2110 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
2111 Likewise.
2112 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
2113 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
2114 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
2115 Likewise.
2116 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
2117 Likewise.
2118 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
2119 Likewise.
2120 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
2121 Likewise.
2122 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
2123 Likewise.
2124 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
2125 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
2126 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
2127 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
2128 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
2129 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
2130 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
2131 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
2132 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
2133 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
2134 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
2135 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
2136 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
2137 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
2138 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
2139 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
2140 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
2141 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
2142 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
2143 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
2144 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
2145 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
2146 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
2147 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
2148 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
2149 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
2150 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
2151 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
2152 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
2153 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
2154 * testsuite/30_threads/this_thread/1.cc: Likewise.
2155 * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
2156 * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
2157 * testsuite/30_threads/thread/cons/1.cc: Likewise.
2158 * testsuite/30_threads/thread/cons/2.cc: Likewise.
2159 * testsuite/30_threads/thread/cons/3.cc: Likewise.
2160 * testsuite/30_threads/thread/cons/4.cc: Likewise.
2161 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
2162 * testsuite/30_threads/thread/cons/5.cc: Likewise.
2163 * testsuite/30_threads/thread/cons/6.cc: Likewise.
2164 * testsuite/30_threads/thread/cons/7.cc: Likewise.
2165 * testsuite/30_threads/thread/cons/8.cc: Likewise.
2166 * testsuite/30_threads/thread/cons/9.cc: Likewise.
2167 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
2168 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
2169 * testsuite/30_threads/thread/members/1.cc: Likewise.
2170 * testsuite/30_threads/thread/members/2.cc: Likewise.
2171 * testsuite/30_threads/thread/members/3.cc: Likewise.
2172 * testsuite/30_threads/thread/members/4.cc: Likewise.
2173 * testsuite/30_threads/thread/members/5.cc: Likewise.
2174 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
2175 Likewise.
2176 * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
2177 * testsuite/30_threads/thread/swap/1.cc: Likewise.
2178 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
2179 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
2180 Likewise.
2181 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
2182 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
2183 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
2184 Likewise.
2185 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
2186 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
2187 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
2188 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
2189 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
2190 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
2191 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
2192 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
2193 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
2194 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
2195 * testsuite/30_threads/try_lock/1.cc: Likewise.
2196 * testsuite/30_threads/try_lock/2.cc: Likewise.
2197 * testsuite/30_threads/try_lock/3.cc: Likewise.
2198 * testsuite/30_threads/try_lock/4.cc: Likewise.
2199 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
2200 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
2201 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
2202 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
2203 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
2204 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
2205 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
2206 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
2207 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
2208 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
2209 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
2210
2211 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
2212
2213 PR libstdc++/96736
2214 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
2215 test "cold" on darwin.
2216 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
2217 Likewise.
2218 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
2219 Likewise.
2220 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
2221 Likewise.
2222 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
2223 Likewise.
2224
2225 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
2226
2227 PR libstdc++/96718
2228 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
2229 tbb-backend effective target.
2230 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
2231 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
2232 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
2233
2234 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
2235
2236 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
2237 (incrementable_traits<__int128>): Define specialization.
2238 (incrementable_traits<unsigned __int128>): Likewise.
2239 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
2240 __int128.
2241
2242 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2243 Patrick Palka <ppalka@redhat.com>
2244
2245 PR libstdc++/96042
2246 * include/bits/range_access.h (__detail::__to_unsigned_like):
2247 Do not use make_unsigned_t<T> in the return type, as it can
2248 result in an error before the integral<T> constraint is checked.
2249 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
2250 (__detail::__make_unsigned_like_t): Define as the return type
2251 of __to_unsigned_like.
2252 * testsuite/std/ranges/subrange/96042.cc: New test.
2253
2254 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2255
2256 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
2257 (operator>=): Remove deprecated functions.
2258
2259 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2260
2261 PR libstdc++/96042
2262 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
2263 trait which is true for 128-bit integers even in strict modes.
2264 (__numeric_traits_integer, __numeric_traits): Use
2265 __is_integer_nonstrict instead of __is_integer.
2266 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
2267 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
2268 Define.
2269 * testsuite/std/ranges/iota/96042.cc: New test.
2270
2271 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2272
2273 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
2274 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
2275 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
2276 Add new macros to comment.
2277
2278 2020-08-19 Patrick Palka <ppalka@redhat.com>
2279
2280 * include/Makefile.am (bits_headers): Add new header
2281 <bits/max_size_type.h>.
2282 * include/Makefile.in: Regenerate.
2283 * include/bits/iterator_concepts.h
2284 (ranges::__detail::__max_diff_type): Remove definition, replace
2285 with forward declaration of class __max_diff_type.
2286 (__detail::__max_size_type): Remove definition, replace with
2287 forward declaration of class __max_size_type.
2288 (__detail::__is_unsigned_int128, __is_signed_int128)
2289 (__is_int128): New concepts.
2290 (__detail::__is_integer_like): Accept __int128 and unsigned
2291 __int128.
2292 (__detail::__is_signed_integer_like): Accept __int128.
2293 * include/bits/max_size_type.h: New header.
2294 * include/bits/range_access.h: Include <bits/max_size_type.h>.
2295 (__detail::__to_unsigned_like): Two new overloads.
2296 * testsuite/std/ranges/iota/difference_type.cc: New test.
2297 * testsuite/std/ranges/iota/max_size_type.cc: New test.
2298
2299 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2300
2301 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
2302 standard modes.
2303 (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
2304 message in deprecated warnings.
2305 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
2306 macros for marking features deprecated in C++11.
2307 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
2308 New macros.
2309 * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
2310 Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
2311 (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
2312 * include/backward/binders.h (binder1st, binder2nd): Likewise.
2313 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
2314 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
2315 * include/std/streambuf (stossc): Replace C++11 attribute
2316 with _GLIBCXX_DEPRECATED_SUGGEST.
2317 * include/std/type_traits (__is_nullptr_t): Use
2318 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
2319 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
2320 Also check for io_state, open_mode and seek_dir typedefs.
2321
2322 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
2323
2324 PR libstdc++/71579
2325 * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
2326 Add static_asserts to make sure that the argument of the type
2327 trait is not misused with incomplete types.
2328 (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
2329 to make sure that the first and second arguments of the type trait
2330 are not misused with incomplete types.
2331 * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
2332 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
2333 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
2334 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
2335 test.
2336 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
2337
2338 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
2339 Clement Chigot <clement.chigot@atos.net>
2340
2341 * config/os/aix/t-aix: Add complementary mode object files to
2342 libsupc++.a
2343
2344 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
2345
2346 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
2347 "cold" isn't used in the library. Also check <cxxabi.h>.
2348 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
2349 Likewise.
2350 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
2351 Likewise.
2352 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
2353 Likewise.
2354 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
2355 Likewise.
2356
2357 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
2358
2359 PR libstdc++/69724
2360 * include/std/future (__future_base::_S_make_deferred_state)
2361 (__future_base::_S_make_async_state): Remove.
2362 (__future_base::_Deferred_state): Change constructor to accept a
2363 parameter pack of arguments and forward them to the call
2364 wrapper.
2365 (__future_base::_Async_state_impl): Likewise. Replace lambda
2366 expression with a named member function.
2367 (async): Construct state object directly from the arguments,
2368 instead of using thread::__make_invoker, _S_make_deferred_state
2369 and _S_make_async_state. Move shared state into the returned
2370 future.
2371 * include/std/thread (thread::_Call_wrapper): New alias
2372 template for use by constructor and std::async.
2373 (thread::thread(Callable&&, Args&&...)): Create state object
2374 directly instead of using _S_make_state.
2375 (thread::__make_invoker, thread::__decayed_tuple)
2376 (thread::_S_make_state): Remove.
2377 * testsuite/30_threads/async/69724.cc: New test.
2378
2379 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
2380
2381 PR libstdc++/55713
2382 PR libstdc++/71096
2383 PR libstdc++/93147
2384 * include/std/tuple [__has_cpp_attribute(no_unique_address)]
2385 (_Head_base<Idx, Head, true>): New definition of the partial
2386 specialization, using [[no_unique_address]] instead of
2387 inheritance.
2388 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
2389 output.
2390 * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
2391 * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
2392 * testsuite/20_util/tuple/element_access/71096.cc: New test.
2393
2394 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
2395
2396 * testsuite/lib/libstdc++.exp: Use the new option
2397 -fdiagnostics-plain-output.
2398
2399 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
2400
2401 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
2402 option is used and fail unless --enable-cheaders-obsolete is
2403 also used.
2404 * configure: Regenerate.
2405
2406 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
2407
2408 PR libstdc++/85828
2409 * include/bits/basic_string.h (operator=(basic_string&&)): Check
2410 for self-move before copying with char_traits::copy.
2411 * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
2412 self-move.
2413 * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
2414 Check for equal allocators.
2415 * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
2416 Call clear() instead of _M_clear().
2417 * include/debug/formatter.h (__msg_self_move_assign): Change
2418 comment.
2419 * include/debug/macros.h (__glibcxx_check_self_move_assign):
2420 (_GLIBCXX_DEBUG_VERIFY): Remove.
2421 * include/debug/safe_container.h (operator=(_Safe_container&&)):
2422 Remove assertion check for safe move and make it well-defined.
2423 * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
2424 Remove assertion check for self-move.
2425 * include/debug/safe_local_iterator.h
2426 (operator=(_Safe_local_iterator&&)): Likewise.
2427 * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
2428 * testsuite/23_containers/deque/cons/self_move.cc: New test.
2429 * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
2430 * testsuite/23_containers/list/cons/self_move.cc: New test.
2431 * testsuite/23_containers/set/cons/self_move.cc: New test.
2432 * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
2433 * testsuite/23_containers/vector/cons/self_move.cc: New test.
2434
2435 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
2436
2437 PR libstdc++/91620
2438 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
2439 to destroy in an intermediate forward_list.
2440 (forward_list<>::remove_if, forward_list<>::unique): Likewise.
2441 * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
2442 (list<>::remove_if): Likewise.
2443 * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
2444 (forward_list<>::erase_after): Adapt.
2445 (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
2446 destroy in an intermediate forward_list.
2447 (forward_list<>::unique): Likewise.
2448 * include/debug/list (list<>::remove, list<>::unique): Likewise.
2449 (list<>::remove_if): Likewise.
2450 * testsuite/23_containers/forward_list/operations/91620.cc: New test.
2451 * testsuite/23_containers/list/operations/91620.cc: New test.
2452
2453 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2454
2455 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
2456 namespace.
2457 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
2458
2459 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2460
2461 PR libstdc++/89760
2462 * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
2463 (execution_context::mutex_type): Define dummy mutex type.
2464 (system_context): Use execution_context::mutex_type.
2465 (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
2466 thread and condition variable types.
2467 [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
2468 define.
2469 (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
2470 an exception when threads aren't available.
2471 (strand::running_in_this_thread()): Defer to _M_state.
2472 (strand::_State::running_in_this_thread()): New function.
2473 (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
2474 * include/experimental/io_context (io_context): Use the
2475 execution_context::mutex_type alias. Replace stack of thread
2476 IDs with counter.
2477 * testsuite/experimental/net/execution_context/use_service.cc:
2478 Enable test for non-pthread targets.
2479
2480 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2481
2482 * include/experimental/executor (system_context::a__tag): Make
2483 default constructor explicit.
2484
2485 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2486
2487 * include/experimental/executor (system_context::_M_run()):
2488 Fix predicate.
2489 * testsuite/experimental/net/system_context/1.cc: New test.
2490
2491 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2492
2493 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
2494 #ifdef instead of #if.
2495 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
2496 using __gthread_yield.
2497
2498 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2499
2500 * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
2501 (this_thread::sleep_until): Define.
2502 [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
2503 use of __gthread_time_t typedef with timespec.
2504 * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
2505 Likewise.
2506 * testsuite/30_threads/this_thread/2.cc: Moved to...
2507 * testsuite/30_threads/this_thread/yield.cc: ...here.
2508 * testsuite/30_threads/this_thread/3.cc: Moved to...
2509 * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
2510 * testsuite/30_threads/this_thread/4.cc: Moved to...
2511 * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
2512 * testsuite/30_threads/this_thread/58038.cc: Add
2513 dg-require-sleep.
2514 * testsuite/30_threads/this_thread/60421.cc: Likewise.
2515 * testsuite/30_threads/this_thread/sleep_for.cc: New test.
2516 * testsuite/30_threads/this_thread/sleep_until.cc: New test.
2517
2518 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2519
2520 PR libstdc++/94681
2521 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
2522 of calling ::lstat directly.
2523 * src/filesystem/ops.cc (read_symlink): Likewise.
2524
2525 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2526
2527 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2528 Use gdb.Type.strip_typedefs().
2529 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
2530 the emulated old type.
2531
2532 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2533
2534 PR libstdc++/94681
2535 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
2536 $enable_libstdcxx_filesystem_ts.
2537 * configure: Regenerate.
2538
2539 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2540
2541 PR libstdc++/93904
2542 * include/bits/stl_iterator.h (inserter): Do not deduce
2543 iterator type (LWG 561).
2544 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
2545
2546 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2547
2548 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
2549 (basic_string::reserve()): Do nothing if exceptions are not
2550 enabled.
2551
2552 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2553
2554 PR libstdc++/95749
2555 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2556 (stat_type): Change to __stat64.
2557 (stat): Use _wstat64.
2558
2559 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2560
2561 PR libstdc++/96303
2562 * include/debug/bitset (bitset::operator==): Call _M_base() on
2563 right operand.
2564 (bitset::operator!=): Likewise, but don't define it at all when
2565 default comparisons are supported by the compiler.
2566 * testsuite/23_containers/bitset/operations/96303.cc: New test.
2567
2568 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2569
2570 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
2571 Replace VERIFY with static_assert where the compiler now
2572 allows it.
2573 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
2574 Likewise.
2575
2576 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2577
2578 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
2579
2580 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
2581 Jonathan Wakely <jwakely@redhat.com>
2582
2583 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
2584 patterns for basic_string members.
2585 (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
2586 * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
2587 * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
2588 (reserve(size_type)): Remove default argument.
2589 (reserve()): Declare new overload.
2590 [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
2591 * include/bits/basic_string.tcc (reserve(size_type)): Remove
2592 support for shrinking capacity.
2593 (reserve()): Perform shrink-to-fit operation.
2594 [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
2595 * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
2596 reflect new behavior.
2597 * testsuite/21_strings/basic_string/capacity/char/1.cc:
2598 Likewise.
2599 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
2600 Likewise.
2601 * testsuite/21_strings/basic_string/capacity/char/2.cc:
2602 Likewise.
2603 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
2604 Likewise.
2605 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
2606 Likewise.
2607 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
2608 Likewise.
2609
2610 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2611
2612 * include/bits/basic_string.tcc
2613 (operator>>(basic_istream&, basic_string&)): Do not set eofbit
2614 if extraction stopped after in.width() characters.
2615 * src/c++98/istream-string.cc (operator>>(istream&, string&)):
2616 Likewise.
2617 * include/bits/istream.tcc (__istream_extract): Do not set
2618 eofbit if extraction stopped after n-1 characters.
2619 * src/c++98/istream.cc (__istream_extract): Likewise.
2620 * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
2621 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
2622 * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
2623 * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
2624
2625 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2626
2627 PR libstdc++/96484
2628 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
2629 immediately for non-symlinks.
2630 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
2631
2632 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2633
2634 * include/std/istream (operator>>(istream&, char*)): Add
2635 attributes to get warnings for pointers that are null or known
2636 to point to the end of a buffer. Request upper bound from
2637 __builtin_object_size check and handle zero-sized buffer case.
2638 (operator>>(istream&, signed char))
2639 (operator>>(istream&, unsigned char*)): Add attributes.
2640 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
2641 Check extracting into the middle of a buffer.
2642 * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
2643
2644 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
2645
2646 * include/std/atomic (atomic<T>::store): Reformat.
2647
2648 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
2649
2650 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
2651 with LLVM repo for PSTL.
2652 * doc/html/manual/status.html: Regenerate.
2653
2654 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
2655
2656 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
2657 * include/bits/istream.tcc (__istream_extract): New function
2658 template implementing both of operator>>(istream&, char*) and
2659 operator>>(istream&, char(&)[N]). Add explicit instantiation
2660 declaration for it. Remove explicit instantiation declarations
2661 for old function templates.
2662 * include/std/istream (__istream_extract): Declare.
2663 (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
2664 call __istream_extract.
2665 (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
2666 (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
2667 (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
2668 (operator>>(basic_istream<char,T>&, signed char(&)[N])):
2669 Likewise.
2670 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
2671 Likewise.
2672 * include/std/streambuf (basic_streambuf): Declare char overload
2673 of __istream_extract as a friend.
2674 * src/c++11/istream-inst.cc: Add explicit instantiation
2675 definition for wchar_t overload of __istream_extract. Remove
2676 explicit instantiation definitions of old operator>> overloads
2677 for versioned-namespace build.
2678 * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
2679 with __istream_extract(istream&, char*, streamsize).
2680 * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
2681 Do not use variable-length array.
2682 * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
2683 Do not run test for C++20.
2684 * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
2685 Do not test writing to pointers for C++20.
2686 * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
2687 Use array instead of pointer.
2688 * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
2689 Do not use variable-length array.
2690 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
2691 Do not run test for C++20.
2692 * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
2693 Do not test writing to pointers for C++20.
2694 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
2695 New test.
2696 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
2697 New test.
2698 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
2699 New test.
2700 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
2701 New test.
2702 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
2703 New test.
2704
2705 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
2706
2707 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
2708 https.
2709 * doc/html/manual/using_exceptions.html: Regenerate.
2710
2711 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
2712
2713 * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
2714 of oneAPI DPC++ Library on Github.
2715 * doc/html/manual/status.html: Regenerate.
2716
2717 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
2718
2719 * include/bits/stl_bvector.h
2720 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
2721 _Bit_type*.
2722 (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
2723 (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
2724 (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
2725 (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
2726 (_Bvector_impl_data::_M_reset()): Likewise.
2727 (_Bvector_impl_data::_M_swap_data): New.
2728 (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
2729 (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
2730 (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
2731 New, use latter.
2732 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
2733 latter.
2734 (vector::vector(vector&&, const allocator_type&, false_type)): New.
2735 (vector::vector(vector&&, const allocator_type&)): Use latters.
2736 (vector::vector(const vector&, const allocator_type&)): Adapt.
2737 [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
2738 const allocator_type&)): Use _M_initialize_range.
2739 (vector::operator[](size_type)): Use iterator operator[].
2740 (vector::operator[](size_type) const): Use const_iterator operator[].
2741 (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
2742 [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
2743 _InputIt)): Use _M_insert_range.
2744 (vector::_M_initialize(size_type)): Adapt.
2745 [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
2746 [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
2747 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
2748 using start _M_offset.
2749 (StdVectorPrinter.to_string): Likewise.
2750 * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
2751 * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
2752 Add check.
2753
2754 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2755
2756 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
2757 instead of nullptr.
2758 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
2759 Likewise.
2760
2761 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2762
2763 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
2764 Move struct to namespace scope.
2765
2766 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2767
2768 * testsuite/26_numerics/numbers/float128.cc: Check
2769 __STRICT_ANSI__ before using __float128.
2770 * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
2771 Likewise.
2772
2773 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2774
2775 * testsuite/18_support/set_terminate.cc: Require C++11 or
2776 higher.
2777 * testsuite/28_regex/simple_c++11.cc: Likewise.
2778 * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
2779 * testsuite/24_iterators/headers/iterator/synopsis.cc:
2780 Require C++14 or lower.
2781
2782 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2783
2784 * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
2785 effective-target from xfail selector.
2786 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
2787 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
2788 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
2789 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
2790 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
2791 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
2792 * testsuite/23_containers/span/subspan_2_assert_neg.cc:
2793 Likewise.
2794 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
2795 Likewise.
2796 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
2797 Likewise.
2798 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
2799 Likewise.
2800 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
2801 Likewise.
2802 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
2803
2804 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2805
2806 * testsuite/20_util/reference_wrapper/83427.cc: Adjust
2807 effective-target to specific language mode only.
2808 * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
2809 Likewise.
2810 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
2811 Likewise.
2812 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
2813 Likewise.
2814 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
2815 Likewise.
2816 * testsuite/26_numerics/valarray/69116.cc:
2817 Likewise.
2818 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
2819 Remove whitespace at end of file.
2820 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
2821 Likewise.
2822
2823 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2824
2825 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
2826 c++17 effective-target.
2827 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
2828 Likewise.
2829 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
2830 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
2831 Likewise.
2832 * testsuite/17_intro/headers/c++2017/operator_names.cc:
2833 Likewise.
2834 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
2835 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
2836 Likewise.
2837 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
2838 Likewise.
2839 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
2840 Likewise.
2841 * testsuite/20_util/any/assign/1.cc: Likewise.
2842 * testsuite/20_util/any/assign/2.cc: Likewise.
2843 * testsuite/20_util/any/assign/emplace.cc: Likewise.
2844 * testsuite/20_util/any/assign/exception.cc: Likewise.
2845 * testsuite/20_util/any/assign/self.cc: Likewise.
2846 * testsuite/20_util/any/cons/1.cc: Likewise.
2847 * testsuite/20_util/any/cons/2.cc: Likewise.
2848 * testsuite/20_util/any/cons/aligned.cc: Likewise.
2849 * testsuite/20_util/any/cons/explicit.cc: Likewise.
2850 * testsuite/20_util/any/cons/in_place.cc: Likewise.
2851 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
2852 * testsuite/20_util/any/make_any.cc: Likewise.
2853 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
2854 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
2855 * testsuite/20_util/any/misc/swap.cc: Likewise.
2856 * testsuite/20_util/any/modifiers/1.cc: Likewise.
2857 * testsuite/20_util/any/observers/type.cc: Likewise.
2858 * testsuite/20_util/any/requirements.cc: Likewise.
2859 * testsuite/20_util/any/typedefs.cc: Likewise.
2860 * testsuite/20_util/as_const/1.cc: Likewise.
2861 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
2862 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
2863 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
2864 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
2865 Likewise.
2866 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
2867 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
2868 Likewise.
2869 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
2870 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
2871 * testsuite/20_util/function_objects/searchers.cc: Likewise.
2872 * testsuite/20_util/in_place/requirements.cc: Likewise.
2873 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
2874 Likewise.
2875 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
2876 Likewise.
2877 * testsuite/20_util/is_invocable/value.cc: Likewise.
2878 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
2879 Likewise.
2880 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
2881 Likewise.
2882 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
2883 Likewise.
2884 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
2885 Likewise.
2886 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
2887 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
2888 Likewise.
2889 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
2890 Likewise.
2891 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
2892 Likewise.
2893 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
2894 Likewise.
2895 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
2896 Likewise.
2897 * testsuite/20_util/is_swappable/value.cc: Likewise.
2898 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
2899 Likewise.
2900 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
2901 Likewise.
2902 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
2903 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
2904 Likewise.
2905 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
2906 Likewise.
2907 * testsuite/20_util/logical_traits/value.cc: Likewise.
2908 * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
2909 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
2910 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
2911 * testsuite/20_util/optional/hash.cc: Likewise.
2912 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
2913 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
2914 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
2915 Likewise.
2916 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
2917 Likewise.
2918 * testsuite/20_util/tuple/apply/1.cc: Likewise.
2919 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
2920 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
2921 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
2922 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
2923 Likewise.
2924 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
2925 Likewise.
2926 * testsuite/20_util/variant/any.cc: Likewise.
2927 * testsuite/20_util/variant/compile.cc: Likewise.
2928 * testsuite/20_util/variant/hash.cc: Likewise.
2929 * testsuite/20_util/variant/index_type.cc: Likewise.
2930 * testsuite/20_util/variant/run.cc: Likewise.
2931 * testsuite/20_util/void_t/1.cc: Likewise.
2932 * testsuite/21_strings/basic_string/79162.cc: Likewise.
2933 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
2934 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
2935 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
2936 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
2937 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
2938 Likewise.
2939 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
2940 Likewise.
2941 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
2942 Likewise.
2943 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
2944 Likewise.
2945 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
2946 Likewise.
2947 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
2948 Likewise.
2949 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
2950 Likewise.
2951 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
2952 Likewise.
2953 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
2954 Likewise.
2955 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
2956 Likewise.
2957 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
2958 Likewise.
2959 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
2960 Likewise.
2961 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
2962 Likewise.
2963 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
2964 Likewise.
2965 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
2966 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
2967 Likewise.
2968 * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
2969 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
2970 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
2971 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
2972 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
2973 Likewise.
2974 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
2975 Likewise.
2976 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
2977 Likewise.
2978 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
2979 Likewise.
2980 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
2981 Likewise.
2982 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2983 Likewise.
2984 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
2985 Likewise.
2986 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
2987 Likewise.
2988 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
2989 Likewise.
2990 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
2991 Likewise.
2992 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
2993 Likewise.
2994 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
2995 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
2996 Likewise.
2997 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
2998 Likewise.
2999 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
3000 Likewise.
3001 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
3002 Likewise.
3003 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
3004 Likewise.
3005 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
3006 Likewise.
3007 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
3008 Likewise.
3009 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3010 Likewise.
3011 * testsuite/21_strings/basic_string_view/literals/types.cc:
3012 Likewise.
3013 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
3014 Likewise.
3015 * testsuite/21_strings/basic_string_view/literals/values.cc:
3016 Likewise.
3017 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
3018 Likewise.
3019 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
3020 Likewise.
3021 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
3022 Likewise.
3023 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
3024 Likewise.
3025 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
3026 Likewise.
3027 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
3028 Likewise.
3029 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
3030 Likewise.
3031 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
3032 Likewise.
3033 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
3034 Likewise.
3035 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
3036 Likewise.
3037 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
3038 Likewise.
3039 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
3040 Likewise.
3041 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
3042 Likewise.
3043 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
3044 Likewise.
3045 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
3046 Likewise.
3047 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
3048 Likewise.
3049 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
3050 Likewise.
3051 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
3052 Likewise.
3053 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
3054 Likewise.
3055 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
3056 Likewise.
3057 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
3058 Likewise.
3059 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
3060 Likewise.
3061 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
3062 Likewise.
3063 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
3064 Likewise.
3065 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
3066 Likewise.
3067 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
3068 Likewise.
3069 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
3070 Likewise.
3071 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
3072 Likewise.
3073 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
3074 Likewise.
3075 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
3076 Likewise.
3077 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
3078 Likewise.
3079 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
3080 Likewise.
3081 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
3082 Likewise.
3083 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
3084 Likewise.
3085 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
3086 Likewise.
3087 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
3088 Likewise.
3089 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
3090 Likewise.
3091 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3092 Likewise.
3093 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
3094 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
3095 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
3096 Likewise.
3097 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
3098 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
3099 Likewise.
3100 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
3101 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
3102 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
3103 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
3104 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
3105 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
3106 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
3107 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
3108 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
3109 Likewise.
3110 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
3111 Likewise.
3112 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
3113 Likewise.
3114 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
3115 Likewise.
3116 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
3117 Likewise.
3118 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
3119 Likewise.
3120 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
3121 Likewise.
3122 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
3123 Likewise.
3124 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
3125 Likewise.
3126 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
3127 Likewise.
3128 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
3129 Likewise.
3130 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
3131 Likewise.
3132 * testsuite/25_algorithms/clamp/1.cc: Likewise.
3133 * testsuite/25_algorithms/clamp/2.cc: Likewise.
3134 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
3135 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
3136 Likewise.
3137 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
3138 Likewise.
3139 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
3140 Likewise.
3141 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3142 Likewise.
3143 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
3144 Likewise.
3145 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
3146 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3147 Likewise.
3148 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
3149 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
3150 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
3151 Likewise.
3152 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
3153 Likewise.
3154 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
3155 Likewise.
3156 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
3157 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
3158 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
3159
3160 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3161
3162 PR libstdc++/96382
3163 * include/bits/stl_iterator.h (reverse_iterator): Friend
3164 declaration should not depend on __cplusplus.
3165
3166 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3167
3168 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
3169 Remove -std=gnu++17 option.
3170
3171 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3172
3173 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
3174 definition of aggregates in C++20.
3175 * testsuite/20_util/optional/requirements.cc: Adjust for
3176 defaulted comparisons in C++20.
3177
3178 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3179
3180 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
3181 deprecation of volatile-qualified structured bindings in C++20.
3182 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
3183 for deprecation of is_pod in C++20
3184
3185 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3186
3187 * testsuite/20_util/time_point_cast/rounding.cc: Remove
3188 duplicate dg-do directive and add c++17 effective target.
3189
3190 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3191
3192 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
3193 LC_ALL_MASK not LC_ALL.
3194
3195 2020-07-31 Richard Biener <rguenther@suse.de>
3196
3197 PR debug/96383
3198 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
3199
3200 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3201
3202 * include/bits/basic_string.h (size_type, difference_type):
3203 Use allocator_traits to obtain the allocator's size_type and
3204 difference_type.
3205
3206 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3207
3208 PR libstdc++/96279
3209 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
3210 isinf unqualified.
3211 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
3212 double.
3213
3214 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3215
3216 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
3217 Use allocator with the correct value type.
3218 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
3219 Likewise.
3220
3221 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3222
3223 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
3224 to string::insert.
3225
3226 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3227
3228 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
3229 helper concept.
3230 (__detail::__integral_nonbool): Likewise.
3231 (__detail::__is_integer_like): Use __integral_nonbool.
3232 * testsuite/std/ranges/access/lwg3467.cc: New test.
3233
3234 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3235
3236 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
3237 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
3238
3239 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3240
3241 * testsuite/23_containers/vector/bool/72847.cc: Use the
3242 exceptions_enabled effective-target keyword instead of
3243 checking for an explicit -fno-exceptions option.
3244 * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
3245 redundant try-catch.
3246 * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
3247 Do not define check_allocate_max_size and memory_resource.
3248 * testsuite/util/testsuite_containers.h: Replace comment with
3249 #error if wrong standard dialect used.
3250 * testsuite/util/testsuite_shared.cc: Likewise.
3251
3252 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
3253
3254 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
3255 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
3256 Make hidden friend.
3257 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
3258 Make hidden friend.
3259 (_Local_iterator_base<>): Inherits _Node_iterator_base.
3260 (_Local_iterator_base<>::_M_cur): Remove.
3261 (_Local_iterator_base<>::_M_curr()): Remove.
3262 (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
3263 Remove.
3264 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
3265 Remove.
3266 * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
3267 (unordered_multimap<>::_M_invalidate): Adapt.
3268 * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
3269 (unordered_multiset<>::_M_invalidate): Adapt.
3270
3271 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
3272 Jonathan Wakely <jwakely@redhat.com>
3273 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3274
3275 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
3276 target powerpc-ibm-aix* and powerpc*-*-darwin*.
3277 * testsuite/29_atomics/atomic_float/value_init.cc: Add options
3278 for libatomic.
3279
3280 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
3281
3282 * include/bits/hashtable.h
3283 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
3284 Add noexcept qualification.
3285 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
3286 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
3287 qualification.
3288 * include/bits/unordered_map.h
3289 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
3290 qualification.
3291 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
3292 Likewise.
3293 * include/bits/unordered_set.h
3294 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
3295 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
3296 Likewise.
3297 * include/debug/unordered_map
3298 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
3299 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
3300 Likewise.
3301 * include/debug/unordered_set
3302 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
3303 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
3304 Likewise.
3305 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
3306 New test.
3307 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
3308 New test.
3309 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
3310 New test.
3311 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
3312 New test.
3313 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
3314 New test.
3315 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
3316 New test.
3317 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
3318 New test.
3319 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
3320 New test.
3321 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
3322 New test.
3323 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
3324 New test.
3325 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
3326 New test.
3327
3328 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
3329
3330 * include/bits/hashtable.h
3331 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3332 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3333 const allocator_type&, true_type)): New.
3334 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3335 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3336 const allocator_type&, false_type)): New.
3337 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3338 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3339 const allocator_type&)): Delegate to latters.
3340 (operator=(initializer_list<value_type>)): Rehash if too small.
3341 (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
3342 size_t len parameter.
3343 * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
3344 Do not try to get input range distance.
3345 * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
3346 * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
3347
3348 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
3349
3350 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
3351 _Hashtable<>::find.
3352 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
3353 (_Hashtable_base<>::_M_node_equals): New, use latter.
3354 (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
3355 _RehashPolicy, false>::_M_equal): Adapt to use latter.
3356 * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
3357 (_Hashtable<>::_M_assign): Use latter.
3358 (_Hashtable<>::_M_move_assign): Likewise.
3359 (_Hashtable<>(_Hashtable<>&&)): Likewise.
3360 (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
3361 (_Hashtable<>::swap): Likewise.
3362 (_Hashtable<>::find): Build iterator directly from _M_find_node result.
3363 (_Hashtable<>::count): Use _Hashtable<>::find.
3364 (_Hashtable<>::equal_range): Likewise.
3365 (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
3366 _M_node_equals.
3367
3368 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
3369
3370 * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
3371 that FE_NEAREST is used.
3372 * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
3373 a { target c++14 } test.
3374 [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
3375 * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
3376 Likewise.
3377 * testsuite/20_util/from_chars/6.cc: New test.
3378
3379 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
3380
3381 * include/std/future (future, shared_future, promise): Add
3382 static assertions to the primary template to reject array and
3383 function types.
3384 * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
3385 * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
3386 * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
3387
3388 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
3389
3390 * include/bits/stl_iterator.h (reverse_iterator): Constrain
3391 converting constructor and converting assignment operator.
3392 Access source iterator's data member directly instead of
3393 calling base().
3394 (move_iterator): Likewise.
3395 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
3396 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
3397
3398 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
3399
3400 * acinclude.m4 (libtool_VERSION): Bump version.
3401 * config.h.in: Regenerate.
3402 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
3403 exports.
3404 * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
3405 version and new export.
3406 * configure: Regenerate.
3407 * configure.ac: Check for <xlocale.h> and uselocale.
3408 * crossconfig.m4: Add macro or checks for uselocale.
3409 * include/std/charconv (from_chars): Declare overloads for
3410 float, double, and long double.
3411 * src/c++17/Makefile.am: Add new file.
3412 * src/c++17/Makefile.in: Regenerate.
3413 * src/c++17/floating_from_chars.cc: New file.
3414 (from_chars): Define for float, double, and long double.
3415 * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
3416 diagnostics caused by new overloads.
3417 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
3418 * testsuite/20_util/from_chars/2.cc: Check leading '+'.
3419 * testsuite/20_util/from_chars/4.cc: New test.
3420 * testsuite/20_util/from_chars/5.cc: New test.
3421 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
3422
3423 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
3424
3425 * include/bits/istream.tcc
3426 (basic_istream::get(__streambuf_type&, char_type): Use unsigned
3427 long long for counter and check if it would overflow _M_gcount.
3428 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
3429 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
3430
3431 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
3432
3433 * include/std/coroutine: Mark the methods of the
3434 trivial awaitables as constexpr.
3435
3436 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
3437
3438 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
3439
3440 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
3441
3442 PR libstdc++/94749
3443 PR libstdc++/96161
3444 * include/bits/istream.tcc (basic_istream::ignore(streamsize))
3445 [n == max]: Check overflow conditions on _M_gcount. Rely on
3446 the fact that either EOF or the delimiter was reached.
3447 [n < max]: Check _M_gcount < n before checking for EOF or
3448 delimiter.
3449 (basic_istream::ignore(streamsize, char_type): Likewise.
3450 * src/c++98/compatibility.cc (istream::ignore(streamsize))
3451 (wistream::ignore(streamsize)): Likewise.
3452 * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
3453 (wistream::ignore(streamsize, char_type)): Likewise.
3454 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
3455 delimiter is discarded if the number of characters ignored
3456 doesn't fit in streamsize.
3457 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
3458 Likewise.
3459 * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
3460 * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
3461
3462 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
3463
3464 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
3465 qualification based only on _Compare one.
3466 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
3467 static asserts.
3468 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
3469 Likewise.
3470 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
3471 Likewise.
3472 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
3473
3474 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3475
3476 * include/std/limits: Whitespace changes.
3477
3478 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3479
3480 * include/Makefile.am: Remove bits/int_limits.h.
3481 * include/Makefile.in: Regenerate.
3482 * include/bits/int_limits.h: Removed.
3483 * include/bits/parse_numbers.h (_Select_int_base): Replace
3484 __int_limits with __int_traits.
3485 * include/bits/range_access.h (_SSize::operator()): Likewise.
3486 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
3487 static assertion.
3488 (__int_traits): New alias template.
3489 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
3490 (__countr_zero, __countr_one, __popcount, __bit_ceil)
3491 (__bit_floor, __bit_width) Replace __int_limits with
3492 __int_traits.
3493 * include/std/charconv (__to_chars_8, __from_chars_binary)
3494 (__from_chars_alpha_to_num, from_chars): Likewise.
3495 * include/std/memory_resource (polymorphic_allocator::allocate)
3496 (polymorphic_allocator::allocate_object): Likewise.
3497 * include/std/string_view (basic_string_view::_S_compare):
3498 Likewise.
3499 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
3500
3501 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3502
3503 * include/std/limits: Whitespace changes.
3504
3505 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3506
3507 * include/std/optional (_Optional_payload_base, _Optional_base)
3508 (optional, __optional_hash_call_base): Adjust whitespace and
3509 other formatting. Remove redundant && tokens on template
3510 arguments to type traits.
3511
3512 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3513
3514 * include/std/optional (make_optional): Add enable_if
3515 constraints and noexcept-specifier to each overload.
3516 * testsuite/20_util/optional/make_optional-2.cc: New test.
3517
3518 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3519
3520 PR libstdc++/96036
3521 * include/std/optional (optional): Add noexcept-specifier to
3522 every constructor, assignment operator, emplace function and
3523 dereference operator.
3524 * testsuite/20_util/optional/assignment/noexcept.cc: New test.
3525 * testsuite/20_util/optional/cons/noexcept.cc: New test.
3526
3527 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3528
3529 PR libstdc++/96063
3530 * include/bits/fs_dir.h: Use consistent tag in class-head.
3531 * include/bits/localefwd.h: Likewise.
3532 * include/bits/regex.h: Likewise.
3533 * include/bits/stl_map.h: Likewise.
3534 * include/bits/stl_multimap.h: Likewise.
3535 * include/bits/stl_multiset.h: Likewise.
3536 * include/bits/stl_set.h: Likewise.
3537 * include/std/complex: Likewise.
3538 * include/std/functional: Likewise.
3539 * include/std/future: Likewise.
3540 * include/std/system_error: Likewise.
3541 * include/std/thread: Likewise.
3542 * include/std/tuple: Likewise.
3543 * include/std/type_traits: Likewise.
3544 * include/std/valarray: Likewise.
3545
3546 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
3547
3548 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
3549 target selector.
3550
3551 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
3552
3553 * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
3554 c++98_only target selector.
3555 * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
3556 Likewise.
3557 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
3558 Likewise.
3559 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
3560 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
3561 Likewise.
3562 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
3563 Likewise.
3564 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
3565 Likewise.
3566 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
3567 Likewise.
3568 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
3569 Likewise.
3570 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
3571 Likewise.
3572 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
3573 Likewise.
3574 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
3575 Likewise.
3576 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
3577 Likewise.
3578 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
3579 Likewise.
3580 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
3581 Likewise.
3582 * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
3583 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
3584 * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
3585 Likewise.
3586 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
3587 Likewise.
3588 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
3589 Likewise.
3590 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
3591 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
3592 Likewise.
3593
3594 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
3595
3596 PR libstdc++/91807
3597 * include/std/variant
3598 (_Copy_assign_base::operator=(const _Copy_assign_base&):
3599 Do the move-assignment from a temporary so that the temporary
3600 is constructed with an explicit index.
3601 * testsuite/20_util/variant/91807.cc: New.
3602
3603 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
3604
3605 PR libstdc++/91153
3606 PR target/93224
3607 * testsuite/29_atomics/atomic_float/1.cc: Use different values
3608 for tests.
3609 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
3610
3611 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
3612
3613 PR libstdc++/94627
3614 * include/bits/regex.h (operator==, operator!=): Remove noexcept
3615 equality comparisons for match_results.
3616 * testsuite/28_regex/match_results/94627.cc: New test.
3617
3618 2020-07-01 Martin Sebor <msebor@redhat.com>
3619
3620 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
3621 text of expected warning.
3622 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
3623 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
3624 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
3625 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
3626
3627 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
3628
3629 Revert:
3630 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3631
3632 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
3633 Add a __nonnull__ attribute.
3634 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
3635 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
3636
3637 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3638
3639 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
3640 Add a __nonnull__ attribute.
3641 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
3642 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
3643
3644 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3645
3646 PR libstdc++/95915
3647 * include/std/type_traits (is_literal_type, is_literal_type_v):
3648 Deprecate in C++17.
3649 * include/std/variant (_Uninitialized):
3650 Adjust the condition and the comment.
3651 * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
3652 * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
3653 Adjust.
3654 * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
3655 * testsuite/20_util/is_literal_type/value.cc: Likewise.
3656 * testsuite/20_util/optional/constexpr/nullopt.cc:
3657 Use __is_literal_type directly.
3658 * testsuite/20_util/optional/nullopt.cc: Likewise.
3659 * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
3660 * testsuite/20_util/variant/95915.cc: New.
3661 * testsuite/20_util/variant/compile.cc: Add new test.
3662 * testsuite/experimental/optional/constexpr/nullopt.cc:
3663 Use __is_literal_type directly.
3664 * testsuite/experimental/optional/nullopt.cc: Likewise.
3665 * testsuite/experimental/type_traits/value.cc: Adjust.
3666 * testsuite/util/testsuite_common_types.h:
3667 Use __is_literal_type directly.
3668
3669 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
3670
3671 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
3672 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
3673 not just 10 and 16.
3674 * testsuite/20_util/from_chars/3.cc: New test.
3675
3676 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
3677
3678 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
3679 * include/std/charconv (__detail::__to_chars): Avoid
3680 -Wsign-compare warning.
3681
3682 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
3683
3684 PR libstdc++/95851
3685 * include/std/charconv (__to_chars_i): Check for zero-sized
3686 buffer unconditionally.
3687 * testsuite/20_util/to_chars/95851.cc: New test.
3688
3689 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
3690
3691 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
3692 type.
3693 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
3694 directives outside preprocessor condition.
3695
3696 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
3697
3698 PR libstdc++/95832
3699 * include/std/variant (__detail::__variant::_Build_FUN): Remove
3700 partial specialization to prevent narrowing conversions to bool.
3701 * testsuite/20_util/variant/compile.cc: Test non-narrowing
3702 conversions to bool.
3703 * testsuite/20_util/variant/run.cc: Likewise.
3704
3705 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
3706
3707 * doc/Makefile.in: Regenerate.
3708 * include/Makefile.in: Regenerate.
3709 * libsupc++/Makefile.in: Regenerate.
3710 * po/Makefile.in: Regenerate.
3711 * python/Makefile.in: Regenerate.
3712 * src/Makefile.in: Regenerate.
3713 * src/c++11/Makefile.in: Regenerate.
3714 * src/c++17/Makefile.in: Regenerate.
3715 * src/c++98/Makefile.in: Regenerate.
3716 * src/filesystem/Makefile.in: Regenerate.
3717 * testsuite/Makefile.in: Regenerate.
3718
3719 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
3720
3721 * Makefile.am: Use -include.
3722 * Makefile.in: Regenerate.
3723
3724 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
3725
3726 * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
3727 * Makefile.in: Regenerate.
3728 * configure.ac (tmake_file): Substitute.
3729 * configure: Regenerate.
3730 * configure.host (aix*): Define tmake_file.
3731 * config/os/aix/t-aix: New file.
3732
3733 2020-06-20 Jason Merrill <jason@redhat.com>
3734
3735 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
3736 Remove greedy_ops tests.
3737 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
3738 Remove greedy_ops tests.
3739
3740 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3741
3742 PR libstdc++/95765
3743 * include/bits/stl_algobase.h (__size_to_integer(float))
3744 (__size_to_integer(double), __size_to_integer(long double))
3745 (__size_to_integer(__float128)): Cast return type explicitly.
3746 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
3747 Remove unused typedef.
3748
3749 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3750
3751 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
3752 namespace qualification.
3753 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
3754 Likewise.
3755 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
3756 (tuple_element, __get_helper, get, __make_tuple_impl)
3757 (__make_1st_indices, __tuple_concater)
3758 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
3759 Likewise.
3760 * include/std/utility (tuple_element, __is_tuple_like_impl)
3761 (tuple_size, __pair_get, get): Likewise.
3762
3763 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3764
3765 * include/bits/std_function.h (function): Define all member
3766 functions inline.
3767
3768 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
3769
3770 * include/bits/stl_algo.h (__includes): Simplify the code.
3771
3772 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
3773
3774 * include/std/optional (optional()): Explicitly define it.
3775
3776 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3777
3778 PR libstdc++/94540
3779 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
3780 Construct the first value at *__first instead of on the stack.
3781 (__uninitialized_default_n_1<true>): Likewise.
3782 Improve comments on several of the non-standard algorithms.
3783 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
3784 New test.
3785 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
3786 New test.
3787 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
3788 New test.
3789 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
3790 New test.
3791 * testsuite/23_containers/vector/cons/94540.cc: New test.
3792
3793 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3794
3795 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
3796 Replace Value type with int so trivial code path is used.
3797 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
3798 Likewise.
3799
3800 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3801
3802 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
3803 use std::fill_n when the size is an integral type.
3804 (__uninitialized_default_n): Likewise.
3805 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
3806 New test.
3807 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
3808 New test.
3809 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
3810 New test.
3811
3812 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
3813
3814 PR libstdc++/95282
3815 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
3816 alias instead of deducing _Tp as an unqualified type.
3817 (__atomic_impl::exchange): Use the _Val alias to remove volatile
3818 from the reinterpret_cast result type.
3819
3820 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
3821
3822 * include/std/atomic (atomic): Add static assertions.
3823 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
3824
3825 2020-06-16 Patrick Palka <ppalka@redhat.com>
3826
3827 PR libstdc++/94003
3828 * testsuite/20_util/is_constructible/94003.cc: New test.
3829
3830 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
3831
3832 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
3833 Update value for C++20.
3834 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
3835 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
3836 Update expected value.
3837 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
3838 Likewise.
3839
3840 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
3841
3842 * include/bits/char_traits.h (char_traits::move): constexpr move with
3843 overlap was using copy_backward incorrectly.
3844 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
3845 New test.
3846
3847 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
3848
3849 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
3850 when the value is currently set.
3851 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
3852 Actually check the return value.
3853 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
3854 Likewise.
3855
3856 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
3857
3858 * include/bits/atomic_base.h (atomic_flag::test): Add missing
3859 const qualifiers.
3860 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
3861 dg-options and verify results of test function.
3862 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
3863
3864 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
3865
3866 PR libstdc++/94749
3867 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
3868 Only discard an extra character if we didn't already reach the
3869 maximum number.
3870 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
3871 (wistream::ignore(streamsize, wchar_t)): Likewise.
3872 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
3873 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
3874
3875 2020-06-10 Patrick Palka <ppalka@redhat.com>
3876
3877 PR libstdc++/95578
3878 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
3879 Also check that the iterator and sentinel have the same type before
3880 applying the unwrapping optimization for __normal_iterator.
3881 Split the check into two, one for the first iterator/sentinel
3882 pair and another for second iterator/sentinel pair. Remove uses
3883 of __niter_base, and remove uses of std::move on a
3884 __normal_iterator.
3885 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
3886 (__copy_or_move): Likewise. Perform similar adjustments for
3887 the reverse_iterator and move_iterator optimizations. Inline
3888 the checks into the if-constexprs, and use using-declarations to
3889 make them less visually noisy. Remove uses of __niter_wrap.
3890 (__copy_or_move_backward): Likewise.
3891 * testsuite/25_algorithms/copy/95578.cc: New test.
3892 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
3893 * testsuite/25_algorithms/equal/95578.cc: New test.
3894 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
3895 * testsuite/25_algorithms/move/95578.cc: New test.
3896 * testsuite/25_algorithms/move_backward/95578.cc: New test.
3897
3898 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
3899 Jonathan Wakely <jwakely@redhat.com>
3900
3901 * include/bits/deque.tcc (__lex_cmp_dit): New.
3902 (__lexicographical_compare_aux1): Define overloads for deque
3903 iterators.
3904 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
3905 New static member function.
3906 (__lexicographical_compare<true>::__3way): Likewise.
3907 (__lexicographical_compare<true>::__lc): Use __3way.
3908 (__lexicographical_compare_aux): Rename to
3909 __lexicographical_compare_aux1 and declare overloads for deque
3910 iterators.
3911 (__lexicographical_compare_aux): Define new forwarding function
3912 that calls __lexicographical_compare_aux1 and declare new overloads
3913 for safe iterators.
3914 (lexicographical_compare): Do not use __niter_base on
3915 parameters.
3916 * include/debug/safe_iterator.tcc
3917 (__lexicographical_compare_aux): Define overloads for safe
3918 iterators.
3919 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
3920 checks with random access iterators.
3921 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
3922 New test.
3923
3924 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
3925
3926 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
3927 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
3928
3929 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
3930
3931 * include/std/optional (bad_optional_access): Define default
3932 constructor and destructor as defaulted.
3933 * testsuite/20_util/optional/bad_access.cc: New test.
3934
3935 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
3936
3937 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
3938 line number.
3939 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
3940
3941 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
3942
3943 * include/bits/unique_ptr.h (operator<<): Define for C++20.
3944 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
3945
3946 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
3947
3948 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
3949 (__detail::__cat, __detail::__diff): Move to class scope in the
3950 relevant __iterator_traits specializations.
3951 (__iterator_traits<>): Use nested class templates instead of ones from
3952 namespace __detail.
3953 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
3954 class scope in iterator_traits<common_iterator<I, S>>.
3955 (iterator_traits<common_iterator<I, S>>): Use nested class template
3956 instead of __detail::__common_iter_ptr.
3957
3958 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
3959
3960 * include/bits/stl_algo.h (__copy_n_a): Move to ...
3961 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
3962 parameter.
3963 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
3964 Declare.
3965 (__niter_base(const _Safe_iterator<_Ite, _Seq,
3966 random_access_iterator_tag>&)): Declare.
3967 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
3968 _Deque_iterator<>)): Declare.
3969 * include/bits/deque.tcc
3970 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
3971 _Deque_iterator<>)): New.
3972 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
3973 New.
3974 * include/bits/streambuf_iterator.h
3975 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
3976 * include/debug/safe_iterator.tcc (__niter_base): New.
3977 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
3978 (test03): New.
3979 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
3980 New test.
3981 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
3982 New test.
3983 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
3984 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
3985 New test.
3986
3987 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
3988
3989 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
3990 ranges::copy for positive values.
3991 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
3992 integral type and only call __copy_n for positive values.
3993 * testsuite/util/testsuite_iterators.h
3994 (random_access_iterator_wrapper::operator+=): Fix range check for
3995 negative values.
3996 (output_container, input_container, forward_container)
3997 (bidirectional_container, random_access_container): New alias
3998 templates.
3999 * testsuite/25_algorithms/copy_n/5.cc: New test.
4000
4001 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
4002
4003 PR libstdc++/90102
4004 * include/debug/deque (deque(const _Base&)): Replace parameter
4005 with a struct that wraps a const _Base&.
4006 * include/debug/forward_list (forward_list(_Base_ref)): New
4007 constructor.
4008 * include/debug/list (list(const _Base&)): Replace parameter
4009 with a struct that wraps a const _Base&.
4010 * include/debug/map.h (map(const _Base&)): Likewise.
4011 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
4012 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
4013 * include/debug/set.h (set(const _Base&)): Likewise.
4014 * include/debug/unordered_map (unordered_map(const _Base&))
4015 (unordered_multimap(const _Base&)): Likewise.
4016 * include/debug/unordered_set (unordered_set(const _Base&))
4017 (unordered_multiset(const _Base&)): Likewise.
4018 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
4019 Adjust dg-error line number.
4020 * include/debug/vector (vector(const _Base&)): Likewise.
4021 * testsuite/23_containers/deque/debug/90102.cc: New test.
4022 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
4023 * testsuite/23_containers/list/debug/90102.cc: New test.
4024 * testsuite/23_containers/map/debug/90102.cc: New test.
4025 * testsuite/23_containers/multimap/debug/90102.cc: New test.
4026 * testsuite/23_containers/multiset/debug/90102.cc: New test.
4027 * testsuite/23_containers/set/debug/90102.cc: New test.
4028 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
4029 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
4030 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
4031 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
4032 * testsuite/23_containers/vector/debug/90102.cc: New test.
4033
4034 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4035
4036 PR libstdc++/95392
4037 * include/bits/fs_path.h (path::_S_to_string): Move to
4038 namespace-scope and rename to ...
4039 (__detail::__string_from_range): ... this.
4040 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
4041 convert a char sequence containing UTF-8 to wstring.
4042 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
4043 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
4044 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
4045 __string_from_range to obtain a contiguous range and
4046 __wstr_from_utf8 to obtain a wide string.
4047 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
4048 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
4049 string.
4050 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
4051 Use __wstr_from_utf8.
4052
4053 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4054
4055 * testsuite/util/testsuite_iterators.h:
4056 (input_iterator_wrapper::operator++(int)): Return proxy object.
4057
4058 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4059
4060 * doc/xml/manual/evolution.xml: Document deprecation of
4061 __is_nullptr_t and removal of std::allocator members.
4062 * doc/html/manual/api.html: Regenerate.
4063
4064 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4065
4066 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
4067 * doc/xml/manual/evolution.xml: Likewise.
4068 * doc/html/manual/api.html: Regenerate.
4069 * doc/html/manual/containers.html: Regenerate.
4070
4071 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4072
4073 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
4074 * doc/html/faq.html: Regenerate.
4075
4076 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4077
4078 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
4079 stray change.
4080
4081 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4082
4083 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
4084 www.cs.princeton.edu to https.
4085 * doc/html/manual/policy_data_structures.html: Regenerate.
4086
4087 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
4088
4089 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
4090 * configure: Rebuild.
4091
4092 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
4093
4094 PR bootstrap/95413
4095 * configure: Regenerated.
4096
4097 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
4098
4099 PR libstdc++/95079
4100 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
4101 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
4102 (unordered_map<>::insert_or_assign): Adapt.
4103
4104 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4105
4106 PR libstdc++/95282
4107 * include/bits/atomic_base.h (__atomic_impl::load): Add
4108 cv-qualifiers to parameter so that _Tp is deduced as the
4109 unqualified type.
4110 * testsuite/29_atomics/atomic_float/95282.cc: New test.
4111
4112 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4113
4114 PR libstdc++/95322
4115 * include/std/ranges (transform_view::_Sentinel): Allow hidden
4116 friends to work with _Iterator<true> and _Iterator<false>.
4117 (join_view::_Sentinel): Likewise.
4118 * testsuite/std/ranges/adaptors/95322.cc: New test.
4119
4120 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4121
4122 PR libstdc++/94354
4123 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
4124 operators to use the correct operations on the underlying
4125 iterators.
4126 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
4127
4128 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4129
4130 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
4131
4132 2020-05-26 Patrick Palka <ppalka@redhat.com>
4133
4134 PR libstdc++/95322
4135 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
4136 Remove and instead define it ...
4137 (common_iterator::_Proxy): ... here.
4138 (common_iterator::operator->): Use it.
4139 * testsuite/24_iterators/common_iterator/2.cc: New test.
4140 * testsuite/std/ranges/adaptors/95322.cc: New test.
4141
4142 2020-05-23 Patrick Palka <ppalka@redhat.com>
4143
4144 PR libstdc++/93978
4145 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
4146 dg-additional-options. Avoid unused-but-set-variable warning.
4147
4148 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
4149
4150 PR libstdc++/95289
4151 * include/debug/helper_functions.h (__get_distance): Only declare
4152 as a constexpr function for C++14 and up.
4153 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
4154
4155 * include/bits/fs_path.h (__detail::_S_range_begin)
4156 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
4157 overloaded function template __detail::__effective_range.
4158 (__detail::__effective_range): New overloaded function template to
4159 create a basic_string or basic_string_view for an effective range.
4160 (__detail::__value_type_is_char): Use __detail::__effective_range.
4161 Do not use remove_const on value type.
4162 (__detail::__value_type_is_char_or_char8_t): Likewise.
4163 (path::path(const Source&, format))
4164 (path::path(const Source&, const locale&))
4165 (path::operator/=(const Source&), path::append(const Source&))
4166 (path::concat(const Source&)): Use __detail::__effective_range.
4167 (path::_S_to_string(InputIterator, InputIterator)): New function
4168 template to create a string view if possible, or string otherwise.
4169 (path::_S_convert): Add overloads that convert a string returned
4170 by __detail::__effective_range. Use if-constexpr to inline conversion
4171 logic from all overloads of _Cvt::_S_convert.
4172 (path::_S_convert_loc): Add overload that converts a string. Use
4173 _S_to_string to avoid allocation when possible.
4174 (path::_Cvt): Remove.
4175 (path::operator+=(CharT)): Remove indirection through path::concat.
4176 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
4177 overload for non-const pointers, to avoid constructing a std::string.
4178 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
4179 compilation with call to _S_convert.
4180
4181 * include/bits/fs_path.h (__detail::_S_range_begin)
4182 (__detail::_S_range_end): Remove unintentional static specifiers.
4183 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
4184 (__detail::_S_range_end): Likewise.
4185
4186 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
4187 Replace alias template with variable template. Don't remove const.
4188 (filesystem::__detail::__is_path_src): Replace overloaded function
4189 template with variable template and specializations.
4190 (filesystem::__detail::__is_path_iter_src): Replace alias template
4191 with class template.
4192 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
4193 iterator pairs.
4194 (filesystem::__detail::_Path2): New alias template for checking
4195 InputIterator requirements.
4196 (filesystem::__detail::__constructible_from): Remove.
4197 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
4198 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
4199 constructor arguments of void and void* types.
4200
4201 2020-05-21 Matthias Kretz <kretz@kde.org>
4202
4203 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
4204 allowing runtest to work without arguments.
4205 * testsuite/Makefile.in: Regenerate.
4206
4207 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
4208
4209 PR libstdc++/93983
4210 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
4211 Reorder constraints to avoid recursion when constructors use
4212 iterator_traits (LWG 3420).
4213 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
4214
4215 * include/experimental/socket (basic_socket::is_open()
4216 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
4217
4218 * include/experimental/bits/net.h (__endpoint, __protocol)
4219 (__acceptable_protocol, __inet_protocol): New concepts.
4220 (__detail::__is_endpoint): Move trait from <experimental/socket>.
4221 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
4222 traits.
4223 (__endpoint, __protocol, __acceptable_protocol): New variable
4224 templates.
4225 * include/experimental/socket (__is_endpoint): Move to net.h header.
4226 (basic_socket, basic_socket_acceptor): Check requirements.
4227
4228 * include/experimental/executor (use_future_t::use_future_t()): Fix
4229 incorrect noexcept-specifier.
4230 * include/experimental/internet (basic_resolver_results): Adjust
4231 whitespace.
4232 * include/experimental/socket (__basic_socket_impl::release): Add
4233 member function.
4234 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
4235 target constructor.
4236 (basic_socket::release(), basic_socket::release(error_code&)): Add
4237 missing member functions.
4238 (basic_socket::is_open()): Add nodiscard attribute.
4239 (basic_socket::close(error_code&)): Pass argument to base function.
4240 (basic_socket_acceptor::release())
4241 (basic_socket_acceptor::release(error_code&)): Add missing member
4242 functions.
4243 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
4244 (basic_socket_streambuf::error()): Add noexcept.
4245 (basic_socket_iostream::error()): Likewise.
4246 * testsuite/experimental/net/socket/basic_socket.cc: New test.
4247
4248 * include/experimental/buffer: Replace typedefs with
4249 alias-declarations.
4250 * include/experimental/executor: Likewise.
4251 * include/experimental/internet: Likewise.
4252 * include/experimental/socket: Likewise.
4253 * include/experimental/timer: Likewise.
4254
4255 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
4256
4257 PR libstdc++/94087
4258 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
4259 passed in.
4260 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
4261 fallback.
4262 (random_device::_M_init): Use __x86_rdseed_rdrand when both
4263 instructions are available.
4264 * testsuite/26_numerics/random/random_device/94087.cc: New test.
4265
4266 2020-05-19 Patrick Palka <ppalka@redhat.com>
4267
4268 PR c++/66439
4269 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
4270 mismatch" messages.
4271 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
4272
4273 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
4274
4275 PR bootstrap/95147
4276 * configure: Regenerated.
4277
4278 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
4279
4280 * configure: Regenerated.
4281
4282 2020-05-13 Alexandre Oliva <oliva@adacore.com>
4283
4284 PR libstdc++/77691
4285 * include/experimental/memory_resource
4286 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
4287 x86-vxworks as on x86-solaris.
4288 (__resource_adaptor_imp::do_deallocate): Likewise.
4289 * testsuite/experimental/memory_resource/new_delete_resource.cc:
4290 Drop xfail.
4291 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
4292 (test03): Drop max-align test for char-aligned alloc.
4293
4294 2020-05-08 Ulrich Drepper <drepper@redhat.com>
4295
4296 * include/bits/atomic_base.h (atomic_flag): Implement test member
4297 function.
4298 * include/std/version: Define __cpp_lib_atomic_flag_test.
4299 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
4300 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
4301
4302 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
4303
4304 PR libstdc++/94971 (partial)
4305 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
4306 std::sample using macro to work in parallel mode.
4307 (__sort_fn): Likewise for std::sort.
4308 (ranges::__nth_element_fn): Likewise for std::nth_element.
4309 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
4310 Likewise for std::__min_cmp.
4311 * include/parallel/algobase.h (lexicographical_compare_three_way):
4312 Add to namespace std::__parallel.
4313
4314 PR c/92472
4315 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
4316 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
4317 (_UnguardedIterator::operator _RAIter): Add const qualifier.
4318 (operator<(_GuardedIterator&, _GuardedIterator&)
4319 (operator<=(_GuardedIterator&, _GuardedIterator&)
4320 (operator<(_UnguardedIterator&, _UnguardedIterator&)
4321 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
4322 parameters to const references.
4323
4324 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
4325
4326 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
4327 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4328
4329 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
4330
4331 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
4332 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
4333 * include/bits/stl_bvector.h (__fill_bvector): Move outside
4334 _GLIBCXX_STD_C namespace.
4335 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
4336 into...
4337 (__fill_a1): ...this.
4338 * testsuite/25_algorithms/fill/bvector/1.cc: New.
4339
4340 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
4341
4342 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
4343
4344 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4345
4346 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
4347 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
4348 Likewise.
4349 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
4350 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
4351 Likewise.
4352
4353 2020-05-06 Martin Liska <mliska@suse.cz>
4354
4355 Revert:
4356 2020-05-05 Martin Liska <mliska@suse.cz>
4357 PR c/92472
4358 * include/parallel/multiway_merge.h:
4359 Use const for _Compare template argument.
4360
4361 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
4362
4363 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
4364 versions for GCC 9.[123] and 10.1 releases.
4365 * doc/html/*: Regenerate.
4366
4367 2020-05-06 Jakub Jelinek <jakub@redhat.com>
4368
4369 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
4370 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
4371 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
4372 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
4373 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
4374 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
4375 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
4376
4377 2020-05-05 Martin Liska <mliska@suse.cz>
4378
4379 PR c/92472
4380 * include/parallel/multiway_merge.h:
4381 Use const for _Compare template argument.
4382
4383 2020-05-04 Fangrui Song <maskray@google.com>
4384
4385 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
4386
4387 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4388
4389 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
4390 * doc/html/*: Regenerate.
4391
4392 PR libstdc++/94906
4393 * src/c++17/memory_resource.cc
4394 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
4395 operands.
4396
4397 2020-05-04 Nathan Sidwell <nathan@acm.org>
4398
4399 PR libstdc++/94747
4400 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
4401 ptrdiff_t before negation, to show intent more clearly.
4402
4403 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4404
4405 PR libstdc++/94936
4406 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
4407 Add comment about single-threaded behaviour.
4408 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
4409 class member access out of loop.
4410 (synchronized_pool_resource::synchronized_pool_resource())
4411 (synchronized_pool_resource::~synchronized_pool_resource())
4412 (synchronized_pool_resource::release()): Check __gthread_active_p
4413 before creating and/or deleting the thread-specific data key.
4414 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
4415 assertions.
4416 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
4417 path for single-threaded case.
4418 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
4419 Likewise. Return if unable to find a pool that owns the allocation.
4420 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
4421 New test.
4422 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
4423 test.
4424 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
4425 test.
4426
4427 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
4428
4429 PR libstdc++/94933
4430 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
4431 usable in constant expressions.
4432 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
4433 non-scalars.
4434
4435 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4436
4437 PR libstdc++/94901
4438 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
4439
4440 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4441 Patrick Palka <ppalka@redhat.com>
4442
4443 PR libstdc++/92894
4444 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
4445 Add trait to determine return type and an alias for it.
4446 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
4447 deduced return type.
4448 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
4449 the result of ranges::iter_move.
4450 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
4451 instead of checking the result of ranges::iter_move.
4452 * testsuite/24_iterators/customization_points/92894.cc: New test.
4453 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
4454
4455 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4456
4457 PR libstdc++/94901
4458 * include/std/type_traits (__is_complete_or_unbounded): Replace
4459 BADNAME _T with _Tp.
4460 * testsuite/17_intro/badnames.cc: New test.
4461
4462 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
4463
4464 PR libstdc++/89510
4465 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
4466 (allocator_traits::_S_destroy)
4467 (allocator_traits<allocator<T>>::construct): Use traits in
4468 noexcept-specifiers.
4469 * include/bits/allocator.h (allocator<void>::construct)
4470 (allocator<void>::destroy): Likewise.
4471 * include/ext/malloc_allocator.h (malloc_allocator::construct)
4472 (malloc_allocator::destroy): Likewise.
4473 * include/ext/new_allocator.h (new_allocator::construct)
4474 (new_allocator::destroy): Likewise.
4475 * testsuite/20_util/allocator/89510.cc: New test.
4476 * testsuite/ext/malloc_allocator/89510.cc: New test.
4477 * testsuite/ext/new_allocator/89510.cc: New test.
4478
4479 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
4480
4481 PR libstdc++/94854
4482 * include/bits/basic_string.tcc: Update comment about explicit
4483 instantiations.
4484
4485 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
4486
4487 PR libstdc++/91480
4488 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
4489 Remove non-standard macro.
4490 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
4491 to indicate P1032R1 support.
4492 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
4493 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
4494 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
4495 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
4496 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
4497 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
4498 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
4499 feature test macro.
4500 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
4501 * testsuite/21_strings/basic_string_view/operations/copy/char/
4502 constexpr.cc: Likewise.
4503 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
4504
4505 PR libstdc++/94831
4506 * include/bits/alloc_traits.h (_S_construct): Restore placement
4507 new-expression for C++11/14/17 and call std::construct_at directly
4508 for C++20.
4509 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
4510 function returning void.
4511 * testsuite/20_util/specialized_algorithms/
4512 uninitialized_value_construct/94831.cc: New test.
4513 * testsuite/23_containers/vector/cons/94831.cc: New test.
4514
4515 2020-04-28 Patrick Palka <ppalka@redhat.com>
4516
4517 LWG 3433 subrange::advance(n) has UB when n < 0
4518 * include/std/ranges (subrange::prev): Fix typo.
4519 (subrange::advance): Handle a negative argument as per the proposed
4520 resolution of LWG 3433.
4521 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
4522
4523 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
4524 Iain Sandoe <iain@sandoe.co.uk>
4525
4526 PR c++/94759
4527 * include/std/coroutine: Implement handing for non-
4528 class coroutine return types.
4529
4530 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
4531
4532 * include/experimental/executor (service_already_exists): Make default
4533 constructor public (LWG 3414).
4534 * testsuite/experimental/net/execution_context/make_service.cc: Check
4535 the service_already_exists can be default constructed.
4536
4537 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
4538 Jonathan Wakely <jwakely@redhat.com>
4539
4540 PR libstdc++/90415
4541 PR libstdc++/92156
4542 * include/std/any (any): Rename template parameters for consistency
4543 with the standard.
4544 (any::_Decay): Rename to _Decay_if_not_any.
4545 (any::any(T&&):: Remove is_constructible from constraints. Remove
4546 non-standard overload.
4547 (any::any(in_place_type_t<T>, Args&&...))
4548 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
4549 (any::emplace(Args&&...))
4550 (any::emplace(initializer_list<U>, Args&&...)):
4551 Use decay_t instead of _Decay.
4552 * testsuite/20_util/any/cons/90415.cc: New test.
4553 * testsuite/20_util/any/cons/92156.cc: New Test.
4554 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
4555 more robust.
4556 * testsuite/20_util/any/modifiers/92156.cc: New test.
4557
4558 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
4559
4560 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
4561 * doc/html/*: Regenerate.
4562
4563 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
4564 value for C++17 to 201803L because P0858R0 is supported for C++17.
4565 * include/std/version (__cpp_lib_array_constexpr): Likewise.
4566 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
4567 Check for value corresponding to P0031R0 features being tested.
4568 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
4569 Check for value corresponding to P0858R0 features being tested.
4570
4571 * include/std/version (__cpp_lib_three_way_comparison): Define for
4572 freestanding builds.
4573
4574 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
4575
4576 * include/experimental/net/executor (system_context): Mark
4577 system_context::system_context() = delete.
4578 * testsuite/experimental/net/executor/1.cc: Add new
4579 test to check system_context is not default constructible.
4580
4581 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
4582
4583 * include/std/coroutine: Update the inline namespace to __n4861.
4584 Add the __cpp_lib_coroutine define, set to 201902L.
4585 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
4586
4587 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
4588
4589 * include/std/execution (__cpp_lib_execution): Define to indicate
4590 support for P0024R2 and P1001R2.
4591 * include/std/version (__cpp_lib_execution): Define.
4592 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
4593 defined by <algorithm>, move other tests to new tests ...
4594 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
4595 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
4596 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
4597 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
4598
4599 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
4600 different values for C++17 and C++20, to indicate different feature
4601 sets. Update value for C++20 to indicate P1032R1 support.
4602 * include/std/version (__cpp_lib_array_constexpr): Likewise.
4603 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
4604 Check feature test macro.
4605 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
4606 New test.
4607 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
4608 feature test macro.
4609 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
4610 in C++17 mode and check feature test macro.
4611
4612 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
4613 here.
4614 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
4615 defined by <utility>.
4616
4617 * include/std/functional (__cpp_lib_concepts): Update macro value to
4618 indicate P1964R2 support.
4619 * include/std/version (__cpp_lib_concepts): Likewise.
4620 * testsuite/std/concepts/1.cc: Adjust expected value.
4621 * testsuite/std/concepts/2.cc: Likewise.
4622
4623 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
4624 __cpp_lib_constexpr_functional.
4625 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
4626 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
4627
4628 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
4629 indicate P1006R1 support.
4630 (__cpp_lib_to_address): Define to indicate P0653R2 support.
4631 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
4632 P1227R2 support.
4633 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
4634 P0769R2 support.
4635 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
4636 P0020R6 support.
4637 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
4638 P1007R3 support.
4639 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
4640 Define to indicate P0339R6 support.
4641 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
4642 indicate P0457R2 support.
4643 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
4644 to indicate P0758R1 support.
4645 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
4646 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
4647 * include/std/version (__cpp_lib_atomic_float)
4648 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
4649 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
4650 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
4651 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
4652 (__cpp_lib_to_address): Define.
4653 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
4654
4655 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
4656 macro.
4657 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
4658 Likewise.
4659 * include/std/version (__cpp_lib_map_insertion)
4660 (__cpp_lib_unordered_map_insertion): Remove.
4661
4662 * include/std/condition_variable (__cpp_lib_jthread): Remove
4663 redundant definition.
4664 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
4665 indicate P1869R1 support.
4666 * include/std/version (__cpp_lib_jthread): Update value.
4667 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
4668 for updated macro value.
4669 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
4670 Likewise.
4671 * testsuite/30_threads/jthread/1.cc: Likewise.
4672 * testsuite/30_threads/jthread/2.cc: Likewise.
4673 * testsuite/30_threads/stop_token/1.cc: Likewise.
4674 * testsuite/30_threads/stop_token/2.cc: Likewise.
4675
4676 * testsuite/21_strings/basic_string/erasure.cc: Check for
4677 __cpp_lib_erase_if macro.
4678 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
4679 messages.
4680 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4681 * testsuite/23_containers/list/erasure.cc: Likewise.
4682 * testsuite/23_containers/map/erasure.cc: Likewise.
4683 * testsuite/23_containers/set/erasure.cc: Likewise.
4684 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4685 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4686 * testsuite/23_containers/vector/erasure.cc: Likewise.
4687
4688 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
4689
4690 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
4691 to define operator<=>.
4692 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
4693
4694 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
4695 * doc/Makefile.in: Regenerate.
4696 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
4697 of "this page".
4698 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
4699 to the C++11 status table.
4700 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
4701 proposals with table matching contents of the C++14 standard.
4702 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
4703 the C++17 standard.
4704 * doc/html/*: Regenerate.
4705
4706 PR c++/94149
4707 * include/std/type_traits (__is_nt_constructible_impl): Add partial
4708 specializations for bounded arrays with non-empty initializers.
4709 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
4710
4711 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
4712
4713 * testsuite/lib/libstdc++.exp: Add additional_flags=
4714 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
4715 compiling with a newer Thread Building Blocks.
4716
4717 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
4718
4719 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
4720
4721 * testsuite/20_util/is_constructible/51185.cc: Make test class a
4722 non-aggregate so that the test verifies the same thing in all -std
4723 modes.
4724 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
4725 results for some types when paren-init for aggregates is supported.
4726
4727 * include/std/version (__cpp_lib_three_way_comparison): Update value.
4728 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
4729 (__detail::__synth3way): Add noexcept-specifier.
4730
4731 * include/bits/stl_map.h (map): Define operator<=> and remove
4732 operator< for C++20.
4733 * include/bits/stl_multimap.h (multimap): Likewise.
4734 * include/bits/stl_multiset.h (multiset): Likewise.
4735 * include/bits/stl_set.h (set): Likewise.
4736 * include/bits/stl_tree.h (_Rb_tree): Likewise.
4737 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
4738 operator!= for C++20.
4739 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
4740 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
4741 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
4742 * include/debug/set.h (__gnu_debug::set): Likewise.
4743 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
4744 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
4745 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
4746 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
4747
4748 2020-04-20 Matthias Kretz <kretz@kde.org>
4749
4750 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
4751
4752 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
4753
4754 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
4755 * include/bits/stl_stack.h (stack): Likewise.
4756 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
4757 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
4758
4759 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4760 Remove redundant operator!= for C++20.
4761 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4762 Likewise.
4763 * include/debug/unordered_map (unordered_map, unordered_multimap):
4764 Likewise.
4765 * include/debug/unordered_set (unordered_set, unordered_multiset):
4766 Likewise.
4767
4768 PR other/94629
4769 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
4770 redundant assignment in constructor.
4771
4772 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
4773
4774 * include/std/chrono (duration, time_point): Define operator<=> and
4775 remove redundant operator!= for C++20.
4776 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
4777 test.
4778 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
4779 test.
4780
4781 * testsuite/util/native_type/native_priority_queue.hpp: Use
4782 allocator_traits to rebind allocator.
4783
4784 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
4785
4786 * include/bits/forward_list.h (forward_list): Define operator<=> and
4787 remove redundant comparison operators for C++20.
4788 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
4789 * include/bits/stl_deque.h (deque): Likewise.
4790 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
4791 * include/bits/stl_list.h (list): Likewise.
4792 * include/bits/stl_vector.h (vector): Likewise.
4793 * include/debug/deque (__gnu_debug::deque): Likewise.
4794 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
4795 * include/debug/list (__gnu_debug::list): Likewise.
4796 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
4797 Likewise.
4798 * include/debug/vector (__gnu_debug::vector): Likewise.
4799 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
4800 operator<=> for C++20.
4801 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
4802 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
4803 * testsuite/23_containers/list/cmp_c++20.cc: New test.
4804 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
4805 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
4806
4807 * include/bits/basic_string.h (basic_string): Define operator<=> and
4808 remove redundant comparison operators for C++20.
4809 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
4810 Add comparison_category members.
4811 (__detail::__char_traits_cmp_cat): New helper to get comparison
4812 category from char traits class.
4813 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
4814 define for C++20.
4815 (sub_match): Define operator<=> and remove redundant comparison
4816 operators for C++20.
4817 (match_results): Remove redundant operator!= for C++20.
4818 * include/std/string_view (basic_string_view): Define operator<=> and
4819 remove redundant comparison operators for C++20.
4820 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
4821 test.
4822 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
4823 New test.
4824 * testsuite/21_strings/basic_string_view/operations/copy/char/
4825 constexpr.cc: Initialize variable.
4826 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
4827 constexpr.cc: Likewise.
4828 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
4829 dg-do directive and remove comments showing incorrect signatures.
4830 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
4831 Likewise.
4832 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
4833 New test.
4834 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
4835 New test.
4836 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
4837
4838 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
4839
4840 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
4841 name of unused parameter.
4842
4843 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
4844
4845 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
4846 (directory_entry): Define operator<=> and remove redundant comparison
4847 operators for C++20.
4848 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
4849 * include/bits/fs_path.h (path): Define operator<=> and remove
4850 redundant comparison operators for C++20.
4851 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
4852 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4853 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4854 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4855
4856 * include/bits/allocator.h (operator!=): Do not define for C++20.
4857 * include/bits/locale_classes.h (operator!=): Likewise.
4858 * include/bits/std_function.h (operator==(nullptr_t, const function&))
4859 (operator!=(const function&, nullptr_t))
4860 (operator!=(nullptr_t, const function&)): Likewise.
4861 * include/ext/bitmap_allocator.h (operator!=): Likewise.
4862 * include/ext/debug_allocator.h (operator!=): Likewise.
4863 * include/ext/extptr_allocator.h (operator!=): Likewise.
4864 * include/ext/malloc_allocator.h (operator!=): Likewise.
4865 * include/ext/mt_allocator.h (operator!=): Likewise.
4866 * include/ext/new_allocator.h (operator!=): Likewise.
4867 * include/ext/pool_allocator.h (operator!=): Likewise.
4868 * include/ext/throw_allocator.h (operator!=): Likewise.
4869 * include/std/bitset (bitset::operator!=): Likewise.
4870 * include/std/memory_resource (operator!=): Likewise.
4871 * include/std/scoped_allocator (operator!=): Likewise.
4872
4873 * include/std/typeindex (operator<=>): Define for C++20.
4874 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
4875
4876 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
4877
4878 * libsupc++/compare (compare_three_way): Fix constraint so that
4879 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
4880 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
4881 New test.
4882
4883 PR libstdc++/94562
4884 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
4885 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
4886 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
4887 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
4888 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
4889 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
4890 C++20.
4891
4892 PR libstdc++/94565
4893 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
4894 * testsuite/18_support/comparisons/categories/94565.cc: New test.
4895
4896 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
4897
4898 * include/std/coroutine: Update coroutines builtin define,
4899 per n4861.
4900
4901 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
4902
4903 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
4904 (strong_order, weak_order, partial_order): Replace uses of <=> with
4905 compare_three_way function object (LWG 3324).
4906 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
4907 equality operator so that X satisfies three_way_comparable.
4908 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
4909 Likewise.
4910 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
4911
4912 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
4913 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
4914 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
4915 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
4916 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
4917
4918 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
4919
4920 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
4921 Define for C++20.
4922 * include/std/complex (operator==(const T&, const complex<T>&))
4923 (operator!=(const complex<T>&, const complex<T>&))
4924 (operator!=(const complex<T>&, const T&))
4925 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
4926 * testsuite/26_numerics/slice/compare.cc: New test.
4927
4928 * include/std/charconv (to_chars_result, from_chars_result): Add
4929 defaulted equality comparisons for C++20.
4930 * testsuite/20_util/from_chars/compare.cc: New test.
4931 * testsuite/20_util/to_chars/compare.cc: New test.
4932
4933 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
4934
4935 PR libstdc++/94520
4936 * include/std/charconv (__integer_to_chars_result_type)
4937 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
4938 allow use in C++14.
4939 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
4940 use of std::string_view with std::string.
4941 * testsuite/20_util/from_chars/2.cc: Likewise.
4942 * testsuite/20_util/to_chars/1.cc: Likewise.
4943 * testsuite/20_util/to_chars/2.cc: Likewise.
4944
4945 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
4946
4947 PR libstdc++/94498
4948 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
4949 usable in constant expressions for C++20.
4950 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
4951 _GLIBCXX20_CONSTEXPR.
4952 (std::char_traits<char>, std::char_traits<wchar_t>)
4953 (std::char_traits<char8_t>): Make move, copy and assign usable in
4954 constant expressions for C++20.
4955 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
4956 and copy usable in constant expressions for C++20.
4957 * include/std/string_view (basic_string_view::copy): Add
4958 _GLIBCXX20_CONSTEXPR.
4959 * testsuite/21_strings/basic_string_view/operations/copy/char/
4960 constexpr.cc: New test.
4961 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
4962 constexpr.cc: New test.
4963
4964 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
4965
4966 * doc/xml/manual/appendix_contributing.xml: Refer to Git
4967 documentation instead of Subversion. Switch to https.
4968 * doc/html/manual/appendix_contributing.html: Regenerate.
4969
4970 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
4971
4972 PR libstdc++/93960
4973 * include/bits/ptr_traits.h (__to_address): Add special case for debug
4974 iterators, to avoid dereferenceable check.
4975 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
4976 * testsuite/20_util/to_address/debug.cc: New test.
4977
4978 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
4979
4980 * testsuite/experimental/net/execution_context/use_service.cc:
4981 Require pthread and gthreads.
4982
4983 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
4984
4985 * doc/xml/manual/appendix_free.xml: Move "free books" list from
4986 fsf.org to gnu.org.
4987 * doc/html/manual/appendix_free.html: Regenerate.
4988
4989 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
4990
4991 Library-side tests for parenthesized aggregate init
4992
4993 PR c++/92878
4994 PR c++/92947
4995
4996 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
4997 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
4998 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
4999 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
5000 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
5001 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
5002 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
5003 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
5004 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
5005 Likewise.
5006 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
5007 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
5008 * testsuite/20_util/variant/92878_92947.cc: Likewise.
5009 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
5010 Likewise.
5011 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
5012 Likewise.
5013 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
5014 Likewise.
5015 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
5016 Likewise.
5017 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
5018 Likewise.
5019 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
5020 Likewise.
5021 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
5022 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
5023 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
5024 Likewise.
5025 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
5026 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
5027 Likewise.
5028 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
5029 Likewise.
5030 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
5031 Likewise.
5032 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
5033 Likewise.
5034 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
5035 Likewise.
5036
5037 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
5038
5039 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
5040 for changes due to parenthesized aggregate-initialization in C++20.
5041 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
5042 with std::chrono::sys_time in C++20.
5043
5044 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
5045 to constrain C++20 versions of comparison operators. Fix backwards
5046 logic of relational operators.
5047 (move_iterator): Use requires-clause to constrain comparison operators
5048 in C++20. Do not declare non-standard same-type overloads for C++20.
5049 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
5050 of comparisons and check using greedy_ops type.
5051 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
5052 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
5053 main function from compile-only test.
5054 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
5055
5056 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
5057
5058 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
5059 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
5060 C++20 concepts are required.
5061 * include/bits/stl_iterator_base_types.h: Likewise.
5062 * include/std/concepts: Likewise.
5063 * include/std/version: Likewise.
5064 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
5065 macro.
5066
5067 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
5068 (reverse_iterator::iterator_category): Define for C++20.
5069 (reverse_iterator): Define comparison operators correctly for C++20.
5070 (__normal_iterator): Add constraints to comparison operators for C++20.
5071 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
5072 overload for input iterators.
5073 (move_iterator): Add constraints to comparison operators for C++20.
5074 Define operator<=> for C++20.
5075 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
5076 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
5077 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
5078 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
5079
5080 * include/bits/iterator_concepts.h (__detail::__decay_copy)
5081 (__detail::__member_begin, __detail::__adl_begin): Move here from
5082 <bits/range_access.h>.
5083 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
5084 * bits/range_access.h (__cust_access::__decay_copy)
5085 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
5086 <bits/iterator_concepts.h>.
5087 (ranges::iterator_t): Use __detail::__range_iter_t.
5088 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
5089 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
5090 (front_insert_iterator): Likewise.
5091 (insert_iterator): Implement changes from P0896R4 for C++20.
5092 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
5093 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
5094 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
5095 for inclusion in synopsis_c++20.cc which expects different signatures
5096 for some function templates.
5097 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
5098
5099 * include/std/type_traits (__is_array_convertible): Move definition
5100 to immediately after is_convertible.
5101
5102 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
5103
5104 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
5105 (chrono::months, chrono::sys_days, chrono::local_t)
5106 (chrono::local_time, chrono::local_seconds, chrono::local_days):
5107 Define for C++20.
5108 (chrono::time_point): Add missing static assert.
5109 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
5110 * testsuite/std/time/clock/file/overview.cc: New test.
5111 * testsuite/std/time/clock/file/members.cc: New test.
5112 * testsuite/std/time/syn_c++20.cc: New test.
5113
5114 2020-03-25 Mike Crowe <mac@mcrowe.com>
5115
5116 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
5117 test.
5118 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
5119 test.
5120
5121 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
5122
5123 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
5124 * include/std/chrono (filesystem::__file_clock): Here.
5125 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
5126 Define public member functions for C++20.
5127 (is_clock, is_clock_v): Define traits for C++20.
5128 * include/std/condition_variable (condition_variable::wait_until): Add
5129 check for valid clock.
5130 * include/std/future (_State_baseV2::wait_until): Likewise.
5131 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
5132 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
5133 Likewise.
5134 * include/std/thread (this_thread::sleep_until): Likewise.
5135 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
5136 slow_clock with new namespace.
5137 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
5138 test.
5139 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
5140 New test.
5141 * testsuite/30_threads/future/members/clock_neg.cc: New test.
5142 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
5143 Qualify slow_clock with new namespace.
5144 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
5145 clock_neg.cc: New test.
5146 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
5147 test.
5148 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
5149 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
5150 New test.
5151 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
5152 slow_clock with new namespace.
5153 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
5154 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
5155 test.
5156 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
5157 * testsuite/std/time/traits/is_clock.cc: New test.
5158 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
5159 namespace.
5160
5161 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
5162
5163 PR libstdc++/93245
5164 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
5165 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
5166 Improve test coverage.
5167
5168 PR libstdc++/94242
5169 * include/bits/fs_path.h (path::_S_str_convert): Replace first
5170 parameter with basic_string_view so that strings with different
5171 allocators can be accepted.
5172 (path::generic_string<C,T,A>()): Use basic_string object that uses the
5173 right allocator type.
5174 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
5175 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
5176 test coverage.
5177
5178 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
5179
5180 PR libstdc++/94033
5181 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
5182 (__is_nt_default_constructible_impl): Remove.
5183 (__is_nothrow_default_constructible_impl): Remove.
5184 (__is_nt_constructible_impl): Add bool template parameter. Adjust
5185 partial specializations.
5186 (__is_nothrow_constructible_impl): Replace class template with alias
5187 template.
5188 (is_nothrow_default_constructible): Derive from alias template
5189 __is_nothrow_constructible_impl instead of
5190 __is_nothrow_default_constructible_impl.
5191 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
5192
5193 * include/std/stop_token (stop_token::_Stop_state_ref): Define
5194 comparison operators explicitly if the compiler won't synthesize them.
5195
5196 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
5197 __cpp_lib_concepts before using iter_reference_t.
5198 * include/bits/stream_iterator.h (istream_iterator): Check
5199 __cpp_lib_concepts before using default_sentinel_t.
5200 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
5201
5202 PR libstdc++/94203
5203 * include/experimental/executor (executor::executor(Executor)): Call
5204 make_shared directly instead of _M_create. Create _Tgt1 object.
5205 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
5206 Call allocate_shared directly instead of _M_create. Create _Tgt2
5207 object.
5208 (executor::target_type): Add cast needed for new _Tgt interface.
5209 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
5210 (executor::_Tgt): Define the same interface whether RTTI is enabled or
5211 not.
5212 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
5213 std::type_info in the interface.
5214 (executor::_Tgt::_M_func): Add data member.
5215 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
5216 (executor::_Tgt1::_S_func): Define function to access target without
5217 depending on RTTI.
5218 (executor::_M_create): Remove.
5219 (operator==, operator!=): Simplify comparisons for executor.
5220 * include/experimental/socket (is_error_code_enum<socket_errc>):
5221 Define specialization before use.
5222 * testsuite/experimental/net/executor/1.cc: New test.
5223
5224 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
5225
5226 PR libstdc++/94199
5227 * include/experimental/executor (service_already_exists): Add default
5228 constructor. Declare make_service to be a friend.
5229 * testsuite/experimental/net/execution_context/make_service.cc: New
5230 test.
5231
5232 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
5233
5234 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
5235 a null pointer to functions with nonnull(1) attribute.
5236
5237 2020-03-11 Patrick Palka <ppalka@redhat.com>
5238
5239 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
5240 'address' -> 'std::__addressof'.
5241 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
5242 a non-forward input_range.
5243 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
5244 default constructor protected instead of deleted, like with
5245 input_iterator_wrapper.
5246 (test_range::iterator): Add comment explaining that this type is used
5247 only when the underlying wrapper is input_iterator_wrapper or
5248 output_iterator_wrapper. Remove delegating defaulted constructor so
5249 that the inherited default constructor is used instead.
5250
5251 LWG 3286 ranges::size is not required to be valid after a call to
5252 ranges::begin on an input range
5253 * include/std/ranges (subrange::subrange): Split single-argument
5254 constructor into two, one constrained by _S_store_size and another by
5255 !_S_store_size.
5256 (take_view::begin): Call size() before calling ranges::begin(_M_base).
5257 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
5258 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
5259
5260 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
5261
5262 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
5263 instead of _M_current.
5264 (split_view::_OuterIter::operator++): Likewise.
5265
5266 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
5267 (transform_view::_Iterator::operator*): Add noexcept-specifier.
5268 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
5269 (split_view::_OuterIter::__current): Add noexcept.
5270 (split_view::_InnerIter::__iter_swap): Remove.
5271 (split_view::_InnerIter::__iter_move): Remove.
5272 (split_view::_InnerIter::_M_i_current): New accessors.
5273 (split_view::_InnerIter::__at_end): Use _M_i_current().
5274 (split_view::_InnerIter::operator*): Likewise.
5275 (split_view::_InnerIter::operator++): Likewise.
5276 (iter_move(const _InnerIter&)): Likewise.
5277 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
5278 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
5279 for iter_move and iter_swap on split_view's inner iterator.
5280
5281 PR c++/94117
5282 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
5283 Change expression in noexcept-specifier to match function body.
5284
5285 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
5286 comment explaining multiple dg-do directives.
5287 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
5288 so test is run as well as compiled.
5289
5290 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
5291
5292 PR libstdc++/94063
5293 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
5294 handle concatenations that change the type of the first component.
5295 (path::operator+=(basic_string_view<value_type>)): Likewise.
5296 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
5297
5298 2020-03-06 Patrick Palka <ppalka@redhat.com>
5299
5300 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
5301 join_view::_Sentinel<!_Const>.
5302 * testsuite/std/ranges/adaptors/join.cc: Augment test.
5303
5304 PR libstdc++/93978
5305 * include/bits/range_access.h (__cust_access::_Empty::operator()):
5306 Declare return type to be bool instead of auto.
5307 * testsuite/std/ranges/adaptors/93978.cc: New test.
5308
5309 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
5310
5311 PR libstdc++/94069
5312 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
5313 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
5314 second argument to __glibcxx_rwlock_init.
5315 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
5316
5317 PR libstdc++/93244
5318 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
5319 test to not fail due to PR 94063.
5320 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
5321 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
5322
5323 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
5324
5325 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
5326 would match ENOSYS.
5327
5328 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
5329
5330 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
5331 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
5332 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5333 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
5334 for return value, and in comparison.
5335 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
5336
5337 PR libstdc++/94051
5338 * include/std/string_view: Include <bits/ostream_insert.h>.
5339 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
5340
5341 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
5342
5343 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
5344
5345 2020-03-04 Patrick Palka <ppalka@redhat.com>
5346
5347 PR libstdc++/94017
5348 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
5349 condition for when to use memset, making sure to additionally check that
5350 the output pointer's value type is a non-volatile byte type. Instead of
5351 requiring that the fill type is a byte type, just require that it's an
5352 integral type.
5353 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
5354 New test.
5355 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
5356 New test.
5357 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
5358 blocked by PR 94017.
5359 * testsuite/25_algorithms/fill/94017.cc: New test.
5360 * testsuite/25_algorithms/fill_n/94017.cc: New test.
5361
5362 LWG 3355 The memory algorithms should support move-only input iterators
5363 introduced by P1207
5364 * include/bits/ranges_uninitialized.h
5365 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
5366 to copy __ifirst, which could be a move-only input iterator. Use
5367 operator- instead of ranges::distance to compute distance from a sized
5368 sentinel.
5369 (__uninitialized_copy_n_fn::operator()): Likewise.
5370 (__uninitialized_move_fn::operator()): Likewise.
5371 (__uninitialized_move_n_fn::operator()): Likewise.
5372 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
5373 attempting to copy __first.
5374 (__uninitialized_destroy_n_fn::operator()): Likewise.
5375 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
5376 Augment test.
5377 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
5378 Likewise.
5379 * .../specialized_algorithms/uninitialized_move/constrained.cc:
5380 Likewise.
5381
5382 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
5383 protected instead of private.
5384 (test_sized_range_sized_sent): New.
5385
5386 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
5387 New testsuite iterator.
5388 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
5389 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
5390
5391 * include/bits/ranges_uninitialized.h
5392 (uninitialized_copy_fn::operator()): Pass a reference type as the first
5393 argument to is_nothrow_assignable_v.
5394 (uninitialized_copy_fn::operator()): Likewise.
5395 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
5396 with the input iterator stripped of its move_iterator.
5397 (uninitialized_move_n_fn::operator()): Likewise.
5398 (uninitialized_fill_fn::operator()): Pass a reference type as the first
5399 argument to is_nothrow_assignable_v.
5400 (uninitialized_fill_n_fn::operator()): Likewise.
5401
5402 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
5403
5404 PR libstdc++/94013
5405 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
5406 traits to control when to use memmove and memcmp optimizations.
5407 (__is_nonvolatile_trivially_copyable): New helper trait.
5408 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
5409 use memcmp optimization with volatile data.
5410 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
5411 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
5412 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
5413 (__copy_move_backward_a2): Likewise.
5414 (__equal_aux1): Use __memcmpable.
5415 (__lexicographical_compare_aux): Do not use memcmp optimization with
5416 volatile data.
5417 * testsuite/25_algorithms/copy/94013.cc: New test.
5418 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
5419 * testsuite/25_algorithms/equal/94013.cc: New test.
5420 * testsuite/25_algorithms/fill/94013.cc: New test.
5421 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
5422 * testsuite/25_algorithms/move/94013.cc: New test.
5423 * testsuite/25_algorithms/move_backward/94013.cc: New test.
5424
5425 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
5426 Avoid redundant iterator comparisons (LWG 3410).
5427
5428 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
5429
5430 PR libstdc++/93972
5431 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
5432 differ.
5433 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
5434
5435 * include/std/ranges (__detail::__maybe_empty_t): Rename to
5436 __maybe_present_t.
5437 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
5438
5439 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
5440 dependent type.
5441
5442 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
5443
5444 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
5445
5446 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
5447
5448 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
5449 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
5450 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
5451 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
5452 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
5453
5454 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
5455 Add libatomic option.
5456 * testsuite/30_threads/jthread/jthread.cc: Likewise.
5457
5458 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
5459
5460 * include/bits/stl_algo.h
5461 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
5462 * include/bits/stl_algobase.h: ...here.
5463 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
5464
5465 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
5466
5467 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
5468 option.
5469 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
5470 Likewise.
5471 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
5472 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
5473 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
5474 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
5475 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
5476 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
5477 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
5478 Likewise.
5479
5480 PR libstdc++/92906
5481 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
5482
5483 2020-02-28 Patrick Palka <ppalka@redhat.com>
5484
5485 PR libstdc++/93972
5486 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
5487 Fix condition for when to use memcmp, making it consistent with the
5488 corresponding condition used in std::lexicographical_compare.
5489 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
5490
5491 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
5492 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
5493 existing signatures for C++2a.
5494
5495 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
5496
5497 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
5498 test instead of just compiling it.
5499
5500 2020-02-28 Patrick Palka <ppalka@redhat.com>
5501
5502 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
5503 whenever the underlying range models common_range.
5504
5505 * include/std/ranges (__detail::_CachedPosition): New struct.
5506 (views::filter_view::_S_needs_cached_begin): New member variable.
5507 (views::filter_view::_M_cached_begin): New member variable.
5508 (views::filter_view::begin): Use _M_cached_begin to cache its
5509 result.
5510 (views::drop_view::_S_needs_cached_begin): New static member variable.
5511 (views::drop_view::_M_cached_begin): New member variable.
5512 (views::drop_view::begin): Use _M_cached_begin to cache its result
5513 when _S_needs_cached_begin.
5514 (views::drop_while_view::_M_cached_begin): New member variable.
5515 (views::drop_while_view::begin): Use _M_cached_begin to cache its
5516 result.
5517 (views::reverse_view::_S_needs_cached_begin): New static member
5518 variable.
5519 (views::reverse_view::_M_cached_begin): New member variable.
5520 (views::reverse_view::begin): Use _M_cached_begin to cache its result
5521 when _S_needs_cached_begin.
5522 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
5523 drop_view::begin caches its result.
5524 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
5525 that drop_while_view::begin caches its result.
5526 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
5527 filter_view::begin caches its result.
5528 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
5529 reverse_view::begin caches its result.
5530
5531 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
5532
5533 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
5534 filesystems that silently truncate timestamps.
5535 * testsuite/experimental/filesystem/operations/last_write_time.cc:
5536 Likewise.
5537
5538 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
5539 -Wstringop-overflow warnings.
5540
5541 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
5542
5543 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
5544 -fdiagnostics-urls=never to options.
5545
5546 2020-02-27 Patrick Palka <ppalka@redhat.com>
5547
5548 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
5549 _Iterator<!_Const>.
5550 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
5551 (take_view::_Sentinel<_Const>): Likewise.
5552 (take_while_view::_Sentinel<_Const>): Likewise.
5553 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
5554 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5555 * testsuite/std/ranges/adaptors/take.cc: Augment test.
5556 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
5557 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
5558
5559 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
5560 base() of a vector<>::iterator is a pointer.
5561 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
5562 * testsuite/25_algorithms/move/constrained.cc: Likewise.
5563 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
5564 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
5565 instead of &foo[0].
5566 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
5567 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
5568 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
5569 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
5570 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
5571
5572 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
5573
5574 * include/debug/array (operator<=>): Define for C++20.
5575 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
5576 Adjust dg-error line numbers.
5577 * testsuite/23_containers/array/tuple_interface/
5578 tuple_element_debug_neg.cc: Likewise.
5579
5580 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
5581 defining _GLIBCXX_ASSERTIONS.
5582 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
5583 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
5584 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
5585 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
5586 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
5587 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
5588 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
5589 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
5590 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
5591 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
5592 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
5593 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
5594
5595 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
5596 C++98 where the member function of the base class returns void.
5597
5598 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
5599 equality comparisons that support value-initialized iterators.
5600
5601 * include/bits/boost_concept_check.h (__function_requires): Add
5602 _GLIBCXX14_CONSTEXPR.
5603 * testsuite/25_algorithms/min/concept_checks.cc: New test.
5604
5605 2020-02-26 Patrick Palka <ppalka@redhat.com>
5606
5607 PR libstdc++/93936
5608 * include/std/ranges (split_view::_InnerIter::operator==): Compare
5609 the operands' _M_i rather than their _M_i.current().
5610 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5611
5612 P1645R1 constexpr for <numeric> algorithms
5613 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
5614 partial_sum, adjacent_difference): Make conditionally constexpr for
5615 C++20.
5616 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
5617 test macro.
5618 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
5619 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
5620 constexpr for C++20.
5621 * include/std/version (__cpp_lib_constexpr_numeric): Define.
5622 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
5623 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
5624 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
5625 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
5626 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
5627 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
5628 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
5629 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
5630 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
5631 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
5632 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
5633
5634 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
5635
5636 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
5637 variables in smaller scope and avoid calling ranges::distance when we
5638 know they are pointers. Remove statically-unreachable use of
5639 __builtin_unreachable().
5640 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
5641 Define inline.
5642
5643 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
5644 alias.
5645 (__detail::__maybe_const_t): Likewise.
5646 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
5647 (transform_view, take_view, take_while_view, elements_view): Use
5648 __maybe_const_t.
5649 (join_view, split_view): Use both.
5650
5651 2020-02-25 Patrick Palka <ppalka@redhat.com>
5652
5653 LWG 3397 basic_istream_view::iterator should not provide
5654 iterator_category
5655 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
5656 Rename to ...
5657 (basic_istream_view:_Iterator::iterator_concept): ... this.
5658 * testsuite/std/ranges/istream_view.cc: Augment test.
5659
5660 LWG 3325 Constrain return type of transformation function for
5661 transform_view
5662 * include/std/ranges (transform_view): Constrain the return type of the
5663 transformation function as per LWG 3325.
5664 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
5665
5666 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
5667 * include/std/ranges (join_view::_Iterator::operator--): Require that
5668 range_reference_t<_Base> models common_range.
5669 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
5670
5671 LWG 3301 transform_view::_Iterator has incorrect iterator_category
5672 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
5673 determination of iterator_category as per LWG 3301.
5674 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
5675
5676 LWG 3292 iota_view is under-constrained
5677 * include/std/ranges (iota_view): Require that _Winc models semiregular
5678 as per LWG 3292.
5679 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
5680
5681 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
5682
5683 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
5684 during constant evaluation. Call __builtin_memmove directly instead of
5685 __memmove.
5686 (__copy_or_move_backward): Likewise.
5687 * include/bits/stl_algobase.h (__memmove): Remove.
5688 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
5689 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
5690 Use __builtin_memmove directly instead of __memmove.
5691 (__copy_move_a2): Do not use memmove during constant evaluation.
5692 (__copy_move_backward_a2): Use _IsMove constant to select correct
5693 __copy_move_backward specialization.
5694 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
5695 begin turned into moves during constant evaluation.
5696
5697 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
5698 previous commit.
5699
5700 PR libstdc++/93872
5701 * include/bits/stl_algobase.h (__memmove): Cast away const before
5702 doing move assignment.
5703 * testsuite/25_algorithms/move/93872.cc: New test.
5704 * testsuite/25_algorithms/move_backward/93872.cc: New test.
5705
5706 2020-02-24 Patrick Palka <ppalka@redhat.com>
5707
5708 PR libstdc++/93884
5709 * include/bits/ranges_algobase.h (__copy_or_move,
5710 __copy_or_move_backward): Don't inspect the iter_value_t of the output
5711 iterator, instead inspect its iterator_traits directly.
5712 * include/bits/stl_iterator.h (back_insert_iterator::container):
5713 Conditionally initialize.
5714 (back_insert_iterator::difference_type): Conditionally define.
5715 (back_insert_iterator::back_insert_iterator): Conditionally define this
5716 default constructor.
5717 (front_insert_iterator::container): Conditionally initialize.
5718 (front_insert_iterator::difference_type): Conditionally define.
5719 (front_insert_iterator::front_insert_iterator): Conditionally define
5720 this default constructor.
5721 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
5722 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
5723
5724 P0769R2 Add shift to <algorithm>
5725 * include/bits/ranges_algo.h (shift_left, shift_right): New.
5726 * testsuite/25_algorithms/shift_left/1.cc: New test.
5727 * testsuite/25_algorithms/shift_right/1.cc: New test.
5728
5729 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
5730
5731 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
5732 Make noexcept-specifier conditional.
5733 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
5734 noexcept-specifier.
5735
5736 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
5737 Add constructor.
5738 (operator==(istream_iterator, default_sentinel_t)): Add operator.
5739 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
5740 * include/bits/streambuf_iterator.h
5741 (istreambuf_iterator(default_sentinel_t)): Add constructor.
5742 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
5743 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
5744 New test.
5745 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
5746 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
5747 New test.
5748 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
5749
5750 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
5751 (ranges::enable_view): Simplify (LWG 3326).
5752 * include/bits/range_access.h (ranges::enable_view): Declare.
5753 * include/bits/regex.h (__enable_view_impl): Remove partial
5754 specialization.
5755 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
5756 * include/bits/stl_set.h (__enable_view_impl): Likewise.
5757 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
5758 * include/debug/multiset.h (__enable_view_impl): Likewise.
5759 * include/debug/set.h (__enable_view_impl): Likewise.
5760 * include/debug/unordered_set (__enable_view_impl): Likewise.
5761 * include/experimental/string_view (ranges::enable_view): Define
5762 partial specialization.
5763 * include/std/span (ranges::enable_view): Likewise.
5764 * include/std/string_view (ranges::enable_view): Likewise.
5765 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
5766
5767 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
5768
5769 * include/std/optional (operator<=>(optional<T>, optional<U>))
5770 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
5771 Define for C++20.
5772 * include/std/tuple (__tuple_cmp): New helper function for <=>.
5773 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
5774 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
5775 (operator<=>(monostate, monostate)): Define for C++20.
5776 * testsuite/20_util/optional/relops/three_way.cc: New test.
5777 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
5778 * testsuite/20_util/variant/89851.cc: Move to ...
5779 * testsuite/20_util/variant/relops/89851.cc: ... here.
5780 * testsuite/20_util/variant/90008.cc: Move to ...
5781 * testsuite/20_util/variant/relops/90008.cc: ... here.
5782 * testsuite/20_util/variant/relops/three_way.cc: New test.
5783
5784 2020-02-20 Patrick Palka <ppalka@redhat.com>
5785
5786 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
5787 function.
5788 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
5789 __maybe_refwrap to capture lvalue references by reference, and then use
5790 unwrap_reference_t to forward the by-reference captures as references.
5791 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5792 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
5793
5794 * include/std/ranges (iota_view): Forward declare _Sentinel.
5795 (iota_view::_Iterator): Befriend _Sentinel.
5796 (iota_view::_Sentinel::_M_equal): New member function.
5797 (iota_view::_Sentinel::operator==): Use it.
5798 (views::_Iota::operator()): Forward __f using the correct type.
5799 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
5800 with integers of different signedness, to appease iota_view's deduction
5801 guide.
5802 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
5803
5804 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
5805
5806 * include/bits/range_access.h (ranges::begin): Reject array of
5807 incomplete type.
5808 (ranges::end, ranges::size): Require arrays to be bounded.
5809 (ranges::data): Require lvalue or borrowed_range.
5810 (ranges::iterator_t): Remove constraint.
5811 * testsuite/std/ranges/access/begin.cc: Do not check array of
5812 incomplete type.
5813 * testsuite/std/ranges/access/begin_neg.cc: New test.
5814 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
5815 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
5816 * testsuite/std/ranges/access/ssize.cc: Do not check array of
5817 incomplete type.
5818
5819 * include/std/system_error (error_category::operator<=>)
5820 (operator<=>(const error_code&, const error_code&))
5821 (operator<=>(const error_condition&, const error_condition&)): Define
5822 for C++20.
5823 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
5824 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
5825 test.
5826 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
5827 incorrect comment.
5828 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
5829 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
5830 incorrect comment.
5831 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
5832 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
5833 incorrect comment.
5834 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
5835 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
5836 Remove incorrect comment.
5837 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
5838 test.
5839
5840 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
5841
5842 * include/std/thread (thread::id::operator<=>): Define for C++20.
5843 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
5844 functions in namespace std.
5845 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
5846
5847 2020-02-19 Patrick Palka <ppalka@redhat.com>
5848
5849 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
5850 null terminator of the underlying string as part of the test_range.
5851 (main): Call test03.
5852
5853 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
5854
5855 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
5856 requirement (LWG 3385).
5857 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
5858 expected declaration.
5859
5860 * include/std/ranges (take_while_view, drop_view, drop_while_view)
5861 (elements_view:_Iterator): Initialize data members (LWG 3364).
5862
5863 * libsupc++/compare (three_way_comparable): Remove always-false check
5864 that should have been removed with weak_equality (P1959R0).
5865 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
5866
5867 * include/std/concepts (__detail::__partially_ordered_with): Move here
5868 from <compare>.
5869 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
5870 to simplify definition (LWG 3331).
5871 * libsupc++/compare (__detail::__partially_ordered_with): Move to
5872 <concepts>.
5873
5874 * include/std/concepts (totally_ordered_with): Remove redundant
5875 requirement (LWG 3329).
5876
5877 * include/std/ranges (__detail::__convertible_to_non_slicing): New
5878 helper concept.
5879 (__detail::__pair_like_convertible_to): Remove.
5880 (__detail::__pair_like_convertible_from): Add requirements for
5881 non-slicing conversions.
5882 (subrange): Constrain constructors with __convertible_to_non_slicing.
5883 Remove constructors from pair-like types. Add new deduction guide.
5884 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
5885
5886 * include/bits/iterator_concepts.h (iter_move): Add declaration to
5887 prevent unqualified lookup finding a suitable declaration (LWG 3247).
5888
5889 * include/std/memory_resource (polymorphic_allocator::allocate)
5890 (polymorphic_allocator::allocate_object): Change type of exception to
5891 bad_array_new_length (LWG 3237).
5892 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
5893
5894 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
5895 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
5896 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
5897 * testsuite/20_util/unwrap_reference/3.cc: New test.
5898
5899 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
5900 type during overload resolution, use static assert instead (LWG 3200).
5901 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
5902 incomplete type.
5903 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
5904
5905 * include/std/span (span(T (&)[N])): Use non-deduced context to
5906 prevent first parameter from interfering with class template argument
5907 deduction (LWG 3369).
5908 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
5909 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
5910 rvalues.
5911
5912 * include/std/span (span::const_iterator, span::const_reverse_iterator)
5913 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
5914 Remove (LWG 3320).
5915 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
5916 and cend.
5917 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
5918 Likewise.
5919 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
5920 constrained.cc: Likewise.
5921 * testsuite/20_util/specialized_algorithms/
5922 uninitialized_default_construct/constrained.cc: Likewise.
5923 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
5924 constrained.cc: Likewise.
5925 * testsuite/20_util/specialized_algorithms/uninitialized_move/
5926 constrained.cc: Likewise.
5927 * testsuite/20_util/specialized_algorithms/
5928 uninitialized_value_construct/constrained.cc: Likewise.
5929
5930 * include/bits/range_access.h (range_size_t): Define alias template.
5931 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
5932 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
5933
5934 * include/std/ranges (filter_view, transform_view, take_view)
5935 (join_view, split_view, reverse_view): Remove commented-out converting
5936 constructors (LWG 3280).
5937
5938 * include/std/memory (uninitialized_construct_using_allocator): Use
5939 std::construct_at (LWG 3321).
5940
5941 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
5942 (polymorphic_allocator::allocate_object)
5943 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
5944
5945 LWG 3379. "safe" in several library names is misleading
5946 * include/bits/range_access.h (enable_safe_range): Rename to
5947 enable_borrowed_range.
5948 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
5949 (safe_range): Rename to borrowed_range.
5950 * include/bits/ranges_algo.h: Adjust to use new names.
5951 * include/bits/ranges_algobase.h: Likewise.
5952 * include/bits/ranges_uninitialized.h: Likewise.
5953 * include/std/ranges: Likewise.
5954 (safe_iterator_t): Rename to borrowed_iterator_t.
5955 (safe_subrange_t): Rename to borrowed_subrange_t.
5956 * include/std/span: Adjust to use new names.
5957 * include/std/string_view: Likewise.
5958 * include/experimental/string_view: Likewise.
5959 * testsuite/std/ranges/access/begin.cc: Likewise.
5960 * testsuite/std/ranges/access/cbegin.cc: Likewise.
5961 * testsuite/std/ranges/access/cdata.cc: Likewise.
5962 * testsuite/std/ranges/access/cend.cc: Likewise.
5963 * testsuite/std/ranges/access/crbegin.cc: Likewise.
5964 * testsuite/std/ranges/access/crend.cc: Likewise.
5965 * testsuite/std/ranges/access/data.cc: Likewise.
5966 * testsuite/std/ranges/access/end.cc: Likewise.
5967 * testsuite/std/ranges/access/rbegin.cc: Likewise.
5968 * testsuite/std/ranges/access/rend.cc: Likewise.
5969 * testsuite/std/ranges/safe_range.cc: Likewise.
5970 * testsuite/std/ranges/safe_range_types.cc: Likewise.
5971 * testsuite/util/testsuite_iterators.h: Likewise.
5972
5973 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
5974 (tuple_element<1, const subrange<I, S, K>>): Add partial
5975 specializations (LWG 3398).
5976 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
5977
5978 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
5979 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
5980 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
5981
5982 2020-02-18 Patrick Palka <ppalka@redhat.com>
5983
5984 P1983R0 Wording for GB301, US296, US292, US291, and US283
5985 * include/std/ranges (filter_view::pred): New member function.
5986 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
5987 P1983R0 fixes the highlighted issue in the same way.
5988 (join_view::_Iterator<_Const>): Add friend
5989 join_view::_Iterator<!_Const>.
5990 (join_view::_M_inner): Remove mutable specifier, effectively reverting
5991 the proposed wording changes of P3278.
5992 (join_view::begin): Refine the condition for when to return a const
5993 iterator.
5994 (split_view::_OuterIter::_OuterIter): Adjust constraints.
5995 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
5996 exists and works.
5997
5998 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
5999
6000 PR libstdc++/93818
6001 * include/std/ranges (_RangeAdaptor): Add deduction guide.
6002 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
6003 iterator_t<_Vp>.
6004 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
6005 (transform_view::_Iterator): Add alias _Base_iter and use in place of
6006 iterator_t<_Base>.
6007 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
6008 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
6009 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
6010 (split_view::_InnerIter::_S_iter_cat()): Likewise.
6011
6012 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
6013 assumption that long is wider than int.
6014 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
6015 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
6016 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
6017 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
6018
6019 P1976R2 Fixed-size span construction from dynamic range
6020 * include/std/span (__cpp_lib_span): Update value.
6021 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
6022 assertion.
6023 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
6024 constraints.
6025 (span::first<Count>(), span::last<Count>()): Use explicit type in
6026 return statement.
6027 (as_bytes, as_writable_bytes): Likewise.
6028 * include/std/version (__cpp_lib_span): Update value.
6029 * testsuite/23_containers/span/1.cc: Check new value.
6030 * testsuite/23_containers/span/2.cc: Check new value.
6031 * testsuite/23_containers/span/explicit.cc: New test.
6032
6033 * include/std/span (span::__is_compatible_array): Simplify alias
6034 template by using requires-clause.
6035 (span::__is_compatible_ref): New alias template for constraining
6036 constructors.
6037 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
6038 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
6039 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
6040 redundant parentheses.
6041 (span(R&&)): Add missing constraints.
6042
6043 * include/std/span (span): Reorder members and rename template
6044 parameters to match declarations in the C++2a working paper.
6045
6046 P2116R0 Remove tuple-like protocol support from fixed-extent span
6047 * include/std/span (get, tuple_size, tuple_element): Remove.
6048 * testsuite/23_containers/span/everything.cc: Remove checks for
6049 tuple-like API.
6050 * testsuite/23_containers/span/get_neg.cc: Remove.
6051 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
6052 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
6053 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
6054
6055 2020-02-17 Patrick Palka <ppalka@redhat.com>
6056
6057 P2106R0 Alternative wording for GB315 and GB316
6058 * include/bits/ranges_algo.h (in_fun_result): New.
6059 (for_each_result, for_each_n_result): Change into an alias of
6060 in_fun_result.
6061 (in_in_result): New.
6062 (mismatch_result): Change into an alias of in_in_result.
6063 (copy_if_result): Change into an alias of in_out_result.
6064 (swap_ranges_result): Change into an alias of in_in_result.
6065 (unary_transform_result): Change into an alias of in_out_result.
6066 (in_in_out_result): New.
6067 (binary_transform_result): Change into an alias of in_in_out_result.
6068 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
6069 remove_copy_result, unique_copy_result, reverse_copy_result,
6070 rotate_copy_result, partial_sort_copy_result): Change into an alias of
6071 in_out_result.
6072 (in_out_out_result): New.
6073 (partition_copy_result, merge_result): Change into an alias of
6074 in_out_out_result.
6075 (set_union_result, set_intersection_result): Change into an alias of
6076 in_in_out_result.
6077 (set_difference_result): Change into an alias of in_out_result.
6078 (set_symmetric_difference): Change into an alias of in_in_out_result.
6079 (min_max_result): New.
6080 (minmax_result, minmax_element_result): Change into an alias of
6081 min_max_result.
6082 (in_found_result): New.
6083 (next_permutation_result, prev_permutation_result): Change into an alias
6084 of in_found_result.
6085 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
6086 Adjust following changes to next_permutation_result and
6087 prev_permutation_result.
6088 * include/bits/ranges_algobase.h (in_out_result): New.
6089 (copy_result, move_result, move_backward_result, copy_backward_result,
6090 copy_n_result): Change into an alias of in_out_result.
6091 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
6092 uninitialized_copy_n_result, uninitialized_move_result,
6093 uninitialized_move_n_result): Likewise.
6094 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
6095 structured bindings.
6096 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
6097
6098 P1243R4 Rangify new algorithms
6099 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
6100 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
6101 * testsuite/25_algorithms/clamp/constrained.cc: New test.
6102 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
6103 * testsuite/25_algorithms/sample/constrained.cc: New test.
6104
6105 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
6106
6107 P1964R2 Wording for boolean-testable
6108 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
6109 (__adjacent_find_fn): Cast result of predicate to bool.
6110 * include/std/concepts (__boolean): Remove.
6111 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
6112 new helper concepts.
6113 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
6114 (predicate): Use __boolean_testable instead of boolean.
6115 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
6116 Likewise.
6117
6118 P1970R2 Consistency for size() functions: Add ranges::ssize
6119 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
6120 * testsuite/std/ranges/access/ssize.cc: New test.
6121
6122 P1956R1 On the names of low-level bit manipulation functions
6123 * include/bits/hashtable_policy.h: Update comment.
6124 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
6125 (ispow2, ceil2, floor2, log2p1): Likewise.
6126 (__cpp_lib_int_pow2): Add feature test macro.
6127 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
6128 * include/std/memory (assume_aligned): Adjust use of ispow2.
6129 * include/std/version (__cpp_lib_int_pow2): Add.
6130 * libsupc++/new_opa.cc: Adjust use of __ispow2.
6131 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
6132 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
6133 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
6134 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
6135 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
6136 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
6137 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
6138 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
6139 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
6140 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
6141 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
6142 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
6143
6144 * include/std/charconv: Add comment.
6145
6146 PR libstdc++/92546 (partial)
6147 * include/bits/random.h (uniform_random_bit_generator): Move definition
6148 to <bits/uniform_int_dist.h>.
6149 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
6150 of <bits/random.h>.
6151 * include/bits/ranges_algobase.h: Do not include <cmath>.
6152 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
6153 Move here.
6154 * include/std/ranges: Do not include <limits>.
6155 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
6156
6157 PR libstdc++/92546 (partial)
6158 * include/Makefile.am: Add new header.
6159 * include/Makefile.in: Regenerate.
6160 * include/bits/int_limits.h: New header.
6161 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
6162 numeric_limits with __detail::__int_limits.
6163 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
6164 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
6165 Likewise.
6166 * include/std/charconv (__to_chars_8, __from_chars_binary)
6167 (__from_chars_alpha_to_num, from_chars): Likewise.
6168 * include/std/memory_resource (polymorphic_allocator::allocate)
6169 (polymorphic_allocator::allocate_object): Likewise.
6170 * include/std/string_view (basic_string_view::_S_compare): Likewise.
6171 * include/std/utility (in_range): Likewise.
6172 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
6173 extra error about incomplete type __int_limits<bool>.
6174 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
6175 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
6176 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
6177 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
6178 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
6179 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
6180 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
6181 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
6182 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
6183 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
6184 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
6185 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
6186
6187 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
6188 value for partial_ordering::unordered.
6189
6190 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
6191 const-qualified expression variations.
6192 * include/std/concepts (copyable): Likewise.
6193
6194 * include/std/type_traits (__is_standard_integer): New helper trait.
6195 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
6196 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
6197 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
6198 * testsuite/20_util/integer_comparisons/1.cc: New test.
6199 * testsuite/20_util/integer_comparisons/2.cc: New test.
6200 * testsuite/20_util/integer_comparisons/equal.cc: New test.
6201 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
6202 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
6203 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
6204 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
6205 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
6206 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
6207 * testsuite/20_util/integer_comparisons/less.cc: New test.
6208 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
6209 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
6210 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
6211 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
6212 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
6213
6214 2020-02-16 Patrick Palka <ppalka@redhat.com>
6215
6216 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
6217 Move code after an early exit constexpr if to under an else branch.
6218 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
6219
6220 2020-02-15 Patrick Palka <ppalka@redhat.com>
6221
6222 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
6223 * include/bits/ranges_algobase.h: Likewise.
6224 * include/bits/ranges_uninitialized.h: Likewise.
6225
6226 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
6227 binary_search, copy_if, count, count_if, equal_range, find, find_end,
6228 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
6229 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
6230 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
6231 lower_bound, make_heap, max, max_element, merge, min, min_element,
6232 minmax, minmax_element, mismatch, next_permutation, none_of,
6233 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
6234 partition_point, pop_heap, prev_permutation, push_heap, remove,
6235 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
6236 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
6237 search, search_n, set_difference, set_intersection,
6238 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
6239 stable_partition, stable_sort, swap_ranges, transform, unique,
6240 unique_copy, upper_bound): Convert into function objects.
6241 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
6242 fill, move_backward, copy_backward): Likewise.
6243 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
6244 uninitialized_default_construct_n, uninitialized_value_construct,
6245 uninitialized_value_construct_n, uninitialized_copy,
6246 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
6247 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
6248 destroy, destroy_n): Likewise.
6249
6250 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
6251 (ranges::find_end): ... here.
6252 (ranges::__lexicographical_compare): Fold into ...
6253 (ranges::lexicographical_compare): ... here.
6254 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
6255 (ranges::equal): ... here.
6256
6257 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
6258
6259 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
6260 * include/std/deque: Likewise.
6261 * include/std/forward_list: Likewise.
6262 * include/std/list: Likewise.
6263 * include/std/string: Likewise.
6264 * include/std/vector: Likewise.
6265 * include/std/version: Likewise.
6266 * testsuite/23_containers/deque/erasure.cc: Test for new value.
6267 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
6268 * testsuite/23_containers/list/erasure.cc: Likewise.
6269 * testsuite/23_containers/map/erasure.cc: Likewise.
6270 * testsuite/23_containers/set/erasure.cc: Likewise.
6271 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
6272 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
6273 * testsuite/23_containers/vector/erasure.cc: Likewise.
6274
6275 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
6276
6277 * include/bits/random.h (uniform_random_bit_generator): Require min()
6278 and max() to be constant expressions and min() to be less than max().
6279 * testsuite/26_numerics/random/concept.cc: Check additional cases.
6280 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
6281
6282 2020-02-13 Patrick Palka <ppalka@redhat.com>
6283
6284 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
6285 * include/Makefile.in: Regenerate.
6286 * include/bits/ranges_uninitialized.h: New header.
6287 * include/std/memory: Include it.
6288 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
6289 test.
6290 * .../uninitialized_copy/constrained.cc: New test.
6291 * .../uninitialized_default_construct/constrained.cc: New test.
6292 * .../uninitialized_fill/constrained.cc: New test.
6293 * .../uninitialized_move/constrained.cc: New test.
6294 * .../uninitialized_value_construct/constrained.cc: New test.
6295
6296 * include/Makefile.am: Add bits/ranges_algobase.h
6297 * include/Makefile.in: Regenerate.
6298 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
6299 existing #includes.
6300 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
6301 __detail::__is_move_iterator, copy_result, move_result,
6302 __equal, equal, copy_result, move_result, move_backward_result,
6303 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
6304 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
6305 fill): Split out into ...
6306 * bits/range_algobase.h: ... this new header.
6307
6308 2020-02-12 Patrick Palka <ppalka@redhat.com>
6309
6310 LWG 3389 and LWG 3390
6311 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
6312 constructing the move_iterator with __i.
6313 (counted_iterator::counted_iterator): Use std::move when initializing
6314 M_current with __i.
6315 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
6316 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
6317
6318 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
6319
6320 PR libstdc++/79193
6321 PR libstdc++/88999
6322
6323 * configure: Regenerated.
6324
6325 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
6326
6327 * include/bits/hashtable.h
6328 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
6329 missing std namespace qualification to forward call.
6330
6331 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
6332
6333 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
6334 comment.
6335 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
6336
6337 * include/std/ranges: Fix non-ASCII characters in comment.
6338
6339 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
6340 equality comparison to be valid and return bool.
6341 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
6342 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
6343 type with ambiguous conversion to fundamental types.
6344 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
6345
6346 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6347
6348 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
6349 Use remove_cvref_t.
6350 (readable_traits): Rename to indirectly_readable_traits.
6351 (readable): Rename to indirectly_readable.
6352 (writable): Rename to indirectly_writable.
6353 (__detail::__iter_exchange_move): Do not use remove_reference_t.
6354 (indirectly_swappable): Adjust requires expression parameter types.
6355 expression.
6356 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
6357 (ranges::replace_if, ranges::generate_n, ranges::generate)
6358 (ranges::remove): Use new name for writable.
6359 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
6360 Use new name for readable.
6361 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
6362 new name for readable_traits.
6363 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
6364 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
6365 new definition of indirectly_readable.
6366
6367 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
6368 to take parameters of common_iterator, instead of the common_iterator
6369 type itself. Fix argument for __common_iter_has_arrow constraint.
6370 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
6371
6372 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6373
6374 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
6375 warning.
6376 (basic_istream_view::_Iterator::operator++()): Add missing return.
6377
6378 2020-02-07 Patrick Palka <ppalka@redhat.com>
6379
6380 * include/bits/ranges_algo.h: Remove extraneous &&.
6381
6382 * include/std/ranges (ranges::__detail::__stream_extractable,
6383 ranges::basic_istream_view, ranges::istream_view): Define.
6384 * testsuite/std/ranges/istream_view: New test.
6385
6386 Implement C++20 range adaptors
6387 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
6388 (subrange::_S_store_size): Mark as const instead of constexpr to
6389 avoid what seems to be a bug in GCC.
6390 (__detail::__box): Give it defaulted copy and move constructors.
6391 (ranges::views::_Single::operator()): Mark constexpr.
6392 (ranges::views::_Iota::operator()): Mark constexpr.
6393 (__detail::Empty): Define.
6394 (ranges::views::__closure::_RangeAdaptor,
6395 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
6396 ranges::views::all, ranges::__detail::find_if,
6397 ranges::__detail::find_if_not, ranges::__detail::mismatch,
6398 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
6399 ranges::views::transform, take_view, ranges::views::take,
6400 take_while_view, ranges::views::take_while, drop_view,
6401 ranges::views::drop, join_view, ranges::views::join,
6402 __detail::require_constant, __detail::tiny_range, split_view,
6403 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
6404 common_view, ranges::views::common, reverse_view,
6405 ranges::views::reverse,
6406 ranges::views::__detail::__is_reversible_subrange,
6407 ranges::views::__detail::__is_reverse_view, reverse_view,
6408 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
6409 ranges::views::elements, ranges::views::keys, ranges::views::values):
6410 Define.
6411 (views): Alias for ranges::views.
6412 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
6413 tuple_element<1, ranges::subrange>): New partial specializations.
6414 * testsuite/std/ranges/adaptors/all.cc: New test.
6415 * testsuite/std/ranges/adaptors/common.cc: Likewise.
6416 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
6417 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
6418 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
6419 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
6420 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
6421 * testsuite/std/ranges/adaptors/join.cc: Likewise.
6422 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
6423 * testsuite/std/ranges/adaptors/split.cc: Likewise.
6424 * testsuite/std/ranges/adaptors/take.cc: Likewise.
6425 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
6426 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
6427
6428 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6429
6430 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
6431 type of enumerations and comparison category types.
6432 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
6433 (__cmp_cat::_Ncmp::unordered): Change value to 2.
6434 (partial_ordering::_M_value, weak_ordering::_M_value)
6435 (strong_ordering::_M_value): Change type to __cmp_cat::type.
6436 (partial_ordering::_M_is_ordered): Remove data member.
6437 (partial_ordering): Use second bit of _M_value for unordered. Adjust
6438 comparison operators.
6439 (weak_ordering::operator partial_ordering): Simplify to remove
6440 branches.
6441 (operator<=>(unspecified, weak_ordering)): Likewise.
6442 (strong_ordering::operator partial_ordering): Likewise.
6443 (strong_ordering::operator weak_ordering): Likewise.
6444 (operator<=>(unspecified, strong_ordering)): Likewise.
6445 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
6446 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
6447 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
6448
6449 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
6450 __cpp_lib_three_way_comparison macro and use deduced return type for
6451 operator<=>.
6452 * testsuite/std/ranges/iota/iterator.cc: New test.
6453
6454 2020-02-07 Patrick Palka <ppalka@redhat.com>
6455 Jonathan Wakely <jwakely@redhat.com>
6456
6457 Implement C++20 constrained algorithms
6458 * include/Makefile.am: Add new header.
6459 * include/Makefile.in: Regenerate.
6460 * include/std/algorithm: Include <bits/ranges_algo.h>.
6461 * include/bits/ranges_algo.h: New file.
6462 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
6463 * testsuite/25_algorithms/all_of/constrained.cc: New test.
6464 * testsuite/25_algorithms/any_of/constrained.cc: New test.
6465 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
6466 * testsuite/25_algorithms/copy/constrained.cc: New test.
6467 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
6468 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
6469 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
6470 * testsuite/25_algorithms/count/constrained.cc: New test.
6471 * testsuite/25_algorithms/count_if/constrained.cc: New test.
6472 * testsuite/25_algorithms/equal/constrained.cc: New test.
6473 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
6474 * testsuite/25_algorithms/fill/constrained.cc: New test.
6475 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
6476 * testsuite/25_algorithms/find/constrained.cc: New test.
6477 * testsuite/25_algorithms/find_end/constrained.cc: New test.
6478 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
6479 * testsuite/25_algorithms/find_if/constrained.cc: New test.
6480 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
6481 * testsuite/25_algorithms/for_each/constrained.cc: New test.
6482 * testsuite/25_algorithms/generate/constrained.cc: New test.
6483 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
6484 * testsuite/25_algorithms/heap/constrained.cc: New test.
6485 * testsuite/25_algorithms/includes/constrained.cc: New test.
6486 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
6487 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
6488 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
6489 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
6490 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
6491 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
6492 test.
6493 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
6494 * testsuite/25_algorithms/max/constrained.cc: New test.
6495 * testsuite/25_algorithms/max_element/constrained.cc: New test.
6496 * testsuite/25_algorithms/merge/constrained.cc: New test.
6497 * testsuite/25_algorithms/min/constrained.cc: New test.
6498 * testsuite/25_algorithms/min_element/constrained.cc: New test.
6499 * testsuite/25_algorithms/minmax/constrained.cc: New test.
6500 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
6501 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
6502 * testsuite/25_algorithms/move/constrained.cc: New test.
6503 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
6504 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
6505 * testsuite/25_algorithms/none_of/constrained.cc: New test.
6506 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
6507 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
6508 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
6509 * testsuite/25_algorithms/partition/constrained.cc: New test.
6510 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
6511 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
6512 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
6513 * testsuite/25_algorithms/remove/constrained.cc: New test.
6514 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
6515 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
6516 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
6517 * testsuite/25_algorithms/replace/constrained.cc: New test.
6518 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
6519 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
6520 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
6521 * testsuite/25_algorithms/reverse/constrained.cc: New test.
6522 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
6523 * testsuite/25_algorithms/rotate/constrained.cc: New test.
6524 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
6525 * testsuite/25_algorithms/search/constrained.cc: New test.
6526 * testsuite/25_algorithms/search_n/constrained.cc: New test.
6527 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
6528 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
6529 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
6530 test.
6531 * testsuite/25_algorithms/set_union/constrained.cc: New test.
6532 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
6533 * testsuite/25_algorithms/sort/constrained.cc: New test.
6534 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
6535 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
6536 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
6537 * testsuite/25_algorithms/transform/constrained.cc: New test.
6538 * testsuite/25_algorithms/unique/constrained.cc: New test.
6539 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
6540 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
6541
6542 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
6543
6544 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
6545 number in comment. Fix indentation.
6546
6547 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
6548 redundant _GLIBCXX20_CONSTEXPR.
6549
6550 * include/std/ranges (viewable_range): Replace decay_t with
6551 remove_cvref_t (LWG 3375).
6552
6553 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
6554
6555 * include/bits/iterator_concepts.h (iter_reference_t)
6556 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
6557 Remove workarounds for PR c++/67704.
6558 * testsuite/24_iterators/aliases.cc: New test.
6559
6560 2020-02-05 Patrick Palka <ppalka@redhat.com>
6561
6562 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
6563 when initializing _M_current.
6564 (move_iterator::base): Split into two overloads differing in
6565 ref-qualifiers as in P1207R4 for C++20.
6566
6567 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
6568
6569 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
6570 use.
6571
6572 PR libstdc++/93562
6573 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
6574 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
6575 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
6576
6577 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
6578
6579 * configure: Regenerate.
6580
6581 2020-01-31 Patrick Palka <ppalka@redhat.com>
6582
6583 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
6584 test_range::end() returns the same type as test_range::begin().
6585 * testsuite/24_iterators/range_operations/next.cc: Likewise.
6586 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
6587 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
6588 Always return a sentinel<I>.
6589
6590 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
6591
6592 PR libstdc++/92895
6593 * include/std/stop_token (stop_token::stop_possible()): Call new
6594 _M_stop_possible() function.
6595 (stop_token::stop_requested()): Do not use stop_possible().
6596 (stop_token::binary_semaphore): New class, as temporary stand-in for
6597 std::binary_semaphore.
6598 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
6599 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
6600 New data members for symchronization with stop_callback destruction.
6601 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
6602 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
6603 Remove.
6604 (stop_token::_Stop_cb::_M_run): New member function.
6605 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
6606 Remove.
6607 (stop_token::_Stop_state::_M_owners): New data member to track
6608 reference count for ownership.
6609 (stop_token::_Stop_state::_M_value): New data member combining a
6610 spinlock, the stop requested flag, and the reference count for
6611 associated stop_source objects.
6612 (stop_token::_Stop_state::_M_requester): New data member for
6613 synchronization with stop_callback destruction.
6614 (stop_token::_Stop_state::_M_stop_possible()): New member function.
6615 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
6616 of _M_value.
6617 (stop_token::_Stop_state::_M_add_owner)
6618 (stop_token::_Stop_state::_M_release_ownership)
6619 (stop_token::_Stop_state::_M_add_ssrc)
6620 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
6621 updating reference counts.
6622 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
6623 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
6624 (stop_token::_Stop_state::_M_try_lock)
6625 (stop_token::_Stop_state::_M_try_lock_and_stop)
6626 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
6627 managing spinlock.
6628 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
6629 read and update state. Release lock while running callbacks. Use new
6630 data members to synchronize with callback destruction.
6631 (stop_token::_Stop_state::_M_remove_callback): Likewise.
6632 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
6633 to read and update state.
6634 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
6635 replacing shared_ptr.
6636 (stop_source::stop_source(const stop_source&)): Update reference count.
6637 (stop_source::operator=(const stop_source&)): Likewise.
6638 (stop_source::~stop_source()): Likewise.
6639 (stop_source::stop_source(stop_source&&)): Define as defaulted.
6640 (stop_source::operator=(stop_source&&)): Establish postcondition on
6641 parameter.
6642 (stop_callback): Enforce preconditions on template parameter. Replace
6643 base class with data member of new _Cb_impl type.
6644 (stop_callback::stop_callback(const stop_token&, Cb&&))
6645 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
6646 (stop_callback::_Cb_impl): New type wrapping _Callback member and
6647 defining the _S_execute member function.
6648 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
6649 test.
6650 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
6651 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
6652 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
6653 New test.
6654 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
6655 test.
6656 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
6657 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
6658 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
6659 test.
6660
6661 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
6662 three_way_comparable_with.
6663 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
6664 (compare_three_way::operator()): Remove redundant constraint from
6665 requires-clause.
6666 (__detail::_Synth3way::operator()): Use three_way_comparable_with
6667 instead of workaround.
6668 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
6669 output due to simplified constraints on compare_three_way::operator().
6670
6671 PR libstdc++/93479
6672 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
6673 * testsuite/18_support/comparisons/object/93479.cc: New test.
6674
6675 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
6676 returns the same type as test_range::begin(). Add comments.
6677 * testsuite/std/ranges/access/rbegin.cc: Likewise.
6678 * testsuite/std/ranges/access/rend.cc: Likewise.
6679 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
6680 test_range is the same as its iterator type.
6681 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
6682 operator- overloads to satisfy sized_sentinel_for when the iterator
6683 satisfies random_access_iterator.
6684
6685 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
6686
6687 PR libstdc++/93470
6688 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
6689 static assertion to object types.
6690
6691 PR libstdc++/93325
6692 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
6693 clock_gettime instead of explicit glibc version check.
6694 * configure: Regenerate.
6695
6696 2020-01-28 Martin Liska <mliska@suse.cz>
6697
6698 PR libstdc++/93478
6699 * include/std/atomic: Fix typo.
6700 * include/std/optional: Likewise.
6701
6702 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
6703
6704 * configure: Regenerate.
6705
6706 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
6707
6708 PR libstdc++/93426
6709 * include/std/span (span): Fix deduction guide.
6710 * testsuite/23_containers/span/deduction.cc: New test.
6711
6712 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
6713
6714 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
6715 (__cmp_cat::_Ord::equivalent): Add enumerator.
6716 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
6717 and greater.
6718 (partial_ordering, weak_ordering, strong_ordering): Remove
6719 constructors taking __cmp_cat::_Eq parameters. Use renamed
6720 enumerators.
6721
6722 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
6723
6724 * acinclude.m4: Handle `--with-toolexeclibdir='.
6725 * Makefile.in: Regenerate.
6726 * aclocal.m4: Regenerate.
6727 * configure: Regenerate.
6728 * doc/Makefile.in: Regenerate.
6729 * include/Makefile.in: Regenerate.
6730 * libsupc++/Makefile.in: Regenerate.
6731 * po/Makefile.in: Regenerate.
6732 * python/Makefile.in: Regenerate.
6733 * src/Makefile.in: Regenerate.
6734 * src/c++11/Makefile.in: Regenerate.
6735 * src/c++17/Makefile.in: Regenerate.
6736 * src/c++98/Makefile.in: Regenerate.
6737 * src/filesystem/Makefile.in: Regenerate.
6738 * testsuite/Makefile.in: Regenerate.
6739
6740 2020-01-23 Alexandre Oliva <oliva@adacore.com>
6741
6742 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
6743 * configure: Rebuild.
6744
6745 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
6746
6747 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
6748
6749 PR libstdc++/91947
6750 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
6751 rule.
6752 * include/Makefile.in: Regenerate.
6753
6754 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
6755
6756 * doc/xml/faq.xml: Fix grammar.
6757 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
6758 * doc/xml/manual/spine.xml: Update copyright years.
6759 * doc/html/*: Regenerate.
6760
6761 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
6762
6763 * doc/xml/faq.xml: Update for SVN -> Git transition.
6764 * doc/xml/manual/appendix_contributing.xml: Likewise.
6765 * doc/xml/manual/status_cxx1998.xml: Likewise.
6766 * doc/xml/manual/status_cxx2011.xml: Likewise.
6767 * doc/xml/manual/status_cxx2014.xml: Likewise.
6768 * doc/xml/manual/status_cxx2017.xml: Likewise.
6769 * doc/xml/manual/status_cxx2020.xml: Likewise.
6770 * doc/xml/manual/status_cxxtr1.xml: Likewise.
6771 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
6772
6773 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
6774
6775 * include/Makefile.am: Add coroutine to the std set.
6776 * include/Makefile.in: Regenerated.
6777 * include/std/coroutine: New file.
6778
6779 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
6780
6781 PR libstdc++/92376
6782 * include/bits/c++config: Only do PSTL config when the header is
6783 present, to fix freestanding.
6784 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
6785 functions if they were detected by configure.
6786
6787 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
6788 Matthew Bauer <mjbauer95@gmail.com>
6789 Jonathan Wakely <jwakely@redhat.com>
6790
6791 PR bootstrap/64271 (partial)
6792 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
6793 to unsigned short.
6794 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
6795 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
6796 definitions with NetBSD upstream.
6797 (ctype_base::blank): Use _CTYPE_BL.
6798 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
6799 Declaration.
6800 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
6801 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
6802 parameters to unsigned char.
6803 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
6804
6805 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
6806
6807 PR libstdc++/91263
6808 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
6809 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
6810 (_Equality_base): Remove.
6811 (_Equality<>::_M_equal): Review implementation. Use
6812 std::is_permutation.
6813 * testsuite/23_containers/unordered_multiset/operators/1.cc
6814 (Hash, Equal, test02, test03): New.
6815 * testsuite/23_containers/unordered_set/operators/1.cc
6816 (Hash, Equal, test02, test03): New.
6817
6818 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
6819
6820 PR libstdc++/93267
6821 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
6822 Move here from <bits/range_access.h> and define using __int128 when
6823 available.
6824 (__is_integer_like, __is_signed_integer_like): Move here from
6825 <bits/range_access.h>.
6826 (weakly_incrementable): Use __is_signed_integer_like.
6827 * include/bits/range_access.h (__max_diff_type, __max_size_type)
6828 (__is_integer_like, __is_signed_integer_like): Move to
6829 <bits/iterator_concepts.h>.
6830 (__make_unsigned_like_t): Move here from <ranges>.
6831 * include/std/ranges (__make_unsigned_like_t): Move to
6832 <bits/range_access.h>.
6833 (iota_view): Replace using-directive with using-declarations.
6834 * testsuite/std/ranges/iota/93267.cc: New test.
6835 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
6836
6837 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
6838
6839 PR libstdc++/93244
6840 * include/bits/fs_path.h (path::generic_string<C,A>)
6841 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
6842 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
6843 root-dir is converted to forward slash in generic pathname.
6844 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
6845 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
6846
6847 PR libstdc++/58605
6848 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
6849 Define.
6850 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
6851 (__atomic_float): Add default member initializer for C++20.
6852 * include/std/atomic (atomic): Likewise.
6853 (atomic::atomic()): Remove noexcept-specifier on default constructor.
6854 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
6855 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
6856 number.
6857 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
6858 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
6859 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
6860 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
6861 expected result for is_trivially_default_constructible.
6862 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
6863 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
6864 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
6865 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
6866 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
6867 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
6868 expected results for is_trivially_default_constructible.
6869 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
6870 new test generator.
6871
6872 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
6873
6874 * testsuite/util/testsuite_iterators.h: Improve comment.
6875
6876 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
6877 initialization syntax.
6878
6879 PR libstdc++/92285
6880 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
6881 of base class independent of __cplusplus value.
6882 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
6883 type defined in the base class
6884 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
6885 * testsuite/24_iterators/istreambuf_iterator/requirements/
6886 base_classes.cc: Adjust expected base class for C++98.
6887
6888 2020-01-09 Olivier Hainque <hainque@adacore.com>
6889
6890 * doc/xml/manual/appendix_contributing.xml: Document _C2
6891 as a reserved identifier, by VxWorks.
6892 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
6893 * include/bits/stl_multimap.h: Likewise.
6894
6895 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
6896
6897 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
6898 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
6899 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
6900 partial specialization to disambiguate the two constrained
6901 specializations.
6902
6903 * include/experimental/type_traits (experimental::is_pod_v): Disable
6904 -Wdeprecated-declarations warnings around reference to std::is_pod.
6905 * include/std/type_traits (is_pod_v): Likewise.
6906 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
6907 is_standard_layout and is_trivial. Do not check is_pod for C++20.
6908 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
6909 Add -Wno-deprecated for C++20.
6910 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
6911 * testsuite/20_util/is_pod/value.cc: Likewise.
6912 * testsuite/experimental/type_traits/value.cc: Likewise.
6913
6914 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
6915
6916 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
6917 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
6918 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
6919
6920 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
6921
6922 PR libstdc++/93205
6923 * include/bits/random.h (operator>>): Check stream operation succeeds.
6924 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
6925 typedefs.
6926 (operator>>): Remove redundant __istream_type typedefs. Check stream
6927 operations succeed.
6928 (__extract_params): New function to fill a vector from a stream.
6929 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
6930
6931 PR libstdc++/93208
6932 * config/abi/pre/gnu.ver: Add new exports.
6933 * include/std/memory_resource (memory_resource::~memory_resource()):
6934 Do not define inline.
6935 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
6936 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
6937 Define.
6938 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
6939 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
6940
6941 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
6942
6943 PR libstdc++/92124
6944 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
6945 template alias.
6946 (_Hashtable<>::__fwd_value_for): New.
6947 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
6948 parameter.
6949 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
6950 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
6951 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
6952 with std::move.
6953 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
6954 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
6955 Adapt.
6956 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
6957 Adapt.
6958 * testsuite/23_containers/unordered_set/92124.cc: New.
6959
6960 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
6961
6962 PR libstdc++/93201
6963 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
6964 detailed error reporting for remove_all. Check result of recursive
6965 call before incrementing iterator.
6966 (remove_all(const path&), remove_all(const path&, error_code&)): Use
6967 do_remove_all.
6968 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
6969 result of recursive call before incrementing iterator.
6970 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
6971 are reported correctly.
6972 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
6973
6974 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
6975
6976 * include/std/condition_variable
6977 (condition_variable_any::wait_on): Rename to match current draft
6978 standard.
6979 (condition_variable_any::wait_on_until): Likewise.
6980 (condition_variable_any::wait_on_for): Likewise.
6981 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
6982 Adjust tests to account for renamed methods.
6983
6984 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
6985
6986 PR libstdc++/92124
6987 * include/bits/stl_tree.h
6988 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
6989 std::move_if_noexcept by std::move.
6990 * testsuite/23_containers/map/92124.cc: New.
6991 * testsuite/23_containers/set/92124.cc: New.
6992
6993 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
6994
6995 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
6996 (stop_source): Likewise (LWG 3362).
6997 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
6998 comparisons.
6999
7000 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
7001 (lexicographical_compare_three_way): Do not depend on
7002 __cpp_lib_concepts.
7003 * include/std/version (__cpp_lib_three_way_comparison): Only define
7004 when __cpp_lib_concepts is defined.
7005 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
7006
7007 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
7008
7009 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
7010 Only define four-argument overload when __cpp_lib_concepts is defined.
7011
7012 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
7013
7014 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
7015
7016 2020-01-01 Jakub Jelinek <jakub@redhat.com>
7017
7018 Update copyright years.
7019 \f
7020 Copyright (C) 2020 Free Software Foundation, Inc.
7021
7022 Copying and distribution of this file, with or without modification,
7023 are permitted in any medium without royalty provided the copyright
7024 notice and this notice are preserved.