[Bug libstdc++/51749] Including <algorithm> pollutes global namespace
nospam.kotarou.dono at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jan 29 10:39:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51749
--- Comment #14 from nospam.kotarou.dono at gmail dot com 2012-01-29 04:40:07 UTC ---
Just reporting another one~ (Yes, I can live with it not being fixed, but
bugzilla is for reporting bugs, right?)
Including <string> eventually includes pthreads.h, dumping the whole file in
the global namespace. Example:
$ cat | g++ -xc++ - -o - > /dev/null
#include <string>
pid_t pid = 0; // Should not compile
int main() { return (short)pid; }
$ echo $?
0
More information about the Gcc-bugs
mailing list