Rollback to r437 for bind_first implementation. The "cleaned up" version was a no-go in some cases

This commit is contained in:
Jason Turner
2009-11-08 16:28:35 +00:00
parent 1bc968e788
commit 3a37ceedb7
4 changed files with 50 additions and 70 deletions

View File

@@ -44,30 +44,26 @@ namespace chaiscript
int expected;
};
namespace detail
{
template<typename Ret>
struct Do_Call
template<typename Ret>
struct Do_Call
{
template<typename Fun>
static Boxed_Value go(const boost::function<Fun> &fun, const std::vector<Boxed_Value> &params)
{
template<typename Fun>
static Boxed_Value go(const boost::function<Fun> &fun, const std::vector<Boxed_Value> &params)
{
return Handle_Return<Ret>::handle(call_func(fun, params));
}
};
return Handle_Return<Ret>::handle(call_func(fun, params));
}
};
template<>
struct Do_Call<void>
template<>
struct Do_Call<void>
{
template<typename Fun>
static Boxed_Value go(const boost::function<Fun> &fun, const std::vector<Boxed_Value> &params)
{
template<typename Fun>
static Boxed_Value go(const boost::function<Fun> &fun, const std::vector<Boxed_Value> &params)
{
call_func(fun, params);
return Handle_Return<void>::handle();
};
call_func(fun, params);
return Handle_Return<void>::handle();
};
}
};
}
#define BOOST_PP_ITERATION_LIMITS ( 0, 10 )