示例#1
0
 Matrix &operator=(Matrix &&s) {
     print_move_assigned(this, std::to_string(m_rows) + "x" + std::to_string(m_cols) + " matrix");
     if (&s != this) {
         delete[] m_data;
         m_rows = s.m_rows; m_cols = s.m_cols; m_data = s.m_data;
         s.m_rows = 0; s.m_cols = 0; s.m_data = nullptr;
     }
     return *this;
 }
 void operator=(ExampleMandA &&e) { print_move_assigned(this); value = e.value; }