#Will a pointer to the child of an optional be invalidated when the entire optional is set to null?
1 messages · Page 1 of 1 (latest)
That surprises me. Can you elaborate a bit on why?
Well, because there's an extra bit of memory somewhere indicating whether the optional is null, and the payload pointer isn't aware of that - storing e.g. a u32 somewhere can't magically also set that "presence" (not-null) bit, it's just a normal u32 pointer
Basically all invariants of an optional where is_null = true make the rest of the representation effectively undefined