The problems were indeed related to c++ version incompatibilities. I
didn't manage to fix this using ros2 foxy as there was too much
modifications to do within the library, but I've switched to ros2
galactic and applying the modifications found here
https://github.com/ros2/rclcpp/pull/1678 I managed to make it work.
However,
I'm still interested to understand how you managed to fix the issues
with ros1 in your dv-ros repository as I think you managed to fix it
without modifying the distribution, so It would be awesome if you could
give me a bit more details about what you've done to fix this.