←back to thread

498 points azhenley | 1 comments | | HN request time: 0.209s | source
Show context
WalterBright ◴[] No.45774916[source]
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?
replies(2): >>45774963 #>>45774985 #
1. wicharek ◴[] No.45774985[source]
Yes, because line 3 would implicitly be: const int * p