Am 16.06.2014 14:26, schrieb Brandon Kohn:
On 6/15/2014 14:15 PM, Olaf Peter wrote:
Is there a way to override the default implementation for e.g. double? The attached example fails to compile due to redefinition of 'struct boost::numeric::numeric_cast_traits
' If you define BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS then you can define the conversions for fundamental types. Even so, converting from double to double won't affect the value. There is a layer that checks for this an implements a trivial conversion that does nothing but return a const T&.
so, I can't use it like boost.math.round
(
On 6/15/2014 14:56 PM, Olaf Peter wrote:
Probably I did though to complicated before; but even using make_converter_from doesn't compile :( Is the way correct and only my typedef wrong?
BTW; why isn't there a RoundMath<> here, RoundEven<> policy does exist.
What type of round does RoundMath do?
simply if(x < 0) floor(x-0.5) else ceil(x+0.5) Thanks, Olaf