[edit: this is incorrect! Sorry]
One thing you can do if you still want to use namespace std is put it in the .cpp lib file, but not the lib header. Compile the lib .cpp file as an object, and the header is what gets included in some other .cpp file (the one with main()). When you compile main(), link it to the precompiled library object. The presence/absence of "using namespace std" in the lib .cpp source won't matter (as long as it is not in the header), eg.
In header (just forward declarations):
Code:
class foo {
std::string somemethod()...
Then in the .cpp source for which this is a header:
Code:
using namespace std;
string foo::somemethod ()
As long as the later is compiled by itself, you can link to it and use the header without any collisions [ edit: probably wrong! ]