skasperski / navigation_2d

ROS nodes to navigate a mobile robot in a planar environment
GNU General Public License v3.0
123 stars 65 forks source link

fixed spa2d.h:163 from 'const' to 'constexpr' for variable qScale #36

Closed Maik93 closed 6 years ago

Maik93 commented 6 years ago

An error on this file cause abort compilation on my machine, running ROS Lunar, Ubuntu 17.04 x64

skasperski commented 6 years ago

"constexpr" is a C++11 feature and is currently not used. Is C++11 standard with ros lunar?

Maik93 commented 6 years ago

Can't find anything on Google, but I've currently installed last version of Catkin (catkin_tools 0.4.4) with ROS Lunar and compiling navigation_2d with default configurations trows me "use constexpr instead of const" error, so I suppose C++11 is the standard now. With this little modifications everything works well on my machine.

skasperski commented 6 years ago

Ok. It currently breaks the kinetic build, but I will include this when I prepare the release for lunar.

skasperski commented 6 years ago

Thanks again for contributing. After trying a while to find a solution that works with all compilers, I found that this qScale variable is just never used at all. So the most portable solution was to simply remove it together with that strange initialization.

Meh.