Created
January 20, 2016 05:29
-
-
Save xaxxon/da00417a0dc23de967ea to your computer and use it in GitHub Desktop.
This file contains hidden or 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<class T> | |
struct MethodTypesHelper{}; | |
template<class RETURN_TYPE, class ... PARAMETERS> | |
struct MethodTypesHelper<RETURN_TYPE(*)(PARAMETERS...)>{ | |
typedef RETURN_TYPE(*FUNCTION_TYPE)(PARAMETERS...); | |
std::function<RETURN_TYPE(PARAMETERS...)> operator()(FUNCTION_TYPE function) { | |
return std::function<RETURN_TYPE(PARAMETERS...)>(function); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment