[Development] Making QScopedPointer scoped (again)

Olivier Goffart olivier at woboq.com
Thu Sep 5 07:55:31 CEST 2013


On Wednesday 04 September 2013 18:45:45 Alexandr Akulich wrote:
> Hi all.
> 
> Im totally agree with Stephen, because such change definitely complicate
> source reading.
> When one read "ScopedPointer", then one naturally expect that stored object
> will be deleted.

Except it is not.
If someone does
 scopedPoiner.take();
the "expectation" is already broken.

The can of worm was already open.  And adding the move operator do not change 
the readability of the code in any way.

-- 
Olivier

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org




More information about the Development mailing list