denisidoro / denisidoro/ucMenu
using namespace std; in main headers causes naming conflicts
- Dominant language
- C++
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The `using namespace std;` in the headers is causing naming conflicts.
The reason `std::` exists is to avoid naming conflicts. The fix would be to move all `using namespace std;` declarations into the sources (out of the headers), or not using it at all.
Naming conflicts happen because names from `std::` like `max`, `vector`, `array` can be shadowed by local identifiers with the same names, and some other cases.
Libraries should never do `using namespace std` in headers that may be included by people using the library.
[StackOverflow thread for more information](https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice)
Contributor guide
No contributing guide indexed for this repository
Research direction
No files or tests are named; start by inspecting the library's public headers for `using namespace std;` and the corresponding source files. Done means the declarations are removed from headers, source usage is handled consistently, and the library no longer exposes those namespace-related naming conflicts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100