Would it be possible to add something like choosing a random value from an enum? #37
Gisbert12843
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Hey, unfortunately C++ does not support reflection so it's not possible to iterate over enum values, since they're a simple integers under the hood You still can make some crutch like creating an constexpr initializer_list of all enum values and using Random::get(enums_all_values) on it |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm still fairly new to C++, but it would be a cool addition if this would be implemented somehow as long as its possible ofc..
Beta Was this translation helpful? Give feedback.
All reactions