You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Am dropping here as hope it is of some use to someone.
Ideally the utility from !233 could be patched to be more generified not to need specifically a vector of values and strings, but instead, an iterable range of values and string-like objects. This would allow passing in the output from magic_enum::enum_entries<Enumeration>() directly. As it stands we could also probably use ranges rather than the explicit for loop.
Should not take too long to implement, but don;t have a time to open a branch today.
Also not sure if we should get conversion to the underlying integer for free. Am not seeing it right now but maybe I am overlooking something.
It looks like the develop branch is now requiring C++17 support, in which case it's be possible to integrate magic_enum into Chaiscript to automate this. Although C++23 should be bringing some sort of reflection capabilities, so would understand a motivation to hold off and see what comes of that, as without needing nearly as much boilerplate this would make Chaiscript really awesome!
The text was updated successfully, but these errors were encountered:
This is a snippet to add enums automagically:
Am dropping here as hope it is of some use to someone.
Ideally the utility from !233 could be patched to be more generified not to need specifically a
vector
of values andstrings
, but instead, an iterable range of values and string-like objects. This would allow passing in the output frommagic_enum::enum_entries<Enumeration>()
directly. As it stands we could also probably use ranges rather than the explicit for loop.Should not take too long to implement, but don;t have a time to open a branch today.
Also not sure if we should get conversion to the underlying integer for free. Am not seeing it right now but maybe I am overlooking something.
It looks like the develop branch is now requiring C++17 support, in which case it's be possible to integrate magic_enum into Chaiscript to automate this. Although C++23 should be bringing some sort of reflection capabilities, so would understand a motivation to hold off and see what comes of that, as without needing nearly as much boilerplate this would make Chaiscript really awesome!
The text was updated successfully, but these errors were encountered: