Is it possible for me to set an ending istream_iterator
other than the default constructed one?
One use case would be initializing a vector<int>
with the first 13 elements from an istream_iterator<int>
: vector<int>{ istream_iterator<int>(cin), x)
where x
is an iterator that is exactly 13 elements away from istream_iterator<int>(cin)
.