Another important advantage of enum classes is that you can specify its size: enum class Colors : char { red, green, blue} That is really handy for memory limited environments such as embedded systems.
@@treyquattro Can you point me to where the spec defines that? I still think it doesnt. Also, I don't see how I could syntactically formulate this in code.
An explanation online felt confusing but now is crystal clear. Thanks!
Great to hear!
Simple to the point
Excellent tutorial my friend
Thanks, I just learned something new
valid point. this video just answered a remark i have made in the previous video.
excellent tutorial. provides very good reasons to always use enum classes instead of regular enums
exactly what i wanted to know, elaborately explained, thanks.
Glad it was helpful!
thanks for clarifying this important point.
You are welcome!!
Cppnuts always making the difference.
Another important advantage of enum classes is that you can specify its size:
enum class Colors : char { red, green, blue}
That is really handy for memory limited environments such as embedded systems.
you can do the same for regular enums
@@manuelmueller7243 how so? Are you referring to compiler features? Professionally I would never go for such lock-in.
@@MrKreidel it's in the spec
@@treyquattro Can you point me to where the spec defines that? I still think it doesnt. Also, I don't see how I could syntactically formulate this in code.
@@MrKreidel dude. en.cppreference.com/w/cpp/language/enum
since enum classes are full fledged classes we should be able to overload the operators for them ???
So much knowledge in a single video
Thanks man!!
How to use cin, enum classes and switch cases?
I would like to that integer which i put from keyboard to be something from enum
Great video!
Very clear explanation Thanks
Glad it was helpful!
Very good explanation.
Glad it was helpful!
thanks for this video
I have an exam on this tomorrow and my professor never explained it in depth
Thank you for explaining so well. Please make videos on boost library.
Thanks man i may try..
This is the best explanation ty!
Glad it was helpful!
Thx a lot you explain this very magic like thinking simple SJ! 🖖🏻🖖🏻🖖🏻
Thanks alot, it motivates.
can we compare a string and a variable in enum class or enum
I don't know why but in MSVC even after putting int green = 100; it still compiled .
Maybe it's a runtime error ? Sir can you please help ?
Shinichi Kudo it should not compile please check your green spelling or you might have done something else.
People {good, bad} should be a fundamental type!
wow, didn't know that
thank youuuuuuuuuuuuu
This was amazing. wth