#define foreach(t, o, i) for(t::iterator (i)=(o).begin();(i)!=(o).end();++(i))
な感じのマクロの場合、それを使うと方を渡さなくて良くなりますか?