Skip to content

Fix deprecated this capture in arvr/projects/ariane/aria_research_kit/projectaria_tools/core/data_provider/VrsDataProviderFactory.cpp +5 - #264

Closed
YLouWashU wants to merge 1 commit into
facebookresearch:mainfrom
YLouWashU:export-D82609200
Closed

Fix deprecated this capture in arvr/projects/ariane/aria_research_kit/projectaria_tools/core/data_provider/VrsDataProviderFactory.cpp +5#264
YLouWashU wants to merge 1 commit into
facebookresearch:mainfrom
YLouWashU:export-D82609200

Conversation

@YLouWashU

Copy link
Copy Markdown
Contributor

Summary:
In the future LLVM will require that lambdas capture this explicitly. -Wdeprecated-this-capture checks for and enforces this now.

This diff adds an explicit this capture to a lambda to fix an issue that presents similarly to this:

   -> fbcode/path/to/my_file.cpp:66:47: error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-
Wdeprecated-this-capture]
   ->           detail::createIOWorkerProvider(evb, requestsRegistry_);
   ->                                               ^
   -> fbcode/path/to/my_file.cpp:61:30: note: add an explicit capture of 'this' to capture '*this' by reference
   ->   evb->runInEventBaseThread([=, self_weak = std::move(self_weak)]() {
   ->                              ^
   ->                               , this

Differential Revision: D82609200

@meta-cla meta-cla Bot added the cla signed label Sep 17, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@YLouWashU has exported this pull request. If you are a Meta employee, you can view the originating diff in D82609200.

…/projectaria_tools/core/data_provider/VrsDataProviderFactory.cpp +5 (facebookresearch#264)

Summary:

In the future LLVM will require that lambdas capture `this` explicitly. `-Wdeprecated-this-capture` checks for and enforces this now.

This diff adds an explicit `this` capture to a lambda to fix an issue that presents similarly to this:
```
   -> fbcode/path/to/my_file.cpp:66:47: error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-
Wdeprecated-this-capture]
   ->           detail::createIOWorkerProvider(evb, requestsRegistry_);
   ->                                               ^
   -> fbcode/path/to/my_file.cpp:61:30: note: add an explicit capture of 'this' to capture '*this' by reference
   ->   evb->runInEventBaseThread([=, self_weak = std::move(self_weak)]() {
   ->                              ^
   ->                               , this
```

Differential Revision: D82609200
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@YLouWashU has exported this pull request. If you are a Meta employee, you can view the originating diff in D82609200.

@YLouWashU YLouWashU closed this Sep 23, 2025
@YLouWashU
YLouWashU deleted the export-D82609200 branch September 23, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants