[Development] Making QScopedPointer scoped (again)

Stephen Kelly stephen.kelly at kdab.com
Tue Sep 3 11:44:58 CEST 2013


On Tuesday, September 03, 2013 11:39:58 Simon Hausmann wrote:
> > Adding a move contructor to QScopedPointer makes no sense, because moving
> > means 'escaping the scope', which breaks the fundamental point of
> > QScopedPointer. QScopedPointer is different to std::unique_ptr and should
> > remain so.
> 
> The only argument I can see in your email that explains _why_ this feature 
> shouldn't be added to QScopedPointer is NIH.
> 
> What is the price of NIH here? Compared to the value we're adding at the
> same  time to developers who are not able to rely on C++11 yet?

Em, what?

I suppose you didn't read the patch. Am I correct?

The patch *only* has an effect for people using C++11, where it is redundant 
because of std::unique_ptr. 

The original patch only tries to make QScopedPointer something it's not.

Thanks,

-- 
Join us in October at Qt Developer Days 2013 - https://devdays.kdab.com

Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130903/8815c8c7/attachment.sig>


More information about the Development mailing list