Tech Off Post

Single Post Permalink

View Thread: Should I make namespace std global?
  • User profile image
    Sven Groot

    I don't much care one way or the other in source files.

    Never put any using declarations in header files though, since you force whomever will later use those headers to have their global namespace polluted. I'm working on an application whose source I've inherited, and there "using namespace std;" was put in the precompiled header, so either I'm stuck with it for any sourcefiles I add, or I have to change a few hundred existing source files.