Compiling tf or tf2 with -std=gnu++0x
Hello,
I am trying to rosmake a package (modular_cloud_matcher) which forces -std=gnu++0x compiler option. This results in the following error:
/opt/ros/electric/stacks/geometry/tf/include/tf/tf.h:91:44: error: ‘constexpr’ needed for in-class initialization of static data member ‘DEFAULT_CACHE_TIME’ of non-integral type
and a similar one in tf2.
A possible solution is to change in tf.h from
static const double DEFAULT_CACHE_TIME = 10.0;
to
static constexpr double DEFAULT_CACHE_TIME = 10.0;
I suppose, however, this is not the right way to solve the issue, because next update will remove my modification. I am rather new to the ROS community, so I would like to know what should be done in such cases.