libbitcoin / libbitcoin-system

Bitcoin Cross-Platform C++ Development Toolkit
https://libbitcoin.info/
Other
1.3k stars 385 forks source link

Fix: Remove redundant error code argument from std::filesystem::exist… #1535

Closed gubatron closed 1 month ago

gubatron commented 1 month ago
gubatron commented 1 month ago

This was breaking the build for me on macos building with std=c++20 and boost 1.76.0

$ clang --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin23.5.0
Thread model: posix
evoskuil commented 1 month ago

Thanks, so you have a successful ARM build? We don’t CI that platform yet.

evoskuil commented 1 month ago

Documentation states that the API is new in C++17, and the change to the second override causes a change from noexcept to throws, which is a problem. https://en.cppreference.com/w/cpp/filesystem/exists

gubatron commented 1 month ago

interesting, I couldn't run ./configure with C++17 Yes, building on macos arm64

My goal is to eventually build libbitcoin-node to give you a hand there with lots of low hanging fruit. Building libbitcoin-network now

gubatron commented 1 month ago

ran again configure with C++17 on macos arm, this happens, both here and in libbitcoin-network:

...
checking pkg-config is at least version 0.9.0... yes
checking whether g++ supports C++20 features with -std=c++20... no
checking whether g++ supports C++20 features with +std=c++20... no
checking whether g++ supports C++20 features with -h std=c++20... no
configure: error: *** A compiler with support for C++20 language features is required.
evoskuil commented 1 month ago

C++20 is required, but the API is “since C++17” which includes C++20. In other words, it should be fine when building with C++20. Great to have you onboard!

evoskuil commented 1 month ago

Also, we would really love to have an macOS ARM build set up in our GitHub Actions CI process!

evoskuil commented 1 month ago

See: https://github.com/libbitcoin/libbitcoin-node/issues/686