Ticket #10098: sign_mismatch.patch

File sign_mismatch.patch, 1.5 KB (added by Joseph Southwell <joseph@…>, 8 years ago)

patch with one way to fix this warning.

  • include/boost/range/iterator_range_core.hpp

    diff --git a/include/boost/range/iterator_range_core.hpp b/include/boost/range/iterator_range_core.hpp
    index cefabd4..08e5b73 100644
    a b protected:  
    336336public:
    337337    reference operator[](difference_type at) const
    338338    {
    339         BOOST_ASSERT(at >= 0 && at < size());
     339       BOOST_ASSERT(at >= 0 && ((size_type)at) < size());
    340340        return this->m_Begin[at];
    341341    }
    342342
    public:  
    347347    //
    348348    abstract_value_type operator()(difference_type at) const
    349349    {
    350         BOOST_ASSERT(at >= 0 && at < size());
     350       BOOST_ASSERT(at >= 0 && ((size_type)at) < size());
    351351        return this->m_Begin[at];
    352352    }
    353353