-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Core: Natively convert enum
/BitField
with Variant
#101003
base: master
Are you sure you want to change the base?
Conversation
625458d
to
7a5497f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
7a5497f
to
304aecb
Compare
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.
This is looking great! I think the LOC change alone shows the reduction in complexity this PR brings. Looking forward to when this gets merged 😁
304aecb
to
99a936f
Compare
Gave it some more thought, and I'm gonna walk back on trying to handle qualified names automatically. While I'm still largely confident of that implementation, it wasn't air-tight; I'd rather not have the rest of the PR be potentially bogged down by it. I'll revisit that idea in the future, once I have an unambiguously universal solution. |
A big reason the above issue happened in the first place is because SO MUCH of the enum binding logic happens after the fact, when the overwhelming majority could be determined via
<type_traits>
magic. The only exception seems to be the qualified name, which this PR keeps as an explicitly provided variable; absolutely everything else is now handled natively. While this could probably be implemented more cleanly via C++20 concepts, the entire bindsystem would benefit from them; so for now, SFINAE1 gets the job done.Footnotes
https://en.cppreference.com/w/cpp/language/sfinae ↩