Subject: [Boost-bugs] [Boost C++ Libraries] #5729: Missing static_cast in fpt_limits
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-21 16:18:00
#5729: Missing static_cast in fpt_limits
--------------------------------------------------------+-------------------
Reporter: pbristow | Owner: rogeeff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
Version: Boost Development Trunk | Severity: Problem
Keywords: test static_cast floating_point comparison |
--------------------------------------------------------+-------------------
Using Boost.Test with e_float (in sandbox, which requires always explicit
conversion) reveals that a static_cast is missing in struct fpt_limits in
floating_point_comparison:
static FPT min_value()
{
return std::numeric_limits<FPT>::is_specialized
? (std::numeric_limits<FPT>::min)()
: 0;
}
should use
static FPT min_value()
{
return std::numeric_limits<FPT>::is_specialized
? (std::numeric_limits<FPT>::min)()
: static_cast<FPT>(0);
}
Oh and there are some tabs :-(
Compiles and seem to work OK with this change.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5729> 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:07 UTC