[Bug libstdc++/15995] New: istringbuf/operator

debian-gcc at lists dot debian dot org gcc-bugzilla@gcc.gnu.org
Tue Jun 15 07:23:00 GMT 2004


[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



More information about the Gcc-bugs mailing list