This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
a quick ofstream question
Hello,
while porting code from CC4.2 to g++2.95(.1), I noticed that
ofstream("filename") << myVar;
does not compile (an overloaded op<< is assumed).
ofstream ofs1("filename");
ofs1 << myVar;
works fine.
It is conceivable that g++ does not want to apply a non-const
op<< to a temporary, but I was wondering if this is according
to the C++ standard (if not, does V3 allow this).
thanks,
Igor
--
Igor Markov office: (310) 206-0179
http://vlsicad.cs.ucla.edu/~imarkov