Handle the ReturnVal exception at the eval_function level so that functions passed back to C++ land have their return values handled properly
This commit is contained in:
@@ -56,7 +56,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
boost::function<std::string (const std::string&, const std::string &)> f =
|
||||
dispatchkit::build_functor<std::string (const std::string &, const std::string &)>
|
||||
(chai, "function(x, y) { x + y }");
|
||||
(chai, "function(x, y) { return x + y }");
|
||||
|
||||
std::cout << "Functor call: " << f("Hello", " World") << std::endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user