summaryrefslogtreecommitdiff
path: root/redfish-core/lib/roles.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-01-23 03:40:12 +0300
committerEd Tanous <ed.tanous@intel.com>2019-02-09 04:54:39 +0300
commitabf2add6a35aaf42ba60c4ae955a4d8925b13b19 (patch)
treefe3e8aadb5bb92455cf504d50d7a99478b35ec67 /redfish-core/lib/roles.hpp
parent734bfe90949b230b1d3e061522f45903c10c7b08 (diff)
downloadbmcweb-abf2add6a35aaf42ba60c4ae955a4d8925b13b19.tar.xz
bmcweb: move variant usage to std namespace
Change-Id: I9d7069668f91f2ac72d2f4a440f63e0e85dd5269 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'redfish-core/lib/roles.hpp')
-rw-r--r--redfish-core/lib/roles.hpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/redfish-core/lib/roles.hpp b/redfish-core/lib/roles.hpp
index 0f33b045b5..d07208e940 100644
--- a/redfish-core/lib/roles.hpp
+++ b/redfish-core/lib/roles.hpp
@@ -17,6 +17,8 @@
#include "node.hpp"
+#include <variant>
+
namespace redfish
{
@@ -145,10 +147,8 @@ class RoleCollection : public Node
{"Description", "BMC User Roles"}};
crow::connections::systemBus->async_method_call(
- [asyncResp](
- const boost::system::error_code ec,
- const sdbusplus::message::variant<std::vector<std::string>>&
- resp) {
+ [asyncResp](const boost::system::error_code ec,
+ const std::variant<std::vector<std::string>>& resp) {
if (ec)
{
messages::internalError(asyncResp->res);
@@ -158,8 +158,7 @@ class RoleCollection : public Node
asyncResp->res.jsonValue["Members"];
memberArray = nlohmann::json::array();
const std::vector<std::string>* privList =
- sdbusplus::message::variant_ns::get_if<
- std::vector<std::string>>(&resp);
+ std::get_if<std::vector<std::string>>(&resp);
for (const std::string& priv : *privList)
{
std::string role = getRoleFromPrivileges(priv);