void apply(Cont1& c, PtrMemFun1 f) { typename Cont1::iterator it = c.begin(); while(it != c.end()) { //(it->*f)(); // Compact form ((*it).*f)(); // Alternate form it++; } }
void assert_contents(const Cont1 &c1, const Cont2 &c2) { return assert_range(c1.begin(), c1.end(), c2.begin(), c2.end()); }
void CopyContainer(Cont1& cont1, Cont2& cont2) { std::copy(cont1.begin(), cont1.end(), std::back_inserter(cont2)); }