"Dave Gomboc" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > [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 > needs/expectations. > >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. Fernando Cacciola _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost