#ifndef UTIL_H_E9110D4C #define UTIL_H_E9110D4C template void erase_if(Container& items, const Predicate& predicate) { for (auto it = std::begin(items); it != std::end(items);) { if (predicate(*it)) { it = items.erase(it); } else { ++it; } } }; #endif /* end of include guard: UTIL_H_E9110D4C */