What is the reason we cannot have a template declaration inside a function definition?
Why this piece of code not compile?
template TestPkg< typename T >
cout << "Value:" << iVal << endl;
int i =10;
TestPkg< int > sample( i );
I am interested in understanding as to what happens inside the compiler, which is restricting such a declaration?