From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2003-09-01 23:03:17
"Dave Gomboc" <dave_at_[hidden]> escribió en el mensaje news:Pine.LNX.4.44.0309012109320.21837-100000_at_boyne.cs.ualberta.ca...
> [Fernando Cacciola]
> > I'm saying that the choice made by variant<> in this regards is to the
> > code using get<> as hopeless as undefined behaviour. I don't think that
> > preconditions (and exceptions thereof) should be used to arbitrarily
> > make the illusion of giving meaning to an operation that is undefined at
> > the conceptual level.
> For myself, and I think also for Joel, "nil" is a fully legitimate value,
But you never get a 'nil' when trying to get a 'T' out of variant<T,nil>,
you get an exception and the offending code is aborted up to the
catch handler, if any.
> not a hopeless, meaningless, conceptually undefined value. It's quite
> clear that you don't share this view. The conceptual divide here is
> surprisingly large.
> I'm surprised to find myself suggesting this, but perhaps instead of
> debating this issue further I and like-interested people should create and
> submit a high-quality implementation of nilable.hpp to Boost. If
> accepted, people could then choose whichever best meets their
>From the perspective of a test field, it is quite reasonable to have a
competing alternative so we can see what works better on the long run.
But from the perspective of a library that is largely becoming a de facto standard
for production code, I'm not sure how that would work for the end users.
Anyway, you have my support if you want to do that...
I promise I'll try to review it as impartially as I can.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk