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]

libstdc++/2830: incorrect inserter for std::string



>Number:         2830
>Category:       libstdc++
>Synopsis:       incorrect inserter for std::string
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 15 12:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     kenny.simpson@gs.com
>Release:        20010507 snapshot
>Organization:
>Environment:
looking over the code
>Description:
At the end of bits/ostream.tcc I see:

// 21.3.7.8 basic_string::operator<<
...
    { return (__out << __s.c_str()); }

first, shouldn't this be 21.3.7.9? as 21.3.7.8 describes swap.
second, this won't handle '\0's properly.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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