c++17: drop experimental::filesystem

Use std::filesystem, and drop support for building with experimental
under c++14.

Tested: Build the repo.
Change-Id: I4af0d9c034dbfef5a65153ba5447b86c961aebf1
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index fc6b72e..03c918e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -18,8 +18,7 @@
           $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
           $(PHOSPHOR_LOGGING_LIBS) \
           $(SDBUSPLUS_LIBS) \
-          -lcrypt \
-          -lstdc++fs
+          -lcrypt
 
 check_PROGRAMS = ldap_config_test
 ldap_config_test_CPPFLAGS = $(cppflags)
diff --git a/test/ldap_mapper_test.cpp b/test/ldap_mapper_test.cpp
index b3c1a4f..a044b64 100644
--- a/test/ldap_mapper_test.cpp
+++ b/test/ldap_mapper_test.cpp
@@ -1,5 +1,5 @@
 #include <gtest/gtest.h>
-#include <experimental/filesystem>
+#include <filesystem>
 #include <stdlib.h>
 #include <sdbusplus/bus.hpp>
 #include "phosphor-ldap-mapper/ldap_mapper_entry.hpp"
@@ -15,8 +15,6 @@
 namespace user
 {
 
-namespace fs = std::experimental::filesystem;
-
 class TestSerialization : public testing::Test
 {
   public:
@@ -29,15 +27,15 @@
     void SetUp() override
     {
         char tempDir[] = "/tmp/privmapper_test.XXXXXX";
-        dir = fs::path(mkdtemp(tempDir));
+        dir = std::filesystem::path(mkdtemp(tempDir));
     }
 
     void TearDown() override
     {
-        fs::remove_all(dir);
+        std::filesystem::remove_all(dir);
     }
 
-    fs::path dir;
+    std::filesystem::path dir;
     sdbusplus::bus::bus bus;
 };
 
@@ -84,19 +82,20 @@
 {
     std::string groupName = "admin";
     std::string privilege = "priv-admin";
-    namespace fs = std::experimental::filesystem;
     size_t entryId = 1;
     LDAPMapperMgr manager1(TestSerialization::bus, mapperMgrRoot,
                            (TestSerialization::dir).c_str());
     EXPECT_NO_THROW(manager1.create(groupName, privilege));
 
-    EXPECT_EQ(fs::exists(TestSerialization::dir / std::to_string(entryId)),
+    EXPECT_EQ(std::filesystem::exists(TestSerialization::dir /
+                                      std::to_string(entryId)),
               true);
     LDAPMapperMgr manager2(TestSerialization::bus, mapperMgrRoot,
                            (TestSerialization::dir).c_str());
     EXPECT_NO_THROW(manager2.restore());
     EXPECT_NO_THROW(manager2.deletePrivilegeMapper(entryId));
-    EXPECT_EQ(fs::exists(TestSerialization::dir / std::to_string(entryId)),
+    EXPECT_EQ(std::filesystem::exists(TestSerialization::dir /
+                                      std::to_string(entryId)),
               false);
 }