-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Improved Enum Support #1611
Comments
That’s a C++17 library. What exactly do you have in mind? |
I think I'm asking for some nicer syntax for this, but I didn't consider the standard at all, my bad! Basically, I wanted to avoid defining the map macro, and see if it's possible to extract the enum names automatically, exactly what magic_enum does. |
I see. The library does not offer a unique mapping of enums, because it is up to the user to decide how to encode them (integers, strings, ???). But I think an example how to use a library like magic enum to support writing a |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I put together the magic enum stuff here: https://github.com/fredemmott/magic_json_serialize_enum |
So, I see that we are currently supporting enum types relatively well but the documentation mentioned there are some caveats. I was wondering if it’s a good idea to use something like magic enum and achieve a safer conversion. I understand that you might not want to include another code to your code base but do you think this is something you’d like to have or you think the current method is sufficient? If you think it worth it, I maybe able to spare some time and work on it 👍🏼
The text was updated successfully, but these errors were encountered: