[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 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost