std::ranges::size() may return an integer-like type, which is not covered by oneDPL tests.
A suggestion:
- Add a test with a range with an integer-like type.
- Fix issues if any.
Notes:
https://en.cppreference.com/w/cpp/iterator/is-integer-like.html specifies that:
Expressions of integer-class type are explicitly convertible to any integer-like type, and implicitly convertible to any integer-class type of equal or greater width and the same signedness. Expressions of integral type are both implicitly and explicitly convertible to any integer-class type. Conversions between integral and integer-class types and between two integer-class types do not exit via an exception. The result of such a conversion is the unique value of the destination type that is congruent to the source modulo 2N
, where N is the width of the destination type.
Given that the conversion from/to a regular integer type is outlined by the spec, such ranges should already be supported, but explicitly checking is an additional guarantee.
std::ranges::size() may return an integer-like type, which is not covered by oneDPL tests.
A suggestion:
Notes:
https://en.cppreference.com/w/cpp/iterator/is-integer-like.html specifies that:
Given that the conversion from/to a regular integer type is outlined by the spec, such ranges should already be supported, but explicitly checking is an additional guarantee.