asio: Update variant usage
After the below change in sdbusplus,
the variant usage needs to be switched to std::variant
https://github.com/openbmc/sdbusplus/commit/90778b430290c9ec8c33fb77b03e2552d9dd6905
Tested:
./configure --enable-boost
make
Change-Id: Ic1d156ad379eb56822f75e8046f83fa45f4ad56d
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
diff --git a/example/asio-example.cpp b/example/asio-example.cpp
index b4f6265..29b605f 100644
--- a/example/asio-example.cpp
+++ b/example/asio-example.cpp
@@ -65,13 +65,15 @@
yield[ec], "xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test",
"org.freedesktop.DBus.Properties", "Get", "xyz.openbmc_project.test",
"int");
- if (!ec && testValue.get<int>() == 24)
+ if (!ec && sdbusplus::message::variant_ns::get<int>(testValue) == 24)
{
std::cout << "async call to Properties.Get serialized via yield OK!\n";
}
else
{
- std::cout << "ec = " << ec << ": " << testValue.get<int>() << "\n";
+ std::cout << "ec = " << ec << ": "
+ << sdbusplus::message::variant_ns::get<int>(testValue)
+ << "\n";
}
conn->yield_method_call<void>(
yield[ec], "xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test",
@@ -81,13 +83,15 @@
yield[ec], "xyz.openbmc_project.asio-test", "/xyz/openbmc_project/test",
"org.freedesktop.DBus.Properties", "Get", "xyz.openbmc_project.test",
"int");
- if (!ec && testValue.get<int>() == 42)
+ if (!ec && sdbusplus::message::variant_ns::get<int>(testValue) == 42)
{
std::cout << "async call to Properties.Get serialized via yield OK!\n";
}
else
{
- std::cout << "ec = " << ec << ": " << testValue.get<int>() << "\n";
+ std::cout << "ec = " << ec << ": "
+ << sdbusplus::message::variant_ns::get<int>(testValue)
+ << "\n";
}
}