
15 Jul
2010
15 Jul
'10
3:12 p.m.
On Thu, Jul 15, 2010 at 10:55 AM, Andrew Sutton <andrew.n.sutton@gmail.com>wrote:
2) Should the bits being stuffed apply during comparison?
Contrary to what I've just said, you could implement comparisons using the pointers alone and excluding the bits. I think this would be reasonable. Consider a comparison to nullptr (or (void*)0).
Would it be better to make the pointer_plus_bits convertible to a boolean based on the value of the pointer being stored? This would allow it to be more like to a pointer being that you could, as many people do, put it inside of an if statement to check to see if its null. -- thanks, Brian Bartman