DEV Community

Discussion on: Loops are bad, algorithms are good! Aren't they?

Collapse
 
matawed profile image
matawed

Good read! However, shouldn’t it be

bool isIncluded = (foundPosition != collection.end());

See cppreference for details.

Collapse
 
sandordargo profile image
Sandor Dargo

Of course, it should! Updated, thanks for pointing it out!