You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know how much effort this would take, but if it is too much don't worry about it. I understand you maintain this for fun on your free time.
One of my only gripes with mx is the lack of count enum class members.
In my experience, it is often best practice to add a trailing count enum, which enables you to write generalized loops on enums without ever worrying about size problems. For ex.
enumclasspotato {
russet,
yukon,
sweet,
count, // This will always be equal to the number of enum elements, if they aren't specified values.
};
So I can do.
for (size_t i = 0; i < size_t(potato::count); ++i) {
potato my_potato = potato(i); //etc
}
So, in mx. I wish there was a count where it makes sense. For ex with Step.
enumclassStep
{
c = 0,
d = 1,
e = 2,
f = 3,
g = 4,
a = 5,
b = 6,
count,
unspecified = -1
};
Cheers
The text was updated successfully, but these errors were encountered:
I don't know how much effort this would take, but if it is too much don't worry about it. I understand you maintain this for fun on your free time.
One of my only gripes with
mx
is the lack ofcount
enum class members.In my experience, it is often best practice to add a trailing
count
enum, which enables you to write generalized loops on enums without ever worrying about size problems. For ex.So I can do.
So, in mx. I wish there was a
count
where it makes sense. For ex withStep
.Cheers
The text was updated successfully, but these errors were encountered: