Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-06-29 15:20:20


----- Original Message -----
From: "Kevlin Henney" <kevlin_at_[hidden]>

> Perhaps it should be in the name, eg interpret_cast_nothrow? Or maybe
> even a scoped setting, eg a guard object can be used to change the
> behaviour in a given block or expression. Or is that too subtle? Hmm, if
> that were used, it could perhaps offer a way of resolving precision
> issues that were raised:
>
> {
> interpreting params(std::nothrow, some_precision);
> ... interpret_cast<A>(b) ...
> ... interpret_cast<C>(d) ...
> }
>
> The most obvious objection I can come up with against this is the
> threading issue. As a threading model has not yet been established for
> boost, there is no way to deal with thread-specific data portably.

This runs into the same problem that your other "single-thread only"
proposal has. Namely, if streaming A or C relied on the throwing behavior of
an internal interpret_cast, that behavior would have been changed
externally.

-Dave


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