Opened 10 years ago
Closed 10 years ago
#7989 closed Bugs (fixed)
[string_algo] find_iterator broken in 1.53?
Reported by: | Owned by: | Marshall Clow | |
---|---|---|---|
Milestone: | Boost 1.54.0 | Component: | string_algo |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The find_iterator uses in its increment function the plus operator. This compiles for random access iterators but not for iterators with less capabilities, e.g.:
std::list<char> lst; std::vector<char> vec; std::string str;
ok boost::make_find_iterator(str, boost::first_finder(str));
ok boost::make_find_iterator(vec, boost::first_finder(str));
not ok boost::make_find_iterator(lst, boost::first_finder(str));
Change History (4)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
I was actually using the find_iterator on a file with a std::istream_iterator which is -I think- an input iterator. Those are ruled out then?
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [82788]) Make find_iterator work with forward iterators; refs #7989