Exemple #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++;
	}
}
Exemple #2
0
void transfer_test( Cont1& from, Cont2& to )
{
    BOOST_MESSAGE( "starting container transfer test" );
    BOOST_CHECK( !from.empty() );
    to. BOOST_NESTED_TEMPLATE transfer<Cont1>( from );
    BOOST_CHECK( !to.empty() );
    BOOST_MESSAGE( "finishing container transfer test" );
}
Exemple #3
0
void assert_contents(const Cont1 &c1, const Cont2 &c2)
{ return assert_range(c1.begin(), c1.end(), c2.begin(), c2.end()); }
Exemple #4
0
void CopyContainer(Cont1& cont1, Cont2& cont2)
{
    std::copy(cont1.begin(), cont1.end(), std::back_inserter(cont2));
}