Boost logo

Boost :

From: Eric Lemings (lemings_at_[hidden])
Date: 2006-08-21 18:47:25


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Deane Yang
> Sent: Monday, August 21, 2006 4:28 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] Boost Units library preview
> My main objection to this is that I am pretty sure that a
> quantity/units library that does not do implicit unit
> conversion is a *lot* easier to implement than one that does.
> And it's hard for me to believe that a library that does
> automatic unit conversion doesn't have inside of it a simpler
> non-automatic unit conversion library. So implementing
> explicit unit conversion on top of an implicit conversion
> library seems, well, backwards.

Not really. The implementation that I used is that, internally,
all arithmetic values are stored in a standard unit (typically
the SI unit). Only when an arithmetic value is assigned to or
retrieved from the object is a conversion operation actually
required. All other arithmetic operations can therefore be
oblivious to conversion operations. So doing the conversions
up front actually simplifies the implementation.


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