On Wednesday 25 April 2012 14:40:27 [email protected] wrote: > On 4/25/12 3:11 PM, "ext Olivier Goffart" <[email protected]> wrote: > >On Wednesday 25 April 2012 13:47:35 Thiago Macieira wrote: > >> However, I agree with you: it's too late to change it everywhere. > >> > >>Unless we > >> > >> do it properly, it also has the potential to make things worse. I'd > >> > >>like to > >> > >> ask you to find out where this is most important and do it now. > > > >My point was to make it the default policy for new setters rather then > >changing existing code at this point. > > One problem I see here is that this does to some extent make assumptions > about the implementation of the getter. If we happen to have a need to > change the implementation, the whole point of passing by value might > suddenly become moot. > > In addition it moves the code required for making the copy for the cases > where the compiler can't optimize it away to the caller, ie. from a shared > to a non shared location. This can increase the total size of the code > generated. > > So I'm absolutely not sure changing our policy is a good idea here. You > might be optimizing one case and make many others worse.
That's right. Let us ignore this, and keep it as before then :-) _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
