
Hi list, I'm using boost 1.49 and get an annoying number of signed/unsigned comparison warnings when i use boost::size. Which is because the return type seems to be signed When I look at boost/range/size.hpp, i get template<class SinglePassRange> inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange>::type <--signed size(const SinglePassRange& rng) But the documentation for random access ranges tells otherwise: Expression: boost::size(a) Return Type: boost::range_size<X>::type and Forward Range defines range_size as: boost::range_size<X>::type An unsigned integral type that can represent any nonnegative value of the Range's distance type. assuming the documentation does not lie, I propose the following fix template<class SinglePassRange> inline BOOST_DEDUCED_TYPENAME range_size<SinglePassRange>::type size(const SinglePassRange& rng) Greetings, Oswin