Fix problem with functor<>() not casting to the proper type and add unit test for this case

This commit is contained in:
Jason Turner
2010-08-03 15:19:20 +00:00
parent e1fbf54e40
commit a122403c20
4 changed files with 28 additions and 8 deletions

View File

@@ -0,0 +1,16 @@
#include <chaiscript/utility/utility.hpp>
int main()
{
chaiscript::ChaiScript chai;
chai.eval("def func() { print(\"Hello World\"); } ");
boost::function<void ()> f = chai.functor<void ()>("func");
f();
return EXIT_SUCCESS;
}