-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Previous/next value helpers #280
Comments
For example enum class SMAAEdgeMethod : uint8_t {
Color
, Luma
, Depth
};
https://en.cppreference.com/w/cpp/iterator/next for example throws an error (I would probably prefer to return optional) |
In my case I cycle again to the beginning. You could of course add both variants. |
On further thinking there should probably be the following variants:
This should cover every use case. |
Add 2 variants in master:
https://github.com/Neargye/magic_enum/blob/master/include/magic_enum_utility.hpp |
There should be a way to get previous/next value in the enum, something like this:
https://github.com/turol/smaaDemo/blob/31ba838df401122afb62ebbf4c6b49c93108b011/demo/smaaDemo.cpp#L252
https://github.com/turol/smaaDemo/blob/31ba838df401122afb62ebbf4c6b49c93108b011/demo/smaaDemo.cpp#L2595
The text was updated successfully, but these errors were encountered: