use C++ 20 in default.#3187
Conversation
Signed-off-by: Tomoya.Fujita <fujita.tomoya@triorb.co.jp>
|
Tick the box to add this pull request to the merge queue (same as
|
|
We already use c++20 by 'inheritance' from rclcpp. The statements you modified at the old way of doing this. |
|
so are you saying we should remove those lines? my understanding is that these packages still declared C++17 locally in their CMakeLists, so I updated them to match the project's C++20 requirement. If C++20 is already inherited from the parent rclcpp configuration and these settings are effectively unused. |
|
Yes, we should remove this altogether, and replace it by target_link_libraries(${PROJECT_NAME} PUBLIC
# Note we link public on purpose, as we want to export
# the used C++ version as minimum to all consuming packages
ament_cmake_ros_core::ament_ros_defaults
)This is the modern way of setting the minimum C++ version. I would add this explicit for each pkg, even though it is inherited as relying on the upstream pkg seems like bad practice to me. Its like includes were you also include explicitly. |
|
Note, this is per library, not per pkg. |
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
|
Pulls: #3187 |
Description
https://docs.ros.org/en/rolling/Releases/lyrical/supported-platforms.html#minimum-language-requirements
Fixes # (issue)
Is this user-facing behavior change?
Did you use Generative AI?
Additional Information