fixes to compile on gcc 4.7

This commit is contained in:
Eduardo Bart 2012-04-04 10:16:33 -03:00
parent 11ad1f5c5b
commit 27e24bda28
2 changed files with 7 additions and 8 deletions

View File

@ -28,7 +28,7 @@
#define DEG_TO_RAD (acos(-1)/180.0)
#define RAD_TO_DEC (180.0/acos(-1))
#define BUILD_COMPILER "gcc "__VERSION__
#define BUILD_COMPILER "gcc " __VERSION__
#define BUILD_DATE __DATE__
#ifndef BUILD_REVISION

View File

@ -104,6 +104,12 @@ namespace luabinder
};
}
/// Bind a customized function
inline
LuaCppFunction bind_fun(const std::function<int(LuaInterface*)>& f) {
return f;
}
/// Bind a std::function
template<typename Ret, typename... Args>
LuaCppFunction bind_fun(const std::function<Ret(Args...)>& f) {
@ -134,13 +140,6 @@ namespace luabinder
return bind_lambda_fun<F>::call(f);
}
/// Bind a customized functions
template<>
inline
LuaCppFunction bind_fun(const std::function<int(LuaInterface*)>& f) {
return f;
}
/// Convert to C++ functions pointers to std::function then bind
template<typename Ret, typename... Args>
LuaCppFunction bind_fun(Ret (*f)(Args...)) {