Commit 95d64e9
Fix deprecated this capture in omnistore/snapshot/handlers/PeriodicSyncHandler.cpp +5
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
```
Reviewed By: dtolnay
Differential Revision: D81189814
fbshipit-source-id: 1c2ab90224683e129f4113a39e422f52596154821 parent 92e79db commit 95d64e9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments