Simplification in enum template