#include using namespace std ; //-------------------------------------------------------- //const reference template void f1(const T* param) { cout << "param:" << param << " " << typeid(T).name() << " " << typeid(param).name() << endl ; //*param = 100 ; } //-------------------------------------------------------- int main() { int x1 = 27; // x is an int const int cx = x1; // cx is a const int const int& rx = x1; f1( &x1 ) ; //T is an int. param is an const int* cout << x1 << endl ; f1( &cx ) ; //T is an int. param is an const int* f1( &rx ) ; //T is an int. param is an const int* return 0 ; } //--------------------------------------------------------