gcc/libstdc++-v3/testsuite/std
Jonathan Wakely a0e6f05d26 libstdc++: Fix iota_view::size() to avoid overflow
This avoids the overflow that occurs when negating the most negative
value of an integral type.

Also prevent returning signed int when the values have lower rank and
promote to int.

libstdc++-v3/ChangeLog:

	* include/std/ranges (ranges::iota_view::size()): Perform all
	calculations in the right unsigned types.
	* testsuite/std/ranges/iota/size.cc: New test.
2020-08-24 16:17:04 +01:00
..
concepts libstdc++: Avoid using __float128 in strict modes 2020-07-31 19:58:03 +01:00
ranges libstdc++: Fix iota_view::size() to avoid overflow 2020-08-24 16:17:04 +01:00
time libstdc++: Add some C++20 additions to <chrono> 2020-03-26 14:00:12 +00:00