Am 19.01.2016 um 15:21 schrieb Ziller Eike:

On Jan 19, 2016, at 16:09, Marc Mutz <marc.m...@kdab.com> wrote:
I doubt many people actively use the fact that Qt containers are cheap to
copy.

Each and every developer that uses Qt uses the fact that Qt containers are cheap to 
“copy"

class A
{
public:
     QVector<B> something() const;
private:
     QVector<B> m_something;
};

QVector<B> A::something() const
{
     return m_something;
}

Good point Eike, thank you.

Marc, wow would one avoid invocation of the copy constructor here? Without handing out pointers or references. Of course.

Ciao,
Mathias
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to