Skip to content

Instantly share code, notes, and snippets.

@germandiagogomez
Created May 24, 2021 22:41
Show Gist options
  • Save germandiagogomez/f1d6a4d8d4896787404d5ae8d4ea2355 to your computer and use it in GitHub Desktop.
Save germandiagogomez/f1d6a4d8d4896787404d5ae8d4ea2355 to your computer and use it in GitHub Desktop.
Function Parameters can take callback from ChaiScript
// C++ side
// void f(std::function<void (MyRegisteredClass)> callback);
...
chai.add(fun(f), "f");
//chaiscript side
f([](myObject) {
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment