Skip to content
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

Inclusion of <concepts> without a header availability check #2340

Open
tareqsiraj opened this issue Nov 18, 2024 · 0 comments
Open

Inclusion of <concepts> without a header availability check #2340

tareqsiraj opened this issue Nov 18, 2024 · 0 comments

Comments

@tareqsiraj
Copy link

There are inclusions of the <concept> header (C++20) in the codebase where the default C++ standard in the CMake side is C++17.

folly/CMakeLists.txt

Lines 76 to 80 in 33f5b67

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
message(STATUS "setting C++ standard to C++${CMAKE_CXX_STANDARD}")
endif()

#include <concepts>

#include <concepts>

In other places this seems to be included if the header is available:

#if __has_include(<concepts>)
#include <concepts>
#endif

This breaks the build in environments where the <concepts> header isn't available.

https://en.cppreference.com/w/cpp/header/concepts

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

No branches or pull requests

1 participant