|
Boost : |
From: Dave Gomboc (dave_at_[hidden])
Date: 2003-08-30 21:14:45
> I could drop the pointer-like interface but only if replaced by
> some member function that aids to the fact that the value being
> accessed may be undefined, that is, I know from previous experience
> that the following code better be invalid:
>
> opt = 1 ; // OK, never undefined
> int i = opt ; // WARNING, possibly undefined
> opt.foo(); // WARNING, possiby undefined
My experience is quite different: I *want* "int i = opt;" to compile.
If it doesn't, it impedes generic code. Hence, I throw an exception
at runtime when opt was nil/undefined (as in the code I posted the
other day).
> Well, this is a good time for all of you to speak. The heat is on again.
Relax, we are cooking up software, not you! ;-)
Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk