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

Revisit anonymous namespaces vs. static functions #124

Closed
clalancette opened this issue Mar 5, 2024 · 1 comment · Fixed by #233
Closed

Revisit anonymous namespaces vs. static functions #124

clalancette opened this issue Mar 5, 2024 · 1 comment · Fixed by #233
Assignees

Comments

@clalancette
Copy link
Collaborator

C++ has two different ways to create compilation-unit-local functions: using an anonymous namespace (the modern C++ way), or by putting static in front of the function (the C way).

Currently in rmw_zenoh_cpp we use a mixture of these two styles. We should be consistent here, and just choose one. My personal preference is for static in front of the function, as it is easier to tell at a glance that a function is local-only. But I'm open to other opinions.

This comes out of a discussion in #123 (comment)

@fujitatomoya
Copy link

@clalancette can you assign this to @Yadunund ?

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

Successfully merging a pull request may close this issue.

3 participants