T
Teddy.Gammell
Hi,
I would like to write a function which does this:
for each element in the list
call f1() of each element.
if f1() return false, break the loop
else continue
I try to use the for_each() algorithm, but it does not let me stop the
loop conditionally (in my case, the return value of the functor I pass
in).
I check transform() also, but that does not work out.
Is there any STL algorithm that i can use? If yes, please advice.
Thank you.
I would like to write a function which does this:
for each element in the list
call f1() of each element.
if f1() return false, break the loop
else continue
I try to use the for_each() algorithm, but it does not let me stop the
loop conditionally (in my case, the return value of the functor I pass
in).
I check transform() also, but that does not work out.
Is there any STL algorithm that i can use? If yes, please advice.
Thank you.