[Interest] Q_FOREACH creating copy , was (no subject)
pr12og2 at programist.ru
Tue Jun 30 21:55:45 CEST 2015
> Adding a new macro is overruled. Either you modify foreach to work like you
> want or we leave things as is.
Giuseppe D'Angelo is not happy with possibility of foreach change ... you are not happy with adding another macro ... it's a wonderful wonderful world :)
So there is persons agains each of possibilities ... nice.
> I've already asked you to make that modification and run some Qt applications
> to see what breaks.
OK ... I will do. Any ideas what app can be a good test?
>> In case the idea of adding of "const ref to the container" loop will be
>> rejected by community I am aware only about necessity for everybody to know
>> that people may add their own for loop so that code completion feature of
>> QtCreator will not use any hardcoded names like "foreach" and thus work for
>> other for-loops as well.
> I didn't understand this last paragraph.
I mean that I suggest to have "const ref to container" loop for goodness of all. If this will be rejected by responsible persons ... it does not hurt me.
I would have problems if developers of QtCreator will design code completion feature so that it will use some special knowledge about what is foreach
and as the result code completion would work for foreach and will not work for "forevery".
So at least I wish that someone will tell loudly in meeting (I do now know when this happens but I guess people must coordinate their work somehow) that
even if we decided to not change anything with qt's foreach loops others are using their own modification of foreach and code completion should work for others for-loops too.
More information about the Interest