const A& operator * (const A & rhs) const { return A(this->m_num1 * rhs.m_num1, this->m_num2*rhs.m_num1); }
Itβs bad here.
You return a dangling link, if it works, this is a coincidence.
You are returning what exists in the frame of the stack that was destroyed. Just return the value to fix it.
source share