I have this code which causes a compiler error telling:
Error (active) E0511 this operation on an enumerated type requires an applicable user-defined operator function
enum e{ val = 201, val2 = 11 };
for (unsigned bit = 1; e::val; e::val /= e::val2, bit <<= 1) {
std::cout << bit << std::endl;
why I can't do this operation, enum's type is integer