[Development] r-value references in API (was: RFC: Proposal for a semi-radical change in Qt APIs taking strings)

Koehne Kai Kai.Koehne at theqtcompany.com
Thu Oct 15 09:34:30 CEST 2015


> -----Original Message-----
> [...]
> >BTW: functions storing a passed QString as-is should provide a
> >QString&& overload, and that might be a good idea even when otherwise
> >using QStringView only.
> 
> Yes, agree with this.

I guess this advice is not only for QString arguments though (from 5.7 onwards). Which other types should get an && overload?

Does API exposed via Q_PROPERTY/ QML benefit from an r-value reference overloads, too?

I think it's a good idea to create some recommendations for 5.7 now, before everyone develops his own rules ...

Kai


More information about the Development mailing list