id summary reporter owner description type status milestone component version severity resolution keywords cc 11739 operator / for point2 is hard coded to operate on type double c.d.glover@… Stefan Seefeld "When using boost::gil::point2, applying a division operation results in a point2. This is undesirable. The fix appears to be easy, change this code {{{ template BOOST_FORCEINLINE point2 operator/(const point2& p, double t) { return t==0 ? point2(0,0):point2(p.x/t,p.y/t); } }}} to operate on T instead of double. But, that seems overly simple so I am trying to figure out why this code was written this way in the first place. A possibly safer alternative is to cast the result back to point2, ie; {{{ template BOOST_FORCEINLINE point2 operator/(const point2& p, double t) { return t==0 ? point2(0,0):point2(T(p.x/t),T(p.y/t)); } }}} This change makes the / operator act the same as the /= operator, which is also hard coded to double, but because it's a member, doesn't yield a new type, so it's probably fine (other than the fact that I asked for floats and am getting double operations). While we're at it, I also find it weird that this code is protecting against division by zero, but that's a different problem. " Bugs closed To Be Determined gil USE GITHUB Boost 1.59.0 Problem duplicate mateusz@…