Given this example:
#include <string>
class Foo
{
public:
Foo(std::string p_member) : m_member{p_member} {}
private:
std::string m_member;
};
int main()
{
Foo f{"Test"};
return 0;
}
In Foo
ctor, is the string copied or moved by default? Do I have to explicitly write the std::move(p_member)
?