Skip to content

Instantly share code, notes, and snippets.

@sansumbrella
sansumbrella / remove_if.cpp
Created November 26, 2012 15:21 — forked from cporter/remove_if.cpp
remove_if and vector
// -*- compile-command: "clang++ -std=gnu++0x -stdlib=libc++ -o remove_if remove_if.cpp" -*-
#include <iostream>
#include <vector>
using std::cout;
using std::endl;
int main (int, char **) {
std::vector<int> ints = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
cout << "Range-based for loop:" << endl;