This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [OT] Re: g++ namespace std & BUG?
- To: Gregory Martin Pfeil <pfeilgm at xmlglobal dot com>
- Subject: Re: [OT] Re: g++ namespace std & BUG?
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Thu, 23 Aug 2001 09:55:34 -0700 (PDT)
- cc: libstdc++ at gcc dot gnu dot org
> 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