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

remove "using namespace std" statement [Bug] #276

Closed
milyin opened this issue Nov 7, 2023 · 1 comment · Fixed by #281
Closed

remove "using namespace std" statement [Bug] #276

milyin opened this issue Nov 7, 2023 · 1 comment · Fixed by #281
Assignees
Labels
bug Something isn't working

Comments

@milyin
Copy link
Contributor

milyin commented Nov 7, 2023

It's incorrect to expose "using namespace std" in header here:
https://github.com/eclipse-zenoh/zenoh-pico/blob/master/include/zenoh-pico/collections/pointer.h#L29
This affects compilation of other projects which may purposedly avoid including std namepace.See explanation here
https://stackoverflow.com/questions/5849457/using-namespace-in-c-headers

Unfortunately just removing this line is not enough because macro _Z_POINTER_DEFINE accesses memory_order_relaxed without std prefix and we can't just add std:: to it as this should work with C code too. A bit more clever solution is required.

@milyin milyin added the bug Something isn't working label Nov 7, 2023
cguimaraes added a commit to cguimaraes/zenoh-pico that referenced this issue Nov 17, 2023
@cguimaraes cguimaraes self-assigned this Nov 17, 2023
@cguimaraes
Copy link
Member

@milyin provided a fix in #281

p-avital added a commit that referenced this issue Nov 28, 2023
Remove 'using namespace std' statement. Fixes #276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants