Consider the following program
#include <iostream>
int main()
{
std::string a = "Hello World"; // Copy initialization
std::string b("Hello World"); // Direct initialization
std::string c{"Hello World"}; // Value initialization
}
I realize that the results of these 3 lines are the same, but I wonder if they work differently under the hood. If there is such a difference, what is it? And which one of these initializations is the most efficient?