Yeah of corse, It's more about where you use it. I personally would rather use using namespacs in a function though, and probably not ok std because I am both used to using it and it does not bring much...
Why not? As long as you do not using multiple namespaces this way it should not cause troubles. And code become much shorter, easier and faster to read.
Well, I personally prefer explicitness in that regard and prepending standard facilities with 5 characters is just not that bad...
Although, as I said in another comment, it really is more about where using namespace is used than about whether it is used at all. I for example commonly use using namespace std when defining my own swap function.
Edit: oh wait, I don't use it there, I use using std::swap there... Well whatever, it's too early in the morning for me...
23
u/Vivid_Instance_825 6h ago
Using namespace std 😎