Skip to content

Commit

Permalink
Fix for: explicit capture of 'this' with a capture default of '=' is …
Browse files Browse the repository at this point in the history
…a C++20 extension [-Werror,-Wc++20-extensions]

Summary: Fix for: explicit capture of 'this' with a capture default of '=' is a C++20 extension [-Werror,-Wc++20-extensions]

Reviewed By: r-barnes

Differential Revision: D52457050

fbshipit-source-id: 2b2f045c37eb96689472d24901312e5093ab87c7
  • Loading branch information
Dan Melnic authored and facebook-github-bot committed Dec 29, 2023
1 parent 88e79a2 commit 234d39a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions folly/experimental/channels/detail/Utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class SenderCancellationCallback : public IChannelCallback {
*/
void consume(ChannelBridgeBase*) override {
cancelSource_.requestCancellation();
executor_->add([=, this]() {
executor_->add([this]() {
CHECK(!callbackToFire_.second.isReady());
callbackToFire_.first.setValue(CallbackToFire::Consume);
});
Expand All @@ -183,7 +183,7 @@ class SenderCancellationCallback : public IChannelCallback {
*/
void canceled(ChannelBridgeBase*) override {
cancelSource_.requestCancellation();
executor_->add([=, this]() {
executor_->add([this]() {
CHECK(!callbackToFire_.second.isReady());
callbackToFire_.first.setValue(CallbackToFire::Canceled);
});
Expand Down

0 comments on commit 234d39a

Please sign in to comment.