On Friday 15 May 2015 10:42:54 Matthew Woehlke wrote: > > for (auto x : function(function2())) > > > > > > > > If function returns a temporary and function passes through a reference, > > [...] > Er... wait. My bad. Does it resolve the issue if 'Container const& c;' > in qtEnumerator is changed to be a copy (i.e. remove the '&') rather > than a reference? (I was thinking it was a copy when I wrote the above, > and, given that this is likely only going to be used on Qt containers, > it probably ought to be a copy.)
If you copy the container into the wrapper, yes, it should work. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
