const again
Walter Bright
newshound1 at digitalmars.com
Thu Dec 6 16:45:52 PST 2007
BCS wrote:
> totally random though: I'm designing a program and ran across a place
> where I want to say "this pointer shall never be dereferenced, it shall
> only be used as an identity" the idea being that I want to be sure that
> the code has no dependencies on anything under it. It would be used
> somthing like a key in a hash table but where the test is "same thing"
> not "equal things". What should this be implemented as? Does this have
> any place in the const system? Is there an existing clean solution?
Since the point of a pointer is to dereference, perhaps a pointer is the
wrong thing. Perhaps it should be a struct.
---------------------------------------------
Doolittle: "Bomb, what is your purpose?"
Bomb #20: "To explode, of course"
-- Dark Star
More information about the Digitalmars-d
mailing list