Thiago Macieira wrote: > We can only do that efficiently if we drop CoW. Creating an adapting API > is easy; making sure we don't do unnecessary copies because we've lost CoW > is the hard part.
Would it be possible to wrap a QSharedDataPointer<VectorData<T> >, where class VectorData<T> : public QSharedData, public std::vector<T>? That would still be layered above std::vector (and d.data() would give you something that is-a std::vector) yet CoW. Or are there reasons why such an approach would not be workable for std::vector? Now I think the current QVector implementation is fine, but I'm also not convinced wrapping std::vector requires dropping CoW. The problems would probably show up somewhere else. Kevin Kofler _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development