You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Mark Brown <ma...@gmail.com> on 2007/10/30 22:47:47 UTC

stream iterators into different streams compare equal?

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