Boost logo

Boost :

Subject: Re: [boost] [convert] are you mixing default_value and error_value?
From: Vicente Botet Escriba (vicente.botet_at_[hidden])
Date: 2009-07-08 11:43:48

Gottlob Frege wrote:
> On Wed, Jul 8, 2009 at 6:42 AM, vicente.botet<vicente.botet_at_[hidden]>
> wrote:
>> Yes, this is what I wanted to say. On the case of the direction class,
>> you are forced to give an *initial value* because direction is not
>> default constructible, but with your interface we can't have an exception
>> in this case. Is for this reason I say you are mixin both.
> Do we need to give an initial value just for conversion to work at
> all, or is it only needed as a return in the error case?
> Tony


It is needed for both usages: the initial value when the class is not
default constructible, and the error value when we want this value to be
returned when failure. Now we can not have an exception for the conversion
to a class that is not default constructible because when we give a default
value it is also interpreted as the error value. As I said we are mixing
both concepts, which is not good, as both are orthogonal.


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at