I'm curious where this fits in with single assignment semantics:
int x = 3;
x = 4; // error!
int* p = &x;
*p = 4; // is that an error?I'm curious where this fits in with single assignment semantics:
int x = 3;
x = 4; // error!
int* p = &x;
*p = 4; // is that an error?
At least with clang it's a warning:
Yes, because line 3 would implicitly be: const int * p