33 #include <boost/lexical_cast.hpp> 48 using boost::lexical_cast;
51 using IntSet = std::set<uint>;
54 show (IntSet
const& coll)
62 select_match (
string description)
64 return [&](uint candidate)
66 return string::npos != description.find( lexical_cast<string> (candidate));
97 for (
int i=0; i<10; ++i)
102 cout <<
"removed " << elems_to_remove <<
" ---> ";
Simple test class runner.
void test_remove(string elems_to_remove)
void for_each(CON const &elements, FUN function, P1 &&bind1, ARGS &&...args)
Accept binding for arbitrary function arguments.
bool remove_if(SET &set, FUN test)
remove all elements fulfilling a given predicate from a (sorted) set.
Perform operations "for each element" of a collection.