Created
January 25, 2017 23:58
-
-
Save dario2994/f57e93fecb85c92618f5c0a8728ee8f6 to your computer and use it in GitHub Desktop.
Function evaluating a member function for the given instance passing the given arguments.
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 <typename T, typename ClassT, typename ...ArgT> | |
T EvaluateMemberFunction(ClassT& b, T (ClassT::*method)(ArgT...), ArgT... args) { | |
return (b.*method)(args...); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment