Here, const pointer hold the address of const variable. like :
#include <iostream>
int main()
{
const int i = 5;
const int* ptr = &i;
}
It's working fine.
But, If I use using (Type alias) like:
#include <iostream>
using intptr = int*;
int main() {
const int i = 5;
const intptr ptr = &i;
}
GCC compiler gives an error. [Live demo]
Why pointer does not work with using Type alias?