#include "qcopyable-mutex.hpp" mutex& mutex::operator=(const mutex& datum) { inner = nullptr; inner = std::make_unique(datum->isRecursive() ? QMutex::Recursive : QMutex::NonRecursive); return *this; } mutex::mutex(const mutex& datum) { *this = datum; } mutex::mutex(mutex::mode m) : inner(std::make_unique(static_cast(int(m)))) { } QMutex* mutex::operator&() const { return *this; } QMutex* mutex::operator->() const { return *this; } mutex::operator QMutex*() const { return const_cast(inner.get()); }