3 ms·
Shouldn't your move vs copy constructors be generally irrelevant? The idea is that they are semantically equivalent thus the compiler can make the correct choic
by Guvante 12y ago
Shouldn't your move vs copy constructors be generally irrelevant? The idea is that they are semantically equivalent thus the compiler can make the correct choice for you.
Your comment about RVO isn't accurate, those are two separate returns with rvalues (which can thus use a move constructor).
I would heartily agree that tooling to allow inspection about how all of these rules apply would help tremendously.