#if __has_include() #include namespace fs = std::filesystem; #elif __has_include() #include namespace fs = std::experimental::filesystem; #else #error std::filesystem not available! #endif int main() { [[maybe_unused]] fs::path path("/"); }