This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/61658] Invalid std::string(size_type, value_type) constructor implementation


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61658

--- Comment #1 from __vic <d.v.a at ngs dot ru> ---
If replace with:

std::string st(1U, '0');

then prints as expected:
1
0

Why {1U, '0'} is treated as std::initializer_list<char> ?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]