cppreference.com says:
A
constexpr
specifier used in an object declaration impliesconst
.
But I tried to make a constexpr
pointer hold the address of a const
object of the same base-type but the compiler gave me an error:
const int a = 1;
int main(){
constexpr int *b = &a;
return 0;
}
So, what types can a constexpr
pointer point to?