Boost logo

Boost :

From: Dave Gomboc (dave_at_[hidden])
Date: 2003-09-01 22:22:01


[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,
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
needs/expectations.

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk