On Wed, May 22, 2019 at 09:02:13PM +0300, Konstantin Tokarev wrote:
> 
> 
> 22.05.2019, 20:55, "André Pönitz" <[email protected]>:
> > On Wed, May 22, 2019 at 07:41:42PM +0300, Konstantin Tokarev wrote:
> >>  22.05.2019, 19:38, "Philippe" <[email protected]>:
> >>  >>  People tend to use QList as a deque because of the fast prepend/take 
> >> first
> >>  >
> >>  > Simply, QArrayList should not be deprecated.
> >>  > It is also useful to store large objects that needs to be sorted.
> >>
> >>  In the latter QList can be replaced with std::vector<std::unique_ptr<T>>
> >>  or QVector<std::unique_ptr<T>>
> >
> > At the price of user code uglification.
> 
> template<class T>
> using UniquePtrVector = std::vector<std::unique_ptr<T>>;

Leaves you with '->' vs '.' on things that effectively value semantics.

And you can't overload '.' to 'fix' this.

Andre'
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to