let's say we have an enum
I'm finding myself hard pressed to find any real advantage to using the new C++11 features like so:Code:enum someEnum { value1, value2 };
I understand that this effectively requires the programmer to fully qualify the enum member name, but I, along with my colleagues are in the habit of fully qualifying enum member names, even pre-C++11. also, even though we've specified that the members use int as their backing storage, there is still no automatic conversion to int.Code:enum class someEnum : int { value1, value2 };
I'm just wondering if there is any common situation that makes the new way work better.



1Likes
LinkBack URL
About LinkBacks



