(e89d20181bcd38c25180ff7943cf48941710ead9)
#include <QtCore/qbasicatomic.h>
Go to the source code of this file.
|
| template<typename T> |
| QT_WARNING_POP void | qAtomicAssign (T *&d, T *x) |
| | This is a helper for the assignment operators of implicitly shared classes.
|
| template<typename T> |
| void | qAtomicDetach (T *&d) |
| | This is a helper for the detach method of implicitly shared classes.
|
◆ qAtomicAssign()
This is a helper for the assignment operators of implicitly shared classes.
Your assignment operator should look like this:
Definition at line 182 of file qatomic.h.
◆ qAtomicDetach()
template<typename T>
| void qAtomicDetach |
( |
T *& | d | ) |
|
|
inline |
This is a helper for the detach method of implicitly shared classes.
Your private class needs a copy constructor which copies the members and sets the refcount to 1. After that, your detach function should look like this:
Definition at line 201 of file qatomic.h.