It is not allowed to forward declare an enum, but it is allowed to forward declare a class. The reason I could find is that the compiler does not the size of the enum. (correct me if I am wrong.).
But then why it is allowed for class? There also the size is not known to compiler when compiling the particular translation unit, when we are making a forward declaration of a particular class in a header file.
It would be helpful if this is explained from the compiler's perspective.