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] New: Invalid std::string(size_type, value_type) constructor implementation


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

            Bug ID: 61658
           Summary: Invalid std::string(size_type, value_type) constructor
                    implementation
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: d.v.a at ngs dot ru

#include<string>
#include<iostream>

int main()
{
    std::string st{1U, '0'};
    std::cout << st.length() << '\n';
    std::cout << st << '\n';
}

Prints:
2
â0


Must be:
1
0

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