As seen on ideone:
cout << string(50, 'x'); // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cout << string{50, 'x'}; // 2x WAT??
I have figured out that 50 is ASCII '2', so:
cout << static_cast<int>('2'); // 50 cout << static_cast<char>(50); // 2 But that's as far as I've got.
Does this lead to a solid argument against C++11 initializers?
initializer_listconstructor ofstringtakes a list of characters, that's why.