Lately I have been seeing quite a few people who initialize their std::string
s like this:
std::string a{ "test" }; // Yes they do it with a single value
Now I wouldn't use this unless it's an array or to pass an initialization list.
But it got me curious, is there any point of doing this preferably over:
std::string a = "test";
std::string a ( "test" );
All three work without a doubt and I get the difference between the latter two.
Does it give some kind of performance improvement?