Created
January 24, 2017 19:16
-
-
Save ridiculousfish/fcdd3dd1a6346c77f18c2116c907640e 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 <stdio.h> | |
#include <functional> | |
void func(std::function<void(void)> func) { | |
printf("func1\n"); | |
} | |
template<typename ANYTHING> | |
static void foo() { | |
func([](){}); | |
} | |
template<typename HANDLER> | |
void func(const HANDLER &handler) { | |
printf("func2\n"); | |
} | |
int main(void) { | |
foo<int>(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment