One of the reasons "using namespace" in header files is considered bad practise (Why is "using namespace std;" considered bad practice?) is because it "leaks" the using-directive to everyone that includes your headerfile. Is this still the case for C++ modules or can I "safely" put e.g. using namespace std
or using std::cout
into my module? :
module;
#include <iostream>
export module Module;
using namespace std;
// using std::cout;
export void greet() {
cout << "Hello World!\n";
}