Boost logo

Boost Users :

Subject: Re: [Boost-users] [range] discrepancy between size and vector ::size
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-12-07 10:17:22


Den 06-12-2011 21:40, giecrilj_at_[hidden] skrev:
> The following code gives me a warning:
>
> void trigger (::std ::vector< int> const&v)
> { ::boost ::size (v) == v. size (); }
>
> and the warning is "signed and unsigned in comparison".
>
> I understand that (size == end - begin)
> and that the latter expression is a difference;
> however, isn't the difference guaranteed to be positive?

We are in the process of fixing it.

-Thorsten


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net