Is there a convenience constructor in C++? : <p>Is it possible for an overloaded constructor to somehow call another constructor within the class, similar to the code below?</p>

<pre><code>class A {
public:
    A(std::string str) : m_str(str) {}
    A(int i) { *this = std::move(A(std::to_string(i))); }

    std::string m_str;
};
</code></pre>

<p>The code above works, yet I am afraid that calling this in the constructor might lead to undefined behavior.</p>

<p>If it does could you please explain why and also suggest a better alternative?</p>
