
10 Apr
2013
10 Apr
'13
10:08 a.m.
I know this has come up before, so I'm really seeking to discover the current situation. boost::size( std::list<...> ) fails because the implementation of size is end - begin. I know I could use distance, but am surprised size(list) doesn't work out of the box. * So, is it correct that size(list) doesn't work? * Does distance(begin, end) specialise for random access iterators to O(n) performance? * Why doesn't size similarly specialise? Thx, Rob.