Subject: [Boost-bugs] [Boost C++ Libraries] #8850: Patch for spurious warning at boost/accumulators/statistics/p_square_quantile.hpp(72)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-18 16:54:53
#8850: Patch for spurious warning at
boost/accumulators/statistics/p_square_quantile.hpp(72)
-------------------------------------------------+-------------------------
Reporter: Gareth Sylvester-Bradley <gareth | Owner:
.sylvester-bradley@â¦> | eric_niebler
Type: Patches | Status: new
Milestone: To Be Determined | Component: accumulator
Version: Boost 1.54.0 | Severity: Problem
Keywords: |
-------------------------------------------------+-------------------------
When building with Visual Studio 2012 (msvc-11.0), 64-bit, I got a '''27
kB''' warning message at the head of which was:
{{{
boost/accumulators/statistics/p_square_quantile.hpp(72): warning C4244:
'=' : conversion from 'size_t' to 'double', possible loss of data
}}}
The offending line 72 and a possible one-character patch would seem to be:
{{{
- this->actual_positions[i] = i + 1;
+ this->actual_positions[i] = i + 1.;
}}}
A code snippet that demonstrates the warning:
{{{
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/median.hpp>
boost::accumulators::accumulator_set< double, boost::accumulators::stats<
boost::accumulators::tag::median > > median_accumulator;
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8850> 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