-
Notifications
You must be signed in to change notification settings - Fork 129
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
Using C / C++ keywords as package name / field names results into compilation error #272
Comments
Absolutely, that is what should happen in each language message generator specific to the keywords in that language. Related to #118. |
Just for information: I did a short search and apparently it isn't possible in C++ to escape keywords. The usage of keywords as identifiers is forbidden. |
I am not sure I understand your comment. If the |
I thought of escaping in the way of doing something like |
I've started an design article on this topic at: ros2/design#172 |
I guess this can be closed @dirk-thomas |
I realised today that using C++ keywords as fieldnames results into a compilation error.
Example:
Will result into:
It would be great if either the message generator would throw an error like: Don't use c++ keywords or
the message generator would somehow escape these fields.
If this is not a viable solution for you I think a hint in the documentation would be useful:
https://github.com/ros2/ros2/wiki/About-ROS-Interfaces
The text was updated successfully, but these errors were encountered: