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