[Development] Proposal: Deprecating platforms in Qt 5.6 that don't support lambda

Thiago Macieira thiago.macieira at intel.com
Thu Feb 19 20:28:59 CET 2015


On Thursday 19 February 2015 17:46:01 Giuseppe D'Angelo wrote:
> On 19 February 2015 at 17:26, Thiago Macieira <thiago.macieira at intel.com> 
wrote:
> > Sounds like the intended behaviour to me. What's wrong with this picture?
> 
> That on a non-const shared container
> 
> for (auto i : container)
> 
> will detach it. That's why having rules instead of saying "just use
> it", I guess...

And who says it's not what you wanted?

for (auto &i : container) {
	if (i.startsWith("foo"))
		i = bar;
}

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list