Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polution of global namespace due to using namespace EspSoftwareSerial;. #301

Closed
everslick opened this issue Nov 19, 2023 · 1 comment
Closed

Comments

@everslick
Copy link

The using namespace EspSoftwareSerial; in SoftwareSerial.h pulls some symbols (like Parity and Config) into the global namespace. Because those names are by nature very generic, this leads to conflicts if the Application already uses those symbols.

I believe that using namespace should never be used in a header file for exactly that reason and in this case completely renders the EspSoftwareSerial namespace moot. no?

Is this something that can be fixed? What would be the best way to do this?

@dok-net dok-net added invalid and removed invalid labels Nov 25, 2023
@dok-net
Copy link
Collaborator

dok-net commented Nov 25, 2023

The using may be to generic, it's probably best to research which types were in the global namespace before the refactoring anyway. I will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants