-
Notifications
You must be signed in to change notification settings - Fork 41
build: Require C++-17 #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bitcoin-fork
Are you sure you want to change the base?
build: Require C++-17 #55
Conversation
If we are going to change this, I think you should just change it to C++20. |
An alternative would be cherry-picking google#1251 |
We aren't trying to retain C++11 compatibility? |
You could also update the CMake minimum required to |
If this started happening recently in clang, i think we can wait for google to bump theirs (last bump: https://chromium.googlesource.com/chromium/src/tools/clang/+/4e2e7b926a033fc85695da101404f79b7ce2d7a7) and then wait for them to pull in one of the fixes? |
`std::is_standard_layout_v` (used in `util/no_destructor.h`) is not available until C++-17. This breaks building with some compilers. Tested with clang 20.1.6. google#1246 https://en.cppreference.com/w/cpp/types/is_standard_layout.html
4cb1276
to
bb48a45
Compare
I considered this fix, but it seems preferable to me to maintain a build flag patch over upstream rather than a code patch.
This is already an issue with clang 20, e.g. my distro's included version of clang |
The downstream CI is using clang 20 ( https://github.com/bitcoin/bitcoin/blob/5757de4ddd37f9321ee6b338b40888fd3561fc00/ci/test/00_setup_env_native_fuzz.sh#L11, https://github.com/bitcoin/bitcoin/blob/5757de4ddd37f9321ee6b338b40888fd3561fc00/ci/test/01_base_install.sh#L53 , ...) is there a reason why it passes? |
std::is_standard_layout_v
(used inutil/no_destructor.h
is not available until C++-17. This breaks building with some compilers.Tested with clang 1f1c725b68b9d72b5cd3fc95c57ce4244bc85c8e (llvm/llvm-project@1f1c725)
google#1246
https://en.cppreference.com/w/cpp/types/is_standard_layout.html
I ran into this when trying to build with a master
clang
to test #54.