build: switch to C++20

Signed-off-by: Deepak Kodihalli <deepak.kodihalli.83@gmail.com>
Change-Id: I514e8210bfcc4c4546720de19b151d9a4dae1fc5
diff --git a/meson.build b/meson.build
index 93c31cf..dcb0e44 100644
--- a/meson.build
+++ b/meson.build
@@ -1,10 +1,10 @@
 project('pldm', ['c', 'cpp'],
-        version: '0.1', meson_version: '>=0.53.2',
+        version: '0.1', meson_version: '>=0.57.0',
         default_options: [
           'warning_level=3',
           'default_library=shared',
           'werror=true',
-          'cpp_std=c++17',
+          'cpp_std=c++20',
           'buildtype=debugoptimized'
         ])
 
diff --git a/softoff/softoff.cpp b/softoff/softoff.cpp
index a704885..2091fca 100644
--- a/softoff/softoff.cpp
+++ b/softoff/softoff.cpp
@@ -350,7 +350,8 @@
     }
 
     // Add a timer to the event loop, default 30s.
-    auto timerCallback = [=](Timer& /*source*/, Timer::TimePoint /*time*/) {
+    auto timerCallback = [=, this](Timer& /*source*/,
+                                   Timer::TimePoint /*time*/) {
         if (!responseReceived)
         {
             std::cerr << "PLDM soft off: ERROR! Can't get the response for the "
@@ -364,7 +365,7 @@
                std::chrono::seconds{1}, std::move(timerCallback));
 
     // Add a callback to handle EPOLLIN on fd
-    auto callback = [=](IO& io, int fd, uint32_t revents) {
+    auto callback = [=, this](IO& io, int fd, uint32_t revents) {
         if (!(revents & EPOLLIN))
         {
             return;