#include <iostream> using namespace std; template<struct T> void fun(T i) { cout<<i<<endl; } int main() { int i=10; fun<int>(i); return 0; }
Standard input is empty
prog.cpp:4: error: ‘struct T’ is not a valid type for a template constant parameter prog.cpp: In function ‘void fun(T)’: prog.cpp:4: error: ‘i’ has incomplete type prog.cpp:4: error: forward declaration of ‘struct T’ prog.cpp: In function ‘int main()’: prog.cpp:12: error: no matching function for call to ‘fun(int&)’
Standard output is empty