Non-null objects, the Null Object pattern, and T.init
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Mon Jan 20 04:29:13 PST 2014
On Monday, 20 January 2014 at 12:20:58 UTC, Ola Fosheim Grøstad
wrote:
> But when you have an explicit nullptr test you will have to
> mask it before testing the zero-flag in the control register.
And just to make it explicit: you will have to add the masking
logic to all comparisons of nullable pointers too if you want to
allow comparison of null to be valid.
aptr==bptr => ((aptr&MASK==0)&&(bptr&MASK==0))||aptr==bptr
or something like that.
More information about the Digitalmars-d
mailing list