Example #1
0
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++;
	}
}
Example #2
0
void assert_contents(const Cont1 &c1, const Cont2 &c2)
{ return assert_range(c1.begin(), c1.end(), c2.begin(), c2.end()); }
Example #3
0
void CopyContainer(Cont1& cont1, Cont2& cont2)
{
    std::copy(cont1.begin(), cont1.end(), std::back_inserter(cont2));
}