[Development] QTextStream::readLine(0) is an ambiguous overload in 5.5

Al-Khanji Louai louai.al-khanji at theqtcompany.com
Mon May 18 12:54:46 CEST 2015


> -----Original Message-----
> From: development-bounces+louai.al-khanji=theqtcompany.com at qt-
> project.org [mailto:development-bounces+louai.al-
> khanji=theqtcompany.com at qt-project.org] On Behalf Of Marc Mutz
> Sent: Monday, May 18, 2015 2:47 PM
> To: development at qt-project.org
> Subject: Re: [Development] QTextStream::readLine(0) is an ambiguous
> overload in 5.5
> 
> On Monday 18 May 2015 12:17:32 Koehne Kai wrote:
> > Can you elaborate? We're talking about in/out parameters here, where
> > raw pointers IMO are still perfectly valid. What do you expect the
> > signature  of readLine(QString *line) to be in C++14?
> 
> QString readLine(QString &&reuseThisStringsCapacity);
> 
> --
> Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
> KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
> Tel: +49-30-521325470
> KDAB - The Qt Experts
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development


Ooh, a bike shed thread! I vote that we implement N4282 and make the function signature

bool readLine(std::observer_ptr<QString>, qint64);

This is obviously better since we now can report failures *AND* make object lifetimes explicit!

</snark>

:)

Louai




More information about the Development mailing list