|
Boost Users : |
Subject: Re: [Boost-users] [units] Automatic Physical Units in Mathematica and Boost.Units
From: Matthias Schabel (boost_at_[hidden])
Date: 2011-01-03 14:06:20
> For * and / I need it for a different reason, the library *can*
> multiply quantities from different systems but them it becomes very
> difficult to convert that quantity to a third system of units. It
> seems that explicit conversion can't handle such conversion even
> though all the conversion factors are defined.
> So by adding factors in an expression one can inadvertedly introduce
> many different systems of units that later can not be converted.
AFAIK, if conversions are correctly defined there should not be a problem converting to a third system of units. Can you provide a small, self-contained example of the problem?
> I can share the code of these auto_conversion_operators if you are interested.
Steven, any thoughts on implementing an expression-local way of allowing implicit conversions? It actually seems like it might be a great GSOC project to re-implement Boost.Units using Boost.Proto...
>> As far as internal implementation, what are the concerns?
>
> In the same way that I implemented some additions I would have liked
> to implement other features like the explicit conversion in cases were
> three (or more) systems or units are involved. That part seemed to
> involve a fair amount of research in the library, in particular in its
> compile-time linear algebra, static_rational and a lot of MPL. My
> question about implementation is to know if the library is planned to
> change in some particular way.
The above comment aside, I'm not aware of any major planned changes in the Boost.Units implementation.
Matthias
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net