Boost logo

Boost :

From: Anatoli Tubman (anatoli_at_[hidden])
Date: 2001-08-30 11:36:12

On Thursday 30 August 2001 18:52, George Heintzelman wrote:
> [...] when operating on units with different base systems, the
> compiler looks up the conversion constants and hopefully can reduce the
> conversion to a single multiplication at compile time, invisible to the
> user.

Mmm... after thinking about it some more, I would prefer
the system *not* to do any automatic conversions and require
unit_cast<>() or somesuch. Runtime cost is runtime cost,
and it better be visible to the user. Especially because there's
no guarantee it will be reduced down to a *single* multiplication.
Most compilers will not do floating-point calculations at compile
time, even with constants.

anatoli at ptc dot com -- opinions are mine

Boost list run by bdawes at, gregod at, cpdaniel at, john at