Commit 310b6251 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

added exception in move assignment operator

parent b3ff1ba4
...@@ -80,8 +80,9 @@ class mutex { ...@@ -80,8 +80,9 @@ class mutex {
* @brief Move assignment operator is deleted. * @brief Move assignment operator is deleted.
*/ */
mutex& operator=(mutex&& other) { mutex& operator=(mutex&& other) {
if(m_mutex != ABT_MUTEX_NULL) if(m_mutex != ABT_MUTEX_NULL) {
ABT_mutex_free(&m_mutex); TL_MUTEX_ASSERT(ABT_mutex_free(&m_mutex));
}
m_mutex = other.m_mutex; m_mutex = other.m_mutex;
other.m_mutex = ABT_MUTEX_NULL; other.m_mutex = ABT_MUTEX_NULL;
return *this; return *this;
......
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