It compiles because the compiler knows at compile time the size Enumeration(which turns out to be empty).
You clearly see this syntax:
enum class Enumeration : short;
The compiler knows everything there is to know about Enumeration.
Enumerationis opaque-enum-declaration , which also means that type completei.e. you can use sizeofon it. If necessary, you can specify a list of counters in a later version (unless, of course, re-recording with a different base type is required).
, enum class, static_cast .
enum afterall.
cppreference
, static_cast .
: enum int?