[There are a few questions on this but none of the answers are particularly definitive and several are out of date with the current C++ standard].
My research shows
If your question is "Can I convert this double to int without loss of information?" then I would do something simple like :
template bool CanConvert(U u) { return U(T(u)) == u; } CanConvert(1.0) -- true CanConvert(1.5) -- false CanConvert(1e9) -- true CanConvert(1e10)-- false