From Jason Turner
Watch on YouTube

Summary

This episode discusses the syntactic equivalence between 'enum class' and 'enum struct' in C++, both of which create scoped enumerations with stronger type safety introduced in C++11. Jason explains that while the keywords produce identical functionality, there's a semantic argument for preferring 'enum struct' since all enumeration values are effectively public, following the convention that structs have public members by default while classes have private members by default.

Resources

Tags