Skip to content

Instantly share code, notes, and snippets.

@mvirkkunen
Created June 14, 2014 13:48
Show Gist options
  • Save mvirkkunen/985d0495873325d56f14 to your computer and use it in GitHub Desktop.
Save mvirkkunen/985d0495873325d56f14 to your computer and use it in GitHub Desktop.
Damn it C++
recent_msgs.erase(
std::remove_if(
recent_msgs.begin(),
recent_msgs.end(),
[&queue](line::Message &rm) {
auto r = find_if(
queue->begin(),
queue->end(),
[&rm](line::Message &qm) { return qm.id == rm.id; });
return (r != queue->end());
}),
recent_msgs.end());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment