fix build for old compilers (#1323)#1324
Merged
serge-sans-paille merged 1 commit intoxtensor-stack:masterfrom Apr 26, 2026
Merged
fix build for old compilers (#1323)#1324serge-sans-paille merged 1 commit intoxtensor-stack:masterfrom
serge-sans-paille merged 1 commit intoxtensor-stack:masterfrom
Conversation
Signed-off-by: Liu Zixian <zixian.liu@dolphindb.com>
|
|
||
| #include <version> | ||
|
|
||
| #if __cpp_lib_bitops >= 201907L |
Contributor
There was a problem hiding this comment.
Does this check and the include of '' still makes sense then?
Member
There was a problem hiding this comment.
I guess it is for compilers that were late to implement some features of the standard?
Contributor
Author
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
ok, let's live with it for a while then.
Contributor
|
Thanks. It's quite strange that our CI didn't catch it though. |
Contributor
Author
|
The CI failure looks unrelated to this PR, try to fix it with #1327 |
9ce5347
into
xtensor-stack:master
72 of 75 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
version header and std::countl_one are introduced in C++20