This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/15361] New: bitset<>::_Find_next fails
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2004 02:04:22 -0000
- Subject: [Bug libstdc++/15361] New: bitset<>::_Find_next fails
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The code:
#include <bitset>
#include <iostream>
using namespace std;
int main() {
bitset<256> b;
b.set(225);
b.set(226);
cout << b.count() << ":" << b._Find_first() << ":" << b._Find_next(225)
<< ":" << b.test(225) << ":" << b.test(226) << ":" << b.test(227) << endl;
return 0;
}
produces:
~/ootbc/common/test/src$ a.out
2:225:256:1:1:0
That is, the bitset correctly has two members, and they are correctly 225 and 226, but _Find_next(225) returns end-of-set (256) rather than the next value (226)
Ivan
--
Summary: bitset<>::_Find_next fails
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15361