
7 Oct
2010
7 Oct
'10
12:33 p.m.
On 2010-10-07 13:36, David Abrahams wrote:
At Wed, 06 Oct 2010 20:31:30 +0200, Rutger ter Borg wrote:
Optional models "the variable is not set." You want something different. Why not just create a different class to model what you want?
I think I know what optional models, and it is clearly what I want. However, I would like to have space-efficient ones.
It seems clear to me that optional<T*> models one more state than you want. You're not interested in "no T*" and "a null T*" as separate states.
That's right, that would be optional<T&>. Cheers, Rutger