-
-
Notifications
You must be signed in to change notification settings - Fork 394
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
Constexpr CRC for C++23 #907
base: pull-request/#907-Constexpr-CRC-for-C++23
Are you sure you want to change the base?
Constexpr CRC for C++23 #907
Conversation
Review changes with SemanticDiff. |
Sorry for bundling it like this, the PR was written in several hours of sleep-deprivation-fueled-mania. I can split the C++23 support later on. I can also tell already that the check for C++23 will probably need to be refined in the future. |
That last push should fix the C++11 builds (my fault for using Right now I have absolutely no clue though what's going on in those C++23 test on clang. The include stack would point to something in UnitTest++?
|
It looks like the clang checks are failing at the point where clang is being upgraded to version 17. |
Sorry about the multiple pushes, hopefully it's not much of an issue. I don't have a Ubuntu system on hand, but removing the installation and changing the builds to clang/clang++ 18 should work, hopefully |
In light of #912 , I marked this PR as a draft. My current plan is:
|
This ended up a bit bigger than I originally intended, but all the tests pass.
What's added:
ETL_CONSTEXPR23
, CI runs for C++23constexpr
for C++23 buildsC++23
Since my feature requires C++23, I added basic support for it, including:
ETL_CONSTEXPR23
std::aligned_storage
deprecationConstexpr CRC
I wanted to created some binary headers for use with a bootloader, and for those headers to be guarded with CRC. Since I'm using ETL's implementation, I updated the library to actually allow using CRCs in a constant evaluated context.
The requirement for C++23 comes from
P2647R1
, which permits puttingconstexpr
onetl::crc_table::add()
. The limitation being thestatic
part of the actual table. This could probably be relaxed, but I don't exactly see how at the moment, not with support for C++98 or C++03.