]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common: do not check for experimental/filesystem anymore
authorKefu Chai <kchai@redhat.com>
Thu, 27 Aug 2020 13:01:37 +0000 (21:01 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 31 Aug 2020 13:13:21 +0000 (21:13 +0800)
seastar is only compatible with C++17 and C++20, so no need to check for
<experimental/filesystem> anymore. the C++ standard library should be
C++17 compatible.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/common/config_proxy.cc

index a853564038acb06864d18d53c8d4395a666b5c57..88d4679d5739cd5c0620b35e576f83c1d1e5f07f 100644 (file)
@@ -3,20 +3,10 @@
 
 #include "config_proxy.h"
 
-#if __has_include(<filesystem>)
 #include <filesystem>
-#else
-#include <experimental/filesystem>
-#endif
 
 #include "crimson/common/buffer_io.h"
 
-#if defined(__cpp_lib_filesystem)
-namespace fs = std::filesystem;
-#elif defined(__cpp_lib_experimental_filesystem)
-namespace fs = std::experimental::filesystem;
-#endif
-
 namespace crimson::common {
 
 ConfigProxy::ConfigProxy(const EntityName& name, std::string_view cluster)
@@ -88,7 +78,7 @@ seastar::future<> ConfigProxy::parse_config_files(const std::string& conf_files)
          return seastar::make_ready_future<seastar::stop_iteration>(
             seastar::stop_iteration::yes);
         });
-      }).handle_exception_type([] (const fs::filesystem_error&) {
+      }).handle_exception_type([] (const std::filesystem::filesystem_error&) {
         return seastar::make_ready_future<seastar::stop_iteration>(
           seastar::stop_iteration::no);
       }).handle_exception_type([] (const std::invalid_argument&) {