On 2017-04-20 13:18, Sergio Martins wrote:
> On 2017-04-20 18:06, Matthew Woehlke wrote:
>>   for (auto i : qtEnumerate(my_hash))
>>     do_stuff(i.key(), i.value());
> 
> That doesn't work with temporaries, does it ?

No. Neither does std::add_const / qAsConst.

> Maybe something to fix in the C++ language, since the usual
> lifetime-extension tricks don't help in this case.

There has been talk, but TTBOMK no concrete proposals yet. (IIRC the
`register` proposal was published but the author decided not to present
it yet.)

-- 
Matthew
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to