#include #include using namespace std; template inline void value(T t) {cout << ++t << "\n";} template inline void reference(T& t) {cout << ++t << "\n";} int main() { const int i = 10; const int *const p = &i; const int *const *const pp = &p; value(i); //change T to int value(p); //change T to const int * value(pp); //change T to const int *const * //reference(i); //change T to const int won't compile //reference(p); //change T to const int *const won't compile //reference(pp); //change T to const int *const *const won't compile return EXIT_SUCCESS; }