Соответствует ли g ++ требованиям std :: string C ++ 11
Рассмотрим следующий пример:
int main()
{
string x = "hello";
//copy constructor has been called here.
string y(x);
//c_str return const char*, but this usage is quite popular.
char* temp = (char*)y.c_str();
temp[0] = 'p';
cout < "x = " < x < endl;
cout < "y = " < y < endl;
cin >> x;
return 0;
}