Does associative array change the location of values?

Ali Çehreli acehreli at
Sun Oct 31 16:54:23 UTC 2021

On 10/31/21 9:49 AM, H. S. Teoh wrote:

 > The current spec explicitly states that masking pointers this way is UB.

Ok. :) What about unions?

union U {
   ulong u;
   void* p;

Can the GC deal with that?

Or other smart ways where I store the pointer in two parts as 
page+offset? (Perhaps that's UB as well.)


More information about the Digitalmars-d-learn mailing list