On 11 Jul 2014, at 22:26, John Baldwin <j...@freebsd.org> wrote: >> For things that live in the base system, there's not much danger of boost >> conflicts. 'using namespace std' is mostly a problem when it's in headers >> (especially > library headers), because it can break large amounts of code. In a tiny > utility, it's probably the right thing to do. > > The original question was about a general style rule for C++ code in FreeBSD. > I suppose it would be fine to permit it in small utilities and only in .cc > files but not otherwise?
I would say that it's completely fine as long as: - It's in an implementation file and - The utility has not dependencies other than the standard library The first ensures that namespace pollution is localised. The latter limits you to cases where there is no chance of there being any conflicts (if you're defining a symbol in a program that has the same name as an STL one then you should probably be referring to it by its fully qualified name anyway or the code will be unreadable). David _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"