I recently checked in a change that removes #include <iostream> from
header files in SimGear and FlightGear, replacing it with iosfwd,
istream or ostream as needed. This is primarily a style change, but it
should speed up compilation time and startup time slightly too. Here's
the issue: iostream sucks in everything necessary to declare cin, cout
and cstderr, and includes special magic to initialize those variables.
If you include this in a header file, then the magic is duplicated
across many object files. Most header files that use a symbol from the
C++ I/O library only need the forwarding declarations in iosfwd.

In the course of that change I also removed using declarations from
header files and pushed them into source files where needed. Header
files should not pollute the namespace of the files they are included
in. This change admittedly touched a lot of files; if you think that I
shouldn't have touched your personal subsystem, let me know and we can
work something out.

Thanks,
Tim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to