Daily bit(e) of C++ | Opaque Enum Declaration
Daily bit(e) of C++ ♻️59, Hiding enumerators from the public API using Opaque Enum Declaration.
Opaque Enum Declaration is an enum declaration (specifying the name and the underlying type) that does not list the enumerators or their values.
This gives us the benefit of an enumeration, a strongly typed integral type without implicit conversion semantics (for scoped enumerations), without exposing the enumerator names or their values as part of the API.