On Mon, Oct 17, 2011 at 10:30:17PM +0200, Knoll Lars (Nokia-MP-Qt/Oslo) wrote: > On 10/17/11 6:43 PM, "ext Oswald Buddenhagen" <[email protected]> > wrote: > >On Mon, Oct 17, 2011 at 03:04:41PM +0200, Knoll Lars (Nokia-MP-Qt/Oslo) > >wrote: > >> Otherwise everything's large by default, which would IMO lead to > >> rather bad characteristics for simple&small user defined classes. > >> > >default to small. error out if the type is not primitive/movable. > > Bad idea. Most developers don't even know about our trait system, > yes, and that's a major source of performance problems, including in our own code.
but whatever. the alternative is behaving just like a vector, i.e., erroring out if no copy c'tor can be found. in the vast majority of cases performance doesn't matter anyway, and in the majority of the remaining cases defaulting to vector-like behavior is typically the performance-wise better, and most of all more expected choice. for POD types, a clever compiler could even optimize a copy c'tor loop into a memmove without us doing it explicitly based on qt typetraits. _______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
