From: Geoff Leyland (gley001_at_[hidden])
Date: 2004-01-07 20:03:11
On 8/01/2004, at 11:07 AM, Matthias Schabel wrote:
>> I've only been following this discussion from the side, but I was
>> under the impression that Mattias Schabel had not just described how
>> to do it, but had actually done it. Is that right?
> Yep. It's slow to compile. I'd love to start a dialogue on
> performance issues as optimizing metaprogramming compile times is
> about as far from my domain of expertise as it gets...
Sorry, I can't help with that - years ago I wrote a run-time dimension
checking and unit conversion library, and had made a start on a
template based version. I was about to stick my head up and mention it
when I saw that what you had done seemed much better and more complete.
But I don't know about MPL I'm afraid.
>> Furthermore, as I understood it, Mattias's units library was fairly
>> solidly based on the underlying concept of (user-chosen) dimensions.
>> Have I misunderstood?
> Nope - the dimensional analysis part is completely unit system
> independent. For all intents and purposes, the SI/CGS/etc... unit
> systems are just applications of the core library for dimensioned
I think that's what I meant. You have some underlying system for
remembering the dimensions of values that are all stored in "basic"
units, so that you can divide a length by a time^2 and get an
acceleration. If your basic units are SI then that's all fine. Then
you have a units library that just converts from (say) feet to the
basic length unit, right?
The dimensional analysis part knows nothing about units, but the unit
conversion part knows about dimensions, right?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk