[boost-users] converting InputIterator to ForwardIterator

11 Mar
2009
11 Mar
'09
4:45 p.m.
Hello, I'd like to do the subj, in order to be able to apply some std algorithms to files, like this: ifstream file("myfile", std::ios::binary|std::ios::in); std::string delim("\r\n\r\n"); // sequence to search typedef std::istreambuf_iterator<char> iterator; iterator begin(file), end; iterator pos = std::find_end(begin, end, delim.begin(), delim.end()); // won't work, because istreambuf_iterator is *not* ForwardIterator I found something called multi_pass in boost::spirit. However, I'm not sure if it's relevant or deprecated class (it seems to be a part of the "old" Spirit), and whether this's the only Boost utility I can use to perform the above conversion. Thanks.
5884
Age (days ago)
5884
Last active (days ago)
0 comments
1 participants
participants (1)
-
Igor R