16 Jun
2014
16 Jun
'14
3:41 p.m.
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 (
) with polycies or doubles, isn't it?
Why would you want to? It's a type conversion utility not a rounding one, if you want to do rounding why not use the Boost.Math functions directly? John.