Use C++17 optional and any
The optional and any types are no longer experimental
in C++17.
Change-Id: I0b507b73fdd13afe531bef7a2ce308ebc8a3da7d
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/manager.cpp b/manager.cpp
index 3d9850d..5e05342 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -109,7 +109,7 @@
}
void Manager::addInterface(const std::string& objectPath, InterfaceType type,
- std::experimental::any& object)
+ std::any& object)
{
auto id = getEntryID(objectPath);
auto entry = entries.find(id);
@@ -127,8 +127,7 @@
}
void Manager::addChildInterface(const std::string& objectPath,
- InterfaceType type,
- std::experimental::any& object)
+ InterfaceType type, std::any& object)
{
auto id = getEntryID(objectPath);
auto entry = childEntries.find(id);
@@ -173,7 +172,7 @@
object->emit_object_added();
- std::experimental::any anyObject = object;
+ std::any anyObject = object;
addInterface(objectPath, InterfaceType::POLICY, anyObject);
}
@@ -247,7 +246,7 @@
}
object->serialize(dir);
- std::experimental::any anyObject = object;
+ std::any anyObject = object;
addChildInterface(objectPath, InterfaceType::CALLOUT, anyObject);
calloutNum++;
}
@@ -289,7 +288,7 @@
if (callout->deserialize(saveDir))
{
callout->emit_object_added();
- std::experimental::any anyObject = callout;
+ std::any anyObject = callout;
addChildInterface(objectPath, InterfaceType::CALLOUT, anyObject);
}
}