Skip to content

Commit

Permalink
Fix lambda return type inference (#20457)
Browse files Browse the repository at this point in the history
Some compilers (some ARM-based Linux compilers) have difficulty
inferring the return type of lambdas that don't explicitly state their
return type. This causes issues when passing lambdas as arguments into
functions that expect a specific function signature.

This fixes this specific instance in CASEServer that has this problem.
  • Loading branch information
mrjerryjohns authored and web-flow committed Jul 7, 2022
1 parent b39e947 commit 4cae0c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocols/secure_channel/CASEServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void CASEServer::OnSessionEstablishmentError(CHIP_ERROR err)
// from a SessionDelegate::OnSessionReleased callback. Schedule the preparation as an async work item.
//
mSessionManager->SystemLayer()->ScheduleWork(
[](auto * systemLayer, auto * appState) {
[](auto * systemLayer, auto * appState) -> void {
CASEServer * _this = static_cast<CASEServer *>(appState);
_this->PrepareForSessionEstablishment();
},
Expand Down

0 comments on commit 4cae0c7

Please sign in to comment.