|
Boost Users : |
Subject: [Boost-users] [range] discrepancy between size and vector ::size
From: giecrilj_at_[hidden]
Date: 2011-12-06 15:40:55
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?
Also note that no range function ever uses range_size ::type.
I suggest that ::boost ::size should return range_size ::type.
Chris
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