[Development] The future of smart pointers in Qt API

André Pönitz apoenitz at t-online.de
Sun Feb 2 22:45:41 CET 2020


On Sun, Feb 02, 2020 at 07:55:09PM +0100, Giuseppe D'Angelo via Development wrote:
> On 02/02/2020 17:38, Alberto Mardegan wrote:
> > On 01/02/20 15:32, Giuseppe D'Angelo via Development wrote:
> > > Il 01/02/20 12:37, Alberto Mardegan ha scritto:
> > > > Do we need to have such a counterpart? In my work experience, when I'm
> > > > not allowed to use Qt and am restricted to the STL, all the times I had
> > > > to use std::unique_ptr was to get the same behaviour as a QScopedPointer.
> > > 
> > > So you never had to pass one to a function, return one from a function,
> > > create a vector of them? Color me *very* suspicious.
> > 
> > Believe it or not :-) I find std::shared_ptr easier to use when passing
> > pointers to and from functions. And I never needed to put them into an
> > array.
> 
> This is a logical fallacy; "I don't need it, noone else does".

But this is the argument the de-Qt-ers use when it comes to Qt convenience
they don't need.

Andre'


More information about the Development mailing list