Convert variant usage to std interface
This is just a refactoring to use the c++17 std::variant interfaces
instead of the mapbox::variant specific ones. We should be able to use
mapbox::variant and std::variant interchangeably now.
Tested:
Built against sdbusplus with mapbox::variant and sbusplus using
std::variant. Both variant compile and test out.
Change-Id: I6fbaad3d12dd34968db6a10f3d74a65e07d0f0cc
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/read_fru_data.cpp b/read_fru_data.cpp
index c7ff61b..67bbf9f 100644
--- a/read_fru_data.cpp
+++ b/read_fru_data.cpp
@@ -8,6 +8,7 @@
#include <map>
#include <phosphor-logging/elog-errors.hpp>
+#include <sdbusplus/message/types.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
extern const FruMap frus;
@@ -15,6 +16,9 @@
{
namespace fru
{
+
+namespace variant_ns = sdbusplus::message::variant_ns;
+
using namespace phosphor::logging;
using InternalFailure =
sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
@@ -143,8 +147,8 @@
{
data[properties.second.section].emplace(
properties.first,
- std::move(
- allProp[properties.first].get<std::string>()));
+ std::move(variant_ns::get<std::string>(
+ allProp[properties.first])));
}
}
}