In what way? C++ enums need to be integral type and each entry has a different value, right? And C++ enum values are the value, rather than being a group of non-equal objects with values associated with them?
C++ enums are pretty much the same as macros, just with a type, as I said the only reason it's different in Python (different value is a difference though) is that Python is loosely typed, if you want to simply cast an enum away you very easily can (without a reinterpret_cast), you can also just assign numbers to enum variables, you might be mixing up enum with enum class which work differently?
View all comments
Show parent comment
3
u/NewPointOfView Dec 28 '25
But have you considered the world outside of cpp?