Add bound_fun helper and put it to use cleaning up the engine bootstrapping
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#define __register_function_hpp__
|
||||
|
||||
#include "dispatchkit.hpp"
|
||||
#include "bind_first.hpp"
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
@@ -57,6 +58,12 @@ namespace chaiscript
|
||||
{
|
||||
return detail::fun_helper(t);
|
||||
}
|
||||
|
||||
template<typename T, typename Q>
|
||||
Proxy_Function bound_fun(T t, Q q)
|
||||
{
|
||||
return detail::fun_helper(bind_first(t, q));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user