Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/xsimd/arch/common/xsimd_common_bit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef XSIMD_BIT_HPP
#define XSIMD_BIT_HPP

#if __cplusplus > 202002L

#include <version>

#if __cpp_lib_bitops >= 201907L
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this check and the include of '' still makes sense then?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it is for compilers that were late to implement some features of the standard?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense when someone uses a compiler that does not fully support C++20.

Looks like clang(libcxx) implemented version header (P0754R2) in clang 7 and bit operations (P0553R4) in clang 9.

Reference: https://libcxx.llvm.org/Status/Cxx20.html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let's live with it for a while then.

Expand All @@ -23,6 +25,8 @@ namespace xsimd
}
}

#endif

#else

#include <climits>
Expand Down
Loading