Good to know. It would be nice to have this mentionned in the official documentation.
Sometimes there are discussions about what is best QVector vs std::vector, and here we have a good "plus" for QVector. Philippe On Thu, 29 Dec 2016 01:26:33 -0200 Thiago Macieira <thiago.macie...@intel.com> wrote: > Em quarta-feira, 28 de dezembro de 2016, às 17:34:37 BRST, Philippe escreveu: > > Given an aligned type such as: > > > > struct alignas(2048) foo > > { > > char t[55]; > > }; > > > > I was pleasantly surprised that QVector<foo> provides aligned data (see my > > example further, using Qt 5.8 RC) I could not see this officially > > mentionned in the Qt documentation. Yet, this is obviously very useful. > > Hence, is it a documentation omission, or "an implementation detail we > > can't rely on" ? > > Yes. It's intentional and works properly for all Qt containers, save > QLinkedList (because it uses "new") and QVarLengthArray (because you should > revise your code instead). > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest