Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 19, 2025

Remove the -Wc++20-extensions warning triggered by capturing a structured binding in a lambda.

ROS 2 still targets C++17 only (REP-2000). Capturing structured bindings directly is a C++20 extension, so we avoid it by using .second explicitly instead. The unused first element (hw_name / entry.first) is omitted to avoid the separate -Wunused-variable warning/error.

No functional change.

Fixes #2574

Tested locally:

@christophfroehlich christophfroehlich changed the title hardware_interface: fix C++20 structured-binding capture in lambda (fixes #2574) (backport #2832) Avoid C++20 structured binding capture (backport #2832) Nov 19, 2025
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.50%. Comparing base (1abab95) to head (7d4301c).
⚠️ Report is 4 commits behind head on jazzy.

Files with missing lines Patch % Lines
hardware_interface/src/resource_manager.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy    #2834      +/-   ##
==========================================
+ Coverage   89.48%   89.50%   +0.01%     
==========================================
  Files         152      152              
  Lines       17704    17747      +43     
  Branches     1453     1448       -5     
==========================================
+ Hits        15842    15884      +42     
- Misses       1282     1287       +5     
+ Partials      580      576       -4     
Flag Coverage Δ
unittests 89.50% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
hardware_interface/src/resource_manager.cpp 75.93% <0.00%> (-0.07%) ⬇️

... and 2 files with indirect coverage changes

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

@christophfroehlich christophfroehlich merged commit 33045ed into jazzy Nov 19, 2025
15 of 16 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/jazzy/pr-2832 branch November 19, 2025 12:05
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.

3 participants