This is not related to performance at all. But consider this: you are using two libraries called Foo and Bar:
using namespace foo; using namespace bar;
Everything works fine, and you can call Blah()
from Foo and Quux()
from Bar without problems. But one day you upgrade to a new version of Foo 2.0, which now offers a function called Quux()
. Now you’ve got a conflict: Both Foo 2.0 and Bar import Quux()
into your global namespace. This is going to take some effort to fix, especially if the function parameters happen to match.
If you had used foo::Blah()
and bar::Quux()
, then the introduction of foo::Quux()
would have been a non-event.
Related Posts:
- printf with std::string?
- error C2065: ‘cout’ : undeclared identifier
- What are the differences between a pointer variable and a reference variable in C++?
- What is an undefined reference/unresolved external symbol error and how do I fix it?
- What is a lambda expression in C++11?
- What is an undefined reference/unresolved external symbol error and how do I fix it?
- How to find out if an item is present in a std::vector?
- What does the explicit keyword mean?
- What is a smart pointer and when should I use one?
- What does the explicit keyword mean?
- Why is enum class preferred over plain enum?
- How do I reverse a C++ vector?
- Replace part of a string with another string
- What is the difference between const int*, const int * const, and int const *?
- What does T&& (double ampersand) mean in C++11?
- What is the difference between const int*, const int * const, and int const *?
- Issue with std::stol – ‘std::invalid_argument’ what(): stol
- Is there a tab equivalent of std::endl within the standard library?
- Why am I getting string does not name a type Error?
- What is move semantics?
- Is the practice of returning a C++ reference variable evil?
- How to write C++ getters and setters
- What are the differences between struct and class in C++?
- What is std::move(), and when should it be used?
- C++: std does not have member “string”
- Append an int to a std::string
- gcc/g++: “No such file or directory”
- Resolve build errors due to circular dependency amongst classes
- expected unqualified-id before string constant
- cc1plus: error: unrecognized command line option “-std=c++11” with g++
- std::wstring VS std::string
- What is object slicing?
- LLVM Compiler 2.0: Warning with “using namespace std;”
- Why should I use a pointer rather than the object itself?
- I’m getting the error “stoi is not a member of std” in myprogramminglab [duplicate]
- How to throw a C++ exception
- The static keyword and its various uses in C++
- What is the ‘override’ keyword in C++ used for? [duplicate]
- Unresolved external symbol in object files
- Mutex example / tutorial? [closed]
- “std::bad_alloc”: am I using too much memory?
- Expected initializer before namespace
- A proper way to create a matrix in c++
- No matching member function for call to ‘push_back’ error
- “X does not name a type” error in C++
- Difference between long double and double in C and C++ [duplicate]
- Why there is no pop_front method in C++ std::vector?
- Pointer to incomplete class type is not allowed
- C++ error: “Array must be initialized with a brace enclosed initializer”
- How to avoid the error: terminate called after throwing an instance of ‘std::logic_error’ what(): basic_string::_S_construct null not valid
- Error while overloading operator (must be a nonstatic member function)
- C++ Fatal Error LNK1120: 1 unresolved externals
- Vector of structs initialization
- C++ deprecated conversion from string constant to ‘char*’
- Where do “pure virtual function call” crashes come from?
- How to convert vector to array
- “non-standard syntax; use ‘&’ to create a pointer to member” error in Visual Studio 2015
- Hash function for a string
- CMake error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
- How to run valgrind with basic c example?
- initial value of reference to non-const must be an lvalue
- Typedef function pointer?
- cannot declare variable ‘’ to be of abstract type ‘’
- Difference between ‘struct’ and ‘typedef struct’ in C++?
- Hash function for a string
- Is there a replacement for unistd.h for Windows (Visual C)?
- How to call on a function found on another file?
- How to project a point onto a plane in 3D?
- Using C-string gives Warning: “Address of stack memory associated with local variable returned”
- generate random double numbers in c++
- Cygwin Make bash command not found
- C++ Compiler Error C2280 “attempting to reference a deleted function” in Visual Studio 2013 and 2015
- Why use pointers?
- Why I cannot cout a string?
- Don’t understand static boolean behavior
- How to write std::string to file?
- Member declaration not found
- What is the difference between a .cpp file and a .h file?
- Stable Cotangent
- How to change string into QString?
- Including .cpp files
- Class template inheritance C++
- C++ error: undefined reference to ‘clock_gettime’ and ‘clock_settime’
- Converting String to Cstring in C++
- Initializing default values in a struct
- Warning: comparison of distinct pointer types
- Two decimal places using printf( )
- error C2244 unable to match function definition to an existing declaration
- Initializing pointers in C++
- Static vs dynamic type checking in C++
- “No rule to make target ‘install'”… But Makefile exists
- stack around the variable…was corrupted
- Creating a list to hold objects in C++
- What does “warning: not all control paths return a value” mean? (C++)
- Array of Linked Lists C++
- Is it still safe to delete nullptr in c++0x?
- Declaration is incompatible with type
- One or more multiply defined symbols found
- Template constructor in a class template – how to explicitly specify template argument for the 2nd parameter?
- C++ float array initialization