Move from boost::function to std::function
This commit is contained in:
@@ -7,15 +7,15 @@ int main()
|
||||
|
||||
chai.eval("def func() { print(\"Hello World\"); } ");
|
||||
|
||||
boost::function<void ()> f = chai.eval<boost::function<void ()> >("func");
|
||||
std::function<void ()> f = chai.eval<std::function<void ()> >("func");
|
||||
f();
|
||||
|
||||
if (chai.eval<boost::function<std::string (int)> >("to_string")(6) != "6")
|
||||
if (chai.eval<std::function<std::string (int)> >("to_string")(6) != "6")
|
||||
{
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (chai.eval<boost::function<std::string (const chaiscript::Boxed_Value &)> >("to_string")(chaiscript::var(6)) == "6")
|
||||
if (chai.eval<std::function<std::string (const chaiscript::Boxed_Value &)> >("to_string")(chaiscript::var(6)) == "6")
|
||||
{
|
||||
return EXIT_SUCCESS;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user