3 ms·
Do they allow the commonplace idiom of casting objects to void* and then back to the original type? (That is allowed by the standard) And do they allow "overla
by norswap 11y ago
Do they allow the commonplace idiom of casting objects to void* and then back to the original type? (That is allowed by the standard)
And do they allow "overlay" casting where multiple structs are used to access the same memory region? This is used in the POSIX networking API for instance (and isn't that rare besides -- the alternatives is unions but that has the disadventage of closedness -- you can't add new variants).