From: Danny Smith <dannysmith@cl...> - 2007-05-18 22:21:29
Sent: Saturday, 19 May 2007 9:25 a.m.
> I discovered the following while doing my homework:
> The following code compiles with gcc 3.4.2 and 4.1.1, but not
> with MSVC++
> Express 2005 and OpenWatcom 1.6:
> #include <iostream>
> // note #include <string> is missing
> int main()
> std::string s = "Hello, world!";
> std::cout << s << std::endl;
> return 0;
> This is due to the fact that gcc's <iostream> eventually
> includes <string>.
> My question is:
> Do you think that this is proper?
No. Recently a lot of work has gone into removing unnecessary
inclusions in libstdc++ headers.
This is fixed in gcc-4.3.0.
> Catch suspicious messages before you open them-with Windows
> Live Hotmail.