I'm writing a special iterator class that works like std::istream_iterator
and many others by using a default-constructed instance to mark end of iteration. I want to give it the bidirectional iterator category. After running the following code:
MyIterType i_cur(get_some_iter()), i_end;
while(i_cur != i_end) ++i_cur;
do the standard requirements for bidirectional iterators impose the following to be valid?
--i_cur
++i_cur
--i_end
or++i_end
Thank you for quoting the standard if possible. I compile in C++03, but if C++11 introduces changes, I'm also interested to know them.