Created
January 20, 2019 09:06
-
-
Save bathoryr/659af5be0b6da9c281c0a8f7650194c3 to your computer and use it in GitHub Desktop.
Function pointer template, C++ 11
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 <typename RET, typename... ARGS> | |
using FunctionPtr = RET(*)(ARGS...); | |
std::string func1(int a, int b) | |
{ | |
} | |
int main() | |
{ | |
FunctionPtr<std::string, int, int> fPtr = func1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment