Remove “using namespace std” directive
Reported version
3.x-dev
Type
Development
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
The file thirdparty\intervaltree\IntervalTree.h
contains a using namespace std
directive.
Since this file is included in a lot of places, it ends up polluting the global namespace of a large amount of code across both the libmscore
and the mscoreapp
projects. This namespace pollution has resulted in the recurring problem of std::
prefixes being missing in pull requests. Many of these omissions have slipped through the code review process and are now in committed code. As of this writing there are several dozen instances of this in the codebase.
The using namespace std
directive should be removed, and the missing std::
prefixes should be added wherever needed.
Fix version
3.5.0
Comments
PR #6019.
Fixed in branch master, commit 5a5857f63b
_Fix #304725: Remove “using namespace std” directive
Removed a “using namespace std” directive from the file “thirdparty\intervaltree\IntervalTree.h” and added missing “std::” prefixes wherever needed._
Fixed in branch master, commit 1b4f320aaa
_Merge pull request #6019 from Spire42/304725-remove-using-namespace-std-directive
Fix #304725: Remove “using namespace std” directive_
Automatically closed -- issue fixed for 2 weeks with no activity.