Opened 10 years ago

Closed 10 years ago

#7989 closed Bugs (fixed)

[string_algo] find_iterator broken in 1.53?

Reported by: gast128@… 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 Marshall Clow, 10 years ago

(In [82788]) Make find_iterator work with forward iterators; refs #7989

comment:2 by gast128@…, 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:3 by Marshall Clow, 10 years ago

Milestone: To Be DeterminedBoost 1.54.0

No they should work as well

comment:4 by Marshall Clow, 10 years ago

Resolution: fixed
Status: newclosed

(In [83193]) Merge bug fix to release; Fixes #7989

Note: See TracTickets for help on using tickets.