Remove using namespace std from header files#115
Conversation
|
I think the much better solution would be to remove the whole header files themselves, since they serve no useful purpose (they are not meant to be included anywhere except the respective sole source file). Then the using statement is in a cpp file and hence unproblematic (it is already unproblematic now, but since people just copy stuff without understanding, it is safer to give them less to copy). |
Yes, that is one option. Personally, I appreciate the improved readability that comes with the split, but I understand that it's a matter of preference. Many users might use the .cpp file as a template for their projects, and I believe that examples in general often serve this purpose as well. However, in that scenario, with or without the headers it should not pose an issue. Merging this PR would address the immediate problem, and we could consider consolidating everything into a single file as a subsequent step if you prefer that? Perhaps during a broader refactoring and cleanup of the OSMP .cpp files. This could also address minor improvements like making some functions static, handling always-true conditions, initializing all members, etc. |
Reference to a related issue in the repository
Fixes #114
Add a description
Remove
using namespace stdand add full qualifier where neededCheck the checklist