vendredi 4 mars 2016

How to iterate an unordered_set from the end to the begin

I want to iterate an unordered_set from the end to the begin:

unordered_set<Expression*> BlocExpressions;

for(auto it=BlocExpressions.end(); it != BlocExpressions.begin(); it--){   

                //do some work

            }

But there is no operator -- declared.

So, should I code the -- operator, or is there a way to do that?

Aucun commentaire:

Enregistrer un commentaire