[Boost-bugs] [Boost C++ Libraries] #13374: Boykov Kolmogorov warning with float

Subject: [Boost-bugs] [Boost C++ Libraries] #13374: Boykov Kolmogorov warning with float
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-03 11:22:25


#13374: Boykov Kolmogorov warning with float
------------------------------+-------------------------------
 Reporter: cyril.novel@… | Owner: Jeremiah Willcock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: graph
  Version: Boost 1.63.0 | Severity: Problem
 Keywords: |
------------------------------+-------------------------------
 In boykov_kolmogorov_max_flow.hpp, some values put in property_map are
 integer :

 {{{
 l.176 put(m_res_cap_map, from_source, 0);
 l.190 put(m_dist_map, current_node, 1);
 l.196 put(m_res_cap_map, to_sink, 0);
 l.202 put(m_dist_map, current_node, 1);
 l.208 put(m_res_cap_map, from_source, 0);
 l.217 put(m_dist_map, current_node, 1);
 l.228 put(m_dist_map, current_node, 1);
 }}}

 It causes a C4244 warning in property_map/property_map.hpp (l.310) when
 using floating distance and floating cost. An easy way to prevent this is
 to patch as follow:

 {{{
 l.176 put(m_res_cap_map, from_source, tEdgeVal(0));
 l.190 put(m_dist_map, current_node, tDistanceVal(1));
 l.196 put(m_res_cap_map, to_sink, tEdgeVal(0));
 l.202 put(m_dist_map, current_node, tDistanceVal(1));
 l.208 put(m_res_cap_map, from_source, 0);
 l.217 put(m_dist_map, current_node, tDistanceVal(1));
 l.228 put(m_dist_map, current_node, tDistanceVal(1));
 }}}

 Compiler: VS2017

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13374>
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 : 2018-01-03 11:27:41 UTC