Source:
x
1
2
3
int main()
4
{
5
int i = 0;
6
int& iRef = i;
7
const int& iConstRef = i;
8
volatile int& iVolatileRef = i;
9
const volatile int& iCVRef = i;
10
int* iPtr = &i;
11
12
auto _1 = i; // type = int
13
auto _2 = iRef ; // type = int
14
auto _3 = iConstRef ; // type = int
15
auto _4 = iVolatileRef ; // type = int
16
auto _5 = iCVRef; // type = int
17
auto _6 = iPtr ; // type = int*
18
}
Insight:
1
1
Console: