Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2004-01-12 10:56:24


David Abrahams wrote:
> Daniel Frey <daniel.frey_at_[hidden]> writes:
>
> IIUC, most people do that with preprocessor switches that turn
> typedefs for common quantities like "meter" into simple doubles or
> floats. Generally the compiler can handle these much more
> efficiently than any class instance.

Yes, that's a good idea, but it may change the programs behaviour (e.g.
overloads of double and unit-types, detection through type-traits, ...).
I guess it depends on the usage and it might make sense to provide
several different versions, although you'll always find a difference in
the programs behaviour if you want to. Such non-checking modes need good
documentation and understanding, so I guess I was asking for more work
than I intended :)

Regards, Daniel

-- 
Daniel Frey
aixigo AG - financial solutions & technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

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