
Hi,
I’m trying to find a way to initialize a Boost Unit with a signaling NaN, not just a NaN with the signal cleared. It seems that the only way to initialize a quantity is by multiplying by the unit, and that multiplication clears the signal on the NaN. I know I can just modify the quantity.hpp header and initialize the default constructor val_ member with the signaling NaN, but I was hoping for a cleaner solution.
Here’s an example (typed in by hand, not tested):
const double s_nan = std::numeric_limits<double>::signaling_NaN();
typedef quantity