Skip to content

Instantly share code, notes, and snippets.

@mystor
Created February 15, 2018 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mystor/0a83e3d85d1772dc76a6a5d690bf77ec to your computer and use it in GitHub Desktop.
Save mystor/0a83e3d85d1772dc76a6a5d690bf77ec to your computer and use it in GitHub Desktop.
C++ Overloading Quiz
void generic();
void specific();
template<typename T>
void f(T&&) {
generic();
}
void f(const int&) {
specific();
}
// Which function does this method call?
void caller() {
int x = 10;
f(x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment