if I define a namespace log
somewhere and make it accessible in the global scope, this will clash with double log(double)
from the standard c
I'd suggest:
foo::log::Log x; // Your logging class
::log(0.0); // Log function
Generally I wouldn't write using namespace foo;
as there is no point having it in the foo
namespace if you're not going to use it and it pollutes the global namespace.
See this related question:
How do you properly use namespaces in C++?