-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use C++20 for programs that generate the HTML lists #445
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:
|
Use ubuntu-24.04 and g++-14 for GitHub workflows.
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.
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. |
This currently also includes the unmerged commit from #444, because it modifies a line of code added by that commit. That should disappear from this PR once the other PR is merged.
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.