← Back to team overview

yade-dev team mailing list archive

Please do not use "using namespace boost" any more

 

Dear Yade developers,

I needed to update almost all files in Yade tree, removing
"using namespace boost" all over *.hpp and *.cpp files.
It is really annoying and time consuming task.

I met the problems, compiling Yade against Boost 1.55 and
VTK 6.1 (both of libs are newest versions). So the only correct
way to fix it was to remove "using namespace boost" to escape
name conflicts.

Please, never use "using namespace boost" especially in header-files
any more, because it mixes namespaces, what leads to a very difficult
situation of name conflicts. Let those boost`s methods/typedefs etc.
be a little longer, but it prevents us from such problems.

I will try also to remove `using namespace std` (we have 46 of them all
over the code), but I need to find time for that.

Please the first answer here [1].

[1] http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice

Best regards

Anton