ros / roscpp_core

ros distribution sandbox
89 stars 116 forks source link

Fix usage of std::allocator::rebind for C++20 #124

Closed poggenhans closed 2 years ago

poggenhans commented 4 years ago

std::allocator::rebind was deprecated in C++17 and removed in C++20. The replacement is std::allocator_traits::rebind_alloc that was introduced in C++11. It is semantically equivalent, there should be no API or ABI incompabilities introduced through this change.

This fix should make it possible to use ROS in C++20 mode, see also https://github.com/ros/gencpp/pull/51.

johannes-graeter commented 3 years ago

Super nice! please merge this soon, not being able to use c++20 with ros is an absolute no go...

johannes-graeter commented 3 years ago

@dirk-thomas what is preventing you from merging this? Can I help in any way? Please merge this soon, using C++20 is only a little step for ros but a huge leap for the robotics community :)

dirk-thomas commented 3 years ago

what is preventing you from merging this? Can I help in any way?

@johannes-graeter I am not a maintainer of this repository anymore.

johannes-graeter commented 3 years ago

what is preventing you from merging this? Can I help in any way?

@johannes-graeter I am not a maintainer of this repository anymore.

Sorry dirk for spamming then... I was just thinking, because you were nearly on every commit in the last few months :). Would still be cool if people that are responsible for this repo would react on the PR...

pvangoor commented 3 years ago

Does anyone have a good work around for this problem? I have a regular ROS installation on ubuntu 20.04. Is building ROS from source really the only way?

invenibo commented 2 years ago

Are there any plans on merging this pull request?

johannes-graeter commented 2 years ago

Please merge this, do you really want to be the ones from preventing people to use c++20 in 2022?

aprotyas commented 2 years ago

+1 to merging this!

ros-discourse commented 2 years ago

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/new-packages-for-noetic-2022-03-30/24920/2

gbiggs commented 2 years ago

I've confirmed that API and ABI are not changed by this PR, and tested that it works with C++14, so we can merge it.

For the record, ROS Noetic targets C++14. You should not have any expectation that ROS Noetic will support newer versions of C++.