Add bound_fun helper and put it to use cleaning up the engine bootstrapping

This commit is contained in:
Jason Turner
2009-10-14 02:34:09 +00:00
parent 12e909d9aa
commit 480761c1f7
5 changed files with 99 additions and 20 deletions

View File

@@ -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));
}
}