The following is the error as expected:
int* const const p = new int;
But below there is no error, even if it is equivalent to the previous one:
typedef int* const intp_const;
intp_const const p = new int;
Why constdoes the compiler ignore extra ?
[Note: intp_const constdoes not match const char* constbecause it is possible *p = <value>;.]
source
share