comparing two end() iterators
Posted
by aafoo
on Stack Overflow
See other posts from Stack Overflow
or by aafoo
Published on 2010-03-31T01:57:25Z
Indexed on
2010/03/31
2:03 UTC
Read the original article
Hit count: 222
list<int> foo;
list<int> foo2;
list<int>::iterator foo_end = foo.end();
list<int>::iterator foo2_end = foo2.end();
for (list<int>::iterator it = foo.begin(); it != foo2_end; ++foo) <- notice != comparison here
{
...
it this allowed? will it work correctly.
I am inclined to think that this is implementation dependent, anyone knows if standard says anything about this?
© Stack Overflow or respective owner