Skip to content

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

Open
wants to merge 1 commit into
base: bitcoin-fork
Choose a base branch
from

Conversation

davidgumberg
Copy link

@davidgumberg davidgumberg commented May 28, 2025

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 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.

`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 1f1c725b68b9d72b5cd3fc95c57ce4244bc85c8e (llvm/llvm-project@1f1c725)

google#1246
https://en.cppreference.com/w/cpp/types/is_standard_layout.html
@fanquake
Copy link
Member

If we are going to change this, I think you should just change it to C++20.

@l0rinc
Copy link

l0rinc commented May 29, 2025

An alternative would be cherry-picking google#1251

@fanquake
Copy link
Member

We aren't trying to retain C++11 compatibility?

@fanquake
Copy link
Member

You could also update the CMake minimum required to 3.22 (just matching the Core minimum required).

@maflcko
Copy link

maflcko commented Jun 2, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants