[Please do not mail me a copy of your followup] Antony Polukhin <antoshkka@gmail.com> spake the secret code <CAKqmYPa8aHVeYYB7ZwyLTO7twjnJ_XoohcZ3TXC4eng9pkQ=uA@mail.gmail.com> thusly:
2014-09-08 17:53 GMT+04:00 <dariomt@gmail.com>:
[...] 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>