On quinta-feira, 4 de julho de 2013 22.11.40, Mark wrote:
> On Thu, Jul 4, 2013 at 10:02 PM, Giuseppe D'Angelo <dange...@gmail.com> 
wrote:
> > On 4 July 2013 21:50, Mark <mark...@gmail.com> wrote:
> >> Defining a QVector with an std::unique_ptr seems to work just fine. No
> >> error, compile wise.
> >> QVector<std::unique_ptr<QUrl>> test;
> > 
> > You can't use std::unique_ptr in Qt containers. Qt containers require
> > the type to have a default constructor, a copy constructor, and an
> > assignment operator [1], and you can't copy a std::unique_ptr.
> > 
> > [1]
> > http://qt-project.org/doc/qt-5.0/qtcore/containers.html#assignable-data-t
> > ype --
> > Giuseppe D'Angelo
> 
> Ahh, oke. That makes it obvious.
> 
> But is this something that is planned to be allowed for a future Qt
> version? Please don't say "Qt 6" :p

It's not planned, period. The Qt containers will forever require the ability 
to copy.

It doesn't make sense to introduce containers that don't. Those are called 
"Standard Library".

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to