Should I use std:: and boost:: prefixes everywhere?
c++
Solution
I use `using namespace` only in C++ files, not in headers. Besides, using hole namespace not needed in most of times. For instance, you could write `using boost::shared_ptr` or `using std::tr1::shared_ptr` to easily switch between `shared_ptr` implementations.
Sample:
#include <iostream>
using std::cout;
int main()
{
cout << "test" << std::endl;
return 0;
}
Problem
In my C++ code I don't use the declarations `using namespace std;` or `using namespace boost;`. This makes my code longer and means more typing. I was thinking about starting to use the "using" declarations, but I remember some people arguing against that. What is the recommended practice? std and boost are so common there should be no much harm in that?