since we've dropped the support of GCC older than v8.0, there is no need
to detect <experimental/filesystem>
Signed-off-by: Kefu Chai <kchai@redhat.com>
foreach(library
""
"stdc++fs"
- "c++experimental"
"c++fs")
try_std_filesystem_library("${library}" StdFilesystem_LIBRARY _std_filesystem_already_included)
if(_std_filesystem_already_included)
-#if __has_include(<filesystem>)
#include <filesystem>
+
namespace fs = std::filesystem;
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace fs = std::experimental::filesystem;
-#else
-#error std::filesystem not available!
-#endif
int main() {
fs::create_directory("sandbox");