[C++-sig] type comparison in indexing_suite_detail.hpp
Joel
joel at boost-consulting.com
Thu Sep 23 03:27:20 CEST 2004
Andreas Beyer wrote:
> Hi,
>
> I am using boost_python from the CVS-server (today, Sep. 22, 2004) with
> MinGW on WindowsXP.
>
> When compiling the example for the vector_indexing_suite I get the
> following two warnings:
>
[...]
>
> The follwoing code piece from indexing_suite_detail.hpp causes the
> trouble (from function base_get_slice_data()):
[...]
>
> In the two indicated lines values of type 'Index' (which is unsigned)
> are compared to long. We know at that point, that 'from' and 'to' are
> not negative. So I suggest to change the order of the cast and of the
> comparison to 'max_index' as follows:
>
[...]
>
> This seems to work fine.
Hi Andreas,
I think the patch looks good. However, I suggest we apply the patch
after boost 1.32 is released to avoid unwanted disruptions (there's
no such thing as an "innocuous" fix ;-). Please remind me again, ok?
Thanks!
--
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net
More information about the Cplusplus-sig
mailing list