Commit b3ff1ba4 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

added move assignment to mutex class

parent 71dd4148
...@@ -79,7 +79,13 @@ class mutex { ...@@ -79,7 +79,13 @@ class mutex {
/** /**
* @brief Move assignment operator is deleted. * @brief Move assignment operator is deleted.
*/ */
mutex& operator=(mutex&& other) = delete; mutex& operator=(mutex&& other) {
if(m_mutex != ABT_MUTEX_NULL)
ABT_mutex_free(&m_mutex);
m_mutex = other.m_mutex;
other.m_mutex = ABT_MUTEX_NULL;
return *this;
}
/** /**
* @brief Move constructor. * @brief Move constructor.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment