A
A
Alexey Sidorov2012-11-09 18:13:28
Qt
Alexey Sidorov, 2012-11-09 18:13:28

Does plain C++ have a class similar to QSharedData

It is purely academic interest whether there are containers in pure C ++ or at least in Boost with implicit and explicit sharing that implement the Copy on write technique in a similar way to Qt's QSharedData and QSharedDataPointer'u.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Popov, 2012-11-10
@encyclopedist

std::shared_ptr (available in C++11) or boost::shared_ptr (in earlier standards) should be equivalent to QSharedPointer. You just need to pay attention to thread safety.

I
ixSci, 2012-11-10
@ixSci

Copy on write is a vicious practice, so no - you will not find such.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question