
16 Jun
2014
16 Jun
'14
8:24 a.m.
On 6/16/2014 09:27 AM, Olaf Peter wrote:
so, I can't use it like boost.math.round (<boost/math/special_functions/round.hpp>) with polycies or doubles, isn't it? I don't think it (numeric_cast) should be used to round doubles. For that I would just call your rounder directly.
I wouldn't recommend this, but if you really wanted to use numeric_cast due to other reasons, you could try specializing it for the double to double case: namespace boost { template <> double numeric_cast<double, double>(double value) { return boost::math::round(value); } } Cheers, Brandon