Re: [Boost-bugs] [Boost C++ Libraries] #8129: Conversion warning in hashed_index.hpp

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8129: Conversion warning in hashed_index.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-21 08:26:51


#8129: Conversion warning in hashed_index.hpp
--------------------------------------+-------------------------------------
  Reporter: mbradle@… | Owner: joaquin
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: multi_index
   Version: Boost Development Trunk | Severity: Cosmetic
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment (by mbradle@…):

 Replying to [comment:2 joaquin]:

> Actually, your proposed patch is not entirely correct: `n` should be
 promoted to a floating point type, not `mlf` to integral. Please try the
 following:
> {{{
> float fbc=static_cast<float>(1+static_cast<double>(n)/mlf);
> }}}
> If this clears the warning I'll commit the change to the repository.
 Thank you.

 Hi,

 Yes, this does clear the warning, and I do see that `n` should be
 promoted, not `mlf`. Thanks, and best wishes.

 Brad

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8129#comment:3>
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:12 UTC