Xor trick?

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Jan 25 17:25:06 PST 2014


On Sun, Jan 26, 2014 at 12:14:40AM +0000, bearophile wrote:
> Adam D. Ruppe:
> 
> >You could cast it to size_t, then the compiler will let you do the
> >operation, but casting pointers to and from integers means you
> >take matters of correctness into your own hands.
> 
> Right, so I have to carry around size_t instead of pointers.
[...]

And you can't use the GC since the GC won't be able to find your
xor'd pointers.


T

-- 
WINDOWS = Will Install Needless Data On Whole System -- CompuMan


More information about the Digitalmars-d-learn mailing list