Skip to content

moveit_ros_benchmarks: Require cxx_std_20 compile feature #3509

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Jun 22, 2025

Description

Since #1539 the moveit_ros_benchmarks library uses internally the designated initializers feature, that is only available in C++ 20 (see https://en.cppreference.com/w/cpp/language/aggregate_initialization.html#Designated_initializers).

It seems that GCC and Clang permits to use designated initializers even in C++17 mode, but MSVC instead raise an error like:

2025-06-22T00:10:29.7938610Z  │ │ %SRC_DIR%\ros-kilted-moveit-ros-benchmarks\src\work\src\BenchmarkExecutor.cpp(811,9): error C7555: use of designated initializers requires at least '/std:c++20' [%SRC_DIR%\build\moveit_ros_benchmarks.vcxproj]
2025-06-22T00:10:29.8041863Z  │ │ %SRC_DIR%\ros-kilted-moveit-ros-benchmarks\src\work\src\BenchmarkExecutor.cpp(906,11): error C7555: use of designated initializers requires at least '/std:c++20' [%SRC_DIR%\build\moveit_ros_benchmarks.vcxproj]

see https://github.com/RoboStack/ros-kilted/actions/runs/15800837297/job/44538772389#step:6:3639 .

This PR fixes this by requesting the use at least of C++ 20 features with target_compile_features(moveit_ros_benchmarks PRIVATE cxx_std_20).

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

Copy link

codecov bot commented Jun 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@716f734). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3509   +/-   ##
=======================================
  Coverage        ?   46.21%           
=======================================
  Files           ?      720           
  Lines           ?    62713           
  Branches        ?     7590           
=======================================
  Hits            ?    28974           
  Misses          ?    33572           
  Partials        ?      167           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant