On 2015-08-09 07:58, Kevin Kofler wrote: > Thiago Macieira wrote: >> Please see the C++17 proposal of destructive moves instead. > > It took 4 years for Qt to agree to require a limited subset of C++11, so, > realistically, C++17 features are not likely to end up used (everywhere, at > least) before at least 2021. > > I guess it will also require good compiler optimization to be as effective > as a memmove operating on the whole vector. (Basically, the compiler needs > to detect that you are memmoving a whole vector and convert it to a > memmove.)
Please *see* the proposal. The major point is to have the ability to mark such as defaulted, and to detect when it is *trivial*. When its trivial, containers can use memmove/realloc/etc. instead of copying. (It's not clear yet if they will do so directly, or via some helper, but that shouldn't matter performance-wise.) -- Matthew _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development