[Development] Question about QCoreApplicationData::*_libpaths
Kevin Kofler
kevin.kofler at chello.at
Wed Jan 20 20:05:08 CET 2016
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
More information about the Development
mailing list