Capture this explicitly in the InterfaceAPI find callback - #1699
Conversation
Assisted-by: Claude Opus 5 Signed-off-by: Carlos Aguero <caguero@honurobotics.com>
| [=](const std::string &_file) | ||
| [this](const std::string &_file) | ||
| { | ||
| return sdf::filesystem::append(modelDir, _file); |
There was a problem hiding this comment.
Should we change this to this->modelDir as well? So it's clear at a glance why this is necessary here.
There was a problem hiding this comment.
Good point, done in c2f24b8. It also matches the style used elsewhere in this fixture.
Assisted-by: Claude Opus 5 Signed-off-by: Carlos Aguero <caguero@honurobotics.com>
|
is there a reason not to backport to Jetty? |
We could if we think we'd eventually use C++20 with Jetty (which perhaps we do it when compiling it as a vendor package). It's only fixing a warning when using C++20. |
this is exactly my thinking, since the Jetty vendor packages are using c++20 with Lyrical at any rate, it seems low risk to backport |
|
@Mergifyio backport sdf16 |
✅ Backports have been createdDetails
|
Assisted-by: Claude Opus 5 Signed-off-by: Carlos Agüero <caguero@honurobotics.com> (cherry picked from commit 36536d8)
Assisted-by: Claude Opus 5 Signed-off-by: Carlos Agüero <caguero@honurobotics.com> (cherry picked from commit 36536d8)
🦟 Bug fix
Part of gazebosim/gz-cmake#580
Summary
[=]implicitly capturedthis, which is deprecated in C++20. The lambda only usesthis->modelDir, so the capture is now explicit. No behavior change, and it is valid C++17, so it can land before any standard bump.Before:
Backport Policy
Checklist
codecheckpassed (See contributing)Assisted-by: Claude Opus 5
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-byandGenerated-bymessages.