incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Brown" <mark.g.br...@gmail.com>
Subject stream iterators into different streams compare equal?
Date Tue, 30 Oct 2007 21:47:47 GMT
Hi all,

I have the simple program below that aborts with the latest stdcxx but
runs with no problems with g++. Am I missing something or is this a
bug in stdcxx?

#include <assert.h>
#include <iterator>
#include <sstream>

int main ()
{
    std::istringstream a ("1");
    std::istream_iterator<int> i (a);

    std::istringstream b ("2");
    std::istream_iterator<int> j (b);

    assert (!(i == j));
}

--Mark

Mime
View raw message