Boost logo

Boost :

From: Bjorn.Karlsson_at_[hidden]
Date: 2003-01-16 10:56:30


> From: David Abrahams [mailto:dave_at_[hidden]]
>
> The huge advantage appears when you start looking at arithmetic
> expressions. The result of
>
> if (t < u)
> {
> x = y + z * w;
> }
>
> could be a lot more predictable if we were working with types that
> didn't perform implicit lossy conversions.

In some cases, sure. But without some exceptionally creative use of
expression templates, you'd have a situation where the ordering of variables
determine the validity of the expression - and even then, any extra
precision that the implementation uses (e.g. for floating point arithmetic)
would probably be lost (and if it's not lost, predictability will suffer).

Bjorn


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