When including dynamic_reconfigure/client.h in a project with reorder error flag (or -Wall) a compile time error occurs. This is the output cleaning up unnecessary details:
/opt/ros/kinetic/include/dynamic_reconfigure/client.h:327:19: error: ‘dynamic_reconfigure::Client<ConfigType>::nh_’ will be initialized after [-Werror=reorder]
ros::NodeHandle nh_;
^
/opt/ros/kinetic/include/dynamic_reconfigure/client.h:326:8: error: ‘bool dynamic_reconfigure::Client<ConfigType>::received_configuration_’ [-Werror=reorder]
bool received_configuration_;
^
/opt/ros/kinetic/include/dynamic_reconfigure/client.h:68:3: error: when initialized here [-Werror=reorder]
Client(
This is because the NodeHandle is initialized before received_configuration_ boolean in the constructor, but it is declared afterwards in the private variables. I'll send a small PR with the fix.
When including
dynamic_reconfigure/client.h
in a project withreorder
error flag (or-Wall
) a compile time error occurs. This is the output cleaning up unnecessary details:This is because the
NodeHandle
is initialized beforereceived_configuration_
boolean in the constructor, but it is declared afterwards in the private variables. I'll send a small PR with the fix.