[Development] The future of smart pointers in Qt API
Allan Sandfeld Jensen
kde at carewolf.com
Sat Feb 1 09:27:37 CET 2020
On Samstag, 1. Februar 2020 00:31:17 CET Giuseppe D'Angelo wrote:
> On 31/01/2020 23:47, Allan Sandfeld Jensen wrote:
> >> The question stays: how do we call a unique_ptr equivalent?
> >
> > QScopedPointer? ;)
>
> That name was precisely the reason why the idea of adding movability was
> shot down. I know something about it: I proposed that some 6 years ago!
>
To me the name is still perfect. It makes perfect sense. Just because it is
movable doesn't mean you move the object itself, a move moves the content of
the object. So each move triggers a move of the payload of a scoped pointer to
another scoped pointer in another scope.
I never understood why anyone would think the name would make that impossible.
'Allan
More information about the Development
mailing list