monitor: `optional` no longer experimental
Change-Id: I29e4fa5cfdf5cefe1af548fd5af2a54d08682a11
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/monitor/json_parser.cpp b/monitor/json_parser.cpp
index 9b773c2..227530f 100644
--- a/monitor/json_parser.cpp
+++ b/monitor/json_parser.cpp
@@ -192,7 +192,7 @@
}
// Handle optional conditions
- auto cond = std::experimental::optional<Condition>();
+ auto cond = std::optional<Condition>();
if (fan.contains("condition"))
{
if (!fan["condition"].contains("name"))
diff --git a/monitor/types.hpp b/monitor/types.hpp
index 66f2dfe..59dcb30 100644
--- a/monitor/types.hpp
+++ b/monitor/types.hpp
@@ -5,8 +5,8 @@
#include <nlohmann/json.hpp>
#include <phosphor-logging/log.hpp>
-#include <experimental/optional>
#include <functional>
+#include <optional>
#include <string>
#include <tuple>
#include <vector>
@@ -109,9 +109,9 @@
constexpr auto sensorListField = 5;
constexpr auto conditionField = 6;
-using FanDefinition = std::tuple<std::string, size_t, size_t, size_t, size_t,
- std::vector<SensorDefinition>,
- std::experimental::optional<Condition>>;
+using FanDefinition =
+ std::tuple<std::string, size_t, size_t, size_t, size_t,
+ std::vector<SensorDefinition>, std::optional<Condition>>;
} // namespace monitor
} // namespace fan