libstdc++/8231: iostream header position causes bad code generation
Mon Nov 4 14:32:00 GMT 2002
Synopsis: iostream header position causes bad code generation
State-Changed-When: Mon Nov 4 14:32:21 2002
if the include of <iostream> is not in position #1, then
must appear there, no?
It is not legal to move the include of <iostream> out of
position #1 in any other case. In any event, with your
example, it is not OK to move the include of <iostream>
past position #3. Doing so is lying to the compiler.
As TC++PL-SE says it, <iosfwd> is sufficient to refer
to all things declared in <iostream> but not to apply
operations to them.
Not a regression but rather a more agressive use of the properties of the standard (in case this worked with libstdc++-v2).
More information about the Gcc-bugs