← Back to Question List
C++ Quiz #58
Template Instantiation Failure
The following code fails to compile at the call site. Why?
``cpp
#include <iostream>
using namespace std;
template <typename T>
void printSum(T a, T b) {
cout << a + b << "\n";
}
struct Point { int x, y; };
int main() {
printSum(Point{1,2}, Point{3,4});
}
``