Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use default C++ standard instead of 14 #483

Merged

Conversation

lucasw
Copy link
Contributor

@lucasw lucasw commented Jan 29, 2024

I get this when trying to compile in Ubuntu 22.04:

.../src/drivers/ros_canopen/socketcan_bridge/src/socketcan_to_topic.cpp:28:
/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;
       |             ^~~
make[2]: *** [CMakeFiles/socketcan_to_topic.dir/build.make:90: CMakeFiles/socketcan_to_topic.dir/src/socketcan_to_topic.cpp.o] 

Using the default 22.04 C++ standard (17 I think) fixes it.

This would more accurately be part of a noetic branch which would mean the default C++ standard is already 14.

Copy link
Member

@mathias-luedtke mathias-luedtke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase (#480 got merged) and while you are at it better fix the typo ;)

@mathias-luedtke
Copy link
Member

https://www.ros.org/reps/rep-0003.html#c already defines C++14 as the default for melodic

@lucasw lucasw force-pushed the use_latest_cpp branch from 8adfd8d to 33c2b6d Compare May 2, 2024 13:33
@lucasw lucasw changed the title use default C++ stdandard instead of 14 use default C++ standard instead of 14 May 2, 2024
…is only available from C++17 onwards' and similar errors in newer versions
@lucasw lucasw force-pushed the use_latest_cpp branch from 33c2b6d to 6abe543 Compare May 2, 2024 13:34
@lucasw lucasw requested a review from mathias-luedtke May 2, 2024 13:35
@mathias-luedtke mathias-luedtke merged commit 611cc96 into ros-industrial:melodic-devel May 2, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants