Follow up on !4450 on static_cast<float>
As discussed at !4450 (comment 9755361)
In that case, there is a proper fix (add an overload of
isnantoSIMDWrapper::scalar::float_v) but for now, thestatic_cast<float>is sufficient -- in the case where it won't work, it will refuse to compile (as opposed to the C-style cast, which would compile and invoke Undefined Behavior), and in the case it will compile, it will do what is expected.
But there should be a follow up MR which does this properly, for any reasonable
float_v.
Edited by Miroslav Saur