1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
#include <typeinfo>
#include <cxxabi.h>
using namespace std;
int main()
{
const int& x = 3;
int y = 3;
decltype(x) z = x;
cout << typeid(z).name() << endl;
cout << &x << endl;
cout << &z << endl;
return 0;
}
Back to decltype