facebook / facebook/folly

Inclusion of `<concepts>` without a header availability check

Open
#2,340 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
30.5k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Description

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

https://github.com/facebook/folly/blob/33f5b67fcaeb8705b04fd1b850873a180dc89aaa/CMakeLists.txt#L76-L80
https://github.com/facebook/folly/blob/33f5b67fcaeb8705b04fd1b850873a180dc89aaa/folly/algorithm/simd/detail/Traits.h#L24
https://github.com/facebook/folly/blob/33f5b67fcaeb8705b04fd1b850873a180dc89aaa/folly/algorithm/simd/FindFixed.h#L22

In other places this seems to be included if the header is available:
https://github.com/facebook/folly/blob/33f5b67fcaeb8705b04fd1b850873a180dc89aaa/folly/container/detail/F14Table.h#L53-L55

This breaks the build in environments where the `` header isn't available.

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.