Re: [boost] Re: Re: Re: Re: Optional, tie, and iterator_adaptor

2003-09-03 Thread Joel de Guzman
Andrei Alexandrescu <[EMAIL PROTECTED]> wrote: > By the way, could optional use variant as a backend? I suggested that before. Now I think that it is not practical. It can, but it will not be optimal. I see it the other way now. I suggest that a partial specialization of variant be written tha

[boost] Re: Re: Re: Re: Optional, tie, and iterator_adaptor

2003-09-03 Thread Andrei Alexandrescu
"Hurd, Matthew" <[EMAIL PROTECTED]> wrote in message > I use optional quite a bit and am glad T and optional are different. > Saves my bacon when I do silly things, especially when something transitions > from a T to an optional. Strongly typed maintenance is something I'm > thankful for. > > T* a

Re: [boost] Re: Re: Re: Re: Optional, tie, and iterator_adaptor

2003-09-02 Thread Joel de Guzman
Fernando Cacciola <[EMAIL PROTECTED]> wrote: > Point taken. > There's no need to argue anymore. > I guess significantly more feedback will weight the balance. > > Thanks for all your comments! > It might look the other way around but they were very helpful. Bottom line is, and most importantly,

[boost] Re: Re: Re: Re: Optional, tie, and iterator_adaptor

2003-09-02 Thread Fernando Cacciola
"Joel de Guzman" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Fernando Cacciola <[EMAIL PROTECTED]> wrote: > > > You did sell the idea that it can be a union, but I held to the idea that > > it can just as well be considered as *REALLY REALLY REALLY* > > nothing else but a co

[boost] Re: Re: Re: Re: Optional, tie, and iterator_adaptor

2003-09-02 Thread Fernando Cacciola
"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) sh

Re: [boost] Re: Re: Re: Re: Optional, tie, and iterator_adaptor

2003-09-02 Thread Brian McNamara
On Mon, Sep 01, 2003 at 09:22:01PM -0600, Dave Gomboc wrote: > [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 arb

[boost] Re: Re: Re: Re: Optional, tie, and iterator_adaptor

2003-09-02 Thread Dave Gomboc
[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 i

[boost] Re: Re: Re: Re: Optional, tie, and iterator_adaptor

2003-09-02 Thread Fernando Cacciola
"Joel de Guzman" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Fernando Cacciola <[EMAIL PROTECTED]> wrote: > > >> variant throws throws a bad_get exception > >> when you get a reference to a T which is not the held type. I don't see > >> a problem why you can't do something s