-
Notifications
You must be signed in to change notification settings - Fork 28
Use C++20 for programs that generate the HTML lists #445
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
e841fea
to
26cc0b0
Compare
And the And the GCC version in |
560b76a
to
7872e53
Compare
|
||
auto parse_date(std::istream & temp) -> gregorian::date { | ||
auto parse_date(std::istream & temp) -> std::chrono::year_month_day { | ||
#if __cpp_lib_chrono >= 201803L |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chrono::parse
requires GCC 14, but there's a workaround.
else { | ||
auto mtime = fs::last_write_time(filename); | ||
#if __cpp_lib_chrono >= 201803L | ||
t = clock_cast<system_clock>(mtime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chrono::clock_cast
isn't supported by libc++, but there's a workaround.
There are several places in the code that should be converted to use |
f917514
to
a80f36e
Compare
e.g.
But I'm not sure if would actually be faster/simpler/better to insert into a |
Maybe for C++23 one day, just because everything above can be replaced by:
|
0cc9ced
to
9d18565
Compare
Some weeks ago I considered a similar change locally (Only switching to C++20 without anything else) to see how mingw can handle these changes. I now tested your branch successfully on my system and it seems to work well. I appreciate this course of action. |
32009ec
to
ba0702c
Compare
3264395
to
ff3d6b1
Compare
I've rebased this PR. It would be nice if the github actions workflows didn't need to use |
Use g++-14 for GitHub workflows, as ubuntu-latest is ubuntu-24.04 which uses g++-13 by default.
Use workarounds for missing chrono::parse and chrono::clock_cast.
Instead of sorting several times in a row using different orderings, we can define a single projection that defines the desired final order.
As of version 19.1.0, Clang's libc++ doesn't provide
chrono::clock_cast
orchrono::parse
so maybe it's too soon to make this change.