Boost logo

Boost :

From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2002-11-21 16:36:12


> > Maybe it's a minor point, but I think the !! is really
> ugly. Have you
> > considered the safe_bool idiom that's used in some other Boost
> > libraries? (smart_ptr to name one.)
> >
> Yes, I did.
> safe_bool (among other alternatives) was rejected because of
> the following
> (this specific point is explained in detail on the documentation)
>
> void foo()
> {
> optional<bool> opt = get_some();
> bool is_it = opt;
> }

Did you consider to provide bool specialization that does not have safe_bool
convertion and allowing it for all other types?

Gennadiy.


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