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++/15361] New: bitset<>::_Find_next fails


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


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