Subject: [Boost-bugs] [Boost C++ Libraries] #8779: normal_distribution<float> warnings about narrowing conversions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-04 17:55:45
#8779: normal_distribution<float> warnings about narrowing conversions
-------------------------------------+-----------------------------
Reporter: eric_niebler | Owner: steven_watanabe
Type: Bugs | Status: new
Milestone: To Be Determined | Component: random
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+-----------------------------
msvc-11 and other compilers complain about the following in
normal_distribution.hpp when `normal_distribution<>` is instantiated with
`float`:
{{{
template<class Engine>
RealType generate_tail(Engine& eng) {
boost::random::exponential_distribution<RealType> exponential;
const RealType tail_start(normal_table<double>::table_x[1]);
}}}
The last line is, indeed, a narrowing conversion. Would be great if you
could add a cast to silence this noisy warning.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8779> 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:13 UTC