These are chat archives for ChaiScript/ChaiScript

22nd
Oct 2017
Martin Chang
@marty1885
Oct 22 2017 12:26
@fwsGonzo ChaiScript is built using only standard C++ while delegates is a MSVC CLR feature. So, no. ChaiScript does not support it
Alf-André Walla
@fwsGonzo
Oct 22 2017 18:11
Sorry, I was talking about the zero-overhead replacement for std::function delegates (that also supports member functions)
I'm using them in all my projects now and its a 1:1 replacement for std::function which (if i remember correctly) always allocates and copies stuff
Brandan Lasley
@Brandantl
Oct 22 2017 18:43
@marty1885 Use the Chaiscript extras math. That includes most of the cmath stuff https://github.com/ChaiScript/ChaiScript_Extras
I had to use std::function in my game engine to make it work correctly with Chaiscript. I don't know of a better way to do that yet.
This is kind of the rough draft of how it works in my engine. http://discourse.chaiscript.com/t/passing-chaiscript-function-to-c/265/5