Created
June 20, 2016 09:07
-
-
Save 1995hnagamin/27bb9182b7f06064257a03170a0cd2bd 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
#include <functional> | |
#include <iostream> | |
template<typename T, typename... U> | |
using Fn = std::function<T(U...)>; | |
int add(int x, int y) { | |
return x + y; | |
} | |
int main() { | |
Fn<int,int,int> plus = add; | |
std::cout << plus(1,2) << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment