[OT] Re: g++ namespace std & BUG?
Benjamin Kosnik
bkoz@redhat.com
Thu Aug 23 09:55:00 GMT 2001
> I use method one exclusively in header files (don't want an include to
> corrupt someone's class), and method two in implementation files.
> It saves a bit of typing, and I don't have to worry about forgetting
> it anywhere.
yeah, me too. Obviously, 'using namespace std;' in a header file is a
recipe for disaster. For source files, it's lazy but easy.
Note that for source files you can just inject namespace std names on a
per-function basis as well.
-benjamin
More information about the Libstdc++
mailing list