int x = 27; int &rx = x; constint &crx = x; f(x); // T is int, param's type is const int& f(rx); // T is int, param's type is const int& f(crx); // T is int, param's type is const int&
constint y = 28; f(y); // T is int, param's type is const int&
int &&rr = 27; f(rr); // T is int, param's type is const int&
constint &&crr = 28; f(crr); // T is int, param's type is const int&
int *p = &x; constint *cp = &x; constchar * const ccp = "abcd"; f(p); // T is int*, param's type is int* const & f(cp); // T is const int*, param's type is const int* const & f(ccp); // T is const char*, param's type is const char* const &