Skip to content

Instantly share code, notes, and snippets.

@tylorr
Last active October 18, 2015 05:38
Show Gist options
  • Save tylorr/4f71e15555b8da9c005c to your computer and use it in GitHub Desktop.
Save tylorr/4f71e15555b8da9c005c to your computer and use it in GitHub Desktop.
candidate template ignored: failed template argument deduction
// clang++ -std=c++14 template.cpp
template<typename ...Args>
using Function = void(*)(Args *...);
template<typename ...Args>
void DoThing(Function<Args...> func) { }
void IntFunction(int *i) { }
int main(int argc, char *argv[]) {
DoThing(IntFunction);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment