rclcpp: reserved identifier violation

I would like to point out that identifiers like “RCLCPP_ACTION__QOS_HPP_” and “RCLCPP__EXECUTOR_HPP_do not fit to the expected naming convention of the C++ language standard. Would you like to adjust your selection for unique names?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 22 (13 by maintainers)

Commits related to this issue

Most upvoted comments

We have discussed this in today’s meeting and agree that the current use two consecutive underscores is undesired since it doesn’t follow the spec.

  • We don’t want to go back and follow the Google styleguide either and use a single underscore since the resulting ambiguity has actually bitten us in the past and resulted in colliding header guards from different files.

  • Considering the alternative to use any other kind of valid separator (e.g. _x_) while that would be compliant with the C++ spec there is still an unlikely chance of collision. So the solution is not significantly better than following the Google styleguide.

  • While pragma once works across all of our target platforms we understand the hesitation to use it since it is not covered by the spec either. Therefore we don’t want to rely on it.

Since the current usage works (even though it doesn’t comply with the C++ spec) and we are not aware of any actual problem caused by it we don’t see a good enough alternative to switch to. As a consequence we don’t plan to make a change to the header guards at the moment. Therefore I will mark the ticket with “wontfix” and go ahead and close it.