Skip to content

Include CPP20 and related changes#228

Merged
ahcorde merged 1 commit into
rollingfrom
ahcorde/rolling/cpp20
Jul 3, 2026
Merged

Include CPP20 and related changes#228
ahcorde merged 1 commit into
rollingfrom
ahcorde/rolling/cpp20

Conversation

@ahcorde

@ahcorde ahcorde commented Jun 12, 2026

Copy link
Copy Markdown
Contributor
  • ament_ros_defaults (cxx_std_20, linked PRIVATE) replaces the manual C++17 flag,
  • .cpp-only cleanups
    • single-lookup map access
    • std::ranges::find
    • unique_ptr pImpl
    • typedef→using.

@asymingt FYI

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
@ahcorde ahcorde self-assigned this Jun 12, 2026

@asymingt asymingt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Happy in general with the change. Just one question about c++ standard srtting with ament_cmake_ros_core.

Comment thread CMakeLists.txt
PUBLIC ${console_bridge_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${console_bridge_LIBRARIES})
# Standalone (non-ament) build: request C++20 for our own translation units.
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should we not be using something from ament_cmake_ros_core here in stead of a hard-coded cxx_std_20. I am asking because it seems to me that the purpose of ament_cmake_ros_core is to abstract away from specific standards, so they my be universally set in a central location.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is for the case where we are not using ament

@mergify

mergify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@ahcorde
ahcorde requested a review from asymingt June 29, 2026 13:50
@ahcorde

ahcorde commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Pulls: #228
Gist: https://gist.githubusercontent.com/ahcorde/6e6dd9e9ae4494ebe955d1c3bf8265eb/raw/f94597cb2a823943068574b7b9a0e67acdae7900/ros2.repos
BUILD args: --packages-above-and-dependencies class_loader
TEST args: --packages-above class_loader
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19704

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@asymingt asymingt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@ahcorde
ahcorde merged commit 9af4001 into rolling Jul 3, 2026
5 checks passed
@ahcorde
ahcorde deleted the ahcorde/rolling/cpp20 branch July 3, 2026 07:31
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