Instantly share code, notes, and snippets.

Embed
What would you like to do?
Range loops - Writing safe
//Also bad code. Don't try at home.
for(auto it = msgs.cbegin()+1; it != msgs.cend()-1; it++) {
PublishMessage(*it);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment