Subject: [Boost-bugs] [Boost C++ Libraries] #12252: numeric_cast<int64_t>(pow(2.0, 63.0)) doesn't throw
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-06-06 19:11:33
#12252: numeric_cast<int64_t>(pow(2.0, 63.0)) doesn't throw
------------------------------+---------------------
Reporter: wellnhofer@⦠| Owner: dgregor
Type: Bugs | Status: new
Milestone: To Be Determined | Component: numeric
Version: Boost 1.58.0 | Severity: Problem
Keywords: |
------------------------------+---------------------
The following code produces an overflow but doesn't throw:
{{{
int64_t v = numeric_cast<int64_t>(pow(2.0, 63.0));
}}}
For an explanation, see [http://stackoverflow.com/a/30424410/1956010]
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12252> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC