Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

@gvdhoorn is correct, it's an oversight that you cannot do:

if (condition)

The macro's contents should be wrapped within a do { ... } while(0). This is done in the equivalent C API's, see:

But the rclcpp one's do not do this:

I'd recommend opening an issue on rclcpp and ideally providing a pull request to help us fix it :D