#include using namespace std ; //-------------------------------------------------------- template void f1(T& param) { cout << "param:" << param << " " << typeid(T).name() << " " << typeid(param).name() << endl ; param++ ; } //-------------------------------------------------------- int main() { int x1 = 27; // x is an int const int cx = x1; // cx is a const int const int& rx = x1; //What is T amd paramtype. They can be different due to qualifiers //such as const, ref. // int and int& f1( x1 ) ; //T is an int. param is an int& cout << x1 << endl ; //We need to make sure that the constness is preserved //const int // f1( cx ) ; //T is a const int. param is an const int& // f1( rx ) ; //T is a const int. param is an const int& return 0 ; } //--------------------------------------------------------