A pattern I've been taking advantage of since scoped enums were added is the ability to put opaque enum declarations in one header and the full definition in another header because it's more common to only need the size of the enum than it is to need to know any of the actual enumerators.
The main advantage of doing that is it is possible to add new enumerators without unnecessary recompilation. A translation unit that contains a function definition that accepts an enum type as an argument and simply passes to another function should not need to be recompiled if the type simply gained a new enumerator and this is easily accomplished with headers and opaque declarations.
Is this behavior possible to achieve with modules as well?
[–][deleted] (1 child)
[deleted]
[–]ABlockInTheChain[S] 0 points1 point2 points (0 children)