1 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
3 * include/std/chrono (common_type): Fix partial specializations
4 for a single duration type to use the common_type of the rep.
5 (duration::operator+, duration::operator-): Fix return types
6 to also use the common_type of the rep.
7 * testsuite/20_util/duration/requirements/reduced_period.cc:
8 Check duration using a rep that has common_type specialized.
10 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
13 * include/std/numeric (__abs_integral): Replace with ...
14 (__detail::__absu): New function template that returns an
15 unsigned type, guaranteeing it can represent the most
16 negative signed value.
17 (__detail::__gcd, __detail::__lcm): Require arguments to
18 be unsigned and therefore already non-negative.
19 (gcd, lcm): Convert arguments to absolute value as unsigned
20 type before calling __detail::__gcd or __detail::__lcm.
21 * include/experimental/numeric (gcd, lcm): Likewise.
22 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
24 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
25 * testsuite/26_numerics/gcd/92978.cc: New test.
26 * testsuite/26_numerics/lcm/92978.cc: New test.
27 * testsuite/experimental/numeric/92978.cc: New test.
29 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
31 * include/std/chrono (__duration_common_type): Ensure the
32 reduced ratio is used. Remove unused partial specialization
34 (common_type): Pass reduced ratios to __duration_common_type.
35 Add partial specializations for simple cases involving a single
36 duration or time_point type.
37 (duration::period): Use reduced ratio.
38 (duration::operator+(), duration::operator-()): Return duration
39 type using the reduced ratio.
40 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
41 Adjust expected errors.
42 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
44 2020-08-27 Patrick Palka <ppalka@redhat.com>
46 * include/std/chrono (year_month::operator+): Properly handle a
47 month value of 0 by casting the month value to int before
48 subtracting 1 from it so that the difference is sign-extended in
49 the subsequent addition.
50 * testsuite/std/time/year_month/1.cc: Test adding months to a
51 year_month whose month component is below or above the
52 normalized range of [1,12].
54 2020-08-27 Patrick Palka <ppalka@redhat.com>
57 (__detail::__months_years_conversion_disambiguator): Define.
58 (year_month::operator+=): Templatize the 'months'-based overload
59 so that the 'years'-based overload is selected in case of
60 equally-ranked implicit conversion sequences to both 'months'
61 and 'years' from the supplied argument.
62 (year_month::operator-=): Likewise.
63 (year_month::operator+): Likewise.
64 (year_month::operator-): Likewise.
65 (year_month_day::operator+=): Likewise.
66 (year_month_day::operator-=): Likewise.
67 (year_month_day::operator+): Likewise.
68 (year_month_day::operator-): Likewise.
69 (year_month_day_last::operator+=): Likewise.
70 (year_month_day_last::operator-=): Likewise.
71 (year_month_day_last::operator+): Likewise
72 (year_month_day_last::operator-): Likewise.
73 (year_month_day_weekday::operator+=): Likewise
74 (year_month_day_weekday::operator-=): Likewise.
75 (year_month_day_weekday::operator+): Likewise.
76 (year_month_day_weekday::operator-): Likewise.
77 (year_month_day_weekday_last::operator+=): Likewise
78 (year_month_day_weekday_last::operator-=): Likewise.
79 (year_month_day_weekday_last::operator+): Likewise.
80 (year_month_day_weekday_last::operator-): Likewise.
81 (testsuite/std/time/year_month/2.cc): New test.
82 (testsuite/std/time/year_month_day/2.cc): New test.
83 (testsuite/std/time/year_month_day_last/2.cc): New test.
84 (testsuite/std/time/year_month_weekday/2.cc): New test.
85 (testsuite/std/time/year_month_weekday_last/2.cc): New test.
86 * testsuite/std/time/year_month/2.cc: New file.
87 * testsuite/std/time/year_month_day/2.cc: New file.
88 * testsuite/std/time/year_month_day_last/2.cc: New file.
89 * testsuite/std/time/year_month_weekday/2.cc: New file.
90 * testsuite/std/time/year_month_weekday_last/2.cc: New file.
92 2020-08-27 Patrick Palka <ppalka@redhat.com>
95 * include/std/ranges (transform_view::sentinel::__distance_from):
96 Give this a deduced return type.
97 (transform_view::sentinel::operator-): Adjust the return type so
98 that it's based on the constness of the iterator rather than
100 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
102 2020-08-27 Patrick Palka <ppalka@redhat.com>
104 * include/std/ranges (elements_view::begin): Adjust constraints.
105 (elements_view::end): Likewise.
106 (elements_view::_Sentinel::operator==): Templatize to take both
107 _Iterator<true> and _Iterator<false>.
108 (elements_view::_Sentinel::operator-): Likewise.
109 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
110 the example from P1994R1.
111 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
113 2020-08-27 Patrick Palka <ppalka@redhat.com>
115 * include/std/ranges (elements_view::end): Replace these two
116 overloads with four new overloads.
117 (elements_view::_Iterator::operator==): Remove.
118 (elements_view::_Iterator::operator-): Likewise.
119 (elements_view::_Sentinel): Define.
121 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
123 * include/std/tuple (_Tuple_impl): Whitespaces changes for
124 consistent indentation. Also use __enable_if_t alias template.
126 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
130 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
131 Replace parameter pack with a type parameter and a pack and pass
132 the first type to __use_alloc.
133 * testsuite/20_util/tuple/cons/96803.cc: New test.
135 2020-08-26 Patrick Palka <ppalka@redhat.com>
137 * include/std/chrono (year_month_weekday::operator==): Compare
138 weekday_indexed instead of weekday.
139 * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
141 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
143 * include/bits/hashtable_policy.h (_Hash_code_base): Change
144 index of _Hashtable_ebo_helper base class.
145 * testsuite/23_containers/unordered_map/dup_types.cc: New test.
147 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
150 * include/experimental/string_view (basic_string_view):
151 Enable debug assertions.
152 * include/std/string_view (basic_string_view):
155 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
157 * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
158 _H2 into _RangeHash and _Hash into _Unused.
159 (_Hastable_base<>): Likewise.
160 (_Map_base<>): Likewise.
161 (_Insert_base<>): Likewise.
162 (_Insert<>): Likewise.
163 (_Rehash_base<>): Likewise.
164 (_Local_iterator_base<>): Likewise.
165 (_Hash_code_base<>): Likewise.
166 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
168 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
170 (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
171 bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
172 (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
174 (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
175 (_Local_iterator<>): Remove _H1 and _H2 template parameters.
176 (_Local_const_iterator<>): Likewise.
177 (_Equality<>): Likewise.
178 (_Map_base<>::operator[](const key_type&): Adapt.
179 (_Map_base<>::operator[](key_type&&): Adapt.
180 (_Identity::operator()): Add noexcept.
181 (_Select1st::operator()): Likewise.
182 (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
184 (_Hash_code_base::_M_extract): Remove.
185 * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
186 parameters. Remove _ExtractKey from constructors.
187 (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
188 __hash_code, __node_type*, size_t)): Replace by...
189 (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
190 __node_type*, size_t)): ...this.
191 (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
192 __hash_code, __node_type*)): Replace by...
193 (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
194 __node_type*)): ...this.
195 (_Hashtable<>::__key_extract): Remove.
196 * include/bits/node_handle.h: Adapt.
198 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
200 * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
201 * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
202 * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
203 * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
204 * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
205 * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
206 * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
207 * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
208 * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
209 * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
210 * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
211 * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
212 * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
213 * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
214 * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
215 * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
216 * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
217 * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
218 * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
220 * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
221 * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
223 * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
224 * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
225 * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
226 * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
227 * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
229 2020-08-25 Patrick Palka <ppalka@redhat.com>
231 * include/std/chrono (year_month_weekday::ok): Fix assert.
233 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
235 * include/std/future (future, shared_future. promise): Add
236 is_destructible assertion (LWG 3466). Adjust string-literal for
237 !is_array and !is_function assertions.
238 * testsuite/30_threads/future/requirements/lwg3458.cc: Check
239 types with no accessible destructor. Adjust expected errors.
240 * testsuite/30_threads/promise/requirements/lwg3466.cc:
242 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
245 2020-08-25 Patrick Palka <ppalka@redhat.com>
246 Ed Smith-Rowland <3dw4rd@verizon.net>
247 Jonathan Wakely <jwakely@redhat.com>
249 * include/std/chrono (time_point::operator++)
250 (time_point::operator--): Define.
251 (utc_clock, tai_clock, gps_clock): Forward declare.
252 (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
253 (gps_seconds): Define.
254 (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
255 (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
256 (is_clock_v<gps_clock>): Define these specializations.
257 (leap_second_info): Define.
258 (day, month, year, weekday, weekday_indexed)
259 (weekday_last, month_day, month_day_last, month_weekday)
260 (month_weekday_last, year_month, year_month_day)
261 (year_month_day_last, year_month_weekday, year_month_weekday_last):
262 Declare and later define.
263 (last_spec, last, __detail::__days_per_month)
264 (__detail::__days_per_month, __detail::__last_day): Define.
265 (January, February, March, April, May, June, July, August)
266 (September, October, November, December, Sunday, Monday, Tuesday)
267 (Wednesday, Thursday, Friday, Saturday): Define.
268 (weekday::operator[]): Define out-of-line.
269 (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
271 (year_month_day::year_month_day, year_month_day::ok): Likewise.
272 (__detail::__pow10, hh_mm_ss): Define.
273 (literals::chrono_literals::operator""d)
274 (literals::chrono_literals::operator""y): Define.
275 (is_am, is_pm, make12, make24): Define.
276 * testsuite/20_util/time_point/4.cc: New test.
277 * testsuite/std/time/day/1.cc: New test.
278 * testsuite/std/time/hh_mm_ss/1.cc: New test.
279 * testsuite/std/time/is_am/1.cc: New test.
280 * testsuite/std/time/is_pm/1.cc: New test.
281 * testsuite/std/time/make12/1.cc: New test.
282 * testsuite/std/time/make24/1.cc: New test.
283 * testsuite/std/time/month/1.cc: New test.
284 * testsuite/std/time/month_day/1.cc: New test.
285 * testsuite/std/time/month_day_last/1.cc: New test.
286 * testsuite/std/time/month_weekday/1.cc: New test.
287 * testsuite/std/time/month_weekday_last/1.cc: New test.
288 * testsuite/std/time/weekday/1.cc: New test.
289 * testsuite/std/time/weekday_indexed/1.cc: New test.
290 * testsuite/std/time/weekday_last/1.cc: New test.
291 * testsuite/std/time/year/1.cc: New test.
292 * testsuite/std/time/year_month/1.cc: New test.
293 * testsuite/std/time/year_month_day/1.cc: New test.
294 * testsuite/std/time/year_month_day_last/1.cc: New test.
295 * testsuite/std/time/year_month_weekday/1.cc: New test.
296 * testsuite/std/time/year_month_weekday_last/1.cc: New test.
298 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
300 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
301 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
303 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
305 * include/bits/iterator_concepts.h (indirectly_readable): Add
306 partial specializations to resolve ambiguities (LWG 3446).
307 * testsuite/24_iterators/associated_types/readable.traits.cc:
308 Check types with both value_type and element_type.
310 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
312 * include/std/ranges (ranges::iota_view::size()): Perform all
313 calculations in the right unsigned types.
314 * testsuite/std/ranges/iota/size.cc: New test.
316 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
319 * include/std/variant (_Variant_storage): Replace implicit
320 conversions from size_t to __index_type with explicit casts.
322 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
324 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
325 C++11 and skip for C++17 or later.
327 2020-08-24 Corentin Gay <gay@adacore.com>
329 * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
330 threads and add -pthread only on targets supporting them.
331 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
333 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
335 * testsuite/30_threads/async/42819.cc: Likewise.
336 * testsuite/30_threads/async/49668.cc: Likewise.
337 * testsuite/30_threads/async/54297.cc: Likewise.
338 * testsuite/30_threads/async/any.cc: Likewise.
339 * testsuite/30_threads/async/async.cc: Likewise.
340 * testsuite/30_threads/async/except.cc: Likewise.
341 * testsuite/30_threads/async/launch.cc: Likewise.
342 * testsuite/30_threads/async/lwg2021.cc: Likewise.
343 * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
344 * testsuite/30_threads/call_once/39909.cc: Likewise.
345 * testsuite/30_threads/call_once/49668.cc: Likewise.
346 * testsuite/30_threads/call_once/60497.cc: Likewise.
347 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
348 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
349 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
350 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
351 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
352 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
353 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
354 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
355 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
356 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
358 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
359 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
360 * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
361 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
362 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
363 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
364 * testsuite/30_threads/future/cons/move.cc: Likewise.
365 * testsuite/30_threads/future/members/45133.cc: Likewise.
366 * testsuite/30_threads/future/members/get.cc: Likewise.
367 * testsuite/30_threads/future/members/get2.cc: Likewise.
368 * testsuite/30_threads/future/members/share.cc: Likewise.
369 * testsuite/30_threads/future/members/valid.cc: Likewise.
370 * testsuite/30_threads/future/members/wait.cc: Likewise.
371 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
372 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
373 * testsuite/30_threads/lock/1.cc: Likewise.
374 * testsuite/30_threads/lock/2.cc: Likewise.
375 * testsuite/30_threads/lock/3.cc: Likewise.
376 * testsuite/30_threads/lock/4.cc: Likewise.
377 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
378 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
379 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
380 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
381 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
382 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
383 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
384 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
385 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
386 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
387 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
388 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
389 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
390 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
391 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
392 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
393 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
394 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
395 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
397 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
398 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
399 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
400 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
401 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
402 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
403 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
404 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
405 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
406 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
407 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
408 * testsuite/30_threads/promise/60966.cc: Likewise.
409 * testsuite/30_threads/promise/cons/1.cc: Likewise.
410 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
411 * testsuite/30_threads/promise/cons/move.cc: Likewise.
412 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
413 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
414 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
415 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
416 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
417 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
418 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
419 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
420 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
421 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
422 * testsuite/30_threads/promise/members/swap.cc: Likewise.
423 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
424 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
426 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
427 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
428 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
430 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
431 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
432 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
433 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
434 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
435 * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
437 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
438 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
439 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
441 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
443 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
444 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
445 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
447 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
449 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
451 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
453 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
455 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
456 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
457 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
458 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
459 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
460 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
461 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
462 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
463 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
464 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
465 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
466 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
467 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
468 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
469 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
470 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
471 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
472 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
473 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
474 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
475 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
476 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
477 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
478 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
479 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
480 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
481 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
482 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
483 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
484 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
485 * testsuite/30_threads/this_thread/1.cc: Likewise.
486 * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
487 * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
488 * testsuite/30_threads/thread/cons/1.cc: Likewise.
489 * testsuite/30_threads/thread/cons/2.cc: Likewise.
490 * testsuite/30_threads/thread/cons/3.cc: Likewise.
491 * testsuite/30_threads/thread/cons/4.cc: Likewise.
492 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
493 * testsuite/30_threads/thread/cons/5.cc: Likewise.
494 * testsuite/30_threads/thread/cons/6.cc: Likewise.
495 * testsuite/30_threads/thread/cons/7.cc: Likewise.
496 * testsuite/30_threads/thread/cons/8.cc: Likewise.
497 * testsuite/30_threads/thread/cons/9.cc: Likewise.
498 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
499 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
500 * testsuite/30_threads/thread/members/1.cc: Likewise.
501 * testsuite/30_threads/thread/members/2.cc: Likewise.
502 * testsuite/30_threads/thread/members/3.cc: Likewise.
503 * testsuite/30_threads/thread/members/4.cc: Likewise.
504 * testsuite/30_threads/thread/members/5.cc: Likewise.
505 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
507 * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
508 * testsuite/30_threads/thread/swap/1.cc: Likewise.
509 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
510 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
512 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
513 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
514 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
516 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
517 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
518 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
519 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
520 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
521 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
522 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
523 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
524 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
525 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
526 * testsuite/30_threads/try_lock/1.cc: Likewise.
527 * testsuite/30_threads/try_lock/2.cc: Likewise.
528 * testsuite/30_threads/try_lock/3.cc: Likewise.
529 * testsuite/30_threads/try_lock/4.cc: Likewise.
530 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
531 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
532 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
533 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
534 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
535 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
536 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
537 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
538 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
539 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
540 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
542 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
545 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
546 test "cold" on darwin.
547 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
549 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
551 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
553 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
556 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
559 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
560 tbb-backend effective target.
561 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
562 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
563 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
565 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
567 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
568 (incrementable_traits<__int128>): Define specialization.
569 (incrementable_traits<unsigned __int128>): Likewise.
570 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
573 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
574 Patrick Palka <ppalka@redhat.com>
577 * include/bits/range_access.h (__detail::__to_unsigned_like):
578 Do not use make_unsigned_t<T> in the return type, as it can
579 result in an error before the integral<T> constraint is checked.
580 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
581 (__detail::__make_unsigned_like_t): Define as the return type
582 of __to_unsigned_like.
583 * testsuite/std/ranges/subrange/96042.cc: New test.
585 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
587 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
588 (operator>=): Remove deprecated functions.
590 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
593 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
594 trait which is true for 128-bit integers even in strict modes.
595 (__numeric_traits_integer, __numeric_traits): Use
596 __is_integer_nonstrict instead of __is_integer.
597 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
598 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
600 * testsuite/std/ranges/iota/96042.cc: New test.
602 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
604 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
605 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
606 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
607 Add new macros to comment.
609 2020-08-19 Patrick Palka <ppalka@redhat.com>
611 * include/Makefile.am (bits_headers): Add new header
612 <bits/max_size_type.h>.
613 * include/Makefile.in: Regenerate.
614 * include/bits/iterator_concepts.h
615 (ranges::__detail::__max_diff_type): Remove definition, replace
616 with forward declaration of class __max_diff_type.
617 (__detail::__max_size_type): Remove definition, replace with
618 forward declaration of class __max_size_type.
619 (__detail::__is_unsigned_int128, __is_signed_int128)
620 (__is_int128): New concepts.
621 (__detail::__is_integer_like): Accept __int128 and unsigned
623 (__detail::__is_signed_integer_like): Accept __int128.
624 * include/bits/max_size_type.h: New header.
625 * include/bits/range_access.h: Include <bits/max_size_type.h>.
626 (__detail::__to_unsigned_like): Two new overloads.
627 * testsuite/std/ranges/iota/difference_type.cc: New test.
628 * testsuite/std/ranges/iota/max_size_type.cc: New test.
630 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
632 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
634 (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
635 message in deprecated warnings.
636 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
637 macros for marking features deprecated in C++11.
638 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
640 * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
641 Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
642 (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
643 * include/backward/binders.h (binder1st, binder2nd): Likewise.
644 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
645 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
646 * include/std/streambuf (stossc): Replace C++11 attribute
647 with _GLIBCXX_DEPRECATED_SUGGEST.
648 * include/std/type_traits (__is_nullptr_t): Use
649 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
650 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
651 Also check for io_state, open_mode and seek_dir typedefs.
653 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
656 * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
657 Add static_asserts to make sure that the argument of the type
658 trait is not misused with incomplete types.
659 (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
660 to make sure that the first and second arguments of the type trait
661 are not misused with incomplete types.
662 * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
663 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
664 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
665 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
667 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
669 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
670 Clement Chigot <clement.chigot@atos.net>
672 * config/os/aix/t-aix: Add complementary mode object files to
675 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
677 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
678 "cold" isn't used in the library. Also check <cxxabi.h>.
679 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
681 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
683 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
685 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
688 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
691 * include/std/future (__future_base::_S_make_deferred_state)
692 (__future_base::_S_make_async_state): Remove.
693 (__future_base::_Deferred_state): Change constructor to accept a
694 parameter pack of arguments and forward them to the call
696 (__future_base::_Async_state_impl): Likewise. Replace lambda
697 expression with a named member function.
698 (async): Construct state object directly from the arguments,
699 instead of using thread::__make_invoker, _S_make_deferred_state
700 and _S_make_async_state. Move shared state into the returned
702 * include/std/thread (thread::_Call_wrapper): New alias
703 template for use by constructor and std::async.
704 (thread::thread(Callable&&, Args&&...)): Create state object
705 directly instead of using _S_make_state.
706 (thread::__make_invoker, thread::__decayed_tuple)
707 (thread::_S_make_state): Remove.
708 * testsuite/30_threads/async/69724.cc: New test.
710 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
715 * include/std/tuple [__has_cpp_attribute(no_unique_address)]
716 (_Head_base<Idx, Head, true>): New definition of the partial
717 specialization, using [[no_unique_address]] instead of
719 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
721 * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
722 * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
723 * testsuite/20_util/tuple/element_access/71096.cc: New test.
725 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
727 * testsuite/lib/libstdc++.exp: Use the new option
728 -fdiagnostics-plain-output.
730 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
732 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
733 option is used and fail unless --enable-cheaders-obsolete is
735 * configure: Regenerate.
737 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
740 * include/bits/basic_string.h (operator=(basic_string&&)): Check
741 for self-move before copying with char_traits::copy.
742 * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
744 * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
745 Check for equal allocators.
746 * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
747 Call clear() instead of _M_clear().
748 * include/debug/formatter.h (__msg_self_move_assign): Change
750 * include/debug/macros.h (__glibcxx_check_self_move_assign):
751 (_GLIBCXX_DEBUG_VERIFY): Remove.
752 * include/debug/safe_container.h (operator=(_Safe_container&&)):
753 Remove assertion check for safe move and make it well-defined.
754 * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
755 Remove assertion check for self-move.
756 * include/debug/safe_local_iterator.h
757 (operator=(_Safe_local_iterator&&)): Likewise.
758 * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
759 * testsuite/23_containers/deque/cons/self_move.cc: New test.
760 * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
761 * testsuite/23_containers/list/cons/self_move.cc: New test.
762 * testsuite/23_containers/set/cons/self_move.cc: New test.
763 * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
764 * testsuite/23_containers/vector/cons/self_move.cc: New test.
766 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
769 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
770 to destroy in an intermediate forward_list.
771 (forward_list<>::remove_if, forward_list<>::unique): Likewise.
772 * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
773 (list<>::remove_if): Likewise.
774 * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
775 (forward_list<>::erase_after): Adapt.
776 (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
777 destroy in an intermediate forward_list.
778 (forward_list<>::unique): Likewise.
779 * include/debug/list (list<>::remove, list<>::unique): Likewise.
780 (list<>::remove_if): Likewise.
781 * testsuite/23_containers/forward_list/operations/91620.cc: New test.
782 * testsuite/23_containers/list/operations/91620.cc: New test.
784 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
786 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
788 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
790 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
793 * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
794 (execution_context::mutex_type): Define dummy mutex type.
795 (system_context): Use execution_context::mutex_type.
796 (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
797 thread and condition variable types.
798 [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
800 (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
801 an exception when threads aren't available.
802 (strand::running_in_this_thread()): Defer to _M_state.
803 (strand::_State::running_in_this_thread()): New function.
804 (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
805 * include/experimental/io_context (io_context): Use the
806 execution_context::mutex_type alias. Replace stack of thread
808 * testsuite/experimental/net/execution_context/use_service.cc:
809 Enable test for non-pthread targets.
811 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
813 * include/experimental/executor (system_context::a__tag): Make
814 default constructor explicit.
816 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
818 * include/experimental/executor (system_context::_M_run()):
820 * testsuite/experimental/net/system_context/1.cc: New test.
822 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
824 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
825 #ifdef instead of #if.
826 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
827 using __gthread_yield.
829 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
831 * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
832 (this_thread::sleep_until): Define.
833 [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
834 use of __gthread_time_t typedef with timespec.
835 * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
837 * testsuite/30_threads/this_thread/2.cc: Moved to...
838 * testsuite/30_threads/this_thread/yield.cc: ...here.
839 * testsuite/30_threads/this_thread/3.cc: Moved to...
840 * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
841 * testsuite/30_threads/this_thread/4.cc: Moved to...
842 * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
843 * testsuite/30_threads/this_thread/58038.cc: Add
845 * testsuite/30_threads/this_thread/60421.cc: Likewise.
846 * testsuite/30_threads/this_thread/sleep_for.cc: New test.
847 * testsuite/30_threads/this_thread/sleep_until.cc: New test.
849 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
852 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
853 of calling ::lstat directly.
854 * src/filesystem/ops.cc (read_symlink): Likewise.
856 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
858 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
859 Use gdb.Type.strip_typedefs().
860 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
861 the emulated old type.
863 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
866 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
867 $enable_libstdcxx_filesystem_ts.
868 * configure: Regenerate.
870 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
873 * include/bits/stl_iterator.h (inserter): Do not deduce
874 iterator type (LWG 561).
875 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
877 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
879 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
880 (basic_string::reserve()): Do nothing if exceptions are not
883 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
886 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
887 (stat_type): Change to __stat64.
888 (stat): Use _wstat64.
890 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
893 * include/debug/bitset (bitset::operator==): Call _M_base() on
895 (bitset::operator!=): Likewise, but don't define it at all when
896 default comparisons are supported by the compiler.
897 * testsuite/23_containers/bitset/operations/96303.cc: New test.
899 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
901 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
902 Replace VERIFY with static_assert where the compiler now
904 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
907 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
909 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
911 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
912 Jonathan Wakely <jwakely@redhat.com>
914 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
915 patterns for basic_string members.
916 (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
917 * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
918 * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
919 (reserve(size_type)): Remove default argument.
920 (reserve()): Declare new overload.
921 [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
922 * include/bits/basic_string.tcc (reserve(size_type)): Remove
923 support for shrinking capacity.
924 (reserve()): Perform shrink-to-fit operation.
925 [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
926 * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
927 reflect new behavior.
928 * testsuite/21_strings/basic_string/capacity/char/1.cc:
930 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
932 * testsuite/21_strings/basic_string/capacity/char/2.cc:
934 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
936 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
938 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
941 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
943 * include/bits/basic_string.tcc
944 (operator>>(basic_istream&, basic_string&)): Do not set eofbit
945 if extraction stopped after in.width() characters.
946 * src/c++98/istream-string.cc (operator>>(istream&, string&)):
948 * include/bits/istream.tcc (__istream_extract): Do not set
949 eofbit if extraction stopped after n-1 characters.
950 * src/c++98/istream.cc (__istream_extract): Likewise.
951 * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
952 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
953 * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
954 * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
956 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
959 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
960 immediately for non-symlinks.
961 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
963 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
965 * include/std/istream (operator>>(istream&, char*)): Add
966 attributes to get warnings for pointers that are null or known
967 to point to the end of a buffer. Request upper bound from
968 __builtin_object_size check and handle zero-sized buffer case.
969 (operator>>(istream&, signed char))
970 (operator>>(istream&, unsigned char*)): Add attributes.
971 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
972 Check extracting into the middle of a buffer.
973 * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
975 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
977 * include/std/atomic (atomic<T>::store): Reformat.
979 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
981 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
982 with LLVM repo for PSTL.
983 * doc/html/manual/status.html: Regenerate.
985 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
987 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
988 * include/bits/istream.tcc (__istream_extract): New function
989 template implementing both of operator>>(istream&, char*) and
990 operator>>(istream&, char(&)[N]). Add explicit instantiation
991 declaration for it. Remove explicit instantiation declarations
992 for old function templates.
993 * include/std/istream (__istream_extract): Declare.
994 (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
995 call __istream_extract.
996 (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
997 (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
998 (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
999 (operator>>(basic_istream<char,T>&, signed char(&)[N])):
1001 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
1003 * include/std/streambuf (basic_streambuf): Declare char overload
1004 of __istream_extract as a friend.
1005 * src/c++11/istream-inst.cc: Add explicit instantiation
1006 definition for wchar_t overload of __istream_extract. Remove
1007 explicit instantiation definitions of old operator>> overloads
1008 for versioned-namespace build.
1009 * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
1010 with __istream_extract(istream&, char*, streamsize).
1011 * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
1012 Do not use variable-length array.
1013 * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
1014 Do not run test for C++20.
1015 * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
1016 Do not test writing to pointers for C++20.
1017 * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
1018 Use array instead of pointer.
1019 * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
1020 Do not use variable-length array.
1021 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
1022 Do not run test for C++20.
1023 * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
1024 Do not test writing to pointers for C++20.
1025 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
1027 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
1029 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
1031 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
1033 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
1036 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
1038 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
1040 * doc/html/manual/using_exceptions.html: Regenerate.
1042 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
1044 * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
1045 of oneAPI DPC++ Library on Github.
1046 * doc/html/manual/status.html: Regenerate.
1048 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
1050 * include/bits/stl_bvector.h
1051 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
1053 (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
1054 (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
1055 (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
1056 (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
1057 (_Bvector_impl_data::_M_reset()): Likewise.
1058 (_Bvector_impl_data::_M_swap_data): New.
1059 (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
1060 (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
1061 (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
1063 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
1065 (vector::vector(vector&&, const allocator_type&, false_type)): New.
1066 (vector::vector(vector&&, const allocator_type&)): Use latters.
1067 (vector::vector(const vector&, const allocator_type&)): Adapt.
1068 [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
1069 const allocator_type&)): Use _M_initialize_range.
1070 (vector::operator[](size_type)): Use iterator operator[].
1071 (vector::operator[](size_type) const): Use const_iterator operator[].
1072 (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
1073 [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
1074 _InputIt)): Use _M_insert_range.
1075 (vector::_M_initialize(size_type)): Adapt.
1076 [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
1077 [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
1078 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
1079 using start _M_offset.
1080 (StdVectorPrinter.to_string): Likewise.
1081 * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
1082 * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
1085 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1087 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
1089 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
1092 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1094 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
1095 Move struct to namespace scope.
1097 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1099 * testsuite/26_numerics/numbers/float128.cc: Check
1100 __STRICT_ANSI__ before using __float128.
1101 * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
1104 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1106 * testsuite/18_support/set_terminate.cc: Require C++11 or
1108 * testsuite/28_regex/simple_c++11.cc: Likewise.
1109 * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
1110 * testsuite/24_iterators/headers/iterator/synopsis.cc:
1111 Require C++14 or lower.
1113 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1115 * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
1116 effective-target from xfail selector.
1117 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
1118 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
1119 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
1120 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
1121 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
1122 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
1123 * testsuite/23_containers/span/subspan_2_assert_neg.cc:
1125 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
1127 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
1129 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
1131 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
1133 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
1135 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1137 * testsuite/20_util/reference_wrapper/83427.cc: Adjust
1138 effective-target to specific language mode only.
1139 * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
1141 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
1143 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
1145 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
1147 * testsuite/26_numerics/valarray/69116.cc:
1149 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
1150 Remove whitespace at end of file.
1151 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
1154 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1156 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
1157 c++17 effective-target.
1158 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
1160 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
1161 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
1163 * testsuite/17_intro/headers/c++2017/operator_names.cc:
1165 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
1166 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
1168 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
1170 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
1172 * testsuite/20_util/any/assign/1.cc: Likewise.
1173 * testsuite/20_util/any/assign/2.cc: Likewise.
1174 * testsuite/20_util/any/assign/emplace.cc: Likewise.
1175 * testsuite/20_util/any/assign/exception.cc: Likewise.
1176 * testsuite/20_util/any/assign/self.cc: Likewise.
1177 * testsuite/20_util/any/cons/1.cc: Likewise.
1178 * testsuite/20_util/any/cons/2.cc: Likewise.
1179 * testsuite/20_util/any/cons/aligned.cc: Likewise.
1180 * testsuite/20_util/any/cons/explicit.cc: Likewise.
1181 * testsuite/20_util/any/cons/in_place.cc: Likewise.
1182 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
1183 * testsuite/20_util/any/make_any.cc: Likewise.
1184 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
1185 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
1186 * testsuite/20_util/any/misc/swap.cc: Likewise.
1187 * testsuite/20_util/any/modifiers/1.cc: Likewise.
1188 * testsuite/20_util/any/observers/type.cc: Likewise.
1189 * testsuite/20_util/any/requirements.cc: Likewise.
1190 * testsuite/20_util/any/typedefs.cc: Likewise.
1191 * testsuite/20_util/as_const/1.cc: Likewise.
1192 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
1193 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
1194 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
1195 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
1197 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
1198 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
1200 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
1201 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
1202 * testsuite/20_util/function_objects/searchers.cc: Likewise.
1203 * testsuite/20_util/in_place/requirements.cc: Likewise.
1204 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
1206 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
1208 * testsuite/20_util/is_invocable/value.cc: Likewise.
1209 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
1211 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
1213 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
1215 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
1217 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
1218 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
1220 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
1222 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
1224 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
1226 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
1228 * testsuite/20_util/is_swappable/value.cc: Likewise.
1229 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
1231 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
1233 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
1234 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
1236 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
1238 * testsuite/20_util/logical_traits/value.cc: Likewise.
1239 * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
1240 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
1241 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
1242 * testsuite/20_util/optional/hash.cc: Likewise.
1243 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
1244 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
1245 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
1247 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
1249 * testsuite/20_util/tuple/apply/1.cc: Likewise.
1250 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
1251 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
1252 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
1253 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
1255 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
1257 * testsuite/20_util/variant/any.cc: Likewise.
1258 * testsuite/20_util/variant/compile.cc: Likewise.
1259 * testsuite/20_util/variant/hash.cc: Likewise.
1260 * testsuite/20_util/variant/index_type.cc: Likewise.
1261 * testsuite/20_util/variant/run.cc: Likewise.
1262 * testsuite/20_util/void_t/1.cc: Likewise.
1263 * testsuite/21_strings/basic_string/79162.cc: Likewise.
1264 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
1265 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
1266 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
1267 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
1268 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
1270 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
1272 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
1274 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
1276 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
1278 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
1280 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
1282 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
1284 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
1286 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
1288 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
1290 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
1292 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
1294 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
1296 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
1297 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
1299 * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
1300 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
1301 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
1302 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
1303 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
1305 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
1307 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
1309 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
1311 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
1313 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
1315 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
1317 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
1319 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
1321 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
1323 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
1325 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
1326 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
1328 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
1330 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
1332 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
1334 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
1336 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
1338 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
1340 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1342 * testsuite/21_strings/basic_string_view/literals/types.cc:
1344 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
1346 * testsuite/21_strings/basic_string_view/literals/values.cc:
1348 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
1350 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
1352 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
1354 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
1356 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
1358 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
1360 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
1362 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
1364 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
1366 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
1368 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
1370 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
1372 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
1374 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
1376 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
1378 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
1380 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
1382 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
1384 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
1386 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
1388 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
1390 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
1392 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
1394 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
1396 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
1398 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
1400 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
1402 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
1404 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
1406 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
1408 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
1410 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
1412 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
1414 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
1416 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
1418 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
1420 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
1422 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1424 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
1425 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
1426 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1428 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
1429 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1431 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
1432 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1433 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1434 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
1435 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1436 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
1437 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1438 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
1439 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1441 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
1443 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
1445 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
1447 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
1449 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
1451 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
1453 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
1455 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1457 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
1459 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
1461 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
1463 * testsuite/25_algorithms/clamp/1.cc: Likewise.
1464 * testsuite/25_algorithms/clamp/2.cc: Likewise.
1465 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
1466 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
1468 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
1470 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
1472 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
1474 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
1476 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
1477 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
1479 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
1480 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
1481 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
1483 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
1485 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
1487 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
1488 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
1489 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
1491 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1494 * include/bits/stl_iterator.h (reverse_iterator): Friend
1495 declaration should not depend on __cplusplus.
1497 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1499 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
1500 Remove -std=gnu++17 option.
1502 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1504 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
1505 definition of aggregates in C++20.
1506 * testsuite/20_util/optional/requirements.cc: Adjust for
1507 defaulted comparisons in C++20.
1509 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1511 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
1512 deprecation of volatile-qualified structured bindings in C++20.
1513 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
1514 for deprecation of is_pod in C++20
1516 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1518 * testsuite/20_util/time_point_cast/rounding.cc: Remove
1519 duplicate dg-do directive and add c++17 effective target.
1521 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1523 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
1524 LC_ALL_MASK not LC_ALL.
1526 2020-07-31 Richard Biener <rguenther@suse.de>
1529 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
1531 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
1533 * include/bits/basic_string.h (size_type, difference_type):
1534 Use allocator_traits to obtain the allocator's size_type and
1537 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
1540 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
1542 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
1545 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
1547 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
1548 Use allocator with the correct value type.
1549 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
1552 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
1554 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
1557 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
1559 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
1561 (__detail::__integral_nonbool): Likewise.
1562 (__detail::__is_integer_like): Use __integral_nonbool.
1563 * testsuite/std/ranges/access/lwg3467.cc: New test.
1565 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
1567 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
1568 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
1570 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
1572 * testsuite/23_containers/vector/bool/72847.cc: Use the
1573 exceptions_enabled effective-target keyword instead of
1574 checking for an explicit -fno-exceptions option.
1575 * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
1576 redundant try-catch.
1577 * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
1578 Do not define check_allocate_max_size and memory_resource.
1579 * testsuite/util/testsuite_containers.h: Replace comment with
1580 #error if wrong standard dialect used.
1581 * testsuite/util/testsuite_shared.cc: Likewise.
1583 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
1585 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
1586 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
1588 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
1590 (_Local_iterator_base<>): Inherits _Node_iterator_base.
1591 (_Local_iterator_base<>::_M_cur): Remove.
1592 (_Local_iterator_base<>::_M_curr()): Remove.
1593 (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
1595 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
1597 * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
1598 (unordered_multimap<>::_M_invalidate): Adapt.
1599 * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
1600 (unordered_multiset<>::_M_invalidate): Adapt.
1602 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
1603 Jonathan Wakely <jwakely@redhat.com>
1604 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1606 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
1607 target powerpc-ibm-aix* and powerpc*-*-darwin*.
1608 * testsuite/29_atomics/atomic_float/value_init.cc: Add options
1611 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
1613 * include/bits/hashtable.h
1614 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
1615 Add noexcept qualification.
1616 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
1617 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
1619 * include/bits/unordered_map.h
1620 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
1622 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
1624 * include/bits/unordered_set.h
1625 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
1626 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
1628 * include/debug/unordered_map
1629 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
1630 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
1632 * include/debug/unordered_set
1633 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
1634 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
1636 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
1638 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
1640 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
1642 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
1644 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
1646 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
1648 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
1650 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
1652 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
1654 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
1656 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
1659 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
1661 * include/bits/hashtable.h
1662 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
1663 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
1664 const allocator_type&, true_type)): New.
1665 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
1666 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
1667 const allocator_type&, false_type)): New.
1668 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
1669 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
1670 const allocator_type&)): Delegate to latters.
1671 (operator=(initializer_list<value_type>)): Rehash if too small.
1672 (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
1673 size_t len parameter.
1674 * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
1675 Do not try to get input range distance.
1676 * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
1677 * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
1679 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
1681 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
1683 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
1684 (_Hashtable_base<>::_M_node_equals): New, use latter.
1685 (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
1686 _RehashPolicy, false>::_M_equal): Adapt to use latter.
1687 * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
1688 (_Hashtable<>::_M_assign): Use latter.
1689 (_Hashtable<>::_M_move_assign): Likewise.
1690 (_Hashtable<>(_Hashtable<>&&)): Likewise.
1691 (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
1692 (_Hashtable<>::swap): Likewise.
1693 (_Hashtable<>::find): Build iterator directly from _M_find_node result.
1694 (_Hashtable<>::count): Use _Hashtable<>::find.
1695 (_Hashtable<>::equal_range): Likewise.
1696 (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
1699 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
1701 * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
1702 that FE_NEAREST is used.
1703 * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
1704 a { target c++14 } test.
1705 [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
1706 * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
1708 * testsuite/20_util/from_chars/6.cc: New test.
1710 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
1712 * include/std/future (future, shared_future, promise): Add
1713 static assertions to the primary template to reject array and
1715 * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
1716 * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
1717 * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
1719 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
1721 * include/bits/stl_iterator.h (reverse_iterator): Constrain
1722 converting constructor and converting assignment operator.
1723 Access source iterator's data member directly instead of
1725 (move_iterator): Likewise.
1726 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
1727 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
1729 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
1731 * acinclude.m4 (libtool_VERSION): Bump version.
1732 * config.h.in: Regenerate.
1733 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
1735 * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
1736 version and new export.
1737 * configure: Regenerate.
1738 * configure.ac: Check for <xlocale.h> and uselocale.
1739 * crossconfig.m4: Add macro or checks for uselocale.
1740 * include/std/charconv (from_chars): Declare overloads for
1741 float, double, and long double.
1742 * src/c++17/Makefile.am: Add new file.
1743 * src/c++17/Makefile.in: Regenerate.
1744 * src/c++17/floating_from_chars.cc: New file.
1745 (from_chars): Define for float, double, and long double.
1746 * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
1747 diagnostics caused by new overloads.
1748 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
1749 * testsuite/20_util/from_chars/2.cc: Check leading '+'.
1750 * testsuite/20_util/from_chars/4.cc: New test.
1751 * testsuite/20_util/from_chars/5.cc: New test.
1752 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
1754 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
1756 * include/bits/istream.tcc
1757 (basic_istream::get(__streambuf_type&, char_type): Use unsigned
1758 long long for counter and check if it would overflow _M_gcount.
1759 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
1760 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
1762 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
1764 * include/std/coroutine: Mark the methods of the
1765 trivial awaitables as constexpr.
1767 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
1769 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
1771 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
1775 * include/bits/istream.tcc (basic_istream::ignore(streamsize))
1776 [n == max]: Check overflow conditions on _M_gcount. Rely on
1777 the fact that either EOF or the delimiter was reached.
1778 [n < max]: Check _M_gcount < n before checking for EOF or
1780 (basic_istream::ignore(streamsize, char_type): Likewise.
1781 * src/c++98/compatibility.cc (istream::ignore(streamsize))
1782 (wistream::ignore(streamsize)): Likewise.
1783 * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
1784 (wistream::ignore(streamsize, char_type)): Likewise.
1785 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
1786 delimiter is discarded if the number of characters ignored
1787 doesn't fit in streamsize.
1788 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
1790 * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
1791 * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
1793 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
1795 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
1796 qualification based only on _Compare one.
1797 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
1799 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
1801 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
1803 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
1805 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
1807 * include/std/limits: Whitespace changes.
1809 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
1811 * include/Makefile.am: Remove bits/int_limits.h.
1812 * include/Makefile.in: Regenerate.
1813 * include/bits/int_limits.h: Removed.
1814 * include/bits/parse_numbers.h (_Select_int_base): Replace
1815 __int_limits with __int_traits.
1816 * include/bits/range_access.h (_SSize::operator()): Likewise.
1817 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
1819 (__int_traits): New alias template.
1820 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
1821 (__countr_zero, __countr_one, __popcount, __bit_ceil)
1822 (__bit_floor, __bit_width) Replace __int_limits with
1824 * include/std/charconv (__to_chars_8, __from_chars_binary)
1825 (__from_chars_alpha_to_num, from_chars): Likewise.
1826 * include/std/memory_resource (polymorphic_allocator::allocate)
1827 (polymorphic_allocator::allocate_object): Likewise.
1828 * include/std/string_view (basic_string_view::_S_compare):
1830 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
1832 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
1834 * include/std/limits: Whitespace changes.
1836 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
1838 * include/std/optional (_Optional_payload_base, _Optional_base)
1839 (optional, __optional_hash_call_base): Adjust whitespace and
1840 other formatting. Remove redundant && tokens on template
1841 arguments to type traits.
1843 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
1845 * include/std/optional (make_optional): Add enable_if
1846 constraints and noexcept-specifier to each overload.
1847 * testsuite/20_util/optional/make_optional-2.cc: New test.
1849 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
1852 * include/std/optional (optional): Add noexcept-specifier to
1853 every constructor, assignment operator, emplace function and
1854 dereference operator.
1855 * testsuite/20_util/optional/assignment/noexcept.cc: New test.
1856 * testsuite/20_util/optional/cons/noexcept.cc: New test.
1858 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
1861 * include/bits/fs_dir.h: Use consistent tag in class-head.
1862 * include/bits/localefwd.h: Likewise.
1863 * include/bits/regex.h: Likewise.
1864 * include/bits/stl_map.h: Likewise.
1865 * include/bits/stl_multimap.h: Likewise.
1866 * include/bits/stl_multiset.h: Likewise.
1867 * include/bits/stl_set.h: Likewise.
1868 * include/std/complex: Likewise.
1869 * include/std/functional: Likewise.
1870 * include/std/future: Likewise.
1871 * include/std/system_error: Likewise.
1872 * include/std/thread: Likewise.
1873 * include/std/tuple: Likewise.
1874 * include/std/type_traits: Likewise.
1875 * include/std/valarray: Likewise.
1877 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
1879 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
1882 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
1884 * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
1885 c++98_only target selector.
1886 * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
1888 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
1890 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
1891 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
1893 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
1895 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
1897 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
1899 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
1901 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
1903 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
1905 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
1907 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
1909 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
1911 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
1913 * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
1914 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
1915 * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
1917 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
1919 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
1921 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
1922 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
1925 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1928 * include/std/variant
1929 (_Copy_assign_base::operator=(const _Copy_assign_base&):
1930 Do the move-assignment from a temporary so that the temporary
1931 is constructed with an explicit index.
1932 * testsuite/20_util/variant/91807.cc: New.
1934 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1938 * testsuite/29_atomics/atomic_float/1.cc: Use different values
1940 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
1942 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
1945 * include/bits/regex.h (operator==, operator!=): Remove noexcept
1946 equality comparisons for match_results.
1947 * testsuite/28_regex/match_results/94627.cc: New test.
1949 2020-07-01 Martin Sebor <msebor@redhat.com>
1951 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
1952 text of expected warning.
1953 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
1954 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
1955 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
1956 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
1958 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
1961 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1963 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
1964 Add a __nonnull__ attribute.
1965 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
1966 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
1968 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1970 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
1971 Add a __nonnull__ attribute.
1972 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
1973 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
1975 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
1978 * include/std/type_traits (is_literal_type, is_literal_type_v):
1980 * include/std/variant (_Uninitialized):
1981 Adjust the condition and the comment.
1982 * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
1983 * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
1985 * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
1986 * testsuite/20_util/is_literal_type/value.cc: Likewise.
1987 * testsuite/20_util/optional/constexpr/nullopt.cc:
1988 Use __is_literal_type directly.
1989 * testsuite/20_util/optional/nullopt.cc: Likewise.
1990 * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
1991 * testsuite/20_util/variant/95915.cc: New.
1992 * testsuite/20_util/variant/compile.cc: Add new test.
1993 * testsuite/experimental/optional/constexpr/nullopt.cc:
1994 Use __is_literal_type directly.
1995 * testsuite/experimental/optional/nullopt.cc: Likewise.
1996 * testsuite/experimental/type_traits/value.cc: Adjust.
1997 * testsuite/util/testsuite_common_types.h:
1998 Use __is_literal_type directly.
2000 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2002 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
2003 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
2005 * testsuite/20_util/from_chars/3.cc: New test.
2007 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2009 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
2010 * include/std/charconv (__detail::__to_chars): Avoid
2011 -Wsign-compare warning.
2013 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2016 * include/std/charconv (__to_chars_i): Check for zero-sized
2017 buffer unconditionally.
2018 * testsuite/20_util/to_chars/95851.cc: New test.
2020 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
2022 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
2024 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
2025 directives outside preprocessor condition.
2027 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
2030 * include/std/variant (__detail::__variant::_Build_FUN): Remove
2031 partial specialization to prevent narrowing conversions to bool.
2032 * testsuite/20_util/variant/compile.cc: Test non-narrowing
2033 conversions to bool.
2034 * testsuite/20_util/variant/run.cc: Likewise.
2036 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
2038 * doc/Makefile.in: Regenerate.
2039 * include/Makefile.in: Regenerate.
2040 * libsupc++/Makefile.in: Regenerate.
2041 * po/Makefile.in: Regenerate.
2042 * python/Makefile.in: Regenerate.
2043 * src/Makefile.in: Regenerate.
2044 * src/c++11/Makefile.in: Regenerate.
2045 * src/c++17/Makefile.in: Regenerate.
2046 * src/c++98/Makefile.in: Regenerate.
2047 * src/filesystem/Makefile.in: Regenerate.
2048 * testsuite/Makefile.in: Regenerate.
2050 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
2052 * Makefile.am: Use -include.
2053 * Makefile.in: Regenerate.
2055 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
2057 * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
2058 * Makefile.in: Regenerate.
2059 * configure.ac (tmake_file): Substitute.
2060 * configure: Regenerate.
2061 * configure.host (aix*): Define tmake_file.
2062 * config/os/aix/t-aix: New file.
2064 2020-06-20 Jason Merrill <jason@redhat.com>
2066 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
2067 Remove greedy_ops tests.
2068 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
2069 Remove greedy_ops tests.
2071 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
2074 * include/bits/stl_algobase.h (__size_to_integer(float))
2075 (__size_to_integer(double), __size_to_integer(long double))
2076 (__size_to_integer(__float128)): Cast return type explicitly.
2077 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
2078 Remove unused typedef.
2080 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
2082 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
2083 namespace qualification.
2084 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
2086 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
2087 (tuple_element, __get_helper, get, __make_tuple_impl)
2088 (__make_1st_indices, __tuple_concater)
2089 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
2091 * include/std/utility (tuple_element, __is_tuple_like_impl)
2092 (tuple_size, __pair_get, get): Likewise.
2094 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
2096 * include/bits/std_function.h (function): Define all member
2099 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
2101 * include/bits/stl_algo.h (__includes): Simplify the code.
2103 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
2105 * include/std/optional (optional()): Explicitly define it.
2107 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2110 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
2111 Construct the first value at *__first instead of on the stack.
2112 (__uninitialized_default_n_1<true>): Likewise.
2113 Improve comments on several of the non-standard algorithms.
2114 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
2116 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
2118 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
2120 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
2122 * testsuite/23_containers/vector/cons/94540.cc: New test.
2124 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2126 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
2127 Replace Value type with int so trivial code path is used.
2128 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
2131 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2133 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
2134 use std::fill_n when the size is an integral type.
2135 (__uninitialized_default_n): Likewise.
2136 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
2138 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
2140 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
2143 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
2146 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
2147 alias instead of deducing _Tp as an unqualified type.
2148 (__atomic_impl::exchange): Use the _Val alias to remove volatile
2149 from the reinterpret_cast result type.
2151 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
2153 * include/std/atomic (atomic): Add static assertions.
2154 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
2156 2020-06-16 Patrick Palka <ppalka@redhat.com>
2159 * testsuite/20_util/is_constructible/94003.cc: New test.
2161 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
2163 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
2164 Update value for C++20.
2165 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
2166 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
2167 Update expected value.
2168 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
2171 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
2173 * include/bits/char_traits.h (char_traits::move): constexpr move with
2174 overlap was using copy_backward incorrectly.
2175 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
2178 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
2180 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
2181 when the value is currently set.
2182 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
2183 Actually check the return value.
2184 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
2187 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
2189 * include/bits/atomic_base.h (atomic_flag::test): Add missing
2191 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
2192 dg-options and verify results of test function.
2193 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
2195 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
2198 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
2199 Only discard an extra character if we didn't already reach the
2201 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
2202 (wistream::ignore(streamsize, wchar_t)): Likewise.
2203 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
2204 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
2206 2020-06-10 Patrick Palka <ppalka@redhat.com>
2209 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
2210 Also check that the iterator and sentinel have the same type before
2211 applying the unwrapping optimization for __normal_iterator.
2212 Split the check into two, one for the first iterator/sentinel
2213 pair and another for second iterator/sentinel pair. Remove uses
2214 of __niter_base, and remove uses of std::move on a
2216 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
2217 (__copy_or_move): Likewise. Perform similar adjustments for
2218 the reverse_iterator and move_iterator optimizations. Inline
2219 the checks into the if-constexprs, and use using-declarations to
2220 make them less visually noisy. Remove uses of __niter_wrap.
2221 (__copy_or_move_backward): Likewise.
2222 * testsuite/25_algorithms/copy/95578.cc: New test.
2223 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
2224 * testsuite/25_algorithms/equal/95578.cc: New test.
2225 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
2226 * testsuite/25_algorithms/move/95578.cc: New test.
2227 * testsuite/25_algorithms/move_backward/95578.cc: New test.
2229 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
2230 Jonathan Wakely <jwakely@redhat.com>
2232 * include/bits/deque.tcc (__lex_cmp_dit): New.
2233 (__lexicographical_compare_aux1): Define overloads for deque
2235 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
2236 New static member function.
2237 (__lexicographical_compare<true>::__3way): Likewise.
2238 (__lexicographical_compare<true>::__lc): Use __3way.
2239 (__lexicographical_compare_aux): Rename to
2240 __lexicographical_compare_aux1 and declare overloads for deque
2242 (__lexicographical_compare_aux): Define new forwarding function
2243 that calls __lexicographical_compare_aux1 and declare new overloads
2245 (lexicographical_compare): Do not use __niter_base on
2247 * include/debug/safe_iterator.tcc
2248 (__lexicographical_compare_aux): Define overloads for safe
2250 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
2251 checks with random access iterators.
2252 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
2255 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
2257 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
2258 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
2260 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
2262 * include/std/optional (bad_optional_access): Define default
2263 constructor and destructor as defaulted.
2264 * testsuite/20_util/optional/bad_access.cc: New test.
2266 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
2268 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
2270 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
2272 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
2274 * include/bits/unique_ptr.h (operator<<): Define for C++20.
2275 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
2277 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
2279 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
2280 (__detail::__cat, __detail::__diff): Move to class scope in the
2281 relevant __iterator_traits specializations.
2282 (__iterator_traits<>): Use nested class templates instead of ones from
2284 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
2285 class scope in iterator_traits<common_iterator<I, S>>.
2286 (iterator_traits<common_iterator<I, S>>): Use nested class template
2287 instead of __detail::__common_iter_ptr.
2289 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
2291 * include/bits/stl_algo.h (__copy_n_a): Move to ...
2292 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
2294 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
2296 (__niter_base(const _Safe_iterator<_Ite, _Seq,
2297 random_access_iterator_tag>&)): Declare.
2298 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
2299 _Deque_iterator<>)): Declare.
2300 * include/bits/deque.tcc
2301 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
2302 _Deque_iterator<>)): New.
2303 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
2305 * include/bits/streambuf_iterator.h
2306 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
2307 * include/debug/safe_iterator.tcc (__niter_base): New.
2308 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
2310 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
2312 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
2314 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
2315 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
2318 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
2320 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
2321 ranges::copy for positive values.
2322 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
2323 integral type and only call __copy_n for positive values.
2324 * testsuite/util/testsuite_iterators.h
2325 (random_access_iterator_wrapper::operator+=): Fix range check for
2327 (output_container, input_container, forward_container)
2328 (bidirectional_container, random_access_container): New alias
2330 * testsuite/25_algorithms/copy_n/5.cc: New test.
2332 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
2335 * include/debug/deque (deque(const _Base&)): Replace parameter
2336 with a struct that wraps a const _Base&.
2337 * include/debug/forward_list (forward_list(_Base_ref)): New
2339 * include/debug/list (list(const _Base&)): Replace parameter
2340 with a struct that wraps a const _Base&.
2341 * include/debug/map.h (map(const _Base&)): Likewise.
2342 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
2343 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
2344 * include/debug/set.h (set(const _Base&)): Likewise.
2345 * include/debug/unordered_map (unordered_map(const _Base&))
2346 (unordered_multimap(const _Base&)): Likewise.
2347 * include/debug/unordered_set (unordered_set(const _Base&))
2348 (unordered_multiset(const _Base&)): Likewise.
2349 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
2350 Adjust dg-error line number.
2351 * include/debug/vector (vector(const _Base&)): Likewise.
2352 * testsuite/23_containers/deque/debug/90102.cc: New test.
2353 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
2354 * testsuite/23_containers/list/debug/90102.cc: New test.
2355 * testsuite/23_containers/map/debug/90102.cc: New test.
2356 * testsuite/23_containers/multimap/debug/90102.cc: New test.
2357 * testsuite/23_containers/multiset/debug/90102.cc: New test.
2358 * testsuite/23_containers/set/debug/90102.cc: New test.
2359 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
2360 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
2361 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
2362 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
2363 * testsuite/23_containers/vector/debug/90102.cc: New test.
2365 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
2368 * include/bits/fs_path.h (path::_S_to_string): Move to
2369 namespace-scope and rename to ...
2370 (__detail::__string_from_range): ... this.
2371 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
2372 convert a char sequence containing UTF-8 to wstring.
2373 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
2374 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
2375 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
2376 __string_from_range to obtain a contiguous range and
2377 __wstr_from_utf8 to obtain a wide string.
2378 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
2379 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
2381 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
2382 Use __wstr_from_utf8.
2384 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
2386 * testsuite/util/testsuite_iterators.h:
2387 (input_iterator_wrapper::operator++(int)): Return proxy object.
2389 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
2391 * doc/xml/manual/evolution.xml: Document deprecation of
2392 __is_nullptr_t and removal of std::allocator members.
2393 * doc/html/manual/api.html: Regenerate.
2395 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
2397 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
2398 * doc/xml/manual/evolution.xml: Likewise.
2399 * doc/html/manual/api.html: Regenerate.
2400 * doc/html/manual/containers.html: Regenerate.
2402 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
2404 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
2405 * doc/html/faq.html: Regenerate.
2407 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
2409 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
2412 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
2414 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
2415 www.cs.princeton.edu to https.
2416 * doc/html/manual/policy_data_structures.html: Regenerate.
2418 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
2420 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
2421 * configure: Rebuild.
2423 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
2426 * configure: Regenerated.
2428 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
2431 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
2432 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
2433 (unordered_map<>::insert_or_assign): Adapt.
2435 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
2438 * include/bits/atomic_base.h (__atomic_impl::load): Add
2439 cv-qualifiers to parameter so that _Tp is deduced as the
2441 * testsuite/29_atomics/atomic_float/95282.cc: New test.
2443 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
2446 * include/std/ranges (transform_view::_Sentinel): Allow hidden
2447 friends to work with _Iterator<true> and _Iterator<false>.
2448 (join_view::_Sentinel): Likewise.
2449 * testsuite/std/ranges/adaptors/95322.cc: New test.
2451 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
2454 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
2455 operators to use the correct operations on the underlying
2457 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
2459 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
2461 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
2463 2020-05-26 Patrick Palka <ppalka@redhat.com>
2466 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
2467 Remove and instead define it ...
2468 (common_iterator::_Proxy): ... here.
2469 (common_iterator::operator->): Use it.
2470 * testsuite/24_iterators/common_iterator/2.cc: New test.
2471 * testsuite/std/ranges/adaptors/95322.cc: New test.
2473 2020-05-23 Patrick Palka <ppalka@redhat.com>
2476 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
2477 dg-additional-options. Avoid unused-but-set-variable warning.
2479 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
2482 * include/debug/helper_functions.h (__get_distance): Only declare
2483 as a constexpr function for C++14 and up.
2484 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
2486 * include/bits/fs_path.h (__detail::_S_range_begin)
2487 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
2488 overloaded function template __detail::__effective_range.
2489 (__detail::__effective_range): New overloaded function template to
2490 create a basic_string or basic_string_view for an effective range.
2491 (__detail::__value_type_is_char): Use __detail::__effective_range.
2492 Do not use remove_const on value type.
2493 (__detail::__value_type_is_char_or_char8_t): Likewise.
2494 (path::path(const Source&, format))
2495 (path::path(const Source&, const locale&))
2496 (path::operator/=(const Source&), path::append(const Source&))
2497 (path::concat(const Source&)): Use __detail::__effective_range.
2498 (path::_S_to_string(InputIterator, InputIterator)): New function
2499 template to create a string view if possible, or string otherwise.
2500 (path::_S_convert): Add overloads that convert a string returned
2501 by __detail::__effective_range. Use if-constexpr to inline conversion
2502 logic from all overloads of _Cvt::_S_convert.
2503 (path::_S_convert_loc): Add overload that converts a string. Use
2504 _S_to_string to avoid allocation when possible.
2505 (path::_Cvt): Remove.
2506 (path::operator+=(CharT)): Remove indirection through path::concat.
2507 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
2508 overload for non-const pointers, to avoid constructing a std::string.
2509 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
2510 compilation with call to _S_convert.
2512 * include/bits/fs_path.h (__detail::_S_range_begin)
2513 (__detail::_S_range_end): Remove unintentional static specifiers.
2514 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
2515 (__detail::_S_range_end): Likewise.
2517 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
2518 Replace alias template with variable template. Don't remove const.
2519 (filesystem::__detail::__is_path_src): Replace overloaded function
2520 template with variable template and specializations.
2521 (filesystem::__detail::__is_path_iter_src): Replace alias template
2522 with class template.
2523 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
2525 (filesystem::__detail::_Path2): New alias template for checking
2526 InputIterator requirements.
2527 (filesystem::__detail::__constructible_from): Remove.
2528 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
2529 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
2530 constructor arguments of void and void* types.
2532 2020-05-21 Matthias Kretz <kretz@kde.org>
2534 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
2535 allowing runtest to work without arguments.
2536 * testsuite/Makefile.in: Regenerate.
2538 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
2541 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
2542 Reorder constraints to avoid recursion when constructors use
2543 iterator_traits (LWG 3420).
2544 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
2546 * include/experimental/socket (basic_socket::is_open()
2547 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
2549 * include/experimental/bits/net.h (__endpoint, __protocol)
2550 (__acceptable_protocol, __inet_protocol): New concepts.
2551 (__detail::__is_endpoint): Move trait from <experimental/socket>.
2552 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
2554 (__endpoint, __protocol, __acceptable_protocol): New variable
2556 * include/experimental/socket (__is_endpoint): Move to net.h header.
2557 (basic_socket, basic_socket_acceptor): Check requirements.
2559 * include/experimental/executor (use_future_t::use_future_t()): Fix
2560 incorrect noexcept-specifier.
2561 * include/experimental/internet (basic_resolver_results): Adjust
2563 * include/experimental/socket (__basic_socket_impl::release): Add
2565 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
2567 (basic_socket::release(), basic_socket::release(error_code&)): Add
2568 missing member functions.
2569 (basic_socket::is_open()): Add nodiscard attribute.
2570 (basic_socket::close(error_code&)): Pass argument to base function.
2571 (basic_socket_acceptor::release())
2572 (basic_socket_acceptor::release(error_code&)): Add missing member
2574 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
2575 (basic_socket_streambuf::error()): Add noexcept.
2576 (basic_socket_iostream::error()): Likewise.
2577 * testsuite/experimental/net/socket/basic_socket.cc: New test.
2579 * include/experimental/buffer: Replace typedefs with
2581 * include/experimental/executor: Likewise.
2582 * include/experimental/internet: Likewise.
2583 * include/experimental/socket: Likewise.
2584 * include/experimental/timer: Likewise.
2586 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
2589 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
2591 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
2593 (random_device::_M_init): Use __x86_rdseed_rdrand when both
2594 instructions are available.
2595 * testsuite/26_numerics/random/random_device/94087.cc: New test.
2597 2020-05-19 Patrick Palka <ppalka@redhat.com>
2600 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
2602 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
2604 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
2607 * configure: Regenerated.
2609 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
2611 * configure: Regenerated.
2613 2020-05-13 Alexandre Oliva <oliva@adacore.com>
2616 * include/experimental/memory_resource
2617 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
2618 x86-vxworks as on x86-solaris.
2619 (__resource_adaptor_imp::do_deallocate): Likewise.
2620 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2622 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
2623 (test03): Drop max-align test for char-aligned alloc.
2625 2020-05-08 Ulrich Drepper <drepper@redhat.com>
2627 * include/bits/atomic_base.h (atomic_flag): Implement test member
2629 * include/std/version: Define __cpp_lib_atomic_flag_test.
2630 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
2631 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
2633 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
2635 PR libstdc++/94971 (partial)
2636 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
2637 std::sample using macro to work in parallel mode.
2638 (__sort_fn): Likewise for std::sort.
2639 (ranges::__nth_element_fn): Likewise for std::nth_element.
2640 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
2641 Likewise for std::__min_cmp.
2642 * include/parallel/algobase.h (lexicographical_compare_three_way):
2643 Add to namespace std::__parallel.
2646 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
2647 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
2648 (_UnguardedIterator::operator _RAIter): Add const qualifier.
2649 (operator<(_GuardedIterator&, _GuardedIterator&)
2650 (operator<=(_GuardedIterator&, _GuardedIterator&)
2651 (operator<(_UnguardedIterator&, _UnguardedIterator&)
2652 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
2653 parameters to const references.
2655 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
2657 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
2658 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2660 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
2662 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
2663 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
2664 * include/bits/stl_bvector.h (__fill_bvector): Move outside
2665 _GLIBCXX_STD_C namespace.
2666 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
2668 (__fill_a1): ...this.
2669 * testsuite/25_algorithms/fill/bvector/1.cc: New.
2671 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
2673 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2675 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2677 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
2678 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
2680 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
2681 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
2684 2020-05-06 Martin Liska <mliska@suse.cz>
2687 2020-05-05 Martin Liska <mliska@suse.cz>
2689 * include/parallel/multiway_merge.h:
2690 Use const for _Compare template argument.
2692 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
2694 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
2695 versions for GCC 9.[123] and 10.1 releases.
2696 * doc/html/*: Regenerate.
2698 2020-05-06 Jakub Jelinek <jakub@redhat.com>
2700 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2701 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2702 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2703 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2704 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2705 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2706 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2708 2020-05-05 Martin Liska <mliska@suse.cz>
2711 * include/parallel/multiway_merge.h:
2712 Use const for _Compare template argument.
2714 2020-05-04 Fangrui Song <maskray@google.com>
2716 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
2718 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
2720 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
2721 * doc/html/*: Regenerate.
2724 * src/c++17/memory_resource.cc
2725 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
2728 2020-05-04 Nathan Sidwell <nathan@acm.org>
2731 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
2732 ptrdiff_t before negation, to show intent more clearly.
2734 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
2737 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
2738 Add comment about single-threaded behaviour.
2739 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
2740 class member access out of loop.
2741 (synchronized_pool_resource::synchronized_pool_resource())
2742 (synchronized_pool_resource::~synchronized_pool_resource())
2743 (synchronized_pool_resource::release()): Check __gthread_active_p
2744 before creating and/or deleting the thread-specific data key.
2745 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
2747 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
2748 path for single-threaded case.
2749 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
2750 Likewise. Return if unable to find a pool that owns the allocation.
2751 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
2753 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
2755 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
2758 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
2761 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
2762 usable in constant expressions.
2763 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
2766 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
2769 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
2771 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
2772 Patrick Palka <ppalka@redhat.com>
2775 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
2776 Add trait to determine return type and an alias for it.
2777 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
2778 deduced return type.
2779 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
2780 the result of ranges::iter_move.
2781 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
2782 instead of checking the result of ranges::iter_move.
2783 * testsuite/24_iterators/customization_points/92894.cc: New test.
2784 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
2786 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
2789 * include/std/type_traits (__is_complete_or_unbounded): Replace
2790 BADNAME _T with _Tp.
2791 * testsuite/17_intro/badnames.cc: New test.
2793 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
2796 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
2797 (allocator_traits::_S_destroy)
2798 (allocator_traits<allocator<T>>::construct): Use traits in
2799 noexcept-specifiers.
2800 * include/bits/allocator.h (allocator<void>::construct)
2801 (allocator<void>::destroy): Likewise.
2802 * include/ext/malloc_allocator.h (malloc_allocator::construct)
2803 (malloc_allocator::destroy): Likewise.
2804 * include/ext/new_allocator.h (new_allocator::construct)
2805 (new_allocator::destroy): Likewise.
2806 * testsuite/20_util/allocator/89510.cc: New test.
2807 * testsuite/ext/malloc_allocator/89510.cc: New test.
2808 * testsuite/ext/new_allocator/89510.cc: New test.
2810 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
2813 * include/bits/basic_string.tcc: Update comment about explicit
2816 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
2819 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
2820 Remove non-standard macro.
2821 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
2822 to indicate P1032R1 support.
2823 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
2824 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
2825 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
2826 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
2827 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
2828 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
2829 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
2831 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
2832 * testsuite/21_strings/basic_string_view/operations/copy/char/
2833 constexpr.cc: Likewise.
2834 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
2837 * include/bits/alloc_traits.h (_S_construct): Restore placement
2838 new-expression for C++11/14/17 and call std::construct_at directly
2840 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
2841 function returning void.
2842 * testsuite/20_util/specialized_algorithms/
2843 uninitialized_value_construct/94831.cc: New test.
2844 * testsuite/23_containers/vector/cons/94831.cc: New test.
2846 2020-04-28 Patrick Palka <ppalka@redhat.com>
2848 LWG 3433 subrange::advance(n) has UB when n < 0
2849 * include/std/ranges (subrange::prev): Fix typo.
2850 (subrange::advance): Handle a negative argument as per the proposed
2851 resolution of LWG 3433.
2852 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
2854 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
2855 Iain Sandoe <iain@sandoe.co.uk>
2858 * include/std/coroutine: Implement handing for non-
2859 class coroutine return types.
2861 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
2863 * include/experimental/executor (service_already_exists): Make default
2864 constructor public (LWG 3414).
2865 * testsuite/experimental/net/execution_context/make_service.cc: Check
2866 the service_already_exists can be default constructed.
2868 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
2869 Jonathan Wakely <jwakely@redhat.com>
2873 * include/std/any (any): Rename template parameters for consistency
2875 (any::_Decay): Rename to _Decay_if_not_any.
2876 (any::any(T&&):: Remove is_constructible from constraints. Remove
2877 non-standard overload.
2878 (any::any(in_place_type_t<T>, Args&&...))
2879 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
2880 (any::emplace(Args&&...))
2881 (any::emplace(initializer_list<U>, Args&&...)):
2882 Use decay_t instead of _Decay.
2883 * testsuite/20_util/any/cons/90415.cc: New test.
2884 * testsuite/20_util/any/cons/92156.cc: New Test.
2885 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
2887 * testsuite/20_util/any/modifiers/92156.cc: New test.
2889 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
2891 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
2892 * doc/html/*: Regenerate.
2894 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
2895 value for C++17 to 201803L because P0858R0 is supported for C++17.
2896 * include/std/version (__cpp_lib_array_constexpr): Likewise.
2897 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
2898 Check for value corresponding to P0031R0 features being tested.
2899 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
2900 Check for value corresponding to P0858R0 features being tested.
2902 * include/std/version (__cpp_lib_three_way_comparison): Define for
2903 freestanding builds.
2905 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
2907 * include/experimental/net/executor (system_context): Mark
2908 system_context::system_context() = delete.
2909 * testsuite/experimental/net/executor/1.cc: Add new
2910 test to check system_context is not default constructible.
2912 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
2914 * include/std/coroutine: Update the inline namespace to __n4861.
2915 Add the __cpp_lib_coroutine define, set to 201902L.
2916 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
2918 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
2920 * include/std/execution (__cpp_lib_execution): Define to indicate
2921 support for P0024R2 and P1001R2.
2922 * include/std/version (__cpp_lib_execution): Define.
2923 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
2924 defined by <algorithm>, move other tests to new tests ...
2925 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
2926 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
2927 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
2928 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
2930 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
2931 different values for C++17 and C++20, to indicate different feature
2932 sets. Update value for C++20 to indicate P1032R1 support.
2933 * include/std/version (__cpp_lib_array_constexpr): Likewise.
2934 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
2935 Check feature test macro.
2936 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
2938 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
2940 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
2941 in C++17 mode and check feature test macro.
2943 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
2945 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
2946 defined by <utility>.
2948 * include/std/functional (__cpp_lib_concepts): Update macro value to
2949 indicate P1964R2 support.
2950 * include/std/version (__cpp_lib_concepts): Likewise.
2951 * testsuite/std/concepts/1.cc: Adjust expected value.
2952 * testsuite/std/concepts/2.cc: Likewise.
2954 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
2955 __cpp_lib_constexpr_functional.
2956 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
2957 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
2959 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
2960 indicate P1006R1 support.
2961 (__cpp_lib_to_address): Define to indicate P0653R2 support.
2962 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
2964 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
2966 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
2968 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
2970 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
2971 Define to indicate P0339R6 support.
2972 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
2973 indicate P0457R2 support.
2974 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
2975 to indicate P0758R1 support.
2976 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
2977 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
2978 * include/std/version (__cpp_lib_atomic_float)
2979 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
2980 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
2981 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
2982 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
2983 (__cpp_lib_to_address): Define.
2984 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
2986 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
2988 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
2990 * include/std/version (__cpp_lib_map_insertion)
2991 (__cpp_lib_unordered_map_insertion): Remove.
2993 * include/std/condition_variable (__cpp_lib_jthread): Remove
2994 redundant definition.
2995 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
2996 indicate P1869R1 support.
2997 * include/std/version (__cpp_lib_jthread): Update value.
2998 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
2999 for updated macro value.
3000 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
3002 * testsuite/30_threads/jthread/1.cc: Likewise.
3003 * testsuite/30_threads/jthread/2.cc: Likewise.
3004 * testsuite/30_threads/stop_token/1.cc: Likewise.
3005 * testsuite/30_threads/stop_token/2.cc: Likewise.
3007 * testsuite/21_strings/basic_string/erasure.cc: Check for
3008 __cpp_lib_erase_if macro.
3009 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
3011 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3012 * testsuite/23_containers/list/erasure.cc: Likewise.
3013 * testsuite/23_containers/map/erasure.cc: Likewise.
3014 * testsuite/23_containers/set/erasure.cc: Likewise.
3015 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3016 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3017 * testsuite/23_containers/vector/erasure.cc: Likewise.
3019 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
3021 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
3022 to define operator<=>.
3023 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
3025 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
3026 * doc/Makefile.in: Regenerate.
3027 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
3029 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
3030 to the C++11 status table.
3031 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
3032 proposals with table matching contents of the C++14 standard.
3033 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
3035 * doc/html/*: Regenerate.
3038 * include/std/type_traits (__is_nt_constructible_impl): Add partial
3039 specializations for bounded arrays with non-empty initializers.
3040 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
3042 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
3044 * testsuite/lib/libstdc++.exp: Add additional_flags=
3045 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
3046 compiling with a newer Thread Building Blocks.
3048 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
3050 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
3052 * testsuite/20_util/is_constructible/51185.cc: Make test class a
3053 non-aggregate so that the test verifies the same thing in all -std
3055 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
3056 results for some types when paren-init for aggregates is supported.
3058 * include/std/version (__cpp_lib_three_way_comparison): Update value.
3059 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
3060 (__detail::__synth3way): Add noexcept-specifier.
3062 * include/bits/stl_map.h (map): Define operator<=> and remove
3063 operator< for C++20.
3064 * include/bits/stl_multimap.h (multimap): Likewise.
3065 * include/bits/stl_multiset.h (multiset): Likewise.
3066 * include/bits/stl_set.h (set): Likewise.
3067 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3068 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
3069 operator!= for C++20.
3070 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
3071 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
3072 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
3073 * include/debug/set.h (__gnu_debug::set): Likewise.
3074 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
3075 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
3076 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
3077 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
3079 2020-04-20 Matthias Kretz <kretz@kde.org>
3081 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
3083 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
3085 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
3086 * include/bits/stl_stack.h (stack): Likewise.
3087 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
3088 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
3090 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3091 Remove redundant operator!= for C++20.
3092 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3094 * include/debug/unordered_map (unordered_map, unordered_multimap):
3096 * include/debug/unordered_set (unordered_set, unordered_multiset):
3100 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
3101 redundant assignment in constructor.
3103 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
3105 * include/std/chrono (duration, time_point): Define operator<=> and
3106 remove redundant operator!= for C++20.
3107 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
3109 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
3112 * testsuite/util/native_type/native_priority_queue.hpp: Use
3113 allocator_traits to rebind allocator.
3115 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
3117 * include/bits/forward_list.h (forward_list): Define operator<=> and
3118 remove redundant comparison operators for C++20.
3119 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
3120 * include/bits/stl_deque.h (deque): Likewise.
3121 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
3122 * include/bits/stl_list.h (list): Likewise.
3123 * include/bits/stl_vector.h (vector): Likewise.
3124 * include/debug/deque (__gnu_debug::deque): Likewise.
3125 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
3126 * include/debug/list (__gnu_debug::list): Likewise.
3127 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
3129 * include/debug/vector (__gnu_debug::vector): Likewise.
3130 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
3131 operator<=> for C++20.
3132 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
3133 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
3134 * testsuite/23_containers/list/cmp_c++20.cc: New test.
3135 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
3136 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
3138 * include/bits/basic_string.h (basic_string): Define operator<=> and
3139 remove redundant comparison operators for C++20.
3140 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
3141 Add comparison_category members.
3142 (__detail::__char_traits_cmp_cat): New helper to get comparison
3143 category from char traits class.
3144 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
3146 (sub_match): Define operator<=> and remove redundant comparison
3147 operators for C++20.
3148 (match_results): Remove redundant operator!= for C++20.
3149 * include/std/string_view (basic_string_view): Define operator<=> and
3150 remove redundant comparison operators for C++20.
3151 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
3153 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
3155 * testsuite/21_strings/basic_string_view/operations/copy/char/
3156 constexpr.cc: Initialize variable.
3157 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
3158 constexpr.cc: Likewise.
3159 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
3160 dg-do directive and remove comments showing incorrect signatures.
3161 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
3163 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
3165 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
3167 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
3169 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
3171 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
3172 name of unused parameter.
3174 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
3176 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
3177 (directory_entry): Define operator<=> and remove redundant comparison
3178 operators for C++20.
3179 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
3180 * include/bits/fs_path.h (path): Define operator<=> and remove
3181 redundant comparison operators for C++20.
3182 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
3183 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3184 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3185 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3187 * include/bits/allocator.h (operator!=): Do not define for C++20.
3188 * include/bits/locale_classes.h (operator!=): Likewise.
3189 * include/bits/std_function.h (operator==(nullptr_t, const function&))
3190 (operator!=(const function&, nullptr_t))
3191 (operator!=(nullptr_t, const function&)): Likewise.
3192 * include/ext/bitmap_allocator.h (operator!=): Likewise.
3193 * include/ext/debug_allocator.h (operator!=): Likewise.
3194 * include/ext/extptr_allocator.h (operator!=): Likewise.
3195 * include/ext/malloc_allocator.h (operator!=): Likewise.
3196 * include/ext/mt_allocator.h (operator!=): Likewise.
3197 * include/ext/new_allocator.h (operator!=): Likewise.
3198 * include/ext/pool_allocator.h (operator!=): Likewise.
3199 * include/ext/throw_allocator.h (operator!=): Likewise.
3200 * include/std/bitset (bitset::operator!=): Likewise.
3201 * include/std/memory_resource (operator!=): Likewise.
3202 * include/std/scoped_allocator (operator!=): Likewise.
3204 * include/std/typeindex (operator<=>): Define for C++20.
3205 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
3207 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
3209 * libsupc++/compare (compare_three_way): Fix constraint so that
3210 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
3211 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
3215 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
3216 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
3217 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
3218 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
3219 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
3220 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
3224 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
3225 * testsuite/18_support/comparisons/categories/94565.cc: New test.
3227 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3229 * include/std/coroutine: Update coroutines builtin define,
3232 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
3234 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
3235 (strong_order, weak_order, partial_order): Replace uses of <=> with
3236 compare_three_way function object (LWG 3324).
3237 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
3238 equality operator so that X satisfies three_way_comparable.
3239 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
3241 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
3243 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
3244 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
3245 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
3246 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
3247 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
3249 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
3251 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
3253 * include/std/complex (operator==(const T&, const complex<T>&))
3254 (operator!=(const complex<T>&, const complex<T>&))
3255 (operator!=(const complex<T>&, const T&))
3256 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
3257 * testsuite/26_numerics/slice/compare.cc: New test.
3259 * include/std/charconv (to_chars_result, from_chars_result): Add
3260 defaulted equality comparisons for C++20.
3261 * testsuite/20_util/from_chars/compare.cc: New test.
3262 * testsuite/20_util/to_chars/compare.cc: New test.
3264 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
3267 * include/std/charconv (__integer_to_chars_result_type)
3268 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
3270 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
3271 use of std::string_view with std::string.
3272 * testsuite/20_util/from_chars/2.cc: Likewise.
3273 * testsuite/20_util/to_chars/1.cc: Likewise.
3274 * testsuite/20_util/to_chars/2.cc: Likewise.
3276 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
3279 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
3280 usable in constant expressions for C++20.
3281 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
3282 _GLIBCXX20_CONSTEXPR.
3283 (std::char_traits<char>, std::char_traits<wchar_t>)
3284 (std::char_traits<char8_t>): Make move, copy and assign usable in
3285 constant expressions for C++20.
3286 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
3287 and copy usable in constant expressions for C++20.
3288 * include/std/string_view (basic_string_view::copy): Add
3289 _GLIBCXX20_CONSTEXPR.
3290 * testsuite/21_strings/basic_string_view/operations/copy/char/
3291 constexpr.cc: New test.
3292 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
3293 constexpr.cc: New test.
3295 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
3297 * doc/xml/manual/appendix_contributing.xml: Refer to Git
3298 documentation instead of Subversion. Switch to https.
3299 * doc/html/manual/appendix_contributing.html: Regenerate.
3301 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
3304 * include/bits/ptr_traits.h (__to_address): Add special case for debug
3305 iterators, to avoid dereferenceable check.
3306 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
3307 * testsuite/20_util/to_address/debug.cc: New test.
3309 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
3311 * testsuite/experimental/net/execution_context/use_service.cc:
3312 Require pthread and gthreads.
3314 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
3316 * doc/xml/manual/appendix_free.xml: Move "free books" list from
3318 * doc/html/manual/appendix_free.html: Regenerate.
3320 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
3322 Library-side tests for parenthesized aggregate init
3327 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
3328 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
3329 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
3330 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
3331 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
3332 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
3333 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
3334 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
3335 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
3337 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
3338 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
3339 * testsuite/20_util/variant/92878_92947.cc: Likewise.
3340 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
3342 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
3344 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
3346 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
3348 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
3350 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
3352 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
3353 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
3354 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
3356 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
3357 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
3359 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
3361 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
3363 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
3365 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
3368 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
3370 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
3371 for changes due to parenthesized aggregate-initialization in C++20.
3372 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
3373 with std::chrono::sys_time in C++20.
3375 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
3376 to constrain C++20 versions of comparison operators. Fix backwards
3377 logic of relational operators.
3378 (move_iterator): Use requires-clause to constrain comparison operators
3379 in C++20. Do not declare non-standard same-type overloads for C++20.
3380 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
3381 of comparisons and check using greedy_ops type.
3382 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
3383 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
3384 main function from compile-only test.
3385 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
3387 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
3389 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
3390 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
3391 C++20 concepts are required.
3392 * include/bits/stl_iterator_base_types.h: Likewise.
3393 * include/std/concepts: Likewise.
3394 * include/std/version: Likewise.
3395 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
3398 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
3399 (reverse_iterator::iterator_category): Define for C++20.
3400 (reverse_iterator): Define comparison operators correctly for C++20.
3401 (__normal_iterator): Add constraints to comparison operators for C++20.
3402 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
3403 overload for input iterators.
3404 (move_iterator): Add constraints to comparison operators for C++20.
3405 Define operator<=> for C++20.
3406 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
3407 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
3408 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
3409 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
3411 * include/bits/iterator_concepts.h (__detail::__decay_copy)
3412 (__detail::__member_begin, __detail::__adl_begin): Move here from
3413 <bits/range_access.h>.
3414 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
3415 * bits/range_access.h (__cust_access::__decay_copy)
3416 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
3417 <bits/iterator_concepts.h>.
3418 (ranges::iterator_t): Use __detail::__range_iter_t.
3419 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
3420 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
3421 (front_insert_iterator): Likewise.
3422 (insert_iterator): Implement changes from P0896R4 for C++20.
3423 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
3424 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
3425 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
3426 for inclusion in synopsis_c++20.cc which expects different signatures
3427 for some function templates.
3428 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
3430 * include/std/type_traits (__is_array_convertible): Move definition
3431 to immediately after is_convertible.
3433 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
3435 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
3436 (chrono::months, chrono::sys_days, chrono::local_t)
3437 (chrono::local_time, chrono::local_seconds, chrono::local_days):
3439 (chrono::time_point): Add missing static assert.
3440 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
3441 * testsuite/std/time/clock/file/overview.cc: New test.
3442 * testsuite/std/time/clock/file/members.cc: New test.
3443 * testsuite/std/time/syn_c++20.cc: New test.
3445 2020-03-25 Mike Crowe <mac@mcrowe.com>
3447 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
3449 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
3452 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
3454 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
3455 * include/std/chrono (filesystem::__file_clock): Here.
3456 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
3457 Define public member functions for C++20.
3458 (is_clock, is_clock_v): Define traits for C++20.
3459 * include/std/condition_variable (condition_variable::wait_until): Add
3460 check for valid clock.
3461 * include/std/future (_State_baseV2::wait_until): Likewise.
3462 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
3463 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
3465 * include/std/thread (this_thread::sleep_until): Likewise.
3466 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
3467 slow_clock with new namespace.
3468 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
3470 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
3472 * testsuite/30_threads/future/members/clock_neg.cc: New test.
3473 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
3474 Qualify slow_clock with new namespace.
3475 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
3476 clock_neg.cc: New test.
3477 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
3479 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
3480 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
3482 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
3483 slow_clock with new namespace.
3484 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
3485 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
3487 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
3488 * testsuite/std/time/traits/is_clock.cc: New test.
3489 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
3492 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
3495 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
3496 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
3497 Improve test coverage.
3500 * include/bits/fs_path.h (path::_S_str_convert): Replace first
3501 parameter with basic_string_view so that strings with different
3502 allocators can be accepted.
3503 (path::generic_string<C,T,A>()): Use basic_string object that uses the
3504 right allocator type.
3505 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
3506 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
3509 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
3512 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
3513 (__is_nt_default_constructible_impl): Remove.
3514 (__is_nothrow_default_constructible_impl): Remove.
3515 (__is_nt_constructible_impl): Add bool template parameter. Adjust
3516 partial specializations.
3517 (__is_nothrow_constructible_impl): Replace class template with alias
3519 (is_nothrow_default_constructible): Derive from alias template
3520 __is_nothrow_constructible_impl instead of
3521 __is_nothrow_default_constructible_impl.
3522 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
3524 * include/std/stop_token (stop_token::_Stop_state_ref): Define
3525 comparison operators explicitly if the compiler won't synthesize them.
3527 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
3528 __cpp_lib_concepts before using iter_reference_t.
3529 * include/bits/stream_iterator.h (istream_iterator): Check
3530 __cpp_lib_concepts before using default_sentinel_t.
3531 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
3534 * include/experimental/executor (executor::executor(Executor)): Call
3535 make_shared directly instead of _M_create. Create _Tgt1 object.
3536 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
3537 Call allocate_shared directly instead of _M_create. Create _Tgt2
3539 (executor::target_type): Add cast needed for new _Tgt interface.
3540 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
3541 (executor::_Tgt): Define the same interface whether RTTI is enabled or
3543 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
3544 std::type_info in the interface.
3545 (executor::_Tgt::_M_func): Add data member.
3546 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
3547 (executor::_Tgt1::_S_func): Define function to access target without
3549 (executor::_M_create): Remove.
3550 (operator==, operator!=): Simplify comparisons for executor.
3551 * include/experimental/socket (is_error_code_enum<socket_errc>):
3552 Define specialization before use.
3553 * testsuite/experimental/net/executor/1.cc: New test.
3555 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
3558 * include/experimental/executor (service_already_exists): Add default
3559 constructor. Declare make_service to be a friend.
3560 * testsuite/experimental/net/execution_context/make_service.cc: New
3563 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
3565 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
3566 a null pointer to functions with nonnull(1) attribute.
3568 2020-03-11 Patrick Palka <ppalka@redhat.com>
3570 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
3571 'address' -> 'std::__addressof'.
3572 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
3573 a non-forward input_range.
3574 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
3575 default constructor protected instead of deleted, like with
3576 input_iterator_wrapper.
3577 (test_range::iterator): Add comment explaining that this type is used
3578 only when the underlying wrapper is input_iterator_wrapper or
3579 output_iterator_wrapper. Remove delegating defaulted constructor so
3580 that the inherited default constructor is used instead.
3582 LWG 3286 ranges::size is not required to be valid after a call to
3583 ranges::begin on an input range
3584 * include/std/ranges (subrange::subrange): Split single-argument
3585 constructor into two, one constrained by _S_store_size and another by
3587 (take_view::begin): Call size() before calling ranges::begin(_M_base).
3588 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
3589 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
3591 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
3593 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
3594 instead of _M_current.
3595 (split_view::_OuterIter::operator++): Likewise.
3597 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
3598 (transform_view::_Iterator::operator*): Add noexcept-specifier.
3599 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
3600 (split_view::_OuterIter::__current): Add noexcept.
3601 (split_view::_InnerIter::__iter_swap): Remove.
3602 (split_view::_InnerIter::__iter_move): Remove.
3603 (split_view::_InnerIter::_M_i_current): New accessors.
3604 (split_view::_InnerIter::__at_end): Use _M_i_current().
3605 (split_view::_InnerIter::operator*): Likewise.
3606 (split_view::_InnerIter::operator++): Likewise.
3607 (iter_move(const _InnerIter&)): Likewise.
3608 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
3609 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
3610 for iter_move and iter_swap on split_view's inner iterator.
3613 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
3614 Change expression in noexcept-specifier to match function body.
3616 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
3617 comment explaining multiple dg-do directives.
3618 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
3619 so test is run as well as compiled.
3621 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
3624 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
3625 handle concatenations that change the type of the first component.
3626 (path::operator+=(basic_string_view<value_type>)): Likewise.
3627 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
3629 2020-03-06 Patrick Palka <ppalka@redhat.com>
3631 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
3632 join_view::_Sentinel<!_Const>.
3633 * testsuite/std/ranges/adaptors/join.cc: Augment test.
3636 * include/bits/range_access.h (__cust_access::_Empty::operator()):
3637 Declare return type to be bool instead of auto.
3638 * testsuite/std/ranges/adaptors/93978.cc: New test.
3640 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
3643 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
3644 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
3645 second argument to __glibcxx_rwlock_init.
3646 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
3649 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
3650 test to not fail due to PR 94063.
3651 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
3652 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
3654 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
3656 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
3659 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
3661 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
3662 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
3663 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3664 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
3665 for return value, and in comparison.
3666 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
3669 * include/std/string_view: Include <bits/ostream_insert.h>.
3670 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
3672 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
3674 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
3676 2020-03-04 Patrick Palka <ppalka@redhat.com>
3679 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
3680 condition for when to use memset, making sure to additionally check that
3681 the output pointer's value type is a non-volatile byte type. Instead of
3682 requiring that the fill type is a byte type, just require that it's an
3684 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
3686 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
3688 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
3689 blocked by PR 94017.
3690 * testsuite/25_algorithms/fill/94017.cc: New test.
3691 * testsuite/25_algorithms/fill_n/94017.cc: New test.
3693 LWG 3355 The memory algorithms should support move-only input iterators
3695 * include/bits/ranges_uninitialized.h
3696 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
3697 to copy __ifirst, which could be a move-only input iterator. Use
3698 operator- instead of ranges::distance to compute distance from a sized
3700 (__uninitialized_copy_n_fn::operator()): Likewise.
3701 (__uninitialized_move_fn::operator()): Likewise.
3702 (__uninitialized_move_n_fn::operator()): Likewise.
3703 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
3704 attempting to copy __first.
3705 (__uninitialized_destroy_n_fn::operator()): Likewise.
3706 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
3708 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
3710 * .../specialized_algorithms/uninitialized_move/constrained.cc:
3713 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
3714 protected instead of private.
3715 (test_sized_range_sized_sent): New.
3717 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
3718 New testsuite iterator.
3719 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
3720 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
3722 * include/bits/ranges_uninitialized.h
3723 (uninitialized_copy_fn::operator()): Pass a reference type as the first
3724 argument to is_nothrow_assignable_v.
3725 (uninitialized_copy_fn::operator()): Likewise.
3726 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
3727 with the input iterator stripped of its move_iterator.
3728 (uninitialized_move_n_fn::operator()): Likewise.
3729 (uninitialized_fill_fn::operator()): Pass a reference type as the first
3730 argument to is_nothrow_assignable_v.
3731 (uninitialized_fill_n_fn::operator()): Likewise.
3733 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
3736 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
3737 traits to control when to use memmove and memcmp optimizations.
3738 (__is_nonvolatile_trivially_copyable): New helper trait.
3739 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
3740 use memcmp optimization with volatile data.
3741 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
3742 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
3743 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
3744 (__copy_move_backward_a2): Likewise.
3745 (__equal_aux1): Use __memcmpable.
3746 (__lexicographical_compare_aux): Do not use memcmp optimization with
3748 * testsuite/25_algorithms/copy/94013.cc: New test.
3749 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
3750 * testsuite/25_algorithms/equal/94013.cc: New test.
3751 * testsuite/25_algorithms/fill/94013.cc: New test.
3752 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
3753 * testsuite/25_algorithms/move/94013.cc: New test.
3754 * testsuite/25_algorithms/move_backward/94013.cc: New test.
3756 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
3757 Avoid redundant iterator comparisons (LWG 3410).
3759 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
3762 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
3764 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
3766 * include/std/ranges (__detail::__maybe_empty_t): Rename to
3768 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
3770 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
3773 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
3775 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3777 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
3779 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
3780 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3781 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3782 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3783 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3785 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
3786 Add libatomic option.
3787 * testsuite/30_threads/jthread/jthread.cc: Likewise.
3789 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
3791 * include/bits/stl_algo.h
3792 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
3793 * include/bits/stl_algobase.h: ...here.
3794 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
3796 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
3798 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
3800 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
3802 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
3803 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
3804 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
3805 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
3806 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
3807 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
3808 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
3812 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
3814 2020-02-28 Patrick Palka <ppalka@redhat.com>
3817 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
3818 Fix condition for when to use memcmp, making it consistent with the
3819 corresponding condition used in std::lexicographical_compare.
3820 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
3822 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
3823 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
3824 existing signatures for C++2a.
3826 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
3828 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
3829 test instead of just compiling it.
3831 2020-02-28 Patrick Palka <ppalka@redhat.com>
3833 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
3834 whenever the underlying range models common_range.
3836 * include/std/ranges (__detail::_CachedPosition): New struct.
3837 (views::filter_view::_S_needs_cached_begin): New member variable.
3838 (views::filter_view::_M_cached_begin): New member variable.
3839 (views::filter_view::begin): Use _M_cached_begin to cache its
3841 (views::drop_view::_S_needs_cached_begin): New static member variable.
3842 (views::drop_view::_M_cached_begin): New member variable.
3843 (views::drop_view::begin): Use _M_cached_begin to cache its result
3844 when _S_needs_cached_begin.
3845 (views::drop_while_view::_M_cached_begin): New member variable.
3846 (views::drop_while_view::begin): Use _M_cached_begin to cache its
3848 (views::reverse_view::_S_needs_cached_begin): New static member
3850 (views::reverse_view::_M_cached_begin): New member variable.
3851 (views::reverse_view::begin): Use _M_cached_begin to cache its result
3852 when _S_needs_cached_begin.
3853 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
3854 drop_view::begin caches its result.
3855 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
3856 that drop_while_view::begin caches its result.
3857 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
3858 filter_view::begin caches its result.
3859 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
3860 reverse_view::begin caches its result.
3862 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
3864 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
3865 filesystems that silently truncate timestamps.
3866 * testsuite/experimental/filesystem/operations/last_write_time.cc:
3869 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
3870 -Wstringop-overflow warnings.
3872 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
3874 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
3875 -fdiagnostics-urls=never to options.
3877 2020-02-27 Patrick Palka <ppalka@redhat.com>
3879 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
3881 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
3882 (take_view::_Sentinel<_Const>): Likewise.
3883 (take_while_view::_Sentinel<_Const>): Likewise.
3884 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
3885 * testsuite/std/ranges/adaptors/split.cc: Augment test.
3886 * testsuite/std/ranges/adaptors/take.cc: Augment test.
3887 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
3888 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
3890 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
3891 base() of a vector<>::iterator is a pointer.
3892 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
3893 * testsuite/25_algorithms/move/constrained.cc: Likewise.
3894 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
3895 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
3897 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
3898 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
3899 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
3900 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
3901 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
3903 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
3905 * include/debug/array (operator<=>): Define for C++20.
3906 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
3907 Adjust dg-error line numbers.
3908 * testsuite/23_containers/array/tuple_interface/
3909 tuple_element_debug_neg.cc: Likewise.
3911 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
3912 defining _GLIBCXX_ASSERTIONS.
3913 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
3914 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
3915 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
3916 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
3917 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
3918 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
3919 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
3920 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
3921 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
3922 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
3923 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
3924 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
3926 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
3927 C++98 where the member function of the base class returns void.
3929 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
3930 equality comparisons that support value-initialized iterators.
3932 * include/bits/boost_concept_check.h (__function_requires): Add
3933 _GLIBCXX14_CONSTEXPR.
3934 * testsuite/25_algorithms/min/concept_checks.cc: New test.
3936 2020-02-26 Patrick Palka <ppalka@redhat.com>
3939 * include/std/ranges (split_view::_InnerIter::operator==): Compare
3940 the operands' _M_i rather than their _M_i.current().
3941 * testsuite/std/ranges/adaptors/split.cc: Augment test.
3943 P1645R1 constexpr for <numeric> algorithms
3944 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
3945 partial_sum, adjacent_difference): Make conditionally constexpr for
3947 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
3949 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
3950 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
3951 constexpr for C++20.
3952 * include/std/version (__cpp_lib_constexpr_numeric): Define.
3953 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
3954 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
3955 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
3956 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
3957 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
3958 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
3959 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
3960 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
3961 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
3962 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
3963 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
3965 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
3967 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
3968 variables in smaller scope and avoid calling ranges::distance when we
3969 know they are pointers. Remove statically-unreachable use of
3970 __builtin_unreachable().
3971 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
3974 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
3976 (__detail::__maybe_const_t): Likewise.
3977 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
3978 (transform_view, take_view, take_while_view, elements_view): Use
3980 (join_view, split_view): Use both.
3982 2020-02-25 Patrick Palka <ppalka@redhat.com>
3984 LWG 3397 basic_istream_view::iterator should not provide
3986 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
3988 (basic_istream_view:_Iterator::iterator_concept): ... this.
3989 * testsuite/std/ranges/istream_view.cc: Augment test.
3991 LWG 3325 Constrain return type of transformation function for
3993 * include/std/ranges (transform_view): Constrain the return type of the
3994 transformation function as per LWG 3325.
3995 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
3997 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
3998 * include/std/ranges (join_view::_Iterator::operator--): Require that
3999 range_reference_t<_Base> models common_range.
4000 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
4002 LWG 3301 transform_view::_Iterator has incorrect iterator_category
4003 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
4004 determination of iterator_category as per LWG 3301.
4005 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
4007 LWG 3292 iota_view is under-constrained
4008 * include/std/ranges (iota_view): Require that _Winc models semiregular
4010 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
4012 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
4014 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
4015 during constant evaluation. Call __builtin_memmove directly instead of
4017 (__copy_or_move_backward): Likewise.
4018 * include/bits/stl_algobase.h (__memmove): Remove.
4019 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
4020 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
4021 Use __builtin_memmove directly instead of __memmove.
4022 (__copy_move_a2): Do not use memmove during constant evaluation.
4023 (__copy_move_backward_a2): Use _IsMove constant to select correct
4024 __copy_move_backward specialization.
4025 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
4026 begin turned into moves during constant evaluation.
4028 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
4032 * include/bits/stl_algobase.h (__memmove): Cast away const before
4033 doing move assignment.
4034 * testsuite/25_algorithms/move/93872.cc: New test.
4035 * testsuite/25_algorithms/move_backward/93872.cc: New test.
4037 2020-02-24 Patrick Palka <ppalka@redhat.com>
4040 * include/bits/ranges_algobase.h (__copy_or_move,
4041 __copy_or_move_backward): Don't inspect the iter_value_t of the output
4042 iterator, instead inspect its iterator_traits directly.
4043 * include/bits/stl_iterator.h (back_insert_iterator::container):
4044 Conditionally initialize.
4045 (back_insert_iterator::difference_type): Conditionally define.
4046 (back_insert_iterator::back_insert_iterator): Conditionally define this
4047 default constructor.
4048 (front_insert_iterator::container): Conditionally initialize.
4049 (front_insert_iterator::difference_type): Conditionally define.
4050 (front_insert_iterator::front_insert_iterator): Conditionally define
4051 this default constructor.
4052 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
4053 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
4055 P0769R2 Add shift to <algorithm>
4056 * include/bits/ranges_algo.h (shift_left, shift_right): New.
4057 * testsuite/25_algorithms/shift_left/1.cc: New test.
4058 * testsuite/25_algorithms/shift_right/1.cc: New test.
4060 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
4062 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
4063 Make noexcept-specifier conditional.
4064 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
4067 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
4069 (operator==(istream_iterator, default_sentinel_t)): Add operator.
4070 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
4071 * include/bits/streambuf_iterator.h
4072 (istreambuf_iterator(default_sentinel_t)): Add constructor.
4073 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
4074 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
4076 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
4077 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
4079 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
4081 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
4082 (ranges::enable_view): Simplify (LWG 3326).
4083 * include/bits/range_access.h (ranges::enable_view): Declare.
4084 * include/bits/regex.h (__enable_view_impl): Remove partial
4086 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
4087 * include/bits/stl_set.h (__enable_view_impl): Likewise.
4088 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
4089 * include/debug/multiset.h (__enable_view_impl): Likewise.
4090 * include/debug/set.h (__enable_view_impl): Likewise.
4091 * include/debug/unordered_set (__enable_view_impl): Likewise.
4092 * include/experimental/string_view (ranges::enable_view): Define
4093 partial specialization.
4094 * include/std/span (ranges::enable_view): Likewise.
4095 * include/std/string_view (ranges::enable_view): Likewise.
4096 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
4098 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
4100 * include/std/optional (operator<=>(optional<T>, optional<U>))
4101 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
4103 * include/std/tuple (__tuple_cmp): New helper function for <=>.
4104 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
4105 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
4106 (operator<=>(monostate, monostate)): Define for C++20.
4107 * testsuite/20_util/optional/relops/three_way.cc: New test.
4108 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
4109 * testsuite/20_util/variant/89851.cc: Move to ...
4110 * testsuite/20_util/variant/relops/89851.cc: ... here.
4111 * testsuite/20_util/variant/90008.cc: Move to ...
4112 * testsuite/20_util/variant/relops/90008.cc: ... here.
4113 * testsuite/20_util/variant/relops/three_way.cc: New test.
4115 2020-02-20 Patrick Palka <ppalka@redhat.com>
4117 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
4119 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
4120 __maybe_refwrap to capture lvalue references by reference, and then use
4121 unwrap_reference_t to forward the by-reference captures as references.
4122 * testsuite/std/ranges/adaptors/split.cc: Augment test.
4123 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
4125 * include/std/ranges (iota_view): Forward declare _Sentinel.
4126 (iota_view::_Iterator): Befriend _Sentinel.
4127 (iota_view::_Sentinel::_M_equal): New member function.
4128 (iota_view::_Sentinel::operator==): Use it.
4129 (views::_Iota::operator()): Forward __f using the correct type.
4130 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
4131 with integers of different signedness, to appease iota_view's deduction
4133 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
4135 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
4137 * include/bits/range_access.h (ranges::begin): Reject array of
4139 (ranges::end, ranges::size): Require arrays to be bounded.
4140 (ranges::data): Require lvalue or borrowed_range.
4141 (ranges::iterator_t): Remove constraint.
4142 * testsuite/std/ranges/access/begin.cc: Do not check array of
4144 * testsuite/std/ranges/access/begin_neg.cc: New test.
4145 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
4146 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
4147 * testsuite/std/ranges/access/ssize.cc: Do not check array of
4150 * include/std/system_error (error_category::operator<=>)
4151 (operator<=>(const error_code&, const error_code&))
4152 (operator<=>(const error_condition&, const error_condition&)): Define
4154 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
4155 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
4157 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
4159 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
4160 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
4162 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
4163 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
4165 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
4166 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
4167 Remove incorrect comment.
4168 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
4171 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
4173 * include/std/thread (thread::id::operator<=>): Define for C++20.
4174 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
4175 functions in namespace std.
4176 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
4178 2020-02-19 Patrick Palka <ppalka@redhat.com>
4180 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
4181 null terminator of the underlying string as part of the test_range.
4182 (main): Call test03.
4184 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
4186 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
4187 requirement (LWG 3385).
4188 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
4189 expected declaration.
4191 * include/std/ranges (take_while_view, drop_view, drop_while_view)
4192 (elements_view:_Iterator): Initialize data members (LWG 3364).
4194 * libsupc++/compare (three_way_comparable): Remove always-false check
4195 that should have been removed with weak_equality (P1959R0).
4196 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
4198 * include/std/concepts (__detail::__partially_ordered_with): Move here
4200 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
4201 to simplify definition (LWG 3331).
4202 * libsupc++/compare (__detail::__partially_ordered_with): Move to
4205 * include/std/concepts (totally_ordered_with): Remove redundant
4206 requirement (LWG 3329).
4208 * include/std/ranges (__detail::__convertible_to_non_slicing): New
4210 (__detail::__pair_like_convertible_to): Remove.
4211 (__detail::__pair_like_convertible_from): Add requirements for
4212 non-slicing conversions.
4213 (subrange): Constrain constructors with __convertible_to_non_slicing.
4214 Remove constructors from pair-like types. Add new deduction guide.
4215 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
4217 * include/bits/iterator_concepts.h (iter_move): Add declaration to
4218 prevent unqualified lookup finding a suitable declaration (LWG 3247).
4220 * include/std/memory_resource (polymorphic_allocator::allocate)
4221 (polymorphic_allocator::allocate_object): Change type of exception to
4222 bad_array_new_length (LWG 3237).
4223 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
4225 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
4226 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
4227 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
4228 * testsuite/20_util/unwrap_reference/3.cc: New test.
4230 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
4231 type during overload resolution, use static assert instead (LWG 3200).
4232 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
4234 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
4236 * include/std/span (span(T (&)[N])): Use non-deduced context to
4237 prevent first parameter from interfering with class template argument
4238 deduction (LWG 3369).
4239 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
4240 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
4243 * include/std/span (span::const_iterator, span::const_reverse_iterator)
4244 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
4246 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
4248 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
4250 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
4251 constrained.cc: Likewise.
4252 * testsuite/20_util/specialized_algorithms/
4253 uninitialized_default_construct/constrained.cc: Likewise.
4254 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
4255 constrained.cc: Likewise.
4256 * testsuite/20_util/specialized_algorithms/uninitialized_move/
4257 constrained.cc: Likewise.
4258 * testsuite/20_util/specialized_algorithms/
4259 uninitialized_value_construct/constrained.cc: Likewise.
4261 * include/bits/range_access.h (range_size_t): Define alias template.
4262 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
4263 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
4265 * include/std/ranges (filter_view, transform_view, take_view)
4266 (join_view, split_view, reverse_view): Remove commented-out converting
4267 constructors (LWG 3280).
4269 * include/std/memory (uninitialized_construct_using_allocator): Use
4270 std::construct_at (LWG 3321).
4272 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
4273 (polymorphic_allocator::allocate_object)
4274 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
4276 LWG 3379. "safe" in several library names is misleading
4277 * include/bits/range_access.h (enable_safe_range): Rename to
4278 enable_borrowed_range.
4279 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
4280 (safe_range): Rename to borrowed_range.
4281 * include/bits/ranges_algo.h: Adjust to use new names.
4282 * include/bits/ranges_algobase.h: Likewise.
4283 * include/bits/ranges_uninitialized.h: Likewise.
4284 * include/std/ranges: Likewise.
4285 (safe_iterator_t): Rename to borrowed_iterator_t.
4286 (safe_subrange_t): Rename to borrowed_subrange_t.
4287 * include/std/span: Adjust to use new names.
4288 * include/std/string_view: Likewise.
4289 * include/experimental/string_view: Likewise.
4290 * testsuite/std/ranges/access/begin.cc: Likewise.
4291 * testsuite/std/ranges/access/cbegin.cc: Likewise.
4292 * testsuite/std/ranges/access/cdata.cc: Likewise.
4293 * testsuite/std/ranges/access/cend.cc: Likewise.
4294 * testsuite/std/ranges/access/crbegin.cc: Likewise.
4295 * testsuite/std/ranges/access/crend.cc: Likewise.
4296 * testsuite/std/ranges/access/data.cc: Likewise.
4297 * testsuite/std/ranges/access/end.cc: Likewise.
4298 * testsuite/std/ranges/access/rbegin.cc: Likewise.
4299 * testsuite/std/ranges/access/rend.cc: Likewise.
4300 * testsuite/std/ranges/safe_range.cc: Likewise.
4301 * testsuite/std/ranges/safe_range_types.cc: Likewise.
4302 * testsuite/util/testsuite_iterators.h: Likewise.
4304 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
4305 (tuple_element<1, const subrange<I, S, K>>): Add partial
4306 specializations (LWG 3398).
4307 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
4309 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
4310 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
4311 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
4313 2020-02-18 Patrick Palka <ppalka@redhat.com>
4315 P1983R0 Wording for GB301, US296, US292, US291, and US283
4316 * include/std/ranges (filter_view::pred): New member function.
4317 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
4318 P1983R0 fixes the highlighted issue in the same way.
4319 (join_view::_Iterator<_Const>): Add friend
4320 join_view::_Iterator<!_Const>.
4321 (join_view::_M_inner): Remove mutable specifier, effectively reverting
4322 the proposed wording changes of P3278.
4323 (join_view::begin): Refine the condition for when to return a const
4325 (split_view::_OuterIter::_OuterIter): Adjust constraints.
4326 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
4329 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
4332 * include/std/ranges (_RangeAdaptor): Add deduction guide.
4333 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
4335 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
4336 (transform_view::_Iterator): Add alias _Base_iter and use in place of
4338 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
4339 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
4340 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
4341 (split_view::_InnerIter::_S_iter_cat()): Likewise.
4343 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
4344 assumption that long is wider than int.
4345 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
4346 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
4347 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
4348 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
4350 P1976R2 Fixed-size span construction from dynamic range
4351 * include/std/span (__cpp_lib_span): Update value.
4352 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
4354 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
4356 (span::first<Count>(), span::last<Count>()): Use explicit type in
4358 (as_bytes, as_writable_bytes): Likewise.
4359 * include/std/version (__cpp_lib_span): Update value.
4360 * testsuite/23_containers/span/1.cc: Check new value.
4361 * testsuite/23_containers/span/2.cc: Check new value.
4362 * testsuite/23_containers/span/explicit.cc: New test.
4364 * include/std/span (span::__is_compatible_array): Simplify alias
4365 template by using requires-clause.
4366 (span::__is_compatible_ref): New alias template for constraining
4368 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
4369 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
4370 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
4371 redundant parentheses.
4372 (span(R&&)): Add missing constraints.
4374 * include/std/span (span): Reorder members and rename template
4375 parameters to match declarations in the C++2a working paper.
4377 P2116R0 Remove tuple-like protocol support from fixed-extent span
4378 * include/std/span (get, tuple_size, tuple_element): Remove.
4379 * testsuite/23_containers/span/everything.cc: Remove checks for
4381 * testsuite/23_containers/span/get_neg.cc: Remove.
4382 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
4383 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
4384 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
4386 2020-02-17 Patrick Palka <ppalka@redhat.com>
4388 P2106R0 Alternative wording for GB315 and GB316
4389 * include/bits/ranges_algo.h (in_fun_result): New.
4390 (for_each_result, for_each_n_result): Change into an alias of
4392 (in_in_result): New.
4393 (mismatch_result): Change into an alias of in_in_result.
4394 (copy_if_result): Change into an alias of in_out_result.
4395 (swap_ranges_result): Change into an alias of in_in_result.
4396 (unary_transform_result): Change into an alias of in_out_result.
4397 (in_in_out_result): New.
4398 (binary_transform_result): Change into an alias of in_in_out_result.
4399 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
4400 remove_copy_result, unique_copy_result, reverse_copy_result,
4401 rotate_copy_result, partial_sort_copy_result): Change into an alias of
4403 (in_out_out_result): New.
4404 (partition_copy_result, merge_result): Change into an alias of
4406 (set_union_result, set_intersection_result): Change into an alias of
4408 (set_difference_result): Change into an alias of in_out_result.
4409 (set_symmetric_difference): Change into an alias of in_in_out_result.
4410 (min_max_result): New.
4411 (minmax_result, minmax_element_result): Change into an alias of
4413 (in_found_result): New.
4414 (next_permutation_result, prev_permutation_result): Change into an alias
4416 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
4417 Adjust following changes to next_permutation_result and
4418 prev_permutation_result.
4419 * include/bits/ranges_algobase.h (in_out_result): New.
4420 (copy_result, move_result, move_backward_result, copy_backward_result,
4421 copy_n_result): Change into an alias of in_out_result.
4422 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
4423 uninitialized_copy_n_result, uninitialized_move_result,
4424 uninitialized_move_n_result): Likewise.
4425 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
4426 structured bindings.
4427 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
4429 P1243R4 Rangify new algorithms
4430 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
4431 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
4432 * testsuite/25_algorithms/clamp/constrained.cc: New test.
4433 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
4434 * testsuite/25_algorithms/sample/constrained.cc: New test.
4436 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
4438 P1964R2 Wording for boolean-testable
4439 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
4440 (__adjacent_find_fn): Cast result of predicate to bool.
4441 * include/std/concepts (__boolean): Remove.
4442 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
4443 new helper concepts.
4444 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
4445 (predicate): Use __boolean_testable instead of boolean.
4446 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
4449 P1970R2 Consistency for size() functions: Add ranges::ssize
4450 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
4451 * testsuite/std/ranges/access/ssize.cc: New test.
4453 P1956R1 On the names of low-level bit manipulation functions
4454 * include/bits/hashtable_policy.h: Update comment.
4455 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
4456 (ispow2, ceil2, floor2, log2p1): Likewise.
4457 (__cpp_lib_int_pow2): Add feature test macro.
4458 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
4459 * include/std/memory (assume_aligned): Adjust use of ispow2.
4460 * include/std/version (__cpp_lib_int_pow2): Add.
4461 * libsupc++/new_opa.cc: Adjust use of __ispow2.
4462 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
4463 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
4464 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
4465 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
4466 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
4467 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
4468 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
4469 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
4470 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
4471 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
4472 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
4473 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
4475 * include/std/charconv: Add comment.
4477 PR libstdc++/92546 (partial)
4478 * include/bits/random.h (uniform_random_bit_generator): Move definition
4479 to <bits/uniform_int_dist.h>.
4480 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
4482 * include/bits/ranges_algobase.h: Do not include <cmath>.
4483 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
4485 * include/std/ranges: Do not include <limits>.
4486 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
4488 PR libstdc++/92546 (partial)
4489 * include/Makefile.am: Add new header.
4490 * include/Makefile.in: Regenerate.
4491 * include/bits/int_limits.h: New header.
4492 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
4493 numeric_limits with __detail::__int_limits.
4494 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
4495 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
4497 * include/std/charconv (__to_chars_8, __from_chars_binary)
4498 (__from_chars_alpha_to_num, from_chars): Likewise.
4499 * include/std/memory_resource (polymorphic_allocator::allocate)
4500 (polymorphic_allocator::allocate_object): Likewise.
4501 * include/std/string_view (basic_string_view::_S_compare): Likewise.
4502 * include/std/utility (in_range): Likewise.
4503 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
4504 extra error about incomplete type __int_limits<bool>.
4505 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
4506 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
4507 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
4508 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
4509 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
4510 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
4511 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
4512 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
4513 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
4514 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
4515 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
4516 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
4518 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
4519 value for partial_ordering::unordered.
4521 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
4522 const-qualified expression variations.
4523 * include/std/concepts (copyable): Likewise.
4525 * include/std/type_traits (__is_standard_integer): New helper trait.
4526 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
4527 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
4528 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
4529 * testsuite/20_util/integer_comparisons/1.cc: New test.
4530 * testsuite/20_util/integer_comparisons/2.cc: New test.
4531 * testsuite/20_util/integer_comparisons/equal.cc: New test.
4532 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
4533 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
4534 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
4535 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
4536 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
4537 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
4538 * testsuite/20_util/integer_comparisons/less.cc: New test.
4539 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
4540 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
4541 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
4542 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
4543 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
4545 2020-02-16 Patrick Palka <ppalka@redhat.com>
4547 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
4548 Move code after an early exit constexpr if to under an else branch.
4549 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
4551 2020-02-15 Patrick Palka <ppalka@redhat.com>
4553 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
4554 * include/bits/ranges_algobase.h: Likewise.
4555 * include/bits/ranges_uninitialized.h: Likewise.
4557 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
4558 binary_search, copy_if, count, count_if, equal_range, find, find_end,
4559 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
4560 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
4561 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
4562 lower_bound, make_heap, max, max_element, merge, min, min_element,
4563 minmax, minmax_element, mismatch, next_permutation, none_of,
4564 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
4565 partition_point, pop_heap, prev_permutation, push_heap, remove,
4566 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
4567 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
4568 search, search_n, set_difference, set_intersection,
4569 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
4570 stable_partition, stable_sort, swap_ranges, transform, unique,
4571 unique_copy, upper_bound): Convert into function objects.
4572 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
4573 fill, move_backward, copy_backward): Likewise.
4574 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
4575 uninitialized_default_construct_n, uninitialized_value_construct,
4576 uninitialized_value_construct_n, uninitialized_copy,
4577 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
4578 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
4579 destroy, destroy_n): Likewise.
4581 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
4582 (ranges::find_end): ... here.
4583 (ranges::__lexicographical_compare): Fold into ...
4584 (ranges::lexicographical_compare): ... here.
4585 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
4586 (ranges::equal): ... here.
4588 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
4590 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
4591 * include/std/deque: Likewise.
4592 * include/std/forward_list: Likewise.
4593 * include/std/list: Likewise.
4594 * include/std/string: Likewise.
4595 * include/std/vector: Likewise.
4596 * include/std/version: Likewise.
4597 * testsuite/23_containers/deque/erasure.cc: Test for new value.
4598 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4599 * testsuite/23_containers/list/erasure.cc: Likewise.
4600 * testsuite/23_containers/map/erasure.cc: Likewise.
4601 * testsuite/23_containers/set/erasure.cc: Likewise.
4602 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4603 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4604 * testsuite/23_containers/vector/erasure.cc: Likewise.
4606 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
4608 * include/bits/random.h (uniform_random_bit_generator): Require min()
4609 and max() to be constant expressions and min() to be less than max().
4610 * testsuite/26_numerics/random/concept.cc: Check additional cases.
4611 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
4613 2020-02-13 Patrick Palka <ppalka@redhat.com>
4615 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
4616 * include/Makefile.in: Regenerate.
4617 * include/bits/ranges_uninitialized.h: New header.
4618 * include/std/memory: Include it.
4619 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
4621 * .../uninitialized_copy/constrained.cc: New test.
4622 * .../uninitialized_default_construct/constrained.cc: New test.
4623 * .../uninitialized_fill/constrained.cc: New test.
4624 * .../uninitialized_move/constrained.cc: New test.
4625 * .../uninitialized_value_construct/constrained.cc: New test.
4627 * include/Makefile.am: Add bits/ranges_algobase.h
4628 * include/Makefile.in: Regenerate.
4629 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
4631 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
4632 __detail::__is_move_iterator, copy_result, move_result,
4633 __equal, equal, copy_result, move_result, move_backward_result,
4634 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
4635 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
4636 fill): Split out into ...
4637 * bits/range_algobase.h: ... this new header.
4639 2020-02-12 Patrick Palka <ppalka@redhat.com>
4641 LWG 3389 and LWG 3390
4642 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
4643 constructing the move_iterator with __i.
4644 (counted_iterator::counted_iterator): Use std::move when initializing
4646 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
4647 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
4649 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
4654 * configure: Regenerated.
4656 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
4658 * include/bits/hashtable.h
4659 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
4660 missing std namespace qualification to forward call.
4662 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
4664 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
4666 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
4668 * include/std/ranges: Fix non-ASCII characters in comment.
4670 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
4671 equality comparison to be valid and return bool.
4672 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
4673 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
4674 type with ambiguous conversion to fundamental types.
4675 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
4677 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
4679 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
4681 (readable_traits): Rename to indirectly_readable_traits.
4682 (readable): Rename to indirectly_readable.
4683 (writable): Rename to indirectly_writable.
4684 (__detail::__iter_exchange_move): Do not use remove_reference_t.
4685 (indirectly_swappable): Adjust requires expression parameter types.
4687 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
4688 (ranges::replace_if, ranges::generate_n, ranges::generate)
4689 (ranges::remove): Use new name for writable.
4690 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
4691 Use new name for readable.
4692 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
4693 new name for readable_traits.
4694 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
4695 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
4696 new definition of indirectly_readable.
4698 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
4699 to take parameters of common_iterator, instead of the common_iterator
4700 type itself. Fix argument for __common_iter_has_arrow constraint.
4701 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
4703 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
4705 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
4707 (basic_istream_view::_Iterator::operator++()): Add missing return.
4709 2020-02-07 Patrick Palka <ppalka@redhat.com>
4711 * include/bits/ranges_algo.h: Remove extraneous &&.
4713 * include/std/ranges (ranges::__detail::__stream_extractable,
4714 ranges::basic_istream_view, ranges::istream_view): Define.
4715 * testsuite/std/ranges/istream_view: New test.
4717 Implement C++20 range adaptors
4718 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
4719 (subrange::_S_store_size): Mark as const instead of constexpr to
4720 avoid what seems to be a bug in GCC.
4721 (__detail::__box): Give it defaulted copy and move constructors.
4722 (ranges::views::_Single::operator()): Mark constexpr.
4723 (ranges::views::_Iota::operator()): Mark constexpr.
4724 (__detail::Empty): Define.
4725 (ranges::views::__closure::_RangeAdaptor,
4726 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
4727 ranges::views::all, ranges::__detail::find_if,
4728 ranges::__detail::find_if_not, ranges::__detail::mismatch,
4729 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
4730 ranges::views::transform, take_view, ranges::views::take,
4731 take_while_view, ranges::views::take_while, drop_view,
4732 ranges::views::drop, join_view, ranges::views::join,
4733 __detail::require_constant, __detail::tiny_range, split_view,
4734 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
4735 common_view, ranges::views::common, reverse_view,
4736 ranges::views::reverse,
4737 ranges::views::__detail::__is_reversible_subrange,
4738 ranges::views::__detail::__is_reverse_view, reverse_view,
4739 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
4740 ranges::views::elements, ranges::views::keys, ranges::views::values):
4742 (views): Alias for ranges::views.
4743 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
4744 tuple_element<1, ranges::subrange>): New partial specializations.
4745 * testsuite/std/ranges/adaptors/all.cc: New test.
4746 * testsuite/std/ranges/adaptors/common.cc: Likewise.
4747 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
4748 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
4749 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
4750 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
4751 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
4752 * testsuite/std/ranges/adaptors/join.cc: Likewise.
4753 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
4754 * testsuite/std/ranges/adaptors/split.cc: Likewise.
4755 * testsuite/std/ranges/adaptors/take.cc: Likewise.
4756 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
4757 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
4759 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
4761 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
4762 type of enumerations and comparison category types.
4763 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
4764 (__cmp_cat::_Ncmp::unordered): Change value to 2.
4765 (partial_ordering::_M_value, weak_ordering::_M_value)
4766 (strong_ordering::_M_value): Change type to __cmp_cat::type.
4767 (partial_ordering::_M_is_ordered): Remove data member.
4768 (partial_ordering): Use second bit of _M_value for unordered. Adjust
4769 comparison operators.
4770 (weak_ordering::operator partial_ordering): Simplify to remove
4772 (operator<=>(unspecified, weak_ordering)): Likewise.
4773 (strong_ordering::operator partial_ordering): Likewise.
4774 (strong_ordering::operator weak_ordering): Likewise.
4775 (operator<=>(unspecified, strong_ordering)): Likewise.
4776 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
4777 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
4778 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
4780 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
4781 __cpp_lib_three_way_comparison macro and use deduced return type for
4783 * testsuite/std/ranges/iota/iterator.cc: New test.
4785 2020-02-07 Patrick Palka <ppalka@redhat.com>
4786 Jonathan Wakely <jwakely@redhat.com>
4788 Implement C++20 constrained algorithms
4789 * include/Makefile.am: Add new header.
4790 * include/Makefile.in: Regenerate.
4791 * include/std/algorithm: Include <bits/ranges_algo.h>.
4792 * include/bits/ranges_algo.h: New file.
4793 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
4794 * testsuite/25_algorithms/all_of/constrained.cc: New test.
4795 * testsuite/25_algorithms/any_of/constrained.cc: New test.
4796 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
4797 * testsuite/25_algorithms/copy/constrained.cc: New test.
4798 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
4799 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
4800 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
4801 * testsuite/25_algorithms/count/constrained.cc: New test.
4802 * testsuite/25_algorithms/count_if/constrained.cc: New test.
4803 * testsuite/25_algorithms/equal/constrained.cc: New test.
4804 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
4805 * testsuite/25_algorithms/fill/constrained.cc: New test.
4806 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
4807 * testsuite/25_algorithms/find/constrained.cc: New test.
4808 * testsuite/25_algorithms/find_end/constrained.cc: New test.
4809 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
4810 * testsuite/25_algorithms/find_if/constrained.cc: New test.
4811 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
4812 * testsuite/25_algorithms/for_each/constrained.cc: New test.
4813 * testsuite/25_algorithms/generate/constrained.cc: New test.
4814 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
4815 * testsuite/25_algorithms/heap/constrained.cc: New test.
4816 * testsuite/25_algorithms/includes/constrained.cc: New test.
4817 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
4818 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
4819 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
4820 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
4821 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
4822 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
4824 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
4825 * testsuite/25_algorithms/max/constrained.cc: New test.
4826 * testsuite/25_algorithms/max_element/constrained.cc: New test.
4827 * testsuite/25_algorithms/merge/constrained.cc: New test.
4828 * testsuite/25_algorithms/min/constrained.cc: New test.
4829 * testsuite/25_algorithms/min_element/constrained.cc: New test.
4830 * testsuite/25_algorithms/minmax/constrained.cc: New test.
4831 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
4832 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
4833 * testsuite/25_algorithms/move/constrained.cc: New test.
4834 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
4835 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
4836 * testsuite/25_algorithms/none_of/constrained.cc: New test.
4837 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
4838 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
4839 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
4840 * testsuite/25_algorithms/partition/constrained.cc: New test.
4841 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
4842 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
4843 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
4844 * testsuite/25_algorithms/remove/constrained.cc: New test.
4845 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
4846 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
4847 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
4848 * testsuite/25_algorithms/replace/constrained.cc: New test.
4849 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
4850 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
4851 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
4852 * testsuite/25_algorithms/reverse/constrained.cc: New test.
4853 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
4854 * testsuite/25_algorithms/rotate/constrained.cc: New test.
4855 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
4856 * testsuite/25_algorithms/search/constrained.cc: New test.
4857 * testsuite/25_algorithms/search_n/constrained.cc: New test.
4858 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
4859 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
4860 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
4862 * testsuite/25_algorithms/set_union/constrained.cc: New test.
4863 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
4864 * testsuite/25_algorithms/sort/constrained.cc: New test.
4865 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
4866 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
4867 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
4868 * testsuite/25_algorithms/transform/constrained.cc: New test.
4869 * testsuite/25_algorithms/unique/constrained.cc: New test.
4870 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
4871 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
4873 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
4875 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
4876 number in comment. Fix indentation.
4878 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
4879 redundant _GLIBCXX20_CONSTEXPR.
4881 * include/std/ranges (viewable_range): Replace decay_t with
4882 remove_cvref_t (LWG 3375).
4884 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
4886 * include/bits/iterator_concepts.h (iter_reference_t)
4887 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
4888 Remove workarounds for PR c++/67704.
4889 * testsuite/24_iterators/aliases.cc: New test.
4891 2020-02-05 Patrick Palka <ppalka@redhat.com>
4893 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
4894 when initializing _M_current.
4895 (move_iterator::base): Split into two overloads differing in
4896 ref-qualifiers as in P1207R4 for C++20.
4898 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
4900 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
4904 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
4905 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
4906 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
4908 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
4910 * configure: Regenerate.
4912 2020-01-31 Patrick Palka <ppalka@redhat.com>
4914 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
4915 test_range::end() returns the same type as test_range::begin().
4916 * testsuite/24_iterators/range_operations/next.cc: Likewise.
4917 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
4918 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
4919 Always return a sentinel<I>.
4921 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
4924 * include/std/stop_token (stop_token::stop_possible()): Call new
4925 _M_stop_possible() function.
4926 (stop_token::stop_requested()): Do not use stop_possible().
4927 (stop_token::binary_semaphore): New class, as temporary stand-in for
4928 std::binary_semaphore.
4929 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
4930 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
4931 New data members for symchronization with stop_callback destruction.
4932 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
4933 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
4935 (stop_token::_Stop_cb::_M_run): New member function.
4936 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
4938 (stop_token::_Stop_state::_M_owners): New data member to track
4939 reference count for ownership.
4940 (stop_token::_Stop_state::_M_value): New data member combining a
4941 spinlock, the stop requested flag, and the reference count for
4942 associated stop_source objects.
4943 (stop_token::_Stop_state::_M_requester): New data member for
4944 synchronization with stop_callback destruction.
4945 (stop_token::_Stop_state::_M_stop_possible()): New member function.
4946 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
4948 (stop_token::_Stop_state::_M_add_owner)
4949 (stop_token::_Stop_state::_M_release_ownership)
4950 (stop_token::_Stop_state::_M_add_ssrc)
4951 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
4952 updating reference counts.
4953 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
4954 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
4955 (stop_token::_Stop_state::_M_try_lock)
4956 (stop_token::_Stop_state::_M_try_lock_and_stop)
4957 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
4959 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
4960 read and update state. Release lock while running callbacks. Use new
4961 data members to synchronize with callback destruction.
4962 (stop_token::_Stop_state::_M_remove_callback): Likewise.
4963 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
4964 to read and update state.
4965 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
4966 replacing shared_ptr.
4967 (stop_source::stop_source(const stop_source&)): Update reference count.
4968 (stop_source::operator=(const stop_source&)): Likewise.
4969 (stop_source::~stop_source()): Likewise.
4970 (stop_source::stop_source(stop_source&&)): Define as defaulted.
4971 (stop_source::operator=(stop_source&&)): Establish postcondition on
4973 (stop_callback): Enforce preconditions on template parameter. Replace
4974 base class with data member of new _Cb_impl type.
4975 (stop_callback::stop_callback(const stop_token&, Cb&&))
4976 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
4977 (stop_callback::_Cb_impl): New type wrapping _Callback member and
4978 defining the _S_execute member function.
4979 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
4981 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
4982 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
4983 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
4985 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
4987 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
4988 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
4989 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
4992 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
4993 three_way_comparable_with.
4994 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
4995 (compare_three_way::operator()): Remove redundant constraint from
4997 (__detail::_Synth3way::operator()): Use three_way_comparable_with
4998 instead of workaround.
4999 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
5000 output due to simplified constraints on compare_three_way::operator().
5003 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
5004 * testsuite/18_support/comparisons/object/93479.cc: New test.
5006 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
5007 returns the same type as test_range::begin(). Add comments.
5008 * testsuite/std/ranges/access/rbegin.cc: Likewise.
5009 * testsuite/std/ranges/access/rend.cc: Likewise.
5010 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
5011 test_range is the same as its iterator type.
5012 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
5013 operator- overloads to satisfy sized_sentinel_for when the iterator
5014 satisfies random_access_iterator.
5016 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
5019 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
5020 static assertion to object types.
5023 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
5024 clock_gettime instead of explicit glibc version check.
5025 * configure: Regenerate.
5027 2020-01-28 Martin Liska <mliska@suse.cz>
5030 * include/std/atomic: Fix typo.
5031 * include/std/optional: Likewise.
5033 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
5035 * configure: Regenerate.
5037 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
5040 * include/std/span (span): Fix deduction guide.
5041 * testsuite/23_containers/span/deduction.cc: New test.
5043 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
5045 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
5046 (__cmp_cat::_Ord::equivalent): Add enumerator.
5047 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
5049 (partial_ordering, weak_ordering, strong_ordering): Remove
5050 constructors taking __cmp_cat::_Eq parameters. Use renamed
5053 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
5055 * acinclude.m4: Handle `--with-toolexeclibdir='.
5056 * Makefile.in: Regenerate.
5057 * aclocal.m4: Regenerate.
5058 * configure: Regenerate.
5059 * doc/Makefile.in: Regenerate.
5060 * include/Makefile.in: Regenerate.
5061 * libsupc++/Makefile.in: Regenerate.
5062 * po/Makefile.in: Regenerate.
5063 * python/Makefile.in: Regenerate.
5064 * src/Makefile.in: Regenerate.
5065 * src/c++11/Makefile.in: Regenerate.
5066 * src/c++17/Makefile.in: Regenerate.
5067 * src/c++98/Makefile.in: Regenerate.
5068 * src/filesystem/Makefile.in: Regenerate.
5069 * testsuite/Makefile.in: Regenerate.
5071 2020-01-23 Alexandre Oliva <oliva@adacore.com>
5073 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
5074 * configure: Rebuild.
5076 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
5078 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
5081 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
5083 * include/Makefile.in: Regenerate.
5085 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
5087 * doc/xml/faq.xml: Fix grammar.
5088 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
5089 * doc/xml/manual/spine.xml: Update copyright years.
5090 * doc/html/*: Regenerate.
5092 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
5094 * doc/xml/faq.xml: Update for SVN -> Git transition.
5095 * doc/xml/manual/appendix_contributing.xml: Likewise.
5096 * doc/xml/manual/status_cxx1998.xml: Likewise.
5097 * doc/xml/manual/status_cxx2011.xml: Likewise.
5098 * doc/xml/manual/status_cxx2014.xml: Likewise.
5099 * doc/xml/manual/status_cxx2017.xml: Likewise.
5100 * doc/xml/manual/status_cxx2020.xml: Likewise.
5101 * doc/xml/manual/status_cxxtr1.xml: Likewise.
5102 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
5104 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
5106 * include/Makefile.am: Add coroutine to the std set.
5107 * include/Makefile.in: Regenerated.
5108 * include/std/coroutine: New file.
5110 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
5113 * include/bits/c++config: Only do PSTL config when the header is
5114 present, to fix freestanding.
5115 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
5116 functions if they were detected by configure.
5118 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
5119 Matthew Bauer <mjbauer95@gmail.com>
5120 Jonathan Wakely <jwakely@redhat.com>
5122 PR bootstrap/64271 (partial)
5123 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
5125 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
5126 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
5127 definitions with NetBSD upstream.
5128 (ctype_base::blank): Use _CTYPE_BL.
5129 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
5131 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
5132 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
5133 parameters to unsigned char.
5134 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
5136 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
5139 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
5140 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
5141 (_Equality_base): Remove.
5142 (_Equality<>::_M_equal): Review implementation. Use
5143 std::is_permutation.
5144 * testsuite/23_containers/unordered_multiset/operators/1.cc
5145 (Hash, Equal, test02, test03): New.
5146 * testsuite/23_containers/unordered_set/operators/1.cc
5147 (Hash, Equal, test02, test03): New.
5149 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
5152 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
5153 Move here from <bits/range_access.h> and define using __int128 when
5155 (__is_integer_like, __is_signed_integer_like): Move here from
5156 <bits/range_access.h>.
5157 (weakly_incrementable): Use __is_signed_integer_like.
5158 * include/bits/range_access.h (__max_diff_type, __max_size_type)
5159 (__is_integer_like, __is_signed_integer_like): Move to
5160 <bits/iterator_concepts.h>.
5161 (__make_unsigned_like_t): Move here from <ranges>.
5162 * include/std/ranges (__make_unsigned_like_t): Move to
5163 <bits/range_access.h>.
5164 (iota_view): Replace using-directive with using-declarations.
5165 * testsuite/std/ranges/iota/93267.cc: New test.
5166 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
5168 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
5171 * include/bits/fs_path.h (path::generic_string<C,A>)
5172 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
5173 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
5174 root-dir is converted to forward slash in generic pathname.
5175 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
5176 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
5179 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
5181 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
5182 (__atomic_float): Add default member initializer for C++20.
5183 * include/std/atomic (atomic): Likewise.
5184 (atomic::atomic()): Remove noexcept-specifier on default constructor.
5185 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
5186 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
5188 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
5189 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
5190 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
5191 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
5192 expected result for is_trivially_default_constructible.
5193 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
5194 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
5195 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
5196 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
5197 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
5198 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
5199 expected results for is_trivially_default_constructible.
5200 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
5203 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
5205 * testsuite/util/testsuite_iterators.h: Improve comment.
5207 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
5208 initialization syntax.
5211 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
5212 of base class independent of __cplusplus value.
5213 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
5214 type defined in the base class
5215 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
5216 * testsuite/24_iterators/istreambuf_iterator/requirements/
5217 base_classes.cc: Adjust expected base class for C++98.
5219 2020-01-09 Olivier Hainque <hainque@adacore.com>
5221 * doc/xml/manual/appendix_contributing.xml: Document _C2
5222 as a reserved identifier, by VxWorks.
5223 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
5224 * include/bits/stl_multimap.h: Likewise.
5226 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
5228 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
5229 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
5230 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
5231 partial specialization to disambiguate the two constrained
5234 * include/experimental/type_traits (experimental::is_pod_v): Disable
5235 -Wdeprecated-declarations warnings around reference to std::is_pod.
5236 * include/std/type_traits (is_pod_v): Likewise.
5237 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
5238 is_standard_layout and is_trivial. Do not check is_pod for C++20.
5239 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
5240 Add -Wno-deprecated for C++20.
5241 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
5242 * testsuite/20_util/is_pod/value.cc: Likewise.
5243 * testsuite/experimental/type_traits/value.cc: Likewise.
5245 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
5247 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
5248 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
5249 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
5251 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
5254 * include/bits/random.h (operator>>): Check stream operation succeeds.
5255 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
5257 (operator>>): Remove redundant __istream_type typedefs. Check stream
5259 (__extract_params): New function to fill a vector from a stream.
5260 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
5263 * config/abi/pre/gnu.ver: Add new exports.
5264 * include/std/memory_resource (memory_resource::~memory_resource()):
5265 Do not define inline.
5266 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
5267 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
5269 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
5270 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
5272 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
5275 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
5277 (_Hashtable<>::__fwd_value_for): New.
5278 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
5280 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
5281 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
5282 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
5284 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
5285 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
5287 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
5289 * testsuite/23_containers/unordered_set/92124.cc: New.
5291 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
5294 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
5295 detailed error reporting for remove_all. Check result of recursive
5296 call before incrementing iterator.
5297 (remove_all(const path&), remove_all(const path&, error_code&)): Use
5299 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
5300 result of recursive call before incrementing iterator.
5301 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
5302 are reported correctly.
5303 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
5305 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
5307 * include/std/condition_variable
5308 (condition_variable_any::wait_on): Rename to match current draft
5310 (condition_variable_any::wait_on_until): Likewise.
5311 (condition_variable_any::wait_on_for): Likewise.
5312 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
5313 Adjust tests to account for renamed methods.
5315 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
5318 * include/bits/stl_tree.h
5319 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
5320 std::move_if_noexcept by std::move.
5321 * testsuite/23_containers/map/92124.cc: New.
5322 * testsuite/23_containers/set/92124.cc: New.
5324 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
5326 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
5327 (stop_source): Likewise (LWG 3362).
5328 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
5331 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
5332 (lexicographical_compare_three_way): Do not depend on
5334 * include/std/version (__cpp_lib_three_way_comparison): Only define
5335 when __cpp_lib_concepts is defined.
5336 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
5338 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
5340 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
5341 Only define four-argument overload when __cpp_lib_concepts is defined.
5343 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
5345 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
5347 2020-01-01 Jakub Jelinek <jakub@redhat.com>
5349 Update copyright years.
5351 Copyright (C) 2020 Free Software Foundation, Inc.
5353 Copying and distribution of this file, with or without modification,
5354 are permitted in any medium without royalty provided the copyright
5355 notice and this notice are preserved.