This repository was archived by the owner on May 31, 2025. It is now read-only.
This repository was archived by the owner on May 31, 2025. It is now read-only.
Compilation fail for messages with c++ keywords as field names #31
Closed
Description
The Python generation code contains logic to append with underscore any fields that match a Python keyword:
However, there's no such thing in the gencpp code, so we got tripped up when we had a message with established Python usage that had class
as a field name, and then got used in C++ and wouldn't compile.
For now we've simply renamed our field to class_
, but it would be great to see this transformation happen in gencpp itself, as it does in genpy.