|
Boost : |
From: Martin Wille (mw8329_at_[hidden])
Date: 2006-11-20 04:49:31
Howard Hinnant wrote:
> It has recently come to my attention that I could be overly sensitive
> to this issue and making a fuss about nothing. So I'm writing here
> for a reality check. Do boost programmers consider the use of
> <iostream> as a short cut to get to non-terminal-streams I/O a
> reasonable technique? Or do boost programmers feel that use of
> <iostream> should be reserved only when using one or more of cin,
> cout, cerr, clog, wcin, wcout, wcerr, wclog?
I consider it wrong
* to include <iostream> when the standard streams do not get used
* to include <iostream> as a shortcut for including <istream> and <ostream>
The latter isn't guaranteed to work, IIUC, since <iostream> could be
written as #include <iosfwd> \n extern std::ostream cout; etc. That way,
the free operator<<() functions from <ostream> do not get included and
some output will start to look funny.
Regards,
m
Send instant messages to your online friends http://au.messenger.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk