remove std::experimental usage
All of the std::experimental usages in this repository have a well
supported counterpart in std as of C++17. Switch to use them.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4cdf5cd27053ce85c7f70c215ee9456f96f79f42
diff --git a/src/elog.hpp b/src/elog.hpp
index 6e46b77..24a4582 100644
--- a/src/elog.hpp
+++ b/src/elog.hpp
@@ -1,11 +1,11 @@
#pragma once
#include "callback.hpp"
-#include <experimental/tuple>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
#include <sdbusplus/exception.hpp>
#include <string>
+#include <tuple>
namespace phosphor
{
@@ -107,8 +107,7 @@
/** @brief elog interface implementation. */
void log() const override
{
- std::experimental::apply(detail::CallElog<T, Args...>::op,
- std::tuple_cat(args));
+ std::apply(detail::CallElog<T, Args...>::op, std::tuple_cat(args));
}
std::tuple<Args...> args;
};
@@ -193,14 +192,13 @@
const auto& storage = std::get<storageIndex>(n.second).get();
const auto& result = std::get<resultIndex>(storage);
- if (!result.empty() && any_ns::any_cast<bool>(result))
+ if (result.has_value() && std::any_cast<bool>(result))
{
const auto& path = std::get<pathIndex>(n.first).get();
const auto& propertyName =
std::get<propertyIndex>(n.first).get();
- auto value =
- ToString<propertyType>::op(any_ns::any_cast<propertyType>(
- std::get<valueIndex>(storage)));
+ auto value = ToString<propertyType>::op(
+ std::any_cast<propertyType>(std::get<valueIndex>(storage)));
metadata += path + ":" + propertyName + '=' + value + '|';
}