-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use 'magic_enum' library for static reflection for enums #4065
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pwojcikdev
force-pushed
the
magic-enum
branch
from
January 21, 2023 18:15
9f41a5e
to
5eb0c59
Compare
pwojcikdev
force-pushed
the
magic-enum
branch
from
January 21, 2023 18:29
03a68ec
to
5805a54
Compare
clemahieu
approved these changes
Jan 23, 2023
clemahieu
reviewed
Jan 23, 2023
.gitmodules
Outdated
@@ -29,3 +29,6 @@ | |||
[submodule "boost"] | |||
path = boost | |||
url = https://github.com/boostorg/boost.git | |||
[submodule "magic_enum"] | |||
path = magic_enum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this been corrected for the new submodule directory?
clemahieu
requested changes
Jan 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify submodule path
pwojcikdev
force-pushed
the
magic-enum
branch
from
January 24, 2023 14:54
96f087c
to
cba027d
Compare
@clemahieu Moved library to the submodules folder, need your OK to merge. |
dsiganos
approved these changes
Jan 25, 2023
clemahieu
approved these changes
Jan 26, 2023
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is cumbersome to convert between enum and string representations, because C++ standard does not provide any tools for that purpose. Currently our codebase requires writing manual conversion functions which is inefficient and inflexible. This PR introduces
magic_enum
(https://github.com/Neargye/magic_enum) library as a submodule, which ergonomically handles enum to string conversions without requiring any adaptations to existing enum definitions.The PR only modifies stat related classes (
stat::type
andstat::detail
). More conversions will be done in subsequent PRs.Compiler compatibility for
magic_enum
: