[Please do not mail me a copy of your followup]
Antony Polukhin
2014-09-08 17:53 GMT+04:00
: [...] because that integer cannot be represented in double precision
Is there something in Boost to help here?
That's an interesting question. numeric_cast function was designed to detect positive and negative overflows, not precision loss.
Robert Ramey's "Safe Numerics" is designed to allow the cast to proceed when no precision is lost and do something else when precision is lost. http://rrsd.com/blincubator.com/bi_library/safe-numerics/?gform_post_id=426 -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com