|
Boost Users : |
Subject: Re: [Boost-users] [units] (controlled) implicit conversion
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2010-05-05 07:47:40
> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of alfC
> Sent: Tuesday, May 04, 2010 4:03 PM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [units] (controlled) implicit conversion
>
> On Apr 30, 9:17 am, Matthias Schabel <bo..._at_[hidden]> wrote:
> > Perhaps you would be willing to add the atomic system to the Boost distribution?
>
> Seriously, I would love to. What is the best way to share the code and
> start the collaboration?
>
> > I expect that there is a reasonable subset of users for whom this would add
> > value...
>
> You don't imagine how many. I do quantum chemistry and it is
> incredible how your library changed the way I write my codes... With
> the certainty that the equations are dimensionally correct and that I
> am not messing up with the conversion factors I can concentrate in the
> real problem.
I'm pleased that you have been able to press the Boost.Units library into serious service.
And I'm really delighted that you have found that it really does achieve the gains in reliability, confidence and
convenience that many of us wanted from this, but had not dared to believe was possible (gosh - it's a decade ago).
Until Matthias Schabel and Steven Watanabe worked their meta magic on it :-)
I hope your collaboration can show how it can be further improved into an area where mixed very large and very small
units are a real problem.
And I hope it will show that the library can be used for tricky problems as well as the more mundane (but still error
prone) and thus help achieve really widespread use of the Boost.Units library.
Good luck.
Paul
PS Steven Watanabe has recently developed yet more cunning metacode to allow autoprefixing the SI units.
quantity<length> l = 123456. * meters; // A quantity of length, in units of meters.
cout << engineering_prefix << l << endl; // Outputs "123.456 km" - because more than 999.9 meters.
(also a << binary_prefix and no prefix of course)
This is *very* convenient to avoid values flipping into the nasty E format.
Hopefully this will appear in future releases.
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