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++/15995] New: istringbuf/operator


[forwarded from http://bugs.debian.org/254499 ]

g++-2.95.4 writes 01.

The following program prints 00 instead of the expected 01 (not sure, but it 
seems like a defect to me).  Once you call s >> i, all further str() updates 
are ignored by >>. 
 
#include <sstream> 
#include <iostream> 
 
main() { 
        std::istringstream s("0"); 
        int i; 
        s >> i; 
        std::cout << i; 
        s.str("1"); 
        s >> i; 
        std::cout << i; 
}

-- 
           Summary: istringbuf/operator
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15995


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