I'm reading a piece of code which does this
void *ptr_to_something = (void*)0x23; // I made this up, it's just a pointer to something void *addr; void *dst = (void*)(addr = ptr_to_something); // This is the line that confuses me it seems to assign a pointer to something to another pointer of the same thing. And that's okay.. but then the result is enclosed in parenthesis, cast to the same thing and somehow reassigned to a third pointer to the same thing.
Is this valid C++ at all? Is it guaranteed that assigning the result of an assignment yields the same assigned object?