From: Beman Dawes (beman_at_[hidden])
Date: 2000-06-08 07:43:37
At 10:05 AM 6/7/00 -0500, Ed Brey wrote:
>After some thinking (and writing) about the tradeoffs, I've come up
>with another solution to the nonthrowing cast problem, which IMHO
>advantages over a nonthrowing stream_cast.
>template<typename T, typename U>
>bool stream_convert(const T& source, U& target);
> [analysis snipped]
>In summary, stream_convert has these advantages:
>1. Doesn't require a reserved value of the resulting type.
>2. Can easily be used directly in if statement to handle error
>3. Doesn't take a parameter specifying the error handling action.
Interesting, although I have only been half following the discussion.
Couple of questions:
* What exactly is the returned predicate condition? Or the reverse
question, what exactly causes a return of false?
* Can you summarize the full error handling rationale? In other
words, what is the brief rationale summary that might be included in
some documentation to indicate why errors are detected at all, why an
exception isn't just thrown, and then presumably finishes with your
three points above.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk