When is std :: move redundant?
Simply put, I have this class that I would like to move the wrapped object into.
std::string m_S;
string_t(string_t&& s)
: m_S(s.m_S)
{
}
I've omitted the structure of the surrounding class, just added an element m_S
for completeness.
Do I need to wrap the member access with std::move
or will this work as it s
is passed as an rvalue reference?
+3
source to share
2 answers