a0e6f05d26
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. |
||
---|---|---|
.. | ||
concepts | ||
ranges | ||
time |