Created
January 15, 2016 04:29
-
-
Save xaxxon/f91222298e31b1eb5507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<int depth, typename METHOD_TYPE, typename RET, typename CLASS_TYPE> | |
struct Caller<depth, METHOD_TYPE, RET(CLASS_TYPE::*)() const> { | |
public: | |
// the final class in the call chain stores the actual method to be called | |
enum {DEPTH=depth, ARITY=0}; | |
// This call method actually calls the method with the specified object and the | |
// parameter pack that was built up via the chain of calls between templated types | |
template<typename ... Ts> | |
void operator()(METHOD_TYPE method, CLASS_TYPE & object, const v8::FunctionCallbackInfo<v8::Value> & info, Ts... ts) { | |
RunMethod<METHOD_TYPE>()(object, method, info, ts...); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment