Is there any difference between
std::string s1(\"foo\");
and
std::string s2 = \"foo\";
?
The first one is better.
The second one will create the instance and will assign the default value (""). Then there will be a secodn assignement : "foo". So 2 assignments instead of 1...