Um -- I'm under the impression that decrementing the iterator returned by end() is discouraged. There are containers for which that definitely would not work.
I'm guessing that he would recommend something like other->geneVect.rbegin().base() instead -- presuming you've already ensured that other->geneVect isn't empty.
Nat, you would be half right only if GeneVectType::iterator were a forward_iterator, but a ptr_sequence_adapter is always reversible, so the iterator must be bidirectional. Internally, the boost::reverse_iterator you propose also has to decrement, so it doesn't work any better. Additionally, your proposed solution crashes because other->geneVect.rbegin().base() returns in fact other->geneVect.end(). Only *other->geneVect.rbegin() returns *(other->geneVect.end()-1). Regards Sebastian -- Sebastian Theophil . stheophil@think-cell.com Software Engineer think-cell Software GmbH . Invalidenstr. 34 . 10115 Berlin, Germany http://www.think-cell.com . phone +49-30-666473-10 . toll-free (US) +1-800-891-8091 Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl . Amtsgericht Berlin-Charlottenburg, HRB 85229