Closed AndrewAndHelen closed 2 years ago
Hi my machine is: Apple clang version 13.1.6 (clang-1316.0.21.2.3) Target: arm64-apple-darwin21.2.0 Thread model: posix
I use "filesystem.hpp" in my project, but When I use function without noexcept, compiler tell me some errors:
fs::path p(dest_path); std::error_code ec; fs::file_status s = fs::status(p, ec); bool f = fs::exists(p);
error message is:
[build] bool f = fs::exists(p); [build] ^~~~~~~~~~ [build] /Users/liuweiyu/Documents/s3_client/ghc/filesystem.hpp:4238:17: note: candidate function not viable: no known conversion from 'fs::path' to 'ghc::filesystem::file_status' for 1st argument [build] GHC_INLINE bool exists(file_status s) noexcept [build] ^ [build] /Users/liuweiyu/Documents/s3_client/ghc/filesystem.hpp:4250:17: note: candidate function not viable: requires 2 arguments, but 1 was provided [build] GHC_INLINE bool exists(const path& p, std::error_code& ec) noexcept [build] ^ [build] 1 error generated.
Please give me some help, thanks!
ok, I know why I have this problem, because I add -fno-exceptions into my compier options...
Hi my machine is: Apple clang version 13.1.6 (clang-1316.0.21.2.3) Target: arm64-apple-darwin21.2.0 Thread model: posix
I use "filesystem.hpp" in my project, but When I use function without noexcept, compiler tell me some errors:
error message is:
Please give me some help, thanks!