[Cs3] issues with atc code on lecture today

Mikhail Nesterenko mnestere at kent.edu
Tue Nov 12 13:36:22 EST 2024


I rememberd why find_if() has to start from the beginning of the
container in this lind of code we tried to modify during the lecture today:

      (*toProceed) -> proceed();
      toProceed = std::find_if(waiting_.begin(), waiting_.end(), findCleared);

proceed() takes the flight out of the container which modifies it. So
either we have to do some form of loop-modification idiom or just
search from the beginning.

Thanks,
-- 
Mikhail


More information about the cs3 mailing list