using namespace std: evil usage

General discussion about the development of the open source Blender

Moderators: jesterKing, stiv

Post Reply
Devas73
Posts: 27
Joined: Wed Oct 16, 2002 12:21 am

using namespace std: evil usage

Post by Devas73 » Tue Oct 29, 2002 11:34 pm

To the people cleaning the code: there are MANY header files with "using namespace std" inside.
This makes impossible (for me) to compile, on win32, the module that uses openAL as an identifier "vector" makes MSVC compiler thinks it's std::vector.
Putting a "using namespace..." in an .h file pretty much makes useless the concept of namespaces.
It gives problems as the one above.
Cleaning out this from headers files is critical in my opinion.

dreamerv3
Posts: 119
Joined: Wed Oct 16, 2002 10:30 am

Post by dreamerv3 » Wed Oct 30, 2002 4:58 pm

Hmm, no effense meant but, whats good for MSVC isn't always good for the GCC compiler.

I've found Microsofts' compiler has its own set of sytax requirements as opposed to ANSI C/C++

Bandoler
Posts: 53
Joined: Mon Oct 14, 2002 3:16 pm
Location: Somewhere between the 1 and the 0

Post by Bandoler » Wed Oct 30, 2002 6:02 pm

I agree with you dreamerv3, but also i agree it's not good to use "using namespace XXX" in a header.

Devas73
Posts: 27
Joined: Wed Oct 16, 2002 12:21 am

Post by Devas73 » Wed Oct 30, 2002 7:31 pm

I really would like to get rid of M$ stuff too, using mingw or BCC on win, gcc on linux (already possible) - but for sure a using namespace in an .h file is to avoid, as already said...
Somebody suggested to use CMake, any reports about it's usefulness?
Unfortunately I really don't have time to play with it now...

Devas73
Posts: 27
Joined: Wed Oct 16, 2002 12:21 am

Post by Devas73 » Wed Oct 30, 2002 7:32 pm

I really would like to get rid of M$ stuff too, using mingw or BCC on win, gcc on linux (already possible) - but for sure a using namespace in an .h file is to avoid, as already said...
Somebody suggested to use CMake, any reports about it's usefulness?
Unfortunately I really don't have time to play with it now...

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests