I have a big enum class that is used from many files. The enum class is constantly changing as I add and remove things which causes a lot or recompilation.
I tried to minimize the need for recompilation by using a forward declaration instead of #include whenever I don't need the full enum class definition, just like you normally do with classes.
This works great except that the underlying type is not int so I have to repeat the underlying type each time I write a forward declaration. This feels a bit redundant and isn't optimal if I later decide the change the underlying type.
I have arrived at the conclusion that I should use two header files. One that contains the full definition of the enum class (EnumClass.h) and another one that only contains a forward declaration.
I was thinking of naming the file EnumClass_decl.h or EnumClass_fwd.h (inspired by <iosfwd>) but I'm not sure what is best. Do you use or know of any naming conventions for headers like this?
topic "namíng" on https://google.github.io/styleguide/cppguide.html
Did you mentioned to splitt your mega enum class into separat sections? To compile every time every project when this file is changed is eh, or an other idea is to expose this values in a database refereceing them by calling names.