c++17: drop experimental::filesystem
Use std::filesystem, and drop support for building with experimental
under c++14.
Change-Id: I32755f0d1b119c041978c2f8b988a16a14ba88d4
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/targeting.cpp b/targeting.cpp
index a24031b..37bed58 100644
--- a/targeting.cpp
+++ b/targeting.cpp
@@ -18,7 +18,7 @@
#include <endian.h>
-#include <experimental/filesystem>
+#include <filesystem>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
#include <phosphor-logging/log.hpp>
@@ -31,7 +31,6 @@
{
using namespace phosphor::logging;
-namespace fs = std::experimental::filesystem;
namespace file_error = sdbusplus::xyz::openbmc_project::Common::File::Error;
int Target::getCFAMFD()
@@ -72,7 +71,7 @@
try
{
// Find the the remaining P9s dynamically based on which files show up
- for (auto& file : fs::directory_iterator(fsiSlaveBasePath))
+ for (auto& file : std::filesystem::directory_iterator(fsiSlaveBasePath))
{
std::smatch match;
std::string path = file.path();
@@ -92,7 +91,7 @@
}
}
}
- catch (fs::filesystem_error& e)
+ catch (std::filesystem::filesystem_error& e)
{
using metadata = xyz::openbmc_project::Common::File::Open;