Let O be an object with opCast overridden, then

writeln(O); //prints string
writeln(cast(void *)O)) // error, works fine if I comment out the opCast override
writeln(&O) // address of pointer to O, not what I want.

I want to compare a few objects based on their location. (I know this is bad because of the GC, but I will probably pin them if I go this route)

It seems I have a difficult time getting the original behavior when something is syntactically overridden in D. I understand the point of cast(void *) not working when opCast is overridden but I then do not know how to still get the address.

Any Ideas?


Reply via email to