carnegierobotics / multisense_ros

ROS Wrapper for LibMultiSense
Other
7 stars 18 forks source link

fix: changed standard to c++17 because of std::shared_mutex #49

Closed Frank-Pasqualini closed 1 year ago

Frank-Pasqualini commented 1 year ago
In file included from /usr/include/log4cxx/log4cxx.h:45,
                 from /usr/include/log4cxx/logstring.h:28,
                 from /usr/include/log4cxx/level.h:22,
                 from /usr/include/ros/console.h:46,
                 from /usr/include/ros/ros.h:40,
                 from /home/fpasqualini/work/minibot/catkin_ws/src/minibot_meta/multisense_ros/multisense_ros/include/multisense_ros/color_laser.h:41,
                 from /home/fpasqualini/work/minibot/catkin_ws/src/minibot_meta/multisense_ros/multisense_ros/src/color_laser.cpp:36:
/usr/include/log4cxx/boost-std-configuration.h:10:18: error: ‘shared_mutex’ in namespace ‘std’ does not name a type
   10 |     typedef std::shared_mutex shared_mutex;
      |                  ^~~~~~~~~~~~
/usr/include/log4cxx/boost-std-configuration.h:10:13: note: ‘std::shared_mutex’ is only available from C++17 onwards
   10 |     typedef std::shared_mutex shared_mutex;
      |             ^~~

Multiple errors like this appear when using GCC 11 and C++ 14

mattalvarado commented 1 year ago

@Frank-Pasqualini What OS are you building this with?

Frank-Pasqualini commented 1 year ago

@Frank-Pasqualini What OS are you building this with?

Ubuntu 22.04, GCC 11.3.0

I looked into it and technically GCC is not compliant with a lot of the c++ standards, especially on older versions of the compiler

Frank-Pasqualini commented 1 year ago

I don't have write access to merge it in so since its approved @mattalvarado or someone with write access will have to merge it

moslemk commented 1 year ago

I don't have write access to merge it in so since its approved @mattalvarado or someone with write access will have to merge it

@mattalvarado, can you please?

mattalvarado commented 1 year ago

I don't have write access to merge it in so since its approved @mattalvarado or someone with write access will have to merge it

@mattalvarado, can you please?

Yep!