-
Notifications
You must be signed in to change notification settings - Fork 272
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
Replace std::result_of with std::invoke_result #392
Conversation
Thanks. Before I merge this I need to creat a branch and release for “last release with C++14 support”. On your end, please update the CI configuration to work with your changes. Once the tests are working I’ll review this PR |
Any idea when this can be merged? |
Thanks for the reminder. I’ve planned to create the release w/tagging and review and this this PR this ongoing week |
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.
Kick ass change. Just one tiny file removal and it should be good to go (pending my testing)
.vscode/settings.json
Outdated
@@ -0,0 +1,7 @@ | |||
{ |
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.
please remove this file
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.
Done!
C++17 deprecates
std::result_of<T>
and C++20 completely removes it from the spec in favor ofstd::invoke_result<T>
, preventing compilation of g3log if using C++20-level features.This is the simplest fix which merely replaces all instances of the former with the latter, but it will break compilation on C++14 or older. It would also be possible to make an alias of these templates and use macro compile flags to preserve compatibility with C++14, but I wasn't sure if that would be necessary.
I also took the liberty to use the
*_t
declarations which are much less verbose.