New problem with fstreams?!?
Sat Jan 26 04:05:00 GMT 2002
Hi all, hi Benjamin,
my friend Charles Leggett brought to my attention a recent problem with
fstreams. This a reduced
scratch_file << " just stuff " << "\n";
for (int i=0; i<10; ++i)
std::cout << i << "\n";
std::cerr << "Cannot open SCRATCH\n";
Currently, this is the output:
Cannot open SCRATCH
On the other hand, if I revert this patch:
2002-01-08 Benjamin Kosnik <email@example.com>
* include/bits/fstream.tcc (filebuf::_M_really_overflow): Test
return value of _M_file->sync().
(filebuf::showmanyc): Check for is_open.
* include/std/fstream (filebuf::sync): Tweak.
the behavior is completely different (the same delivered by 3.0.3):
Does this trigger you something?
More information about the Libstdc++