Compilation errors with ROS Melodic on Ubuntu 18.04 and gcc-10
I have roscpp
project using ROS Melodic on Ubuntu 18.04. It builds fine with gcc-9.3.0, but when I switch compiler version to gcc-10.0.1, compilation fails with following error:
[build] /opt/ros/melodic/include/std_msgs/Header.h:46:121: error: no class template named ‘rebind’ in ‘class std::allocator<void>’
In both cases I'm using C++20 standard:
set_property(TARGET af PROPERTY CXX_STANDARD 20)
Is it possible to use gcc-10 in my environment?