istream_iterator bug
Benjamin Kosnik
bkoz@redhat.com
Tue Aug 6 11:11:00 GMT 2002
Don't need all the copy bits to reproduce it, actually. I'm not quite
sure you'd need the standard library either.
-benjamin
#include <iterator>
#include <fstream>
#include <sstream>
int main ()
{
using namespace std;
ifstream f("test");
istringstream s("test");
// 1
istream_iterator<int> one(f);
// 2
istream_iterator<int> two(s);
// 3
istream_iterator<int> three(istream());
#if 1
// 4
istream_iterator<int> four(istringstream("test2"));
// istream_iterator<int> four(ifstream("test2"));
#endif
}
More information about the Gcc-bugs
mailing list