I want sort of a hybrid between these two. I want an iterator where *
operator can both read from and write to elements in the collection,
intelligently calling push_back if necessary in order to write without
going out of bounds.
Is something like this possible? I have something I whipped together
that seems to work with the test cases I've given it, but I'm not 100%
confident that it's bulletproof since it's been quite some time since
I was heavily involved with STL. Can post it if necessary, but
chances are this has been tried before and I'll either get a "yes,
look here for code" or "no don't even bother".
Thanks