#include using namespace std ; //-------------------------------------------------------- //Universal Reference template void f1(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 int& //Lvalue reference cout << x1 << endl ; f1( cx ) ; //T is a const int&. param is a const int& //Lvalue reference f1( rx ) ; //T is a const int& param is a const int& //Lvalue reference f1( 23 ) ; //T is int param is a int&& // Rvalue reference return 0 ; } //--------------------------------------------------------