dimanche 25 décembre 2016

Put c++ iterator into queue

Is there any problem to put c++ iterator into queue? For example:

vector<vector<int>> vecs;
queue<pair<vector<int>::iterator, vector<int>::iterator>> mq;
for (auto &e : vecs)
{
    mq.push(make_pair(e.begin(), e.end()));
}

Aucun commentaire:

Enregistrer un commentaire