diff options
| author | Yong Li <yong.b.li@linux.intel.com> | 2018-12-11 17:44:46 +0800 |
|---|---|---|
| committer | Yong Li <yong.b.li@intel.com> | 2018-12-13 23:53:17 +0000 |
| commit | 6ee43dc57bce75b36f0145c5e895d3811d5c47d4 (patch) | |
| tree | 00185a956b599c7b3870bd113cdbb53ed45a1198 /example | |
| parent | 7583460d683c82e3ff5d73ab9d03d36eb0ba557e (diff) | |
| download | sdbusplus-6ee43dc57bce75b36f0145c5e895d3811d5c47d4.tar.gz sdbusplus-6ee43dc57bce75b36f0145c5e895d3811d5c47d4.zip | |
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>
Diffstat (limited to 'example')
| -rw-r--r-- | example/asio-example.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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 @@ void do_start_async_method_call_one( 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 @@ void do_start_async_method_call_one( 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"; } } |

