
14 Jun
2005
14 Jun
'05
7:31 p.m.
"Alexey Bakhvalov" <bakhvalov@gmail.com> wrote in message news:d8l314$p0h$1@sea.gmane.org... | Btw, I get similar error if I try to subtract iterator from const_iterator | (or vice versa). | Example: | | typedef boost::ptr_vector<char> TContainer; | TContainer some_vector; | TContainer::const_iterator it1 = some_vector.begin(); | TContainer::iterator it2 = some_vector.begin(); | size_t diff = it1 - it2; | | It seems that there is a problem with all binary operators that take | iterators as operands. ah yes. I haven't got time to look in the standard, but must iterator and const_iterator be completely interchangable? -Thorsten