-
Notifications
You must be signed in to change notification settings - Fork 341
Added template specialization in chaiscript::utility::add_class<Enum> to register bulk constants. #233
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
Added template specialization in chaiscript::utility::add_class<Enum> to register bulk constants. #233
Conversation
…ipt into Fix_Crash_From_CppCon
…ipt into Fix_Crash_From_CppCon
… to register bulk constants.
For some reason the build systems break but i don't see where and how it is related to my changes. |
I agree that the build failures are not related to your code. Both travis and appveyor have been giving me a hard time lately. That said though, can you please add an example for how to use this code with a small test, similar to this one: ChaiScript/unittests/compiled_tests.cpp Lines 487 to 518 in 64dd349
Thanks |
Feature enum utility helper
The script execution does work now with enums inside the shorthand vector and passing it to user defined functions, however for completeness we should look at why returning from the script does construct the correct vector but it seems to be empty in every case i have tried.
I have also tried to separately boxed_cast the result which ends up throwing chaiscript::exception::bad_boxed_cast
|
There are two issues.
|
…um_utility_helper
Added template specialization in chaiscript::utility::add_class<Enum> to register bulk constants.
I hope you will consider adding this addition to the helper, so people can use them exactly like the user-type / fun combination.