I am trying to create an extension of class istream_iterator that saves the input stream position before each read. How should I implement the constructor so that it can catch the stream position at the time the constructor was called? Because it is a subclass of istream_iterator, the constructor constructs the base class first; but after the base class has been constructed, the stream position will have changed (this is how istream_iterator works). Short of reimplementing istream_iterator (which is probably the best option because the istream_iterator does not let me ask its underlying stream for its current position, meaning that I need to keep another reference to the same input stream), what are my options here?