[Development] QUIP 6: removing top-level const from return types

Ville Voutilainen ville.voutilainen at gmail.com
Tue May 23 10:44:11 CEST 2017


On 23 May 2017 at 11:39, Marc Mutz <marc.mutz at kdab.com> wrote:
> On Tuesday 23 May 2017 08:36:00 Lars Knoll wrote:
>>  (a detach happening on Linux, but not on MSVC)
>
> Don't fall for FUD.
>
> QPixmap does not have functions that are overloaded on const/non-const.
> Neither does QRegion. Well, except for the special member functions, which is
> the whole point of the exercise. And for QStringBuilder, the change enabled
> calling the rvalue overload of toXyz() functions in the first place, which re-
> use storage, saving an allocation.
>
> To summarize: there is no negative impact of any of these changes. And if MSVC
> does something stupid, it deserves to continue to be pessimised.


Maybe, but I have some questions: the review for removing top-level consts from
QRegion says "It has no effect and inhibits move semantics." How does it inhibit
move semantics? How is this even a SiC? What _positive_ impact do these changes
have?



More information about the Development mailing list