You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[iterator.concept.winc]#3 requires an integer-class type to be able to represent values either from $−2^{N−1}$ to $2^{N−1}−1$ or from 0 to $2^N-1$:
The range of representable values of an integer-class type is the continuous set of values over which it is defined. For any integer-class type, its range of representable values is either $−2^{N−1}$ to $2^{N−1}−1$ (inclusive) for some integer N, in which case it is a signed-integer-class type, or 0 to $2^N-1$ (inclusive) for some integer N, in which case it is an unsigned-integer-class type.
However, the following code:
#include<limits>
#include<iostream>
#include<cstdint>
#include<range/v3/all.hpp>intmain(){
auto r = ranges::cpp20::views::iota(std::uintmax_t(0), std::uintmax_t(1));
using t = ranges::cpp20::range_difference_t<decltype(r)>;
std::cout << std::numeric_limits<t>::min() << '';
std::cout << std::numeric_limits<t>::max() << std::endl;
return0;
}
gives the output -18446744073709551615 18446744073709551615 on compiler explorer, which doesn't fit the above requirements.
The text was updated successfully, but these errors were encountered:
[iterator.concept.winc]#3 requires an integer-class type to be able to represent values either from$−2^{N−1}$ to $2^{N−1}−1$ or from 0 to $2^N-1$ :
However, the following code:
gives the output
-18446744073709551615 18446744073709551615
on compiler explorer, which doesn't fit the above requirements.The text was updated successfully, but these errors were encountered: