Lambda wrote:
Hi, All,
Why the search() function use Forward Iterator?
I think Input Iterator is enough, I need read only.
So that an implementation can use a multipass search algorithm on a
container. Input Iterators will "lose" the previous position
completely once the position is advanced (think I/O input streams),
but you can have two separate instances of a Forward Iterator, with
one delayed from the other (think vectors).
>
In such kind of situations, how should I choose iterator type?
//if you need read only, otherwise use ::iterator
typename std::insert_standard_container_type_here::const_it erator
iter;