We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class MutexLockGuard : public noncopyable { public: explicit MutexLockGuard(MutexLock &mutex) : m_mutex(m_mutex) { m_mutex.lock(); } ~MutexLockGuard(){ m_mutex.unlock(); } private: MutexLock m_mutex; }; 首先,构造函数的mutex完全没用到,其次m_mutex无法被拷贝初始化,需要把m_mutex改为引用类型 各种错误,不知道怎么编译通过的
class MutexLockGuard : public noncopyable { public: explicit MutexLockGuard(MutexLock &mutex) : m_mutex(m_mutex) { m_mutex.lock(); } ~MutexLockGuard(){ m_mutex.unlock(); } private: MutexLock m_mutex; };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
class MutexLockGuard : public noncopyable { public: explicit MutexLockGuard(MutexLock &mutex) : m_mutex(m_mutex) { m_mutex.lock(); } ~MutexLockGuard(){ m_mutex.unlock(); } private: MutexLock m_mutex; };
首先,构造函数的mutex完全没用到,其次m_mutex无法被拷贝初始化,需要把m_mutex改为引用类型
各种错误,不知道怎么编译通过的
The text was updated successfully, but these errors were encountered: