[Interest] Q_FOREACH creating copy , was (no subject)

Giuseppe D'Angelo dangelog at gmail.com
Tue Jun 30 20:17:04 CEST 2015


On Tue, Jun 30, 2015 at 7:16 PM, Thiago Macieira
<thiago.macieira at intel.com> wrote:
> On Tuesday 30 June 2015 18:35:43 Prav wrote:
>> If in definition of QForeachContainer class we add just ONE
>> symbol "&" before "с" in line const T c;
>> and get
>>     const T &c;
>> we will end up with this loop which will be same "work to write" as current
>> foreach. So easy to do :)
>
> I've already asked you to make that modification and run some Qt applications
> to see what breaks.

Is the exercise just rhetorical? Such a change would never be accepted
in Qt anyhow...

-- 
Giuseppe D'Angelo



More information about the Interest mailing list