Created
February 28, 2017 12:51
-
-
Save vralex/bae61c9cc209341a14c85b810a41bd39 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
#include <iostream> | |
struct Widget { | |
template <typename T, typename U> | |
void operator()(const T& a, const U& b) | |
{ | |
std::cout << a << " " << b << std::endl; | |
} | |
}; | |
int main() | |
{ | |
using namespace std::placeholders; | |
auto poly = std::bind(Widget(), 1, _1); | |
poly("32"); | |
poly(12); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment