Boost logo

Boost Users :

Subject: Re: [Boost-users] [units][accumulators] buggy behavior for min accumulator of quantities
From: Eric Niebler (eric_at_[hidden])
Date: 2011-03-12 23:54:35


On 3/13/2011 7:45 AM, alfC wrote:
> Anyway, I would suggest to the authors of boost.units to include
> limits.hpp by default in the core library in order *to avoid this
> surprises*.
> Or better yet, make the author of boost.accumulators to support
> boost.units.
<snip>

This is a known shortcoming of Boost.Accumulators. Things get
complicated when t*t has a different type than t and such. Sprinkling
BOOST_DECLTYPE (or decltype where it's supported) would solve the issue,
but finding all such assumptions everywhere would be hard. Appropriate
use of a degenerate numeric archetype in all the tests would do it, but
adding that and then adding decltype everywhere would be a big job. But
you should file a bug, anyway.

Thanks,

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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