Why am I allowed to use an incomplete enum class?

Viewed 925

Why does the code below compile without any errors?

enum class Enumeration;
void func()
{
    auto enumeration = static_cast<Enumeration>(2);
    auto value = static_cast<int>(enumeration);
}
1 Answers
Related