ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ROS is only made for C++11

this is actually not really true.

For ROS 1: Melodic has lifted the max version to C++14 (see here).

For ROS 2: all ROS 2 versions target C++14 by default (see REP-2000, search for "Minimum language requirements").

What happens if I just put add_compile_options(-std=c++17) in the CMakeLists.txt of my ROS-package and use C++17-features anyway?

Nothing. It probably will just work, as long as your C++17 object code is ABI compatible with whatever libraries you are linking against.

In other words: you'll potentially run into the exact same problems you could have with ABI incompatibilities between libraries when not using ROS.