This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [OT] Re: g++ namespace std & BUG?



> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]