示例#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++;
	}
}
示例#2
0
文件: test.hpp 项目: an146/cpp11-list
void assert_contents(const Cont1 &c1, const Cont2 &c2)
{ return assert_range(c1.begin(), c1.end(), c2.begin(), c2.end()); }
示例#3
0
void CopyContainer(Cont1& cont1, Cont2& cont2)
{
    std::copy(cont1.begin(), cont1.end(), std::back_inserter(cont2));
}