template<class Tarray>
void hoge(Tarray& foo)
{
 typename Tarray::iterator it = foo.begin();
 for (; it != foo.end(); ++it) {
 }
}

こう汁