9 Mar
2016
9 Mar
'16
2:12 p.m.
When I try to cast variable of type double (which is equal to std::numeric_limits<double>::inifinity()) to float I get exception: std::bad_cast: bad numeric conversion: positive overflow. I expected to get std::numeric_limits<float>::inifinity(). The same is true for negative infinity. Is it intended behavior or bug? In case this should be considered as bug, maybe it was fixed in more recent versions of Boost? PS. I am using stock Boost 1.54 on Ubuntu 14.04 Regrads, Dmitry.