Boost logo

Boost :

From: Miki Jovanovic (miki_at_[hidden])
Date: 2000-06-29 09:18:39


--- In boost_at_[hidden], "Ed Brey" <brey_at_a...> wrote:
> I agree with your take on (3), other than when conversion failures
are not
> exceptional cases. One problem is that if failures are frequent,
exceptions
> may be too slow. Also, there is the issue with how easy/cumbersome
the code
> is to write. A previous post [1] went into this in more detail,
but
the
> summary is that try blocks work well when there are many
conversions
and
> possibly other operations for which failure can be handled
uniformly,
> whereas if there is unique recovery action for each potential failed
> conversion, then having the status returned is quite convenient.

I am not overly fond of pairs, but std does this on several
occasions. How about the non-throwing lexical_cast to return a
pair<Targer,bool> ?

Miki.


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