[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#254499: libstdc++5: istringbuf/operator defect?



Package: libstdc++5
Version: 1:3.3.4-1
Severity: normal

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;
}


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.5
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8

Versions of packages libstdc++5 depends on:
ii  gcc-3.3-base                1:3.3.4-1    The GNU Compiler Collection (base 
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.3.4-1    GCC support library

-- no debconf information

-- 
Allan Wind				Email: allan.wind@openwave.com
Senior Engineer				Office: +1 781 313 1393
Technical Product Support (TPS)		Mobile: +1 617 721 9331
Openwave Systems, Inc			Fax:	+1 781 313 1405



Reply to: